summaryrefslogtreecommitdiff
path: root/usr.sbin/identd
AgeCommit message (Collapse)Author
2015-08-20avoid ioctl FIONBIO by passing SOCK_NONBLOCK to the things we getDavid Gwynne
sockets out of. for guenther@
2015-08-20ignore SIGPIPE so we can handle the write(2) failures.David Gwynne
instead of exiting on an unknown write failure, close the client connection on EPIPE from write and warn and close the connection on any other failure. ok jmatthew@
2015-08-04consider the default failure handling for errors on socket operations toDavid Gwynne
close the socket rather than kill the program. tested for a few days on the student shell box at work. based on discussion with guenther@
2015-03-27f the parent builts up a list of replies for the child, it helpsDavid Gwynne
to readd the write event if there's still items on the list. this lets things that do a lot of requests in parallel (like npm) work betterer through a squid proxy using ident for auth. ok jmatthew@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-07-13Use errx() after getpwnam() failure since errno may not be set.Claudio Jeker
All other privsep / privdrop daemons do this the same way. OK florian@ some time ago
2014-07-08Cleanup of getopt argument: -p is not supported anymore.Tobias Stoeckmann
ok deraadt@, dlg@
2014-01-07the return from asprintf does NOT include the space used by theDavid Gwynne
terminating \0 character. if i want to use it as a c string i have to take that into account. found by simon kuhnle who supplied a good bug report. prodded by deraadt@
2013-11-21get bytes off the wire as unsigned char so we can pass them toDavid Gwynne
identd_parse() and then isspace()/isdigit() as appropriately promoted values. based on discussion with deraadt@ and guenther@
2013-11-12handle lack of prototypeTheo de Raadt
2013-10-24no need for netinet/ip_var.h (and friends)Theo de Raadt
2013-07-17implement -H, which hides existing and non-existent users, as well asOkan Demirmen
implying -h. feedback and ok from jmc@ and dlg@
2013-04-29add -h to usage();Jason McIntyre
2013-04-29implement -h from libexec/identd, which hides usernames/uids.David Gwynne
2013-04-23support src/libexec/identd's -e option in src/usr.sbin/identd, ok dlg@Stuart Henderson
2013-04-23sizeof(&foo) isnt as good as sizeof(foo).David Gwynne
found by sthen@
2013-04-23use stat to see if ~/.noident is there to avoid reimplementing a securityDavid Gwynne
issue from 1988 when using open. pointed out by deraadt@
2013-04-23i copied too much from the tftpd manpage. identd doesnt take a directoryDavid Gwynne
argument.
2013-04-23fix usage to reflect the currently accepted getopt things.David Gwynne
2013-04-23i forgot to add -n and -N to the synopsisDavid Gwynne
2013-04-23remove support for specifying which port you want to run on. there's noDavid Gwynne
point. well argued by deraadt@
2013-04-23add support for returning uids instead of usernames via -n, like libexecDavid Gwynne
identd.
2013-04-23add support for -N as per libexec/identd. this lets users putDavid Gwynne
.noident in their homedir to have this identd return HIDDEN-USER instead of their username.
2013-04-22handle ENOBUFS on the SEQPACKET socketpair between the child and the parentDavid Gwynne
procs. if this happens it would mean the parent has a backlog of work cos of slow username resolutions. in that situation the child should tell the client theres an error, but not die. this factors out a bit of code to handle generating errors for the client and closing the socket. reviewed by jmatthew@
2013-04-05kill redundant prototypeFlorian Obser
OK dlg@
2013-03-207 #include which are not neededTheo de Raadt
2013-03-20a tiny bit of knf; mostly whitespaceTheo de Raadt
2013-03-19dont need to event_add the parent to child writing events twice. especiallyDavid Gwynne
if something stops you from having something to write after the first event_add but before the second one. thank you to Henri Kemppainen for the find.
2013-03-18make the arg name for -t consistent, and add STANDARDS;Jason McIntyre
2013-03-18jmc pointed out i didnt replace the placeholders with the year and my name.David Gwynne
2013-03-18whitespace fixes. no functional changeDavid Gwynne
2013-03-18limit the client to 256 bytes of input. if they send too much we just closeDavid Gwynne
the connection. requested by deraadt@
2013-03-18switch from having a timeout after every read/write for the clientDavid Gwynne
connection to a timeout for the whole session. means a client cant sit there feeding us a byte at a time for long periods, consuming fds on the server. it seems to simplify the code a bit too. requested by deraadt@
2013-03-18handle EMFILE/ENFILE from accept by disabling handling of events on theDavid Gwynne
listeners for a second. modelled on how this has been solved in other network daemons.
2013-03-18this is a new identd daemon to replace the libexec one that can be runDavid Gwynne
from inetd. it is an event driven non-blocking implemention using libevent. it features support for privilege separation and revocation. network connections are handled by a chrooted and unprivileged process, while the username lookups are handled by an unprivileged process. the lookups can block while the network handling can continue. it also features support for handling concurrent client connections. its currently lacking support for handling dotfiles in homedirs like the libexec one, and some error handling on accept. its going into the tree so it can be worked on with a history of changes.