View | Details | Raw Unified | Return to bug 178 | Differences between
and this patch

Collapse All | Expand All

(-)session.c (+1 lines)
Lines 1187-1192 Link Here
1187
		while (fgets(buf, sizeof(buf), f))
1187
		while (fgets(buf, sizeof(buf), f))
1188
			fputs(buf, stderr);
1188
			fputs(buf, stderr);
1189
		fclose(f);
1189
		fclose(f);
1190
		fflush(NULL);
1190
		exit(254);
1191
		exit(254);
1191
	}
1192
	}
1192
}
1193
}
(-)auth.c (-1 / +5 lines)
Lines 209-214 Link Here
209
	 */
209
	 */
210
	if ( (pw->pw_uid != 0) && (geteuid() == 0) &&
210
	if ( (pw->pw_uid != 0) && (geteuid() == 0) &&
211
	    loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
211
	    loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
212
		int loginrestrict_errno = errno;
213
212
		if (loginmsg && *loginmsg) {
214
		if (loginmsg && *loginmsg) {
213
			/* Remove embedded newlines (if any) */
215
			/* Remove embedded newlines (if any) */
214
			char *p;
216
			char *p;
Lines 220-226 Link Here
220
			*--p = '\0';
222
			*--p = '\0';
221
			log("Login restricted for %s: %.100s", pw->pw_name, loginmsg);
223
			log("Login restricted for %s: %.100s", pw->pw_name, loginmsg);
222
		}
224
		}
223
		return 0;
225
		/* Don't fail if /etc/nologin  set */
226
	    	if (! (loginrestrict_errno == EPERM && stat(_PATH_NOLOGIN, &st) == 0))
227
			return 0;
224
	}
228
	}
225
#endif /* WITH_AIXAUTHENTICATE */
229
#endif /* WITH_AIXAUTHENTICATE */
226
230

Return to bug 178