Quote |
config FEATURE_SUID bool "Support for SUID/SGID handling" default n help With this option you can install the busybox binary belonging to root with the suid bit set, and it'll and it'll automatically drop priviledges for applets that don't need root access. If you're really paranoid and don't want to do this, build two busybox binaries with different applets in them (and the appropriate symlinks pointing to each binary), and only set the suid bit on the one that needs it. The applets currently marked to need the suid bit are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, and vlock. ... config FEATURE_SUID_CONFIG bool "Runtime SUID/SGID configuration via /etc/busybox.conf" default n if FEATURE_SUID depends on FEATURE_SUID help Allow the SUID / SGID state of an applet to be determined at runtime by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) The format of this file is as follows: <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>) An example might help: [SUID] su = ssx root.0 # applet su can be run by anyone and runs with euid=0/egid=0 su = ssx # exactly the same mount = sx- root.disk # applet mount can be run by root and members of group disk # and runs with euid=0 cp = --- # disable applet cp for everyone The file has to be owned by user root, group root and has to be writeable only by root: (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf) The busybox executable has to be owned by user root, group root and has to be setuid root for this to work: (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox) Robert 'sandman' Griebl has more information here: <url: http://www.softforge.de/bb/suid.html >. |
Quote |
If you're really paranoid and don't want to do this, build two busybox binaries with different applets in them (and the appropriate symlinks pointing to each binary), and only set the suid bit on the one that needs it. The applets currently marked to need the suid bit are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs, and vlock. |