aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2024-01-25 22:25:10 +0000
committerOlivier Certner <olce@FreeBSD.org>2024-02-01 21:24:30 +0000
commit634f86a3c47ffc8dfe7699ea599ab34c88b25324 (patch)
tree768efa6e5e7e6d76a9b621968a703c0a83c88ec2
parent943af0501107f88312a98b217b6956f3d0f2fa76 (diff)
downloadsrc-634f86a3c47ffc8dfe7699ea599ab34c88b25324.tar.gz
src-634f86a3c47ffc8dfe7699ea599ab34c88b25324.zip
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 (cherry picked from commit c7e645269f1c7e9872a7ccf6b72f045c55a66793) Approved by: markj (mentor)
-rw-r--r--lib/libutil/login_cap.h1
-rw-r--r--lib/libutil/login_class.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/libutil/login_cap.h b/lib/libutil/login_cap.h
index a48246804a47..316d6e62d790 100644
--- a/lib/libutil/login_cap.h
+++ b/lib/libutil/login_cap.h
@@ -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_"
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
index b4e52951bf9c..eb16ad501881 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -462,7 +462,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;