diff options
author | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-06-04 20:06:25 +0000 |
---|---|---|
committer | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-06-04 20:06:25 +0000 |
commit | 594f51c1b93a4e0b10d23cb5f23deb3ce10bab08 (patch) | |
tree | 584aaddcc5ef4d9e715f27e9d1d8dad98b7a5074 /include/busybox.h | |
parent | 076115967321ef47cff560a197d90d4605a01cf5 (diff) | |
download | busybox-w32-594f51c1b93a4e0b10d23cb5f23deb3ce10bab08.tar.gz busybox-w32-594f51c1b93a4e0b10d23cb5f23deb3ce10bab08.tar.bz2 busybox-w32-594f51c1b93a4e0b10d23cb5f23deb3ce10bab08.zip |
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]
git-svn-id: svn://busybox.net/trunk/busybox@4855 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'include/busybox.h')
-rw-r--r-- | include/busybox.h | 12 |
1 files changed, 10 insertions, 2 deletions
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 @@ | |||
39 | 39 | ||
40 | #include <features.h> | 40 | #include <features.h> |
41 | 41 | ||
42 | #include "libbb.h" | ||
42 | 43 | ||
43 | enum Location { | 44 | enum Location { |
44 | _BB_DIR_ROOT = 0, | 45 | _BB_DIR_ROOT = 0, |
@@ -48,10 +49,17 @@ enum Location { | |||
48 | _BB_DIR_USR_SBIN | 49 | _BB_DIR_USR_SBIN |
49 | }; | 50 | }; |
50 | 51 | ||
52 | enum SUIDRoot { | ||
53 | _BB_SUID_NEVER = 0, | ||
54 | _BB_SUID_MAYBE, | ||
55 | _BB_SUID_ALWAYS | ||
56 | }; | ||
57 | |||
51 | struct BB_applet { | 58 | struct BB_applet { |
52 | const char* name; | 59 | const char* name; |
53 | int (*main)(int argc, char** argv); | 60 | int (*main)(int argc, char** argv); |
54 | enum Location location; | 61 | enum Location location : 4; |
62 | enum SUIDRoot need_suid : 4; | ||
55 | }; | 63 | }; |
56 | /* From busybox.c */ | 64 | /* From busybox.c */ |
57 | extern const struct BB_applet applets[]; | 65 | extern const struct BB_applet applets[]; |
@@ -99,7 +107,7 @@ extern const struct BB_applet applets[]; | |||
99 | 107 | ||
100 | 108 | ||
101 | /* Pull in the utility routines from libbb */ | 109 | /* Pull in the utility routines from libbb */ |
102 | #include "libbb.h" | 110 | // #include "libbb.h" |
103 | 111 | ||
104 | /* Try to pull in PATH_MAX */ | 112 | /* Try to pull in PATH_MAX */ |
105 | #include <limits.h> | 113 | #include <limits.h> |