version 1.30, 2001/11/17 19:14:34 |
version 1.31, 2001/12/19 07:18:56 |
|
|
} |
} |
if (cp[0] == '%' && cp[1] == 'u') { |
if (cp[0] == '%' && cp[1] == 'u') { |
buffer_append(&buffer, pw->pw_name, |
buffer_append(&buffer, pw->pw_name, |
strlen(pw->pw_name)); |
strlen(pw->pw_name)); |
cp++; |
cp++; |
continue; |
continue; |
} |
} |
|
|
if (options.strict_modes && |
if (options.strict_modes && |
(stat(user_hostfile, &st) == 0) && |
(stat(user_hostfile, &st) == 0) && |
((st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
((st.st_uid != 0 && st.st_uid != pw->pw_uid) || |
(st.st_mode & 022) != 0)) { |
(st.st_mode & 022) != 0)) { |
log("Authentication refused for %.100s: " |
log("Authentication refused for %.100s: " |
"bad owner or modes for %.200s", |
"bad owner or modes for %.200s", |
pw->pw_name, user_hostfile); |
pw->pw_name, user_hostfile); |
|
|
if (stat(buf, &st) < 0 || |
if (stat(buf, &st) < 0 || |
(st.st_uid != 0 && st.st_uid != uid) || |
(st.st_uid != 0 && st.st_uid != uid) || |
(st.st_mode & 022) != 0) { |
(st.st_mode & 022) != 0) { |
snprintf(err, errlen, |
snprintf(err, errlen, |
"bad ownership or modes for directory %s", buf); |
"bad ownership or modes for directory %s", buf); |
return -1; |
return -1; |
} |
} |