upstream commit

Add missing braces in DenyUsers code.  Patch from zev at
bewilderbeest.net, ok deraadt@

Upstream-ID: d747ace338dcf943b077925f90f85f789714b54e
This commit is contained in:
dtucker@openbsd.org 2016-12-15 21:29:05 +00:00 committed by Damien Miller
parent dcc7d74242
commit fe06b68f82
1 changed files with 3 additions and 2 deletions

5
auth.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: auth.c,v 1.118 2016/11/08 22:04:34 djm Exp $ */ /* $OpenBSD: auth.c,v 1.119 2016/12/15 21:29:05 dtucker Exp $ */
/* /*
* Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2000 Markus Friedl. All rights reserved.
* *
@ -192,7 +192,7 @@ allowed_user(struct passwd * pw)
/* Return false if user is listed in DenyUsers */ /* Return false if user is listed in DenyUsers */
if (options.num_deny_users > 0) { if (options.num_deny_users > 0) {
for (i = 0; i < options.num_deny_users; i++) for (i = 0; i < options.num_deny_users; i++) {
r = match_user(pw->pw_name, hostname, ipaddr, r = match_user(pw->pw_name, hostname, ipaddr,
options.deny_users[i]); options.deny_users[i]);
if (r < 0) { if (r < 0) {
@ -205,6 +205,7 @@ allowed_user(struct passwd * pw)
return 0; return 0;
} }
} }
}
/* Return false if AllowUsers isn't empty and user isn't listed there */ /* Return false if AllowUsers isn't empty and user isn't listed there */
if (options.num_allow_users > 0) { if (options.num_allow_users > 0) {
for (i = 0; i < options.num_allow_users; i++) { for (i = 0; i < options.num_allow_users; i++) {