diff options
author | Jay Freeman <saurik@saurik.com> | 2008-02-03 01:01:27 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-02-03 01:01:27 +0000 |
commit | ef02eb874b5cd7dd514ae204ea70465e3bebd012 (patch) | |
tree | 01f3103a53f1e827bed0b2ec463995b0ca793510 /data/system-cmds | |
parent | 68fcb05a1797cc0593c68e3c0b801b8ba1cc3c52 (diff) |
Fixed passwd on 1.1.3.
git-svn-id: http://svn.telesphoreo.org/trunk@44 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/system-cmds')
-rw-r--r-- | data/system-cmds/make.sh | 8 | ||||
-rw-r--r-- | data/system-cmds/passwd.diff | 43 |
2 files changed, 49 insertions, 2 deletions
diff --git a/data/system-cmds/make.sh b/data/system-cmds/make.sh index 0275ab3e8..284e5dad4 100644 --- a/data/system-cmds/make.sh +++ b/data/system-cmds/make.sh @@ -1,6 +1,7 @@ shopt -s extglob pkg:extract cd * +pkg:patch cd getconf.tproj for gperf in *.gperf; do @@ -8,11 +9,14 @@ for gperf in *.gperf; do done cd .. +arm-apple-darwin-gcc -o passwd passwd.tproj/!(od_passwd).c -I. -DTARGET_OS_EMBEDDED +arm-apple-darwin-strip passwd + cp -va "${PKG_DATA}"/kextmanager* . # dmesg reboot shutdown -for tproj in getconf getty hostinfo iostat login nvram passwd sync sysctl vipw zprint; do +for tproj in getconf getty hostinfo iostat login nvram sync sysctl vipw zprint; do echo "${tproj}" - arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/!(od_passwd).c -I. -D'__FBSDID(x)=' -DTARGET_OS_EMBEDDED -framework CoreFoundation -framework IOKit kextmanagerUser.c + arm-apple-darwin-gcc -o "${tproj}" "${tproj}.tproj"/*.c -I. -D'__FBSDID(x)=' -DTARGET_OS_EMBEDDED -framework CoreFoundation -framework IOKit kextmanagerUser.c arm-apple-darwin-strip "${tproj}" done diff --git a/data/system-cmds/passwd.diff b/data/system-cmds/passwd.diff new file mode 100644 index 000000000..25803872f --- /dev/null +++ b/data/system-cmds/passwd.diff @@ -0,0 +1,43 @@ +diff -ru system_cmds-431/passwd.tproj/file_passwd.c system_cmds-431+iPhone/passwd.tproj/file_passwd.c +--- system_cmds-431/passwd.tproj/file_passwd.c 2006-02-21 03:47:32.000000000 +0000 ++++ system_cmds-431+iPhone/passwd.tproj/file_passwd.c 2008-02-03 00:59:35.000000000 +0000 +@@ -211,31 +211,31 @@ + { + fprintf(stderr, "warning: bad format for entry: \"%s\"\n", line); + fprintf(tfp, "%s\n", line); +- if (cfp != NULL) fprintf(cfp, "%s\n", line); + continue; + } + + if (strcmp(newpw->pw_name, pw->pw_name)) + { + fprintf(tfp, "%s\n", line); +- if (cfp != NULL) fprintf(cfp, "%s\n", line); +- continue; +- } ++ } else { ++ pw = newpw; + + fprintf(tfp, "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s\n", + newpw->pw_name, newpw->pw_passwd, newpw->pw_uid, newpw->pw_gid, + newpw->pw_class, newpw->pw_change, newpw->pw_expire, + newpw->pw_gecos, newpw->pw_dir, newpw->pw_shell); ++ } ++ + if (cfp != NULL) + { +- fprintf(cfp, "%s:",newpw->pw_name); +- if ((newpw->pw_passwd == NULL) || (newpw->pw_passwd[0] == '\0')) ++ fprintf(cfp, "%s:",pw->pw_name); ++ if ((pw->pw_passwd == NULL) || (pw->pw_passwd[0] == '\0')) + fprintf(cfp, ":"); + else + fprintf(cfp, "*:"); + fprintf(cfp, "%d:%d:%s:%s:%s\n", +- newpw->pw_uid, newpw->pw_gid, newpw->pw_gecos, +- newpw->pw_dir, newpw->pw_shell); ++ pw->pw_uid, pw->pw_gid, pw->pw_gecos, ++ pw->pw_dir, pw->pw_shell); + } + } + |