summaryrefslogtreecommitdiffstats
path: root/usr.bin/rdist (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-286-21/+21
| | | | | | 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.
* mkstemp() returns -1 on failurederaadt2019-06-281-2/+2
|
* Use password/group cache functions and avoid stashing a pointer tomillert2018-09-213-44/+35
| | | | | | | | 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@
* Fix a crash in rdistd triggered by the recent getpw{ent,nam,uid}millert2018-09-093-12/+15
| | | | | | | | | | | 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@
* Use <elf.h> instead of <elf_abi.h>mpi2017-10-271-2/+2
| | | | ok jasper@, jca@, deraadt@
* remove the remaining references to .depend files since nothing creates themnaddy2017-10-171-3/+1
| | | | any longer; ok espie@ deraadt@
* Avoid clang warning by explicitly marking a constant unsigned; ok millert@otto2017-08-301-2/+2
|
* have bsd.prog.mk/bsd.lib.mk generate .y -> .c/.h rules without intermediateespie2017-07-094-8/+7
| | | | | | | files. This fixes up parallel builds in the default case. FreeBSD does something similar. okay millert@
* Hyphenate compound adjectives 'up-to-date', 'out-of-date' and 'well-known'tb2017-01-011-3/+3
| | | | | | if they precede the noun and omit hyphens otherwise. ok tj
* Avoid compiler warning about zero-length printf format strings.millert2016-03-301-5/+7
| | | | | | 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@
* In setnonblocking() rename "mode" variable to "flags".millert2016-03-301-6/+6
|
* remove extra word; from edgar pettijohnjmc2016-02-251-3/+3
|
* remove needless allocation castsmmcc2015-12-222-4/+4
|
* Remove NULL-checks before free(). ok tb@mmcc2015-12-091-7/+4
|
* change Xrs from now-defunct db(3) to dbopen(3); this wasn;t ajmc2015-11-301-3/+3
| | | | | | | 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;
* use file system path (.Pa) semantic markup macros where appropriate.sobrado2015-07-271-5/+5
| | | | ok jmc@
* in getopt() blocks, stop incrementing flag variable which are supposedderaadt2015-02-081-3/+3
| | | | | to just be 0/1 ok miod florian
* Assume NFS_CHECK and RO_CHECK are defined.guenther2015-01-211-17/+1
| | | | | We only need the dev_t and not the entire struct stat in mntinfo. Delete some superfluous casts.
* Reduce opt_t from long to int.guenther2015-01-212-21/+20
| | | | Debug message consistency: format opts with %#x and modes with %#04o
* Remove unsafe micro-optimization of *bit test*guenther2015-01-211-2/+2
|
* Split out from rdist/defs.h the client-only and server-only bits intoguenther2015-01-2014-345/+325
| | | | | | | | | 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
* We all have syslog() now; assume LOG_PID and LOG_DAEMONguenther2015-01-202-21/+3
|
* Move MF_* to message.c tooguenther2015-01-202-10/+10
|
* Move struct distoptinfo into distopt.c, killing the DISTOPTINFO typedefguenther2015-01-204-62/+48
| | | | | | Move struct msgtype and msgfacility into message.c, killing the MSGTYPE and MSGFACILITY typedefs Make getdistopt() static to distopt.c
* Don't use utime(), so don't need <utime.h>guenther2015-01-201-4/+1
|
* SELECT_FD_TYPE is obsoleteguenther2015-01-202-11/+3
|
* Move #include <syslog.h> to the one file that needs itguenther2015-01-202-3/+3
|
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-164-19/+19
| | | | | | | | | 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)
* The statdb code has never been complete hereguenther2014-07-123-27/+3
|
* Kill never enabled #ifdefsguenther2014-07-121-21/+1
|
* config-def.h is now unnecessary; merge config-data.h into defs.hguenther2014-07-123-121/+7
|
* Kill os-openbsd.h: we have <paths.h>, _PATH_RSH, and utimes()guenther2014-07-126-92/+11
|
* SETARGS and NEED_HASMNTOPT paths are dead; rshrcmd() and libz stuff areguenther2014-07-122-20/+2
| | | | no longer (were never?) used
* Deleted unused local prototypes for systems stuffguenther2014-07-121-49/+1
|
* No really, assume POSIX: errno is declared for us and sys/stat.h hasguenther2014-07-121-15/+1
| | | | S_IX{USR,GRP,OTH}
* Delete unused globalguenther2014-07-121-2/+1
|
* Eliminate some annoying variable shadowingguenther2014-07-122-15/+15
|
* Yes, we have setproctitle(). Delete that and several unused HAVE_* #definesguenther2014-07-122-29/+2
|
* Unused variable from oldrdist cleanupguenther2014-07-121-2/+1
|
* delete all traces of oldrdist -Server command. ok beck guenthertedu2014-07-111-12/+2
|
* Missed a chunk of the previousguenther2014-07-101-2/+2
|
* fleanse out oldrdist supporttedu2014-07-104-48/+5
|
* Assume POSIX: write() takes size_t and returns ssize_tguenther2014-07-102-16/+6
|
* Assume we have getfsstat(); simplify the interface to the *mountent()guenther2014-07-052-58/+5
| | | | wrappers
* Assume BSD44: statfs()guenther2014-07-052-32/+2
|
* Our fork() never missesguenther2014-07-051-10/+1
|
* Assume POSIX: sigrocmask()guenther2014-07-052-16/+5
| | | | Properly use SIG_SIGMASK to restore previous mask
* Assume POSIX: lchown(), fchown(), fchmod(), fchmodat()guenther2014-07-054-86/+4
| | | | Assume we have rcmdsh()
* Assume POSIX: uid_t and gid_tguenther2014-07-054-31/+15
|
* Assume POSIX: <dirent.h>, struct direntguenther2014-07-056-38/+17
|