diff options
author | Damien Miller <djm@mindrot.org> | 2012-04-22 11:08:10 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2012-04-22 11:08:10 +1000 |
commit | 29cd1888873d453f28609d8b301062cbaa4ab4d8 (patch) | |
tree | 8969f031134672e2c20e736efc83aea4a7445505 /session.c | |
parent | a563cced062d0d74843c0ee56a82faa860f10855 (diff) |
- guenther@cvs.openbsd.org 2012/03/15 03:10:27
[session.c]
root should always be excluded from the test for /etc/nologin instead
of having it always enforced even when marked as ignorenologin. This
regressed when the logic was incompletely flipped around in rev 1.251
ok halex@ millert@
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.259 2011/10/24 02:13:13 djm Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.260 2012/03/15 03:10:27 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -1390,7 +1390,7 @@ do_nologin(struct passwd *pw) | |||
1390 | struct stat sb; | 1390 | struct stat sb; |
1391 | 1391 | ||
1392 | #ifdef HAVE_LOGIN_CAP | 1392 | #ifdef HAVE_LOGIN_CAP |
1393 | if (login_getcapbool(lc, "ignorenologin", 0) && pw->pw_uid) | 1393 | if (login_getcapbool(lc, "ignorenologin", 0) || pw->pw_uid == 0) |
1394 | return; | 1394 | return; |
1395 | nl = login_getcapstr(lc, "nologin", def_nl, def_nl); | 1395 | nl = login_getcapstr(lc, "nologin", def_nl, def_nl); |
1396 | #else | 1396 | #else |