Commit graph

18 commits

Author SHA1 Message Date
Olivier Certner c7e645269f
login_cap.h: Remove LOGIN_DEFPRI
This is an implementation detail which is likely to become irrelevant in
the future, as we move to not resetting the priority if the
corresponding capability is not present in the configuration file
('/etc/login.conf').

GitHub's code search and Google show no use of this public constant, and
it doesn't exist in OpenBSD and NetBSD.

So, remove this definition and its sole use in-tree.

PR:                     276570 (exp-run)
Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D43609
2024-01-29 22:58:10 +01:00
Olivier Certner e3a396eb2a
login_cap.h: Remove LOGIN_DEFUMASK
This public constant has not been used in-tree since 1997 (this was
noticed while working on previous commit "setusercontext(): umask: Set
it only once (in the common case)").

Since it was an implementation detail and GitHub's code search and
Google show no use of this symbol today, simply remove it.

PR:                     276570 (exp-run)
Reviewed by:            emaste, kib (earlier version, then part of D40344)
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D43608
2024-01-29 22:58:10 +01:00
Olivier Certner 90e914cd5a
New login_getcapenum(): Allows to read named enum values
Reviewed by:            emaste
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           Kumacom SAS
Differential Revision:  https://reviews.freebsd.org/D40684
2024-01-29 22:58:05 +01:00
Warner Losh 42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Edward Tomasz Napierala 2bfc50bc4f Add two new system calls, setloginclass(2) and getloginclass(2). This makes
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)
2011-03-05 12:40:35 +00:00
Dag-Erling Smørgrav b1720f52d3 Since in_lt() and in_lts() are not static, assume that they are intended to
be part of the public API.  Accordingly, add prototypes and document them.
2008-10-20 17:17:58 +00:00
Dag-Erling Smørgrav 92657d3cbd Since setclasscpumask() is not static, assume that it is intended to be
part of the public API.  Accordingly, add a prototype and document it.
2008-10-20 17:03:05 +00:00
Dag-Erling Smørgrav 93b5982b3c Style and whitespace. 2008-10-20 16:54:53 +00:00
Brooks Davis d84c42924c Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.
2008-07-25 19:58:14 +00:00
Mark Murray 547fa0d9b7 ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify. 2003-10-18 10:04:16 +00:00
Robert Watson 27a68d26ae Add LOGIN_SETMAC, which will indicate to the user context management code
that it should also set the user's default MAC label, if available and
permitted.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-16 02:14:21 +00:00
Robert Watson 909410cf5b Whitespace cleanup--it's not style(9), but it is consistent. Prep
for MAC-related commits to the login infrastructure.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-08-11 01:48:43 +00:00
Ruslan Ermilov b00ba4ccbb Const poisoning. 2002-04-08 11:04:56 +00:00
David E. O'Brien 69160b1eb7 Remove __P() usage. 2002-03-21 23:54:04 +00:00
Brian Feldman 04c9749ff0 Add working and easy crypt(3)-switching. Yes, we need a whole new API
for crypt(3) by now.  In any case:

Add crypt_set_format(3) + documentation to -lcrypt.
Add login_setcryptfmt(3) + documentation to -lutil.
Support for switching crypt formats in passwd(8).
Support for switching crypt formats in pw(8).

The simple synopsis is:
edit login.conf; add a passwd_format field set to "des" or "md5"; go nuts :)

Reviewed by:	peter
2000-08-22 02:15:54 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
David Nugent 56c0434453 Summary of login.conf support changes:
o Incorporated BSDI code and enhancements, better logging for error
  checking (which has been shown to be a problem, and is therefore
  justified, imho); also some minor things we were missing, including
  better quad_t math, which checks for under/overflows.

o setusercontext() now allows user resource limit overrides, but
  does this AFTER dropping root privs, to restrict the user to
  droping hard limits and set soft limits within the kernel's
  allowed user limits.

o umask() only set once, and only if requested.

o add _secure_path(), and use in login.conf to guard against
  symlinks etc. and non-root owned or non-user owned files being
  used. Derived from BSDI contributed code.

o revamped authentication code to BSDI's latest api, which
  includes deleting authenticate() and adding auth_check()
  and a few other functions. This is still marked as depecated
  in BSDI, but is included for completeness. No other source
  in the tree uses this anyway, so it is now bracketed with
  #ifdef LOGIN_CAP_AUTH which is by default not defined. Only
  auth_checknologin() and auth_cat() are actually used in
  module login_auth.c.

o AUTH_NONE definition removed (collided with other includes
  in the tree). [bde]

o BSDI's login_getclass() now accepts a char *classname
  parameter rather than struct passwd *pwd. We now do likewise,
  but added login_getpwclass() for (sort of) backwards
  compatiblity, namely because we handle root as a special
  case for the default class. This will require quite a few
  changes elsewhere in the source tree.

o We no longer pretend to support rlim_t as a long type.

o Revised code formatting to be more bsd-ish style.
1997-05-10 18:55:38 +00:00
David Nugent 3564cb62c8 Move login_cap.h from src/include for easier maintenance with
related files.
1997-05-10 12:49:30 +00:00