Commit Graph

16 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Ed Schouten
4c46bfb6dc Eliminate global variables.
There is no reason why these three variables should be declared as
global variables, while the others aren't. They are only used inside
main().
2011-11-06 16:40:17 +00:00
Ed Schouten
9a958de54c ANSIfy some more tools in usr.sbin/.
Most of these tools build with WARNS=6, except for their use of K&R
function declarations.
2010-01-02 11:05:34 +00:00
Brooks Davis
54404cfb13 In preparation for raising NGROUPS and NGROUPS_MAX, change base
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
2009-06-19 15:58:24 +00:00
Warner Losh
23717fc46a Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.
2004-08-07 04:19:37 +00:00
Mike Makonnen
4fb3a3060c Allow the optional setting of a user, primary group, or grouplist
when chrooting.

Obtained from:	NetBSD
MFC after:	4 weeks
2003-06-07 10:56:12 +00:00
Mike Makonnen
fe6983de4b Explicitly compare the values returned by chdir(2) and chroot(2) to -1. 2003-06-02 05:52:24 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Mike Heffner
408d219e0a WARNS=2 cleanup.
Submitted by:	Maxime Henrion <mux@qualys.com>
MFC after:	2 weeks
2001-12-09 21:56:31 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Philippe Charnier
14b374a5c4 Remove unused #include. Statisize usage(). 1997-09-15 06:32:01 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Rodney W. Grimes
dea673e932 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00