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
@ -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 New Issue
Block a user