summaryrefslogtreecommitdiffstats
path: root/usr.bin/at (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When specifying the time in the form HHMM or HH:MM, if that timenaddy2019-02-161-2/+3
| | | | | | | is already past, the next day is assumed. Handle the case where we're still in the same hour but the minutes are past. ok deraadt@ millert@
* improve markup quality in the cases found by the new "--" style messageschwarze2018-03-161-3/+3
|
* Sync list of non-exported environment variables with at.c.millert2018-01-311-3/+11
|
* Finer grained pledge for at(1). After setegid(), do a three-way pledge:tb2017-06-151-2/+19
| | | | | | | | | For AT and BATCH: "stdio rpath wpath cpath fattr getpw unix" For ATRM: "stdio rpath cpath getpw unix" For ATQ and CAT: "stdio rpath getpw" "unix" is needed for poke_daemon() and "fattr" to chmod +x spoolfile. idea and ok millert
* In cron(8), require that crontab and at files in the spool be ownedmillert2017-06-071-5/+2
| | | | | | | | | | | | | | | by group crontab. The at(1) command now creates files owned by group crontab, the crontab(1) command already does this. Files in the crontab spool with parse errors are now ignored; crontab(1) will not install a crontab file with parse errors. The system crontab file (/etc/crontab) is not affected by this. The required permissions on crontab files have been tightened. Files in the cron spool must be mode 0600 (as created by crontab(1)). The system crontab file may be readable/writable by the owner, readable by group and readable by other. The system crontab must be readable by the owner.
* Use recallocarray for growth of the jobs, just because it is a littlederaadt2017-03-181-2/+3
| | | | beefier than pointers.
* Delete setlocale(LC_TIME, "").schwarze2016-10-311-8/+5
| | | | | | | | | | | The only place where this could potentially get used was the strftime(3) for fprintf(3) "job %s at %s\n" to stderr. We don't want base system utilities to talk to users in foreign languages. No functional change on OpenBSD which doesn't provide any non-standard LC_TIME locale anyway. Patch from Jan Stary <hans at stare dot cz>. In main(), exit -> return while here. OK millert@
* for some time now mandoc has not required MLINKS to functionjmc2016-03-301-2/+1
| | | | | | | | | | | | correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
* Make "at -l" comply with POSIX. Our "at -l" currently acts likemillert2015-11-162-33/+52
| | | | | | | | the historic BSD atq which takes a list of users instead of a list of jobs. We now accept either a user or a job number for "at -l". The "at -l user" syntax is still accepted but no longer documented. This is similar to how we handle differences in "at -r" vs. atrm. OK deraadt@ jmc@
* Use crontab-style syslog calls in at.millert2015-11-131-19/+29
| | | | Remove check_permission and just call allowed() directly.
* There's no need for at.c globals to be extern.millert2015-11-132-21/+12
|
* Use absolute paths in pathnames.h. There is no longer a need tomillert2015-11-122-18/+31
| | | | | | | | chdir(2) to the cron dir and cron(8) now changes to / via daemon(3). We no longer try to create/chmod the spool directories as they should be set correctly at install time. The setegid(crontab) has been moved to open_socket() so it is closer to the chmod(2) call that needs it. OK deraadt@ tedu@
* at already uses O_EXCL when creating files so there's no need tomillert2015-11-111-47/+8
| | | | lock the spool dir. OK jca@
* Use warn/warnx here too.millert2015-11-111-12/+10
|
* Remove bogus DST code. mktime() handles DST automatically whenmillert2015-11-111-5/+1
| | | | tm_isdst is set to -1.
* Use warn/warnx where sensible and add fatal/fatalx wrappers formillert2015-11-111-84/+67
| | | | err/errx that unlink atfile as needed. OK deraadt@
* Use fstatat(), openat() and unlinkat() when operating on files inmillert2015-11-111-28/+21
| | | | the at queue so we don't need to chdir to the queue dir. OK guenther@
* Rename AT_DIR -> AT_SPOOL and SPOOL_DIR -> CRON_SPOOL to improvemillert2015-11-091-17/+17
| | | | readability.
* Use __progname instead of the homegrown ProgramName.millert2015-11-062-24/+17
|
* Change cron from including all headers in every file to only includingmillert2015-11-041-3/+25
| | | | | what each .c file needs. I have not removed cron.h since it will be used in a future clean up of the cron's .h files. OK nicm@
* It is only necessary to swap the effective gid when reading a file.millert2015-11-032-201/+25
| | | | | | An attacker exploiting an overflow can change the egid themselves so running with the egid of the user in other places just gives you a false sense of security. OK nicm@ deraadt@
* Split client-only (at, crontab) functions out of misc.c and intomillert2015-10-311-2/+2
| | | | | client.c. Move truly common functions into common.c. This avoids dead code in the at and crontab commands.
* pledgederaadt2015-10-281-1/+5
| | | | ok millert
* The .Nd macro is intended to provide "a one line description", so avoidschwarze2015-09-092-9/+6
| | | | | | | | | multiple lines of input, in particular, don't use macros below .Nd; such bad style can confuse various apropos(1) tools. All deleted macros reappear later in the text, anyway, except for .Tn, which i'm deleting outright. Found while scanning the tree for good and bad practices in preparation for my EuroBSD2015 mdoc(7) tutorial on Oct 1 in Stockholm.
* Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopederaadt2015-08-202-5/+5
| | | | ok krw millert
* Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@millert2015-03-171-4/+4
|
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-2/+1
| | | | | | | | | What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
* don't need to define debugging 0 anymoretedu2015-01-231-2/+2
|
* userland reallocarray audit.doug2014-10-081-2/+2
| | | | | | | Replace malloc() and realloc() calls that may have integer overflow in the multiplication of the arguments with reallocarray(). ok deraadt@
* When setting environment variables in the atrun script, use themillert2014-09-291-3/+2
| | | | | | | | "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. OK miod@
* no need to discuss sendmail (or any particular mailer) here;jmc2014-09-161-7/+4
| | | | while here, \*(Gt -> >, per ingo;
* as suggested by schwarze, reshuffle STANDARDS text detailing posix featuresjmc2014-03-171-12/+11
| | | | | | | we don;t support next to the posix compat blurb, in order to make things a bit clearer; this also makes the text more concise; ok millert schwarze sobrado
* macro cleanup, mostly to use .Cm for fixed stringsschwarze2014-02-151-21/+20
| | | | | to be passed as command line arguments; from Jan Stary <hans at stare dot cz>, tweaked by me
* STANDARDS: at.allow/deny is xsi (same as cron);jmc2014-01-301-2/+8
|
* Add the "next" keyword as an alias for "+ 1" for relative times.millert2014-01-132-27/+58
| | | | | Also support "months" and "years" keywords when specified as relative time units. All as per POSIX. Man page changes OK jmc@ sobrado@
* flesh out some details in STANDARDS regarding timespec;jmc2014-01-091-2/+17
| | | | ok sobrado millert
* variety of unsigned char casts (or conversions) for ctypederaadt2013-11-252-14/+17
| | | | ok krw
* use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze2013-07-161-4/+4
|
* Adapt cron and at for future large time_t and tv_sec types. These were somederaadt2013-04-171-17/+15
| | | | | of the harder programs to adapt, so let me know if problems happen. tested by guenther, gilles, chl, others
* have the -t argument name in the options list match that of SYNOPSIS;jmc2011-09-041-3/+3
| | | | ok millert
* have the timespec arguments match in case those of time_arg;jmc2011-08-311-7/+7
|
* Copy description of the -t option and its argument with revised textguenther2011-08-311-30/+28
| | | | from the touch(1) manpage after much discussion with jmc@ and miller@
* Same fix as 'touch': with the -t option, when the year is specifiedguenther2011-08-301-4/+5
| | | | | | | but the century isn't, the century is 1900 if year >= 69; otherwise it's 2000. (With 32bit time_t, this does't affect any working usage.) ok millert@
* Use standard EXIT_SUCCESS/EXIT_FAILURE and STD{IN,OUT,ERR}_FILENOmillert2011-08-231-11/+11
| | | | defines instead of using custom macros. Missed in last commit.
* Add two missing lines that got missed when I did the initial at + cronmillert2011-03-201-2/+4
| | | | merge.
* Use dirfd() instead of peeking into struct dirent for dd_fd, which ismillert2011-03-031-2/+2
| | | | non-standard.
* add an EXIT STATUS section for /usr/bin;jmc2010-09-031-13/+13
|
* document exit values; from daniel dickmanjmc2010-07-211-2/+13
|
* 'wether' -> 'whether' typo in license text.krw2010-07-025-11/+11
| | | | ok deraadt@
* behaviour for the -l flag differs between this implementation and posix;jmc2009-12-071-2/+7
| | | | spotted by millert