On 1/10/2014 12:37 AM, Laurent Bercot wrote:
You're performing too much work copying your argument list. :P
The wrapper should be entirely transparent: busybox shouldn't
even notice it has been run through it, so it should be called
with the exact same argv. Here's what I do
[...]
If you didn't want to have to maintain the list within the binary, and
want to depend on the filesystem to declare which applets are allowed,
you could write the wrapper to stat "/bin/$NAME" to verify that it (and
"/" and "/bin") are
* owned by root
* not writable by other users
* on the root filesystem (compare device number to device number of "/")
* has set-uid bit
This would be authorization-by-the-filesystem that you could rely on,
and is intuitive to configure.
It's a lot more code to write, but would still be a small binary.
-Mike
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox