Commit Graph

15 Commits

Author SHA1 Message Date
John Baldwin
636402a76a Use __SCCSID() for SCCS IDs.
- Define NO__SCCSID in CFLAGS to preserve existing behavior of omitting
  SCCS IDs by default.
- While here, fix the $FreeBSD$ in pw_util.c to use __FBSDID.
2018-05-23 17:02:12 +00:00
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
2c8d07a874 Fix a regression that was introduced in r191882.
I changed login_tty() to only work when the application is not a session
leader yet. This works fine for applications in the base system, but it
turns out various applications call this function after daemonizing,
which means they already use their own session.

If setsid() fails, just call tcsetsid() on the current session.
tcsetsid() will already perform proper security checks.

Reported by:	Oliver Lehmann
MFC after:	1 week
2010-01-17 17:52:35 +00:00
Ed Schouten
46b303e83d Add tcsetsid(3).
The entire world seems to use the non-standard TIOCSCTTY ioctl to make a
TTY a controlling terminal of a session. Even though tcsetsid(3) is also
non-standard, I think it's a lot better to use in our own source code,
mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid().

I stole the idea from QNX. They do it the other way around; their
TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls
into an IPC framework.
2009-05-07 13:49:48 +00:00
Warner Losh
ee7093a640 Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
Mark Murray
547fa0d9b7 ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify. 2003-10-18 10:04:16 +00:00
Mark Murray
0ebec5d3c8 Tidy up. Sort headers. 2003-06-14 18:42:37 +00:00
Matthew Dillon
8719c58fef Add __FBSDID()s to libutil 2001-09-30 22:35:07 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Jordan K. Hubbard
8b1ef8d464 Now take stdio.h out of files that don't require it. 1998-10-09 11:24:20 +00:00
Jordan K. Hubbard
b8c11ec197 All these have to include stdio.h now. 1998-10-09 00:39:09 +00:00
Steve Price
673b794638 Protect the copyright comments from reformatting by
indent and make this compile -Wall clean like the
Makefile suggests that it should. :)

Pointed out by:	Bruce Evans <bde@zeta.org.au>
1997-08-13 20:42:18 +00:00
Peter Wemm
3b7e1cc80f Bump libutil revision after recent addition of setproctitle().
Install (optional) libutil.h with prototypes for the functions and
document this in the man page.

minor cleanups to the various routines, include the prototype file, declare
return codes etc.
1996-01-01 08:27:41 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00