View | Details | Raw Unified | Return to bug 1690
Collapse All | Expand All

(-)openssh-5.3p1/auth.c (-6 / +7 lines)
Lines 177-182 Link Here
177
		ipaddr = get_remote_ipaddr();
177
		ipaddr = get_remote_ipaddr();
178
	}
178
	}
179
179
180
	#ifdef CUSTOM_SYS_AUTH_ALLOWED_USER
181
		if (!sys_auth_allowed_user(pw, &loginmsg))
182
			return 0;
183
	#endif
184
 
180
	/* Return false if user is listed in DenyUsers */
185
	/* Return false if user is listed in DenyUsers */
181
	if (options.num_deny_users > 0) {
186
	if (options.num_deny_users > 0) {
182
		for (i = 0; i < options.num_deny_users; i++)
187
		for (i = 0; i < options.num_deny_users; i++)
Lines 189-199 Link Here
189
			}
194
			}
190
	}
195
	}
191
	/* Return false if AllowUsers isn't empty and user isn't listed there */
196
	/* Return false if AllowUsers isn't empty and user isn't listed there */
197
	/* Return true if user is listed in AllowUsers */
192
	if (options.num_allow_users > 0) {
198
	if (options.num_allow_users > 0) {
193
		for (i = 0; i < options.num_allow_users; i++)
199
		for (i = 0; i < options.num_allow_users; i++)
194
			if (match_user(pw->pw_name, hostname, ipaddr,
200
			if (match_user(pw->pw_name, hostname, ipaddr,
195
			    options.allow_users[i]))
201
			    options.allow_users[i]))
196
				break;
202
				return 1;
197
		/* i < options.num_allow_users iff we break for loop */
203
		/* i < options.num_allow_users iff we break for loop */
198
		if (i >= options.num_allow_users) {
204
		if (i >= options.num_allow_users) {
199
			logit("User %.100s from %.100s not allowed because "
205
			logit("User %.100s from %.100s not allowed because "
Lines 235-245 Link Here
235
		ga_free();
241
		ga_free();
236
	}
242
	}
237
243
238
#ifdef CUSTOM_SYS_AUTH_ALLOWED_USER
239
	if (!sys_auth_allowed_user(pw, &loginmsg))
240
		return 0;
241
#endif
242
243
	/* We found no reason not to let this user try to log on... */
244
	/* We found no reason not to let this user try to log on... */
244
	return 1;
245
	return 1;
245
}
246
}

Return to bug 1690