summaryrefslogtreecommitdiffstats
path: root/auth.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2021-02-18 11:25:38 +1100
committerDamien Miller <djm@mindrot.org>2021-02-18 11:27:09 +1100
commit845fe9811c047063d935eca89188ed55c993626b (patch)
treedd72f0b7da07b8566cb25d3c88fde488ddf01ca0 /auth.c
parentd0763c8d566119cce84d9806e419badf20444b02 (diff)
prefer login_getpwclass() to login_getclass()
FreeBSD has login_getpwclass() that does some special magic for UID=0. Prefer this to login_getclass() as its easier to emulate the former with the latter. Based on FreeBSD PR 37416 via Ed Maste; ok dtucker@
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth.c b/auth.c
index 2b77abca..a0e3cd6f 100644
--- a/auth.c
+++ b/auth.c
@@ -604,7 +604,7 @@ getpwnamallow(struct ssh *ssh, const char *user)
if (!allowed_user(ssh, pw))
return (NULL);
#ifdef HAVE_LOGIN_CAP
- if ((lc = login_getclass(pw->pw_class)) == NULL) {
+ if ((lc = login_getpwclass(pw)) == NULL) {
debug("unable to get login class: %s", user);
return (NULL);
}