summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
committerColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
commitc6a2c0334e45419875687d250aed9bea78480f2e (patch)
treed8f01bef9f3921fa1ca7592a19474be9c8349f76 /session.c
parentdd5ed53e20d218607260916a6b04d1c8c5b3d88f (diff)
parent8b13b5bdc4f19bd52ee673104d66b71c21153b96 (diff)
merge 6.1p1
Diffstat (limited to 'session.c')
-rw-r--r--session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/session.c b/session.c
index 5dad26293..65bf28776 100644
--- a/session.c
+++ b/session.c
@@ -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