OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.43 / (download) - annotate - [select for diffs], Tue Dec 29 19:52:16 2020 UTC (3 years, 4 months ago) by benno
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, HEAD
Changes since 1.42: +3 -2 lines
Diff to previous 1.42 (colored)

getifaddrs() can return entries where ifa_addr is NULL. Check for this
before accessing anything in ifa_addr.
ok claudio@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Fri Jan 25 00:19:26 2019 UTC (5 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

I am retiring my old email address;  replace it with my OpenBSD one.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jan 21 11:32:04 2017 UTC (7 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: 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
Changes since 1.39: +4 -5 lines
Diff to previous 1.39 (colored)

The POSIX APIs that that sockaddrs all ignore the s*_len field in the
incoming socket, so userspace doesn't need to set it unless it has its
own reasons for tracking the size along with the sockaddr.

ok phessler@ deraadt@ florian@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Aug 5 10:34:18 2016 UTC (7 years, 9 months ago) by jca
Branch: MAIN
Changes since 1.38: +14 -17 lines
Diff to previous 1.38 (colored)

Switch from select(2) to poll(2); ok millert@

No need to check for POLLHUP since those are UDP sockets.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Mar 28 11:06:09 2016 UTC (8 years, 1 month ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

remove unused variable

ok bentley@

Revision 1.37 / (download) - annotate - [select for diffs], Thu Mar 17 05:27:10 2016 UTC (8 years, 2 months ago) by bentley
Branch: MAIN
Changes since 1.36: +9 -15 lines
Diff to previous 1.36 (colored)

Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.

Previously behaviors were all over the map. This changes them to
use COLUMNS first, and either terminal width or a hardcoded value
(typically 80) as appropriate.

ok deraadt@; man bits ok jmc@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Dec 9 19:39:10 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.35: +2 -3 lines
Diff to previous 1.35 (colored)

Remove NULL-checks before free(). ok tb@

Revision 1.35 / (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.34: +3 -3 lines
Diff to previous 1.34 (colored)

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

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:11 2015 UTC (9 years, 4 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.33: +12 -8 lines
Diff to previous 1.33 (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.33 / (download) - annotate - [select for diffs], Wed Nov 26 18:34:51 2014 UTC (9 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Prefer setvbuf() to setlinebuf() for portability; ok deraadt@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Oct 8 04:08:47 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

userland reallocarray audit.

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

ok deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 3 04:12:49 2013 UTC (11 years, 1 month ago) by deraadt
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
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored)

do not assume time_t and timeval.tv_sec are the same type

Revision 1.30 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:43 2009 UTC (14 years, 6 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.29: +1 -5 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:34 2007 UTC (16 years, 8 months ago) by deraadt
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.28: +5 -5 lines
Diff to previous 1.28 (colored)

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

Revision 1.28 / (download) - annotate - [select for diffs], Fri May 25 21:27:16 2007 UTC (16 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

"interupt" -> "interrupt" in various comments. Mostly from Diego Casati.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Sep 26 10:30:41 2006 UTC (17 years, 7 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.26: +6 -3 lines
Diff to previous 1.26 (colored)

authunix_create_default() might return NULL; spotted by tbert;
ok deraadt@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Aug 4 17:06:46 2003 UTC (20 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: 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, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.25: +7 -5 lines
Diff to previous 1.25 (colored)

protos

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 17 21:56:25 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.24: +12 -9 lines
Diff to previous 1.24 (colored)

Sync with share/misc/license.template and add missing DARPA credit
where applicable.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:50 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

mostly ansi cleanup; pval ok

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 4 17:37:16 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

fix stdout line width handling; different from fix in 3289

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 3 01:52:41 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.21: +12 -23 lines
Diff to previous 1.21 (colored)

Use an ISC-tyle license for all my code; it is simpler and more permissive.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jan 11 18:26:08 2003 UTC (21 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.20: +23 -16 lines
Diff to previous 1.20 (colored)

o specifying host on the command line implies the -a flag
o honor -h, -i, and -u when hosts are specified on the command line
o print hostname when no users for "rusers -la"
o print "day" not "days" when there is only one of them
o avoid calling malloc(0) (pedantic, this was not used unsafely)

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 2 19:06:39 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

missing sockaddr inits; ok itojun

Revision 1.19 / (download) - annotate - [select for diffs], Wed Nov 7 00:02:58 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.18: +33 -2 lines
Diff to previous 1.18 (colored)

When mixing the -l and -i flags sort on each individual user's
idle time, not the minimum idle tiem of all users on the host.
This makes the -i option much more useful...

Revision 1.18 / (download) - annotate - [select for diffs], Tue Nov 6 20:51:19 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.17: +270 -141 lines
Diff to previous 1.17 (colored)

implement missing sorting options

Revision 1.17 / (download) - annotate - [select for diffs], Tue Nov 6 02:46:29 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Must zero out timeout by hand now that it is no longer global.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 6 02:22:25 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.15: +243 -24 lines
Diff to previous 1.15 (colored)

Restore asyncronous RPC code now that I found the uninitialized variable
that was causing problem.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Nov 2 17:16:22 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.14: +22 -248 lines
Diff to previous 1.14 (colored)

Revert to clnt_broadcast() method until an alignment problem with the
asyncronous rpc code in the previous commit is fixed.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Nov 1 23:37:42 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.13: +518 -131 lines
Diff to previous 1.13 (colored)

Major overhaul.

Add protocol version 3 support.  To avoid doing two separate broadcasts
(like the solaris client does) we now do the equivalent of clnt_broadcast()
ourselves and send both version 2 and 3 broadcasts.  These are staggered
such that under normal circumstances the version 3 reply will be received
before the version 2 reply (which is what we want).  Version 3 support
is important now that we have long user and host names in utmp.

Avoid potential duplicates on multihomed machines by storing all
the addresses we get back from gethostbyaddr(), not just a single
address.

Reduce the timeout from 1 minute to 30 seconds which is closer to
what Solaris uses and is generally more useful.

Check window width and take this into account when formatting lines
in -l mode.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 11 03:06:32 2001 UTC (22 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.12: +8 -9 lines
Diff to previous 1.12 (colored)

Use RNUSERS_MAXHOSTLEN, RNUSERS_MAXUSERLEN and RNUSERS_MAXLINELEN
instead of UT_HOSTSIZE, UT_NAMESIZE and UT_LINESIZE since the UT_*
constants define sizes on the local machine, not the sizes specified
by the rusers protocol.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 18 22:19:04 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored)

clnt leaks; tommy@ti.com

Revision 1.11 / (download) - annotate - [select for diffs], Sat Feb 17 16:52:23 2001 UTC (23 years, 3 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.10: +39 -37 lines
Diff to previous 1.10 (colored)

Tidy, be a bit more careful about buffers, and don't use strlen() on utmp.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Feb 5 21:41:07 2001 UTC (23 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

default to 8 wide for user names

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 31 19:48:06 2001 UTC (23 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

fat utmp handling; truncate to 16 chars for now, until we decide how ugly
we will accept.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 18 03:11:28 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: 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.7: +3 -3 lines
Diff to previous 1.7 (colored)

#include <string.h> not <strings.h> -- Yes, I'm a weanie...

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 8 16:49:45 1997 UTC (26 years, 10 months ago) by bitblt
Branch: MAIN
Changes since 1.6: +5 -3 lines
Diff to previous 1.6 (colored)

Fixed remotely triggerable buffer overflow.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 20 10:07:01 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +5 -4 lines
Diff to previous 1.5 (colored)

Wall

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 17 07:13:15 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

r?index -> strr?chr

Revision 1.4 / (download) - annotate - [select for diffs], Fri Aug 16 22:24:18 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +12 -15 lines
Diff to previous 1.3 (colored)

indent

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

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 21 23:43:46 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.1: +5 -3 lines
Diff to previous 1.1 (colored)

sync to netbsd 960418

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