$NetBSD: patch-ak,v 1.11 2011/02/16 17:45:08 taca Exp $ --- auth.c.orig 2010-12-01 01:21:51.000000000 +0000 +++ auth.c @@ -391,7 +391,7 @@ check_key_in_hostfiles(struct passwd *pw user_hostfile = tilde_expand_filename(userfile, pw->pw_uid); if (options.strict_modes && (stat(user_hostfile, &st) == 0) && - ((st.st_uid != 0 && st.st_uid != pw->pw_uid) || + ((st.st_uid != ROOTUID && st.st_uid != pw->pw_uid) || (st.st_mode & 022) != 0)) { logit("Authentication refused for %.100s: " "bad owner or modes for %.200s", @@ -453,7 +453,7 @@ secure_filename(FILE *f, const char *fil /* check the open file to avoid races */ if (fstat(fileno(f), &st) < 0 || - (st.st_uid != 0 && st.st_uid != uid) || + (st.st_uid != ROOTUID && st.st_uid != uid) || (st.st_mode & 022) != 0) { snprintf(err, errlen, "bad ownership or modes for file %s", buf); @@ -470,7 +470,7 @@ secure_filename(FILE *f, const char *fil debug3("secure_filename: checking '%s'", buf); if (stat(buf, &st) < 0 || - (st.st_uid != 0 && st.st_uid != uid) || + (st.st_uid != ROOTUID && st.st_uid != uid) || (st.st_mode & 022) != 0) { snprintf(err, errlen, "bad ownership or modes for directory %s", buf);