OpenBSD CVS

CVS log for src/usr.sbin/rdate/rdate.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (download) - annotate - [select for diffs], Wed Jan 4 13:00:11 2023 UTC (16 months, 3 weeks ago) by jsg
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.36: +1 -6 lines
Diff to previous 1.36 (colored)

Christos Zoulas agreed to rescind clause 3 and 4 in
NetBSD fsck.8 rev 1.35 fsutil.h rev 1.14 pathnames.h rev 1.2
netgroup_mkdb.8 rev 1.9 netgroup_mkdb.c rev 1.18 str.c rev 1.7
str.h rev 1.4 rdate.8 rev 1.11 rdate.c rev 1.19 extern.h rev 1.14
getnetgrent.c rev 1.41 netgroup.h rev 1.10
fparseln.3 rev 1.4 fparseln.c rev 1.10

our stringlist.c/stringlist.h are derived from getnetgrent.c
rfc868time.c from rdate.c
newfs/pathnames.h from fsck/pathnames.h

https://mail-index.netbsd.org/source-changes/2009/10/21/msg002182.html
Not all files are covered as some had copyright assigned to TNF in 1998.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Nov 15 15:14:24 2021 UTC (2 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

No need to declare optind, optarg or opterr; unistd.h does this for us.
From Jan Stary.  OK deraadt@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Dec 23 19:13:52 2015 UTC (8 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: 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, 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.34: +2 -2 lines
Diff to previous 1.34 (colored)

expand message between processes to 2048 bytes.  Andre Smagin found
a case where it can reach 637 bytes of output, so use almost 4x
(he suggested 1024)

Revision 1.34 / (download) - annotate - [select for diffs], Sat Oct 31 18:24:01 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

repair error message; spotted by Marcus Merighi

Revision 1.33 / (download) - annotate - [select for diffs], Thu Oct 29 03:16:15 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.32: +69 -13 lines
Diff to previous 1.32 (colored)

rdate is a classic "run as root, talk to internet for a while doing
crazy packet parsing, then do something requiring privilege at the
end" program.  Simplistic pledge would be "stdio rpath wpath inet dns
settime", which is not very useful.  Imagine if it was exploited?  It
could still change your time backwards or write to your passwd file -
game over.  However the pledge "categorization" is educational, and
quickly leads to a priv-sep solution of sorts.

Create a pipe and fork.  child pledges "stdio inet dns", and talks the
time protocols, then writes error message + timeinfo to the pipe.
parent pledges "stdio rpath wpath settime" and reads error
message/timeinfo from pipe.  If error message, spit it out.  Otherwise
handle the time, then pledge "stdio rpath", and finally report how the
time was adjusted.

A bit more complicated.  Now observe that the pledges help test if
it is right...

(Now that privsep processing is in place, the child could be modified
to chroot + change to a different uid... problem is: which uid..)
ok millert

Revision 1.32 / (download) - annotate - [select for diffs], Mon Feb 9 23:00:14 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.31: +6 -6 lines
Diff to previous 1.31 (colored)

clean up flags++ instances around getopt()
ok florian

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:20 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.30 / (download) - annotate - [select for diffs], Tue Nov 12 22:27:13 2013 UTC (10 years, 6 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.29: +4 -3 lines
Diff to previous 1.29 (colored)

ensure there are prototypes

Revision 1.29 / (download) - annotate - [select for diffs], Fri Aug 16 19:47:43 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Use %lld and cast to (long long) when printing time_t values

otto@ millert@ lteo@ mikeb@ deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Sat Apr 20 20:39:14 2013 UTC (11 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.27: +7 -17 lines
Diff to previous 1.27 (colored)

Remove extra info from usage message; that's what the manual is for.
OK jmc@

Revision 1.27 / (download) - annotate - [select for diffs], Sat Apr 20 00:13:01 2013 UTC (11 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

Add -o option to getopt string and usage.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Apr 19 19:14:46 2013 UTC (11 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.25: +6 -2 lines
Diff to previous 1.25 (colored)

Make -n the default and add -o flag for the old RFC 868 time protocol
(which uses a 32-bit value for its wire protocol).  OK deraadt@ ian@

Revision 1.25 / (download) - annotate - [select for diffs], Fri Apr 19 16:38:47 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.24: +1 -2 lines
Diff to previous 1.24 (colored)

comment incorrect; rdate has -n support now too

Revision 1.24 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:54 2009 UTC (14 years, 7 months ago) by deraadt
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, 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.23: +1 -8 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Wed Jul 9 19:41:56 2008 UTC (15 years, 10 months ago) by sobrado
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
Changes since 1.22: +12 -11 lines
Diff to previous 1.22 (colored)

documentation tweaks.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Feb 18 20:10:53 2004 UTC (20 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: 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, 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
Changes since 1.21: +7 -7 lines
Diff to previous 1.21 (colored)

sort options and SYNOPSIS;
sync usage();

Revision 1.21 / (download) - annotate - [select for diffs], Mon Feb 16 21:25:41 2004 UTC (20 years, 3 months ago) by jakob
Branch: MAIN
Changes since 1.20: +19 -7 lines
Diff to previous 1.20 (colored)

add IPv4/IPv6 transport selection. ok millert@ deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 26 19:47:10 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

strict proto cleanups

Revision 1.19 / (download) - annotate - [select for diffs], Sun Sep 8 12:33:42 2002 UTC (21 years, 8 months ago) by jakob
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.18: +11 -14 lines
Diff to previous 1.18 (colored)

add leap second support for rfc868, from thorsten glaser

Revision 1.18 / (download) - annotate - [select for diffs], Sat Aug 10 21:37:28 2002 UTC (21 years, 9 months ago) by jakob
Branch: MAIN
Changes since 1.17: +11 -5 lines
Diff to previous 1.17 (colored)

style; from thorsten

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jul 27 20:11:34 2002 UTC (21 years, 10 months ago) by jakob
Branch: MAIN
Changes since 1.16: +11 -3 lines
Diff to previous 1.16 (colored)

move leap seconds correction to -N option for now

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jul 27 09:29:50 2002 UTC (21 years, 10 months ago) by jakob
Branch: MAIN
Changes since 1.15: +10 -5 lines
Diff to previous 1.15 (colored)

add verbose output option

Revision 1.15 / (download) - annotate - [select for diffs], Thu May 16 11:00:53 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.14: +6 -8 lines
Diff to previous 1.14 (colored)

bit more KNF

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 16 10:46:34 2002 UTC (22 years ago) by jakob
Branch: MAIN
Changes since 1.13: +39 -69 lines
Diff to previous 1.13 (colored)

add support for SNTP & split out RFC868 time support. ok deraadt@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Feb 19 19:39:40 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +2 -6 lines
Diff to previous 1.12 (colored)

We live in an ANSI C world.  Remove lots of gratuitous #ifdef __STDC__ cruft.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Aug 15 19:39:09 2001 UTC (22 years, 9 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.11: +11 -7 lines
Diff to previous 1.11 (colored)

fix -pa to display properly initialized adjustment; ok beck@ pjanzen@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jul 25 20:12:18 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

#if __STDC__ --> #ifdef __STDC__

Revision 1.10 / (download) - annotate - [select for diffs], Sun Apr 27 13:11:38 1997 UTC (27 years, 1 month ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

More includes for library prototypes.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Apr 4 08:59:41 1997 UTC (27 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +23 -20 lines
Diff to previous 1.8 (colored)

wtmp repairs; netbsd

Revision 1.8 / (download) - annotate - [select for diffs], Thu Feb 6 15:00:27 1997 UTC (27 years, 4 months ago) by kstailey
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

corrected to look even more like date(1)

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jan 21 19:29:08 1997 UTC (27 years, 4 months ago) by kstailey
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

make lint happier

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jan 21 17:44:05 1997 UTC (27 years, 4 months ago) by kstailey
Branch: MAIN
Changes since 1.5: +10 -3 lines
Diff to previous 1.5 (colored)

make output look like that of date(1)

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 10 15:07:08 1996 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

warnx

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 23:41:42 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

sync to netbsd 960418

Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 25 15:56:10 1996 UTC (28 years, 2 months ago) by niklas
Branch: MAIN
Changes since 1.2: +8 -3 lines
Diff to previous 1.2 (colored)

From NetBSD: merge of 960317

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 22 00:17:06 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +48 -16 lines
Diff to previous 1.1 (colored)

From NetBSD:
fix pr/1226 from David Gluss: allow rdate to use adjtime(2)

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:48:04 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:48:04 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.