[BusyBox] passwd still tries to update /etc/shadow when CONFIG_FEATURE_SHADOWPASSWDS is disabled?

john cooper john.cooper at timesys.com
Sun Oct 10 14:49:52 UTC 2004


It seems loginutils/passwd.c:update_passwd() has it's own notion
of whether to use /etc/passwd or /etc/shadow.  Namely even if
CONFIG_FEATURE_SHADOWPASSWDS is not set, update_passwd() will
modify /etc/shadow if it found to be accessible.  Is this an
known issue?

# pr -l90 -n busybox-1.00-rc3/loginutils/passwd.c

    :
   49           if (access(bb_path_shadow_file, F_OK) == 0) {
   50                   has_shadow = 1;
   51           }
   52           if (has_shadow) {
   53                   snprintf(filename, sizeof filename, "%s", 
bb_path_shadow_file);
   54           } else {
   55                   snprintf(filename, sizeof filename, "%s", 
bb_path_passwd_file);
   56           }
   57
   58           if (((fp = fopen(filename, "r+")) == 0) || 
(fstat(fileno(fp), &sb))) {
   59                   /* return 0; */
   60                   return 1;
   61           }

-- 
john.cooper at timesys.com





More information about the busybox mailing list