summaryrefslogtreecommitdiff
path: root/usr.bin/rdist
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-06-28mkstemp() returns -1 on failureTheo de Raadt
2018-09-21Use password/group cache functions and avoid stashing a pointer toTodd C. Miller
the return value of getgrgid(3) or getgrnam(3) which relies on undefined behavior. The rdist server will now use getgroups(2) to determine group membership of the invoking user. In addition, there is now one implementation of tilde expansion instead of two. OK tb@ tim@
2018-09-09Fix a crash in rdistd triggered by the recent getpw{ent,nam,uid}Todd C. Miller
changes. This stems from rdist stashing a pointer to the static area used by getpw{ent,nam,uid} and using it to avoid repeating passwd lookups when pw->pw_name matches the user to be looked up. This relied on undefined behavior, and with the recent passwd changes, is no longer possible as the old pointer will be invalidated. A better approach is to use the upcoming uid_from_user(3) functions. Found by and fix OK tim@
2017-10-27Use <elf.h> instead of <elf_abi.h>Martin Pieuchot
ok jasper@, jca@, deraadt@
2017-10-17remove the remaining references to .depend files since nothing creates themChristian Weisgerber
any longer; ok espie@ deraadt@
2017-08-30Avoid clang warning by explicitly marking a constant unsigned; ok millert@Otto Moerbeek
2017-07-09have bsd.prog.mk/bsd.lib.mk generate .y -> .c/.h rules without intermediateMarc Espie
files. This fixes up parallel builds in the default case. FreeBSD does something similar. okay millert@
2017-01-01Hyphenate compound adjectives 'up-to-date', 'out-of-date' and 'well-known'Theo Buehler
if they precede the noun and omit hyphens otherwise. ok tj
2016-03-30Avoid compiler warning about zero-length printf format strings.Todd C. Miller
Allow a NULL format in message() and switch the two calls to error() and message() with an empty format string to using NULL. OK deraadt@
2016-03-30In setnonblocking() rename "mode" variable to "flags".Todd C. Miller
2016-02-25remove extra word; from edgar pettijohnJason McIntyre
2015-12-22remove needless allocation castsmmcc
2015-12-09Remove NULL-checks before free(). ok tb@mmcc
2015-11-30change Xrs from now-defunct db(3) to dbopen(3); this wasn;t aJason McIntyre
straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts; i've snuck in an rcs id->openbsd id change in dev_mkdb too;
2015-07-27use file system path (.Pa) semantic markup macros where appropriate.Igor Sobrado
ok jmc@
2015-02-08in getopt() blocks, stop incrementing flag variable which are supposedTheo de Raadt
to just be 0/1 ok miod florian
2015-01-21Assume NFS_CHECK and RO_CHECK are defined.Philip Guenther
We only need the dev_t and not the entire struct stat in mntinfo. Delete some superfluous casts.
2015-01-21Reduce opt_t from long to int.Philip Guenther
Debug message consistency: format opts with %#x and modes with %#04o
2015-01-21Remove unsafe micro-optimization of *bit test*Philip Guenther
2015-01-20Split out from rdist/defs.h the client-only and server-only bits intoPhilip Guenther
rdist/client.h and rdistd/server.h Only put #includes in .h files that are necessary for the .h to be used; all other #includes go in the .c files Move all extern variable declarations to the .h files, renaming local variables to avoid shadowing Replace me_type member of mntent_t with an "is NFS?" flag bit
2015-01-20We all have syslog() now; assume LOG_PID and LOG_DAEMONPhilip Guenther
2015-01-20Move MF_* to message.c tooPhilip Guenther
2015-01-20Move struct distoptinfo into distopt.c, killing the DISTOPTINFO typedefPhilip Guenther
Move struct msgtype and msgfacility into message.c, killing the MSGTYPE and MSGFACILITY typedefs Make getdistopt() static to distopt.c
2015-01-20Don't use utime(), so don't need <utime.h>Philip Guenther
2015-01-20SELECT_FD_TYPE is obsoletePhilip Guenther
2015-01-20Move #include <syslog.h> to the one file that needs itPhilip Guenther
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-12The statdb code has never been complete herePhilip Guenther
2014-07-12Kill never enabled #ifdefsPhilip Guenther
2014-07-12config-def.h is now unnecessary; merge config-data.h into defs.hPhilip Guenther
2014-07-12Kill os-openbsd.h: we have <paths.h>, _PATH_RSH, and utimes()Philip Guenther
2014-07-12SETARGS and NEED_HASMNTOPT paths are dead; rshrcmd() and libz stuff arePhilip Guenther
no longer (were never?) used
2014-07-12Deleted unused local prototypes for systems stuffPhilip Guenther
2014-07-12No really, assume POSIX: errno is declared for us and sys/stat.h hasPhilip Guenther
S_IX{USR,GRP,OTH}
2014-07-12Delete unused globalPhilip Guenther
2014-07-12Eliminate some annoying variable shadowingPhilip Guenther
2014-07-12Yes, we have setproctitle(). Delete that and several unused HAVE_* #definesPhilip Guenther
2014-07-12Unused variable from oldrdist cleanupPhilip Guenther
2014-07-11delete all traces of oldrdist -Server command. ok beck guentherTed Unangst
2014-07-10Missed a chunk of the previousPhilip Guenther
2014-07-10fleanse out oldrdist supportTed Unangst
2014-07-10Assume POSIX: write() takes size_t and returns ssize_tPhilip Guenther
2014-07-05Assume we have getfsstat(); simplify the interface to the *mountent()Philip Guenther
wrappers
2014-07-05Assume BSD44: statfs()Philip Guenther
2014-07-05Our fork() never missesPhilip Guenther
2014-07-05Assume POSIX: sigrocmask()Philip Guenther
Properly use SIG_SIGMASK to restore previous mask
2014-07-05Assume POSIX: lchown(), fchown(), fchmod(), fchmodat()Philip Guenther
Assume we have rcmdsh()
2014-07-05Assume POSIX: uid_t and gid_tPhilip Guenther
2014-07-05Assume POSIX: <dirent.h>, struct direntPhilip Guenther