summaryrefslogtreecommitdiffstats
path: root/usr.bin/newgrp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a memory leak in addgroup() by ensuring the allocated memoryghelmer2012-01-051-5/+5
| | | | | | | is freed if an error occurs. PR: bin/161510 MFC after: 4 weeks
* Partially revert r226274, the old code was right.delphij2011-10-161-1/+1
|
* - Fix an off-by-one bug in addgroup().delphij2011-10-121-2/+2
| | | | | | | | - Fix the error message when setgid() failed. PR: bin/161509 Submitted by: Jeremy Huddleston <jeremyhu apple com> MFC after: 2 weeks
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+2
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-2/+0
| | | | Tested with: make universe
* In preparation for raising NGROUPS and NGROUPS_MAX, change basebrooks2009-06-191-4/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarru2004-11-031-1/+1
| | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver
* Only check if ENABLE_SUID_NEWGRP is defined, for consistency withru2004-10-241-1/+1
| | | | other ENABLE_SUID_* variables.
* Use (char *)NULL to terminated to argument list for execl().harti2003-10-301-1/+1
| | | | | Without this cast the compiler cannot know that it has to convert the null pointer constant NULL to a null pointer.
* mdoc(7) police: one minor change that was not probably worth a commit.ru2002-05-301-1/+1
|
* Add the newgrp(1) utility, which changes groups. This is required bytjr2002-05-283-0/+411
the POSIX.2 UPE. PR: 36190 Reviewed by: -standards, silence on -audit
OpenPOWER on IntegriCloud