Commit Graph

32 Commits

Author SHA1 Message Date
joerg 6818646ac8 Use __dead 2011-09-16 15:39:25 +00:00
lukem 10e84421a8 fix sign-compare issues 2009-04-12 10:51:38 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
jmmv 02921c77c9 Make syntax checking for id(1), groups(1) and whoami(1) commands stronger so
that they conform to what the corresponding manual pages say.  This makes all
the tests I recently introduced for these utilities pass.

pooka thinks this was time well spent ;-)
2007-11-16 18:09:50 +00:00
jmmv cacc05fe11 Drop trailing whitespace. On behalf of me. 2007-11-16 17:31:13 +00:00
liamjfoy db01b090d5 Print the euid after the gid as demanded by POSIX.
from freebsd rev 1.27
ok christos, joerg
2006-06-07 13:09:56 +00:00
christos bc3a1c6523 PR/33054: Nicolas Joly: id(1) sometimes report a duplicate group when a user
is not specified. This is because it prints getgid() and getgroups(). If the
getgid() is in the getgroups() set, it was printed twice. This is now detected
and the duplicate printing is avoided.
2006-03-11 17:16:01 +00:00
drochner 9b39088e5c id(1) didn't check the return value of getgrouplist(3) and used memory
outside the group array in the case that a user is member of more than
_SC_NGROUPS_MAX groups.
(This is probably also the problem behind PR bin/31069 by Zafer Aydogan.)
So check the return value and retry with sufficiently allocated memory
in case the initial _SC_NGROUPS_MAX groups are not enough.
2005-08-30 16:47:47 +00:00
peter cd2105a43a Add some missing static/const.
ok wiz@
2004-11-22 17:31:38 +00:00
peter 52f947197e ANSIfy & KNF.
ok wiz@
2004-11-22 17:28:58 +00:00
peter 3a0b5da47f Print the correct usage message for whoami(1) and groups(1).
ok wiz@
2004-11-22 17:21:36 +00:00
peter e8ec0dc16f id(1) -p supports optional [user] arg;
from matthew clarke via OpenBSD

ok wiz@
2004-11-19 14:18:01 +00:00
fvdl c4aacce6a3 Don't compare an integer to NULL. 2003-10-21 02:17:45 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
cgd a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
itohy 7d6cc9c5e5 Add missing newline of "id -p" output. 2001-01-05 03:08:23 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
mycroft b6fad0e324 Make the group list format consistent between `id' and `id userid'. Also make
it look like what Solaris and Linux use (comma but no space between items).
1999-08-17 17:37:32 +00:00
christos 6ccac2c3b8 use sysconf to get the max number of groups instead of NGROUPS. 1998-12-19 16:55:21 +00:00
thorpej 4567103300 Make this compile again, and fix some whitespace lossage. 1998-10-14 21:56:57 +00:00
wsanchez a6e937b096 Replace groups and whoami sh scripts with hard links to id. 1998-10-14 00:55:03 +00:00
erh 7713adc833 Add "-p" usage line. 1998-10-12 20:33:52 +00:00
ross f670fa10c5 Add { and } to shut up egcs. Reformat the more questionable code. 1998-08-25 20:59:36 +00:00
lukem e8ca1c7c50 getopt returns -1 not EOF 1997-10-19 03:18:54 +00:00
lukem f371ce2cb8 WARNSify, fix .Nm usage, deprecate register, use err() from <err.h> 1997-10-19 02:45:44 +00:00
perry 20cc106064 Sync with 4.4BSD-Lite2 1995-09-28 08:05:40 +00:00
mycroft d8f5a26b66 Fix RCS id format. 1994-10-06 15:39:54 +00:00
cgd 87dc7098ba update 1994-05-05 23:24:26 +00:00
jtc abfeba19ee Getgroup's second argument is now a gid_t ptr. 1994-04-01 01:19:08 +00:00
cgd fcea20f055 fix from piero@strider.st.dsi.unimi.it (Piero Serini) to get
"id <login>" to dtrt with primary group name.
1993-12-09 10:28:26 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00