diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-01-14 17:27:14 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-01-14 17:27:14 +0000 |
commit | efd9b848ca6aecfd28fead1ac2633e5b2ad07852 (patch) | |
tree | a9823f85585fe0f554ee578d43d94da25e7829e7 /usr.sbin/cron/crontab.c | |
parent | 6e89f82be3f9d251589ab0c392b34b9cb77e015f (diff) |
Remove compatibility defines for ancient systems. We assume a
reasonable level of POSIX compliance.
Diffstat (limited to 'usr.sbin/cron/crontab.c')
-rw-r--r-- | usr.sbin/cron/crontab.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index 963b9657124..9f069ce135e 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crontab.c,v 1.65 2014/11/26 18:34:52 millert Exp $ */ +/* $OpenBSD: crontab.c,v 1.66 2015/01/14 17:27:13 millert Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -143,7 +143,7 @@ parse_args(int argc, char *argv[]) { break; #endif case 'u': - if (MY_UID(pw) != ROOT_UID) { + if (getuid() != ROOT_UID) { fprintf(stderr, "must be privileged to use -u\n"); exit(EXIT_FAILURE); @@ -553,21 +553,12 @@ replace_cmd(void) { goto done; } -#ifdef HAVE_FCHOWN if (fchown(fileno(tmp), pw->pw_uid, -1) < OK) { perror("fchown"); fclose(tmp); error = -2; goto done; } -#else - if (chown(TempFilename, pw->pw_uid, -1) < OK) { - perror("chown"); - fclose(tmp); - error = -2; - goto done; - } -#endif if (fclose(tmp) == EOF) { perror("fclose"); |