Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / openssh / patches / patch-aj
blobb683b4174389872e6c2c9dc24ebf3919ced6134e
1 $NetBSD: patch-aj,v 1.7 2006/10/31 03:31:20 taca Exp $
3 --- auth-rhosts.c.orig  2008-06-14 08:01:25.000000000 +0900
4 +++ auth-rhosts.c
5 @@ -230,7 +230,7 @@ auth_rhosts2_raw(struct passwd *pw, cons
6                 return 0;
7  
8         /* If not logging in as superuser, try /etc/hosts.equiv and shosts.equiv. */
9 -       if (pw->pw_uid != 0) {
10 +       if (pw->pw_uid != ROOTUID) {
11                 if (check_rhosts_file(_PATH_RHOSTS_EQUIV, hostname, ipaddr,
12                     client_user, pw->pw_name)) {
13                         auth_debug_add("Accepted for %.100s [%.100s] by /etc/hosts.equiv.",
14 @@ -256,7 +256,7 @@ auth_rhosts2_raw(struct passwd *pw, cons
15                 return 0;
16         }
17         if (options.strict_modes &&
18 -           ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
19 +           ((st.st_uid != ROOTUID && st.st_uid != pw->pw_uid) ||
20             (st.st_mode & 022) != 0)) {
21                 logit("Rhosts authentication refused for %.100s: "
22                     "bad ownership or modes for home directory.", pw->pw_name);
23 @@ -283,7 +283,7 @@ auth_rhosts2_raw(struct passwd *pw, cons
24                  * allowing access to their account by anyone.
25                  */
26                 if (options.strict_modes &&
27 -                   ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
28 +                   ((st.st_uid != ROOTUID && st.st_uid != pw->pw_uid) ||
29                     (st.st_mode & 022) != 0)) {
30                         logit("Rhosts authentication refused for %.100s: bad modes for %.200s",
31                             pw->pw_name, buf);