From 9d14879bef4b6be0d962531b1773f2bf7ecd6365 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Tue, 30 Jan 2007 13:37:21 +0000 Subject: busybox 1.4.0 support files --- package/busybox/busybox-1.4.0-conf.patch | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/busybox/busybox-1.4.0-conf.patch (limited to 'package/busybox/busybox-1.4.0-conf.patch') diff --git a/package/busybox/busybox-1.4.0-conf.patch b/package/busybox/busybox-1.4.0-conf.patch new file mode 100644 index 000000000..e265a7a22 --- /dev/null +++ b/package/busybox/busybox-1.4.0-conf.patch @@ -0,0 +1,37 @@ +--- busybox-1.4.0/applets/applets.c Fri Jan 19 22:23:11 2007 ++++ busybox-1.4.0-conf/applets/applets.c Wed Jan 24 10:15:49 2007 +@@ -340,20 +340,26 @@ + if (sct) { + mode_t m = sct->m_mode; + +- if (sct->m_uid == ruid) /* same uid */ ++ if (sct->m_uid == ruid) ++ /* same uid */ + m >>= 6; +- else if ((sct->m_gid == rgid) || ingroup(ruid, sct->m_gid)) /* same group / in group */ ++ else if ((sct->m_gid == rgid) || ingroup(ruid, sct->m_gid)) ++ /* same group / in group */ + m >>= 3; + + if (!(m & S_IXOTH)) /* is x bit not set ? */ + bb_error_msg_and_die("you have no permission to run this applet!"); + +- if ((sct->m_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { /* *both* have to be set for sgid */ +- xsetgid(sct->m_gid); +- } else xsetgid(rgid); /* no sgid -> drop */ +- +- if (sct->m_mode & S_ISUID) xsetuid(sct->m_uid); +- else xsetuid(ruid); /* no suid -> drop */ ++ if (sct->m_gid != 0) { ++ /* _both_ have to be set for sgid */ ++ if ((sct->m_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { ++ xsetgid(sct->m_gid); ++ } else xsetgid(rgid); /* no sgid -> drop */ ++ } ++ if (sct->m_uid != 0) { ++ if (sct->m_mode & S_ISUID) xsetuid(sct->m_uid); ++ else xsetuid(ruid); /* no suid -> drop */ ++ } + } else { + /* default: drop all privileges */ + xsetgid(rgid); -- cgit v1.2.3