diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-14 18:05:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-14 18:05:40 +0000 |
commit | 08bdd093b4355d9008dac6b5cec89d39b2d71b79 (patch) | |
tree | 4a82520cc19050b278817d22b754a496d7334c8f /usr.bin/at/perm.c | |
parent | 146815f3a476f9cc068bef652174b4c1c22a2aa4 (diff) |
Major changes:
Job names are now "runtime.queue" where runtime is when the job will run
in Unix time format. This is what SysV at does and allows us to nuke
the .SEQ file.
Historic BSD options for atq and atrm are now implemented;
atq and atrm get their own man pages.
At no longer does anything with the -v flag. We print the execution
time when jobs are submitted so there is no need.
Most *scanf() usage is gone (one remains in atrun).
Better sanity checks in atrun.
Random style/cleanup.
With these changes we have the best of both worlds; POSIX compliance with
the traditional BSD features.
Diffstat (limited to 'usr.bin/at/perm.c')
-rw-r--r-- | usr.bin/at/perm.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/at/perm.c b/usr.bin/at/perm.c index 38031ed7b76..6ff4eabfe5a 100644 --- a/usr.bin/at/perm.c +++ b/usr.bin/at/perm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: perm.c,v 1.3 2002/05/11 23:16:44 millert Exp $ */ +/* $OpenBSD: perm.c,v 1.4 2002/05/14 18:05:39 millert Exp $ */ /* * perm.c - check user permission for at(1) @@ -25,8 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* System Headers */ - #include <sys/types.h> #include <errno.h> #include <pwd.h> @@ -36,24 +34,17 @@ #include <string.h> #include <unistd.h> -/* Local headers */ - #include "at.h" #include "panic.h" #include "pathnames.h" #include "privs.h" -/* File scope variables */ - #ifndef lint -static const char rcsid[] = "$OpenBSD: perm.c,v 1.3 2002/05/11 23:16:44 millert Exp $"; +static const char rcsid[] = "$OpenBSD: perm.c,v 1.4 2002/05/14 18:05:39 millert Exp $"; #endif -/* Function declarations */ - static int check_for_user(FILE *, const char *); -/* Local functions */ static int check_for_user(FILE *fp, const char *name) @@ -78,8 +69,6 @@ check_for_user(FILE *fp, const char *name) } -/* Global functions */ - int check_permission(void) { @@ -91,7 +80,7 @@ check_permission(void) return 1; if ((pentry = getpwuid(uid)) == NULL) { - perror("Cannot access user database"); + perror("Cannot access password database"); exit(EXIT_FAILURE); } |