← Commit list

995d96a99

Glenn L McGrath
Glenn L McGrath
2004-09-15
FAILED Duration: 33s

Subject

Only write to shadow file is shadow passwords are enabled. Patch by magicfox modified by myself to retain check for shadow file access.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/passwd.c+4 -5
@@ -38,7 +38,6 @@ extern int update_passwd(const struct passwd *pw, char *crypt_pw)
char buffer[80];
char username[32];
char *pw_rest;
- int has_shadow = 0;
int mask;
int continued;
FILE *fp;
@@ -46,12 +45,12 @@ extern int update_passwd(const struct passwd *pw, char *crypt_pw)
struct stat sb;
struct flock lock;
+#ifdef CONFIG_FEATURE_SHADOWPASSWDS
if (access(bb_path_shadow_file, F_OK) == 0) {
- has_shadow = 1;
- }
- if (has_shadow) {
snprintf(filename, sizeof filename, "%s", bb_path_shadow_file);
- } else {
+ } else
+#endif
+ {
snprintf(filename, sizeof filename, "%s", bb_path_passwd_file);
}