aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/id
Commit message (Collapse)AuthorAgeFilesLines
* Adjust printf format specifiers for dev_t and ino_t in user space.Gleb Kurtsou2014-12-171-4/+5
| | | | | | | | | ino_t and dev_t are about to become uint64_t. Reviewed by: kib, mckusick Notes: svn path=/head/; revision=275855
* id(1) only uses getaudit(2) from the BSM which is part of the libcBaptiste Daroussin2014-11-051-2/+0
| | | | Notes: svn path=/head/; revision=274136
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* Correct the change made in r227166.Ed Schouten2011-11-061-0/+2
| | | | | | | This function is only compiled in when building WITH_AUDIT. Notes: svn path=/head/; revision=227203
* Add missing static keywords to id(1)Ed Schouten2011-11-061-17/+17
| | | | Notes: svn path=/head/; revision=227166
* Add two new system calls, setloginclass(2) and getloginclass(2). This makesEdward Tomasz Napierala2011-03-052-5/+23
| | | | | | | | | | | | it possible for the kernel to track login class the process is assigned to, which is required for RCTL. This change also make setusercontext(3) call setloginclass(2) and makes it possible to retrieve current login class using id(1). Reviewed by: kib (as part of a larger patch) Notes: svn path=/head/; revision=219304
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-114-16/+0
| | | | | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* In preparation for raising NGROUPS and NGROUPS_MAX, change baseBrooks Davis2009-06-191-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. MFC after: 2 weeks Notes: svn path=/head/; revision=194494
* Fix id -A when the subject has an extended subject token associated withChristian S.J. Peron2007-10-141-7/+39
| | | | | | | | | | | | | | | | them (for example when they have logged in from an ip6 source). - Stick with the initial call to getaudit(2), if it returns E2BIG, use getaudit_addr(2) instead and set the "extended" flag to indicate that we the calling credential has an extended subject state. - Additionally, add the printing of the machine/at_addr (the ip/ip6 addresses) MFC after: 1 week Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=172621
* Fix SUSv3 compliance: Use a single comma instead of comma and space to separateStefan Farfeleder2006-12-291-1/+1
| | | | | | | | | | additional group entries. PR: 107298 Submitted by: Joost Bekkers Notes: svn path=/head/; revision=165626
* Improve markup.Ruslan Ermilov2006-12-231-1/+2
| | | | Notes: svn path=/head/; revision=165496
* Do not exit without printing the id information if the uid of theMike Pritchard2006-12-091-6/+15
| | | | | | | user executing the command cannot be looked up in the password file. Notes: svn path=/head/; revision=165028
* Add a -a option as a no-op for Solaris compatibility, as brieflyCeri Davies2006-09-262-2/+8
| | | | | | | | | | | discussed on src-committers. This is intentionally not included in the usage() function as it would confuse the output too much. Approved by: jhb MFC after: 1 week Notes: svn path=/head/; revision=162672
* Fix both arguments to err().Ruslan Ermilov2006-09-261-1/+1
| | | | Notes: svn path=/head/; revision=162656
* Rename "-a" flag to "-A" in order to avoid conflicting with the "-a" flagRobert Watson2006-09-232-21/+20
| | | | | | | | | | as found on Solaris. Requested by: ceri MFC after: 3 days Notes: svn path=/head/; revision=162578
* Add a -a argument to id(1), which causes id(1) to print out processRobert Watson2006-09-233-3/+57
| | | | | | | | | | | audit properties, including the audit user id. This can be quite helpful in debugging audit problems. Obtained from: TrustedBSD Project MFC after: 3 days Notes: svn path=/head/; revision=162571
* Print the euid after the gid as demanded by POSIX.Stefan Farfeleder2006-05-281-3/+3
| | | | | | | | | Submitted by: Martin Nagy <nagy.martin@gmail.com> PR: 96239 MFC after: 2 weeks Notes: svn path=/head/; revision=159008
* Add flag to choose whether to use getgrouplist(3) or getgroups(2)Robert Drehmel2005-04-291-6/+11
| | | | | | | | | | | | to the id_print() function. Use getgrouplist(3) for the case when an user was specified, and getgroups(2) when no user was given. That reverts to the expected behaviour and makes it easy to implement an option later to force using getgrouplist(3). Notes: svn path=/head/; revision=145672
* Fix spelling error.Robert Drehmel2005-04-291-1/+1
| | | | Notes: svn path=/head/; revision=145671
* We need to pass NGROUPS + 1 to getgrouplist(3) to displayRobert Drehmel2005-04-281-1/+1
| | | | | | | | | NGROUPS groups. getgrouplist(3) may put a duplicate group id into the passed array (it sets [0] and [1] to the value of the gid argument), but id_print() sorts them out. Notes: svn path=/head/; revision=145629
* - Merge two functions for printing `id' output.Robert Drehmel2005-04-281-57/+33
| | | | | | | | | | | | | | | Showing the ids of both an user given by an argument to `id', and the current user, is now handled in a single function. Displaying the current user's ids was inaccurate because getgroups(2) had been used. getgroups(2) returns the current kernel state of a user's groups, which may not always be correct if /etc/group was recently changed. - Fix a few style bugs. PR: bin/78085 Notes: svn path=/head/; revision=145628
* Remove unused variables.Stefan Farfeleder2005-04-091-2/+1
| | | | Notes: svn path=/head/; revision=144840
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-173-3/+3
| | | | Notes: svn path=/head/; revision=140368
* Pass an array of gid_t rather than an array of int to getgroups().Stefan Farfeleder2004-10-021-1/+2
| | | | | | | PR: 56646 Notes: svn path=/head/; revision=136051
* Add missing %s so that all of the usage message gets printed.David Malone2004-05-192-1/+2
| | | | | | | Bump WARNS to 6 while I'm here. Notes: svn path=/head/; revision=129458
* Bump document date on behalf of the -M option.Ruslan Ermilov2004-05-181-1/+1
| | | | Notes: svn path=/head/; revision=129402
* Add "-M" argument to id(1), which permits the id command to be usedRobert Watson2004-05-032-3/+46
| | | | | | | | | | | to print the MAC label of the current process. "-M" selected as that's what is used in Trusted IRIX. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research Notes: svn path=/head/; revision=128900
* ANSIify function definitions.David Malone2002-09-041-16/+8
| | | | | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5 Notes: svn path=/head/; revision=102944
* Remove local prototypes for main().Juli Mallett2002-08-191-1/+0
| | | | Notes: svn path=/head/; revision=102084
* Consistently use FBSDIDDavid E. O'Brien2002-06-301-2/+2
| | | | Notes: svn path=/head/; revision=99112
* remove __PWarner Losh2002-03-221-8/+8
| | | | Notes: svn path=/head/; revision=92920
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* Fold groups(1) and whoami(1) into id(1).Ruslan Ermilov2001-09-144-87/+35
| | | | Notes: svn path=/head/; revision=83452
* Now that we have it, replace `afterinstall' target with SCRIPTS.Ruslan Ermilov2001-09-131-7/+1
| | | | Notes: svn path=/head/; revision=83409
* mdoc(7) police: utilize the new .Ex macro.Ruslan Ermilov2001-08-153-9/+3
| | | | Notes: svn path=/head/; revision=81687
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79535
* Silence warnings (most about constness) and clamp down with WARNS=2.Dima Dorfman2001-05-282-5/+7
| | | | | | | Tested on i386 and alpha. Notes: svn path=/head/; revision=77314
* Print commas in the group list in user(). current() already did this.Dima Dorfman2001-05-201-1/+1
| | | | | | | | Reviewed by: ru, sheldonh Inspired by: OpenBSD, NetBSD Notes: svn path=/head/; revision=76907
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+2
| | | | Notes: svn path=/head/; revision=74848
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-203-8/+8
| | | | Notes: svn path=/head/; revision=68963
* .UC -> .OsRuslan Ermilov2000-11-062-2/+2
| | | | Notes: svn path=/head/; revision=68384
* DIAGNOSTICS section name missing and .Nm changesPhilippe Charnier2000-03-263-11/+11
| | | | Notes: svn path=/head/; revision=58603
* Cast pw_change and pw_expire to long and fix the format specifier accordingly.Bill Fumerola1999-09-061-2/+2
| | | | Notes: svn path=/head/; revision=51032
* Remove unused variables.Chris Costello1999-09-051-3/+1
| | | | Notes: svn path=/head/; revision=50979
* Properly document -P and -p flags.Chris Costello1999-09-012-1/+4
| | | | Notes: svn path=/head/; revision=50775
* $Id$ -> $FreeBSD$Peter Wemm1999-08-286-6/+6
| | | | Notes: svn path=/head/; revision=50477
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-122-0/+2
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48792
* Clean up some ambiguous nested if/elses.Bill Fumerola1999-07-041-3/+5
| | | | Notes: svn path=/head/; revision=48566
* Add "-P" display the id as a password file entry.David E. O'Brien1998-08-212-6/+40
| | | | | | | Submitted by: terry Notes: svn path=/head/; revision=38468