mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Make check for unknown login class actually work. Previously, using the "-c" option
with login class not defined in login.conf(5) would silently fail, resulting in using the default login class.
This commit is contained in:
parent
fe97b88c15
commit
d790b96563
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254259
|
@ -373,6 +373,8 @@ main(int argc, char *argv[])
|
|||
}
|
||||
lc = login_getclass(class);
|
||||
if (lc == NULL)
|
||||
err(1, "login_getclass");
|
||||
if (lc->lc_class == NULL || strcmp(class, lc->lc_class) != 0)
|
||||
errx(1, "unknown class: %s", class);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue