mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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