[BACK]Return to auth-rhosts.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/auth-rhosts.c between version 1.28 and 1.28.4.1

version 1.28, 2002/05/13 21:26:49 version 1.28.4.1, 2003/09/16 20:50:42
Line 68 
Line 68 
                  * This should be safe because each buffer is as big as the                   * This should be safe because each buffer is as big as the
                  * whole string, and thus cannot be overwritten.                   * whole string, and thus cannot be overwritten.
                  */                   */
                 switch (sscanf(buf, "%s %s %s", hostbuf, userbuf, dummy)) {                  switch (sscanf(buf, "%1023s %1023s %1023s", hostbuf, userbuf,
                       dummy)) {
                 case 0:                  case 0:
                         auth_debug_add("Found empty line in %.100s.", filename);                          auth_debug_add("Found empty line in %.100s.", filename);
                         continue;                          continue;
Line 155 
Line 156 
 {  {
         const char *hostname, *ipaddr;          const char *hostname, *ipaddr;
   
         hostname = get_canonical_hostname(options.verify_reverse_mapping);          hostname = get_canonical_hostname(options.use_dns);
         ipaddr = get_remote_ipaddr();          ipaddr = get_remote_ipaddr();
         return auth_rhosts2(pw, client_user, hostname, ipaddr);          return auth_rhosts2(pw, client_user, hostname, ipaddr);
 }  }
Line 220 
Line 221 
          * not group or world writable.           * not group or world writable.
          */           */
         if (stat(pw->pw_dir, &st) < 0) {          if (stat(pw->pw_dir, &st) < 0) {
                 log("Rhosts authentication refused for %.100s: "                  logit("Rhosts authentication refused for %.100s: "
                     "no home directory %.200s", pw->pw_name, pw->pw_dir);                      "no home directory %.200s", pw->pw_name, pw->pw_dir);
                 auth_debug_add("Rhosts authentication refused for %.100s: "                  auth_debug_add("Rhosts authentication refused for %.100s: "
                     "no home directory %.200s", pw->pw_name, pw->pw_dir);                      "no home directory %.200s", pw->pw_name, pw->pw_dir);
Line 229 
Line 230 
         if (options.strict_modes &&          if (options.strict_modes &&
             ((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("Rhosts authentication refused for %.100s: "                  logit("Rhosts authentication refused for %.100s: "
                     "bad ownership or modes for home directory.", pw->pw_name);                      "bad ownership or modes for home directory.", pw->pw_name);
                 auth_debug_add("Rhosts authentication refused for %.100s: "                  auth_debug_add("Rhosts authentication refused for %.100s: "
                     "bad ownership or modes for home directory.", pw->pw_name);                      "bad ownership or modes for home directory.", pw->pw_name);
Line 256 
Line 257 
                 if (options.strict_modes &&                  if (options.strict_modes &&
                     ((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("Rhosts authentication refused for %.100s: bad modes for %.200s",                          logit("Rhosts authentication refused for %.100s: bad modes for %.200s",
                             pw->pw_name, buf);                              pw->pw_name, buf);
                         auth_debug_add("Bad file modes for %.200s", buf);                          auth_debug_add("Bad file modes for %.200s", buf);
                         continue;                          continue;

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.28.4.1