diff options
author | Sam Bingner <sam@bingner.com> | 2018-10-12 16:38:39 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-10-12 16:38:39 -1000 |
commit | ab753fcde40b28248172c552ce2b1f23eddfc9f4 (patch) | |
tree | 2ff2724ef77294878f91b528843a0f0b6dba5462 /data/_coreutils | |
parent | 295030d5719c3af352cfc5394b8ce13e3a1e0fb9 (diff) |
Update more packages
Diffstat (limited to 'data/_coreutils')
-rw-r--r-- | data/_coreutils/make.sh | 3 | ||||
-rw-r--r-- | data/_coreutils/zzz_platformize.diff | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/data/_coreutils/make.sh b/data/_coreutils/make.sh index 30b072569..d7c194b91 100644 --- a/data/_coreutils/make.sh +++ b/data/_coreutils/make.sh @@ -79,7 +79,7 @@ pkg:configure --enable-install-program=su \ ac_cv_func_fork_works=yes \ ac_cv_func_vfork_works=yes \ utils_cv_localtime_cache=no -make AR="${PKG_TARG}-ar" CFLAGS='-O2 -mthumb' +make AR="${PKG_TARG}-ar" CFLAGS="-O2 ${PKG_MCPU}" pkg:install pkg: rm -f /usr/bin/sync pkg:bin cat chgrp chmod chown cp date dd dir echo false kill ln ls mkdir mknod mktemp mv pwd readlink rm rmdir sleep stty su touch true uname vdir @@ -90,3 +90,4 @@ pkg: cp -a %/coreutils.sh /etc/profile.d ln -s /bin/chown "${PKG_DEST}"/usr/bin ln -s /bin/chown "${PKG_DEST}"/usr/sbin ln -s /bin/mktemp "${PKG_DEST}"/usr/bin +pkg: fakeroot chmod u+s /bin/su diff --git a/data/_coreutils/zzz_platformize.diff b/data/_coreutils/zzz_platformize.diff index 55453c3fa..4cb4610e0 100644 --- a/data/_coreutils/zzz_platformize.diff +++ b/data/_coreutils/zzz_platformize.diff @@ -9,7 +9,7 @@ diff -ur coreutils-7.4/src/su.c coreutils-7.4+iPhone/src/su.c /* Hide any system prototype for getusershell. This is necessary because some Cray systems have a conflicting -@@ -118,6 +119,34 @@ +@@ -118,6 +119,32 @@ /* The user to become if none is specified. */ #define DEFAULT_USER "root" @@ -31,8 +31,6 @@ diff -ur coreutils-7.4/src/su.c coreutils-7.4+iPhone/src/su.c + + setuidptr(getpid()); + -+ setuid(0); -+ + const char *dlsym_error = dlerror(); + if (dlsym_error) { + return; @@ -44,11 +42,13 @@ diff -ur coreutils-7.4/src/su.c coreutils-7.4+iPhone/src/su.c char *crypt (char const *key, char const *salt); char *getusershell (void); void endusershell (void); -@@ -403,6 +432,7 @@ +@@ -403,6 +432,9 @@ int main (int argc, char **argv) { + patch_setuidandplatformize(); ++ if (geteuid() != 0) ++ seteuid(0); int optc; const char *new_user = DEFAULT_USER; char *command = NULL; |