[BusyBox-cvs] CVS busybox/loginutils
CVS User bug1
bug1 at codepoet.org
Wed Sep 15 02:39:09 UTC 2004
Update of /var/cvs/busybox/loginutils
In directory nail:/tmp/cvs-serv4510/loginutils
Modified Files:
passwd.c
Log Message:
Only write to shadow file is shadow passwords are enabled. Patch by magicfox modified by myself to retain check for shadow file access.
--- /var/cvs/busybox/loginutils/passwd.c 2004/09/02 22:21:41 1.8
+++ /var/cvs/busybox/loginutils/passwd.c 2004/09/15 02:39:09 1.9
@@ -38,7 +38,6 @@
char buffer[80];
char username[32];
char *pw_rest;
- int has_shadow = 0;
int mask;
int continued;
FILE *fp;
@@ -46,12 +45,12 @@
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);
}
More information about the busybox-cvs
mailing list