1 --- busybox-1.00.old/loginutils/passwd.c 2004-09-15 04:39:09.000000000 +0200
2 +++ busybox-1.00/loginutils/passwd.c 2005-03-23 15:31:07.000000000 +0100
4 snprintf(filename, sizeof filename, "%s", bb_path_passwd_file);
7 - if (((fp = fopen(filename, "r+")) == 0) || (fstat(fileno(fp), &sb))) {
8 + if (((fp = fopen(filename, "r")) == 0) || (fstat(fileno(fp), &sb))) {
14 /* Lock the password file before updating */
15 lock.l_type = F_WRLCK;
16 lock.l_whence = SEEK_SET;
20 lock.l_type = F_UNLCK;
23 snprintf(buf, sizeof buf, "%s-", filename);
24 if (create_backup(buf, fp)) {
30 if (rename(buf, filename) < 0) {
31 fcntl(fileno(fp), F_SETLK, &lock);