OpenBSD CVS

CVS log for src/usr.sbin/cron/popen.c


[BACK] Up to [local] / src / usr.sbin / cron

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:47 2019 UTC (4 years, 11 months ago) by deraadt
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, 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, OPENBSD_6_6_BASE, OPENBSD_6_6, HEAD
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Sun Nov 15 23:24:24 2015 UTC (8 years, 6 months ago) by millert
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, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.29: +7 -3 lines
Diff to previous 1.29 (colored)

Clean up the remaining uses of stderr and perror() and use warn/err
and/or syslog depending on whether stderr is hooked up at the time.
Also remove closelog() which is not needed since we are headed for exec.
OK guenther@

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 4 20:28:17 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.28: +18 -2 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Sun Oct 4 09:08:46 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.27: +2 -4 lines
Diff to previous 1.27 (colored)

remove stale comment. there is no need to avoid side effects from a "list"
command, because this is not the ftp daemon

Revision 1.27 / (download) - annotate - [select for diffs], Sat Oct 3 19:47:21 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.26: +8 -25 lines
Diff to previous 1.26 (colored)

There is no need to keep a global array of sysconf(_SC_OPEN_MAX) elements
just to keep track of a single pid. Return it to the caller and make it
their problem.
ok deraadt millert

Revision 1.26 / (download) - annotate - [select for diffs], Sat Oct 3 12:46:54 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.25: +1 -20 lines
Diff to previous 1.25 (colored)

unifdef some features we will always have. ok benno zhuk

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 23 19:07:27 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.24: +5 -3 lines
Diff to previous 1.24 (colored)

braces to open a function go on their own line like god intended

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 14 17:27:51 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Use HAVE_FOO for BSD-specific features instead of relying on the
BSD macro from sys/param.h.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 14 17:27:30 2015 UTC (9 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

Use standard types for wait, readdir, signals and pids.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Aug 22 19:32:42 2011 UTC (12 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.21: +7 -7 lines
Diff to previous 1.21 (colored)

Use standard EXIT_SUCCESS/EXIT_FAILURE and STD{IN,OUT,ERR}_FILENO
defines instead of using custom macros.  OK deraadt@ gilles@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:51 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.20: +1 -9 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Mon Apr 3 01:31:11 2006 UTC (18 years, 2 months ago) by djm
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, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.19: +3 -4 lines
Diff to previous 1.19 (colored)

some more malloc(x * y); bzero() -> calloc(x, y) whacking from
adobriyan AT gmail.com

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 2 04:39:45 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.18: +5 -6 lines
Diff to previous 1.18 (colored)

I'm a dork, I removed the 4th clause of the UCB license instead of
the 3rd one.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 20 20:38:08 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.17: +17 -9 lines
Diff to previous 1.17 (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.17 / (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, OPENBSD_3_2
Changes since 1.16: +13 -18 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Tue Jul 9 00:24:50 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.15: +2 -3 lines
Diff to previous 1.15 (colored)

We already did a closelog(); no need for it here.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jul 8 18:11:02 2002 UTC (21 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.14: +14 -59 lines
Diff to previous 1.14 (colored)

Merge in some changes from Paul Vixie's tree; most are cosmetic
o ANSI function headers
o return (foo) not return foo
o add -oi to sendmail flags
o update email address in man pages
o make some strings const
o completely remove globbing cruft from popen.c
o whitespace changes
o add DOW_STAR to flags for "monthly", "weekly", and "daily" cron entries

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 23 03:07:19 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

uid_t and gid_t are unsigned

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 9 00:51:00 2002 UTC (22 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Kill volatile now that jongjmp is history.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Oct 24 17:28:16 2001 UTC (22 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.11: +7 -7 lines
Diff to previous 1.11 (colored)

When becoming a daemon, dup stdin, stdout, and stderr to /dev/null
Change an unsafe vfork() to fork()
Fix dup2() usage--must check for oldd == newd case and no need to close oldd
Fixes annoying messages from sendmail about stdout being closed.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Oct 1 19:19:09 2001 UTC (22 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

In "r" mode always dup2(STDOUT_FILENO, STDERR_FILENO); from ftpd/popen.c
Otherwise, sendmail may complain about the lack of stderr.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jun 3 01:30:04 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.9: +19 -18 lines
Diff to previous 1.9 (colored)

Move login_cap stuff before pipe duping
Move the stderr dup2 to be with stdout dup2 as before since otherwise
sendmail seems to get unhappy.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jun 2 21:56:17 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.8: +87 -58 lines
Diff to previous 1.8 (colored)

Version derived from new ftpd code which has an updated UCB license.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Feb 18 19:48:36 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.7: +23 -33 lines
Diff to previous 1.7 (colored)

Update to ISC cron 4.0b1 + our patches.  This is now under a BSD license.
I also fixed the signal handlers while I was at it.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Aug 21 21:01:21 2000 UTC (23 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.6: +13 -7 lines
Diff to previous 1.6 (colored)

closelog, and check for various child setup failures; solar@false.com

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 20 18:42:42 2000 UTC (23 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.5: +20 -3 lines
Diff to previous 1.5 (colored)

Add calls to setusercontext() and login_get*().  We basically call
setusercontext() in most places where previously we did a setlogin().
Add default login.conf file and put root in the "daemon" login class.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Aug 30 10:45:37 1999 UTC (24 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.4: +6 -1 lines
Diff to previous 1.4 (colored)

in cron_popen(), do an initgroups, setlogin() and chdir to the user's
home dir to make things consistent with what cron does when executing
a normal command on behalf of the user.  I originally didn't think this
was worth doing but changed my mind.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 28 20:13:13 1999 UTC (24 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.3: +7 -2 lines
Diff to previous 1.3 (colored)

Run sendmail as the user corresponding to the crontab entry.
This keeps a user from abusing sendmail via the MAILTO var.
Had to drop -or0s from MAILARGS since that causes sendmail
to drop its privs (contrary to the sendmail docs).

Revision 1.3 / (download) - annotate - [select for diffs], Fri Aug 27 10:13:18 1999 UTC (24 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

Make sure argv gets NULL terminated if cron entry has >= MAX_ARGS arguments.
Gleaned from RedHat info.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 30 06:59:47 1998 UTC (26 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.1: +7 -3 lines
Diff to previous 1.1 (colored)

Y2K fixes from Andreas.Gunnarsson@emw.ericsson.se; culled from various places

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:47:31 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1, OPENBSD_2_0_BASE, OPENBSD_2_0
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:47:31 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.