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
This commit is contained in:
Olivier Certner 2024-01-25 23:25:10 +01:00
parent e3a396eb2a
commit c7e645269f
No known key found for this signature in database
GPG Key ID: 8CA13040971E2627
2 changed files with 1 additions and 2 deletions

View File

@ -32,7 +32,6 @@
#define LOGIN_MECLASS "me"
#define LOGIN_DEFSTYLE "passwd"
#define LOGIN_DEFSERVICE "login"
#define LOGIN_DEFPRI 0
#define _PATH_LOGIN_CONF "/etc/login.conf"
#define _FILE_LOGIN_CONF ".login_conf"
#define _PATH_AUTHPROG "/usr/libexec/login_"

View File

@ -461,7 +461,7 @@ setlogincontext(login_cap_t *lc, const struct passwd *pwd, unsigned long flags)
static void
setclasspriority(login_cap_t * const lc, struct passwd const * const pwd)
{
const rlim_t def_val = LOGIN_DEFPRI, err_val = INT64_MIN;
const rlim_t def_val = 0, err_val = INT64_MIN;
rlim_t p;
int rc;