OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Thu Nov 11 08:48:48 2021 UTC (2 years, 6 months ago) by mestre
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, HEAD
Changes since 1.32: +5 -6 lines
Diff to previous 1.32 (colored)

remove whitespace

Revision 1.32 / (download) - annotate - [select for diffs], Thu Nov 11 08:42:31 2021 UTC (2 years, 6 months ago) by mestre
Branch: MAIN
Changes since 1.31: +9 -13 lines
Diff to previous 1.31 (colored)

There's no need to call pledge(2) so many times, or on many places, with the
same promises, just call it once before the switch case while at the same time
hoisting one unveil(2) so they are all grouped.

The call to pledge(2) on file() can also be simplified since "stdio rpath getpw"
will already be activated when we reach it.

OK deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 10 15:06:24 2021 UTC (2 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +1 -4 lines
Diff to previous 1.30 (colored)

remove a pointless call of setlocale(3);
patch from Jan Stary <hans at stare dot cz>;
OK martijn@

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:20 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.29: +6 -6 lines
Diff to previous 1.29 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Aug 27 15:20:31 2020 UTC (3 years, 8 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.28: +5 -1 lines
Diff to previous 1.28 (colored)

unveil(_PATH_DEV, "r") when -T or -u is used: who(1) is using stat(2) for determining the status of the tty

ok deraadt@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Aug 8 22:55:14 2018 UTC (5 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: 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
Changes since 1.27: +12 -2 lines
Diff to previous 1.27 (colored)

pledge with "unveil" at the top, so that the various modes can unveil
the files they inspect a little later.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Oct 21 16:06:57 2015 UTC (8 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: 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.26: +2 -2 lines
Diff to previous 1.26 (colored)

Style fixes; from Ilya Kaliman

Revision 1.26 / (download) - annotate - [select for diffs], Mon Oct 12 19:56:47 2015 UTC (8 years, 7 months ago) by naddy
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

ttyname() no longer does ioctl TIOCGETA, so pledge("tty") is no longer
needed here.  ok deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Sun Oct 11 23:29:56 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +6 -5 lines
Diff to previous 1.24 (colored)

fix regression: ttyname() failure not handled right

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 10 22:06:41 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

another pledge argument reorder for sake of re-audit

Revision 1.23 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:09 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.22 / (download) - annotate - [select for diffs], Wed Oct 7 17:27:35 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

from previous commit: "ioctl" is used for grab ttyname(0)

with a function's name like that "tty" should be a better request (more strict)

pointed by and ok deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Oct 7 16:11:40 2015 UTC (8 years, 7 months ago) by semarie
Branch: MAIN
Changes since 1.20: +21 -9 lines
Diff to previous 1.20 (colored)

enable tame(2) in who(1).

some refactor to grab ttyname(0) early and use it later.
gradually drop tame requests when no more needed.

"ioctl" is used for grab ttyname(0)
"rpath" is for -T and -u flag, that used stat(2) to get terminal status

initial patch from deraadt with help from guenther

ok deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 22 04:43:41 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

Correct format string mismatches turned up by -Wformat=2

suggestions and ok millert@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Nov 15 10:57:49 2010 UTC (13 years, 6 months ago) by otto
Branch: MAIN
CVS Tags: 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, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.18: +11 -4 lines
Diff to previous 1.18 (colored)

show more of the host, but be careful not to go over 80 cols; ok krw@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:50 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.17: +1 -14 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Wed Aug 18 21:24:27 2004 UTC (19 years, 9 months ago) by jmc
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, 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
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

- Xr w 1
- sort options and sync usage()

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:54 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.15: +8 -13 lines
Diff to previous 1.15 (colored)

mostly ansi cleanup; pval ok

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:23 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.14: +3 -7 lines
Diff to previous 1.14 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 14 03:13:07 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored)

strlcat, but i memset 0 before to be safe

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 7 21:14:28 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

inlined strcpy, should be strncpy anyways; millert ok, from Hans-Joerg.Hoexer@yerbouti.franken.de

Revision 1.12 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:59 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +7 -7 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:18 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

kill more registers

millert@ ok

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jan 31 17:42:26 2001 UTC (23 years, 3 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.9: +11 -8 lines
Diff to previous 1.9 (colored)

move utmp to large format, usernames to 32 chars; downsj

Revision 1.9 / (download) - annotate - [select for diffs], Wed Mar 22 17:07:37 2000 UTC (24 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.8: +6 -12 lines
Diff to previous 1.8 (colored)

Avoid the chdir entirely by prefixing _PATH_DEV to the tty name when
doing a stat.  This makes the -T and -u flags work in confunction with
a file argument.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Mar 21 21:54:51 2000 UTC (24 years, 2 months ago) by ericj
Branch: MAIN
Changes since 1.7: +7 -5 lines
Diff to previous 1.7 (colored)

only chdir() if needed. This affected having who reading different file

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 18 01:22:16 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

indent

Revision 1.6 / (download) - annotate - [select for diffs], Wed Aug 20 05:37:21 1997 UTC (26 years, 9 months ago) by denny
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, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.5: +44 -7 lines
Diff to previous 1.5 (colored)

Add -q (quick), the only X/Open option I can work up enthusiasm to implement.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jul 28 17:38:53 1997 UTC (26 years, 9 months ago) by flipk
Branch: MAIN
Changes since 1.4: +45 -12 lines
Diff to previous 1.4 (colored)

1) Prototypes. pretty.
2) setlocale(LC_ALL, "") from kleink@netbsd
3) Add XPG4.2 `-H' flag (show column headers) from kleink@netbsd
4) initialize flag variables before getopt
5) some Wall cleanup.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 25 21:28:12 1997 UTC (27 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

correct string empty test; yokota@freebsd

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jan 17 07:13:50 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

r?index -> strr?chr

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:43:00 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
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:46:53 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:46:53 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.