From c9aca4561ddb1165890fae0c8b921a2504c6273f Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Tue, 4 Jun 2002 20:06:25 +0000 Subject: Implement two types of suid/sgid support for BusyBox: 1) tinylogin like with compile time selection and a chown root.root 2) Runtime configurable via /etc/busybox.conf (docu is in the works) [Parts of this patch may overlap with my other two patches] --- include/busybox.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/busybox.h') diff --git a/include/busybox.h b/include/busybox.h index ea58c0c28..2e54ac55e 100644 --- a/include/busybox.h +++ b/include/busybox.h @@ -39,6 +39,7 @@ #include +#include "libbb.h" enum Location { _BB_DIR_ROOT = 0, @@ -48,10 +49,17 @@ enum Location { _BB_DIR_USR_SBIN }; +enum SUIDRoot { + _BB_SUID_NEVER = 0, + _BB_SUID_MAYBE, + _BB_SUID_ALWAYS +}; + struct BB_applet { const char* name; int (*main)(int argc, char** argv); - enum Location location; + enum Location location : 4; + enum SUIDRoot need_suid : 4; }; /* From busybox.c */ extern const struct BB_applet applets[]; @@ -99,7 +107,7 @@ extern const struct BB_applet applets[]; /* Pull in the utility routines from libbb */ -#include "libbb.h" +// #include "libbb.h" /* Try to pull in PATH_MAX */ #include -- cgit v1.2.3