OpenBSD CVS

CVS log for src/usr.bin/at/at.c


[BACK] Up to [local] / src / usr.bin / at

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.84 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:10 2023 UTC (14 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.83: +1 -2 lines
Diff to previous 1.83 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.83 / (download) - annotate - [select for diffs], Fri Nov 29 03:12:35 2019 UTC (4 years, 5 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

at(1): ctime comparison: subtraction is not comparison; ok millert@

Revision 1.82 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:00 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

When system calls indicate an error they return -1, not some arbitrary
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.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Jun 15 19:37:10 2017 UTC (6 years, 11 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.80: +19 -2 lines
Diff to previous 1.80 (colored)

Finer grained pledge for at(1).  After setegid(), do a three-way pledge:
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

Revision 1.80 / (download) - annotate - [select for diffs], Wed Jun 7 23:36:43 2017 UTC (6 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.79: +2 -5 lines
Diff to previous 1.79 (colored)

In cron(8), require that crontab and at files in the spool be owned
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.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Mar 18 02:58:54 2017 UTC (7 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.78: +3 -2 lines
Diff to previous 1.78 (colored)

Use recallocarray for growth of the jobs, just because it is a little
beefier than pointers.

Revision 1.78 / (download) - annotate - [select for diffs], Mon Oct 31 17:22:07 2016 UTC (7 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.77: +5 -8 lines
Diff to previous 1.77 (colored)

Delete setlocale(LC_TIME, "").
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@

Revision 1.77 / (download) - annotate - [select for diffs], Mon Nov 16 16:43:06 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.76: +45 -22 lines
Diff to previous 1.76 (colored)

Make "at -l" comply with POSIX.  Our "at -l" currently acts like
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@

Revision 1.76 / (download) - annotate - [select for diffs], Fri Nov 13 21:35:34 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.75: +28 -18 lines
Diff to previous 1.75 (colored)

Use crontab-style syslog calls in at.
Remove check_permission and just call allowed() directly.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Nov 13 21:34:06 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.74: +11 -11 lines
Diff to previous 1.74 (colored)

There's no need for at.c globals to be extern.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Nov 12 21:12:05 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.73: +29 -16 lines
Diff to previous 1.73 (colored)

Use absolute paths in pathnames.h.  There is no longer a need to
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@

Revision 1.73 / (download) - annotate - [select for diffs], Wed Nov 11 21:53:51 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.72: +8 -47 lines
Diff to previous 1.72 (colored)

at already uses O_EXCL when creating files so there's no need to
lock the spool dir.  OK jca@

Revision 1.72 / (download) - annotate - [select for diffs], Wed Nov 11 17:17:56 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.71: +67 -84 lines
Diff to previous 1.71 (colored)

Use warn/warnx where sensible and add fatal/fatalx wrappers for
err/errx that unlink atfile as needed.  OK deraadt@

Revision 1.71 / (download) - annotate - [select for diffs], Wed Nov 11 15:23:06 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.70: +21 -28 lines
Diff to previous 1.70 (colored)

Use fstatat(), openat() and unlinkat() when operating on files in
the at queue so we don't need to chdir to the queue dir.  OK guenther@

Revision 1.70 / (download) - annotate - [select for diffs], Mon Nov 9 15:57:39 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.69: +17 -17 lines
Diff to previous 1.69 (colored)

Rename AT_DIR -> AT_SPOOL and SPOOL_DIR -> CRON_SPOOL to improve
readability.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Nov 6 23:47:42 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.68: +9 -16 lines
Diff to previous 1.68 (colored)

Use __progname instead of the homegrown ProgramName.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 4 20:28:17 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.67: +25 -3 lines
Diff to previous 1.67 (colored)

Change cron from including all headers in every file to only including
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@

Revision 1.67 / (download) - annotate - [select for diffs], Tue Nov 3 16:28:43 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.66: +25 -70 lines
Diff to previous 1.66 (colored)

It is only necessary to swap the effective gid when reading a file.
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@

Revision 1.66 / (download) - annotate - [select for diffs], Wed Oct 28 20:17:31 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +5 -1 lines
Diff to previous 1.65 (colored)

pledge
ok millert

Revision 1.65 / (download) - annotate - [select for diffs], Thu Aug 20 22:32:41 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert

Revision 1.64 / (download) - annotate - [select for diffs], Wed Oct 8 03:56:52 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

userland reallocarray audit.

Replace malloc() and realloc() calls that may have integer overflow in the
multiplication of the arguments with reallocarray().

ok deraadt@

Revision 1.63 / (download) - annotate - [select for diffs], Mon Sep 29 18:44:49 2014 UTC (9 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.62: +2 -3 lines
Diff to previous 1.62 (colored)

When setting environment variables in the atrun script, use the
"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@

Revision 1.62 / (download) - annotate - [select for diffs], Mon Nov 25 18:02:50 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.61: +11 -8 lines
Diff to previous 1.61 (colored)

variety of unsigned char casts (or conversions) for ctype
ok krw

Revision 1.61 / (download) - annotate - [select for diffs], Wed Apr 17 15:58:42 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.60: +15 -17 lines
Diff to previous 1.60 (colored)

Adapt cron and at for future large time_t and tv_sec types.  These were some
of the harder programs to adapt, so let me know if problems happen.
tested by guenther, gilles, chl, others

Revision 1.60 / (download) - annotate - [select for diffs], Tue Aug 30 19:56:08 2011 UTC (12 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.59: +5 -4 lines
Diff to previous 1.59 (colored)

Same fix as 'touch': with the -t option, when the year is specified
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@

Revision 1.59 / (download) - annotate - [select for diffs], Tue Aug 23 15:06:37 2011 UTC (12 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.58: +11 -11 lines
Diff to previous 1.58 (colored)

Use standard EXIT_SUCCESS/EXIT_FAILURE and STD{IN,OUT,ERR}_FILENO
defines instead of using custom macros.  Missed in last commit.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Mar 3 15:06:43 2011 UTC (13 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Use dirfd() instead of peeking into struct dirent for dd_fd, which is
non-standard.

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jul 2 23:40:09 2010 UTC (13 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

'wether' -> 'whether' typo in license text.

ok deraadt@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:35 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.55: +1 -5 lines
Diff to previous 1.55 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.55 / (download) - annotate - [select for diffs], Mon Oct 5 20:47:19 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.54: +16 -9 lines
Diff to previous 1.54 (colored)

open the -f inputfile before letting lower-down functions call chdir()
and move us to where we cannot open it.  problem spotted by austin
ok millert

Revision 1.54 / (download) - annotate - [select for diffs], Wed Sep 5 08:02:21 2007 UTC (16 years, 8 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.53: +6 -5 lines
Diff to previous 1.53 (colored)

Change some variables to their proper type size_t.

ok millert@

Revision 1.53 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:31 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.52: +6 -6 lines
Diff to previous 1.52 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jun 18 11:20:58 2007 UTC (16 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Fix typo introduced in seconds parsing.  From Tim van der Molen.

Revision 1.51 / (download) - annotate - [select for diffs], Thu May 24 12:24:43 2007 UTC (17 years ago) by millert
Branch: MAIN
Changes since 1.50: +7 -6 lines
Diff to previous 1.50 (colored)

If century not specified used the current one instead of aassuming 2000.

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 23 22:34:03 2007 UTC (17 years ago) by millert
Branch: MAIN
Changes since 1.49: +1 -1 lines
Diff to previous 1.49 (colored)

Fix cut and pasto, seconds value is now stored in dot, not p.

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 23 22:30:53 2007 UTC (17 years ago) by millert
Branch: MAIN
Changes since 1.48: +5 -3 lines
Diff to previous 1.48 (colored)

Set tm_sec to 0 if no seconds were specified by the timespec (-t) arg.

Revision 1.48 / (download) - annotate - [select for diffs], Wed May 23 19:50:28 2007 UTC (17 years ago) by millert
Branch: MAIN
Changes since 1.47: +48 -38 lines
Diff to previous 1.47 (colored)

Sanity check the time argument specified by the -t argument.  Some
checks adapted from date(1).  Now prevents scheduling jobs in the
past just like the standard (ie: not -n) at(1) date parsing.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Mar 26 13:55:42 2007 UTC (17 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored)

indicate that -l takes an optional argument;
whilst here, clean up the -cr descriptions, add some refs to
SEE ALSO, and merge the first two synopses into one

based on a diff from J.C. Roberts
help/ok millert

Revision 1.46 / (download) - annotate - [select for diffs], Wed Apr 26 03:01:48 2006 UTC (18 years ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.45: +8 -7 lines
Diff to previous 1.45 (colored)

Cleanup, remove an unused var, use an int to store argc instead of a char,
makes lint a bit happier. OK deraadt

Revision 1.45 / (download) - annotate - [select for diffs], Wed Mar 22 21:51:39 2006 UTC (18 years, 2 months ago) by robert
Branch: MAIN
Changes since 1.44: +6 -2 lines
Diff to previous 1.44 (colored)

plug an fd leak and closedir() two directories;

ok otto@

Revision 1.44 / (download) - annotate - [select for diffs], Tue Oct 25 15:49:38 2005 UTC (18 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

dont' -> don't in comments;
from ray lai;

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jun 23 14:39:35 2005 UTC (18 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.42: +6 -8 lines
Diff to previous 1.42 (colored)

- at(1) synopsis: -r expects a `job' arg, not a timespec
- remove description of -v: it is only for use with atq(1), and is
correctly documented there
- sync usage()
- correctly format synopis for atrm(1)

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jun 17 22:09:11 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.41: +13 -12 lines
Diff to previous 1.41 (colored)

Remove trailing whitespace and, for printf, uid/gid are unsigned

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jun 3 19:19:07 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.40: +7 -4 lines
Diff to previous 1.40 (colored)

Verify that argc > 0 before trying to use argv and mark usage as __dead.
from Dmitry V. Levin

Revision 1.40 / (download) - annotate - [select for diffs], Fri Sep 26 21:26:40 2003 UTC (20 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.39: +8 -6 lines
Diff to previous 1.39 (colored)

better realloc.  ok deraadt@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jul 23 16:53:33 2003 UTC (20 years, 10 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

Add '\n' to error messages in "atrm" mode.

millert@ ok

Revision 1.38 / (download) - annotate - [select for diffs], Sun May 4 21:06:30 2003 UTC (21 years ago) by avsm
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

the buffer to getcwd(3) should be PATH_MAX in size, not MAX_FNAME
to avoid unnecessary truncation
millert@ ok

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Tue Mar 18 04:06:47 2003 UTC (21 years, 2 months ago) by margarida
Branch: OPENBSD_3_2
Changes since 1.30: +12 -7 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Pull patches from current:
Fixes by millert and mpech.

o Add missing increment in newjob() when there is a time collision.
o Fix 'at -r' crash. While loop in process_job() jobs[i] will
  contain NULL. Skip mess.
o Add missing  #include <limits.h>
o Stash uid and mode in struct at so we don't need to pass around a
  struct statbuf *.  Fixes a bug where atq reports all jobs as being
  owned by the owner of the last job in the queue.

millert@ ok

Revision 1.37 / (download) - annotate - [select for diffs], Thu Mar 13 21:28:30 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.36: +8 -6 lines
Diff to previous 1.36 (colored)

Stash uid and mode in struct at so we don't need to pass around a
struct statbuf *.  Fixes a bug where atq reports all jobs as being
owned by the owner of the last job in the queue.  This is fallout
from when I added sorting as per the historic BSD atq.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 3 18:23:13 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.35: +4 -3 lines
Diff to previous 1.35 (colored)

Add back fix from 1.32 that was lost in latest sync

Revision 1.35 / (download) - annotate - [select for diffs], Thu Feb 20 20:38:08 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.34: +212 -153 lines
Diff to previous 1.34 (colored)

Sync with ISC cron-current + my at(1) integration.
The at(1) code is now more tightly integrated into the cron codebase.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Feb 18 02:25:39 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Use the SUN_LEN macro to set sun_len correctly

Revision 1.33 / (download) - annotate - [select for diffs], Mon Feb 17 21:47:19 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

Missing #include <limits.h>

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jan 2 15:48:40 2003 UTC (21 years, 4 months ago) by mpech
Branch: MAIN
Changes since 1.31: +4 -3 lines
Diff to previous 1.31 (colored)

Fix 'at -r' crash.
While loop in process_job() jobs[i] will contain NULL.
Skip mess.

millert@ ok

Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 20 19:57:19 2002 UTC (21 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored)

Add missing increment in newjob() when there is a time collision.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jul 15 19:13:29 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE
Branch point for: OPENBSD_3_2
Changes since 1.29: +56 -6 lines
Diff to previous 1.29 (colored)

Move atrun(8) functionality into cron(8) proper.  This fixes the
long-standing annoyance that atrun's granularity is 10 minutes.
Most at jobs run with a 1 minute granularity.  Jobs submitted via
"at now" or "batch" will run immediately.  Includes a rewritten
cron(8) man page.  at(1) will be integrated more closely into
cron at a future date.

Upgrading notes:
    the atrun job in root's crontab should be removed.
    the /var/at/spool directory is no longer used

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 14 18:05:39 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.28: +386 -226 lines
Diff to previous 1.28 (colored)

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.

Revision 1.28 / (download) - annotate - [select for diffs], Mon May 13 18:43:53 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.27: +45 -14 lines
Diff to previous 1.27 (colored)

Execute job with user's shell, not /bin/sh as per POSIX and historic
BSD behavior.

Add some bash-specific and ssh agent variables to the no_export list.

Print the message after job submission the way POSIX wants.

When cat'ing or removing non-existent jobs, exit with an error if
the specified job does not exist.

Revision 1.27 / (download) - annotate - [select for diffs], Mon May 13 16:12:07 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.26: +4 -6 lines
Diff to previous 1.26 (colored)

Only print usage for the command that was run (at, atq, atrm, batch), not
all four.  Also differentiate between the touch(1) style time as time_arg
and the at(1) style time as timespec (which is what SUS3 does).
Instead of referring to the touch time format as POSIX time, reference
touch.  This is what SUS3 does and it is what users will know.

Revision 1.26 / (download) - annotate - [select for diffs], Sat May 11 23:16:44 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.25: +27 -36 lines
Diff to previous 1.25 (colored)

Pass -Wall and use ANSI function headers.

Revision 1.25 / (download) - annotate - [select for diffs], Sat May 11 23:02:33 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.24: +98 -30 lines
Diff to previous 1.24 (colored)

Add POSIX -r and -t flags from FreeBSD.  The old -d option is now
deprecated and no longer documented.
Also, use __progname instead of examining argv and clean up a few minor
warnings.

Revision 1.24 / (download) - annotate - [select for diffs], Sat May 11 21:56:54 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.23: +9 -17 lines
Diff to previous 1.23 (colored)

Kill -V (version) option since it has no relation to reality any more.

Revision 1.23 / (download) - annotate - [select for diffs], Sat May 11 21:37:13 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.22: +3 -4 lines
Diff to previous 1.22 (colored)

Use O_EXCL (not O_TRUNC) when creating new job file.  If there is a
pre-existing file with the same name this is indicative of a problem
with the sequence file and so it makes sense to treat it as an
error.

Revision 1.22 / (download) - annotate - [select for diffs], Sat May 11 18:41:20 2002 UTC (22 years ago) by millert
Branch: MAIN
Changes since 1.21: +27 -34 lines
Diff to previous 1.21 (colored)

at(1) is no longer setuid root, it is setgid crontab.
This means that /var/at/at.{allow,deny} must be readable by group
crontab, /var/at/jobs is mode 01770, and /var/at/.SEQ is mode 0660.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:44 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.20: +7 -7 lines
Diff to previous 1.20 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jan 17 19:29:06 2001 UTC (23 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.19: +14 -4 lines
Diff to previous 1.19 (colored)

remove stdio code from handler, and _exit() at termination

Revision 1.19 / (download) - annotate - [select for diffs], Sun Apr 23 16:32:07 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Fix thinko, check eqp for NULL, not ap; ath@algonet.se

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 21 04:22:54 2000 UTC (24 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.17: +7 -5 lines
Diff to previous 1.17 (colored)

Deal with getcwd() returning NULL.
Problem noted by Oleg Safiullin <form@vell.nsc.ru>

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 15 05:33:06 1999 UTC (24 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

does not overflow

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jul 9 20:40:58 1998 UTC (25 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.15: +12 -16 lines
Diff to previous 1.15 (colored)

user err/warn; some -Wall

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 3 16:20:26 1998 UTC (25 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

zero sigaction before use

Revision 1.14 / (download) - annotate - [select for diffs], Mon Oct 6 18:31:01 1997 UTC (26 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

bail if permission problem; ms@xy.org

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 17 20:48:04 1997 UTC (26 years, 11 months ago) by kstailey
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

(foo *)NULL -> NULL

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jun 12 16:57:44 1997 UTC (26 years, 11 months ago) by kstailey
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

The NULL macro yields a null pointer constant that is usable as an address
constant expression.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Mar 3 03:34:34 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.10: +3 -8 lines
Diff to previous 1.10 (colored)

cleanup

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 3 03:31:10 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.9: +8 -5 lines
Diff to previous 1.9 (colored)

Give usage message when atq used incorrectly.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Mar 3 00:30:02 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.8: +5 -2 lines
Diff to previous 1.8 (colored)

Complain if invoked in a form that requires an argument and we didn't
get one.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 2 19:59:15 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.7: +5 -7 lines
Diff to previous 1.7 (colored)

Fix up the XXX's I left (oops).

Revision 1.7 / (download) - annotate - [select for diffs], Sat Mar 1 23:40:09 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.6: +278 -113 lines
Diff to previous 1.6 (colored)

Merge in changes from at 2.9

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:12 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.5 / (download) - annotate - [select for diffs], Sat Oct 26 20:06:50 1996 UTC (27 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.4: +6 -6 lines
Diff to previous 1.4 (colored)

Fall back to $USER if getlogin() fails and $LOGNAME is not set.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 15 23:22:35 1996 UTC (27 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.3: +3 -6 lines
Diff to previous 1.3 (colored)

Make sprintf work for you, not the other way around.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Aug 3 20:16:52 1996 UTC (27 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +7 -10 lines
Diff to previous 1.2 (colored)

Was runing most of the code with real and effective uid of 0, contrary
to the comments.  Fixed that and made sure unlink of job file is done
as root so it can succeed.  Also will now detect empty input.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:31:27 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:44:54 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:44:54 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.