aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRyan Mallon <rmallon@gmail.com>2013-10-08 14:52:49 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-10-08 14:52:49 +0200
commit5906a5c26c392b9687d14951a6da3a5195b576be (patch)
tree0f7038d653988cb63f9efe431b9e6674173f60d1 /include
parent932e233a491b6a5b9293ace04ef74667a95d739c (diff)
downloadbusybox-5906a5c26c392b9687d14951a6da3a5195b576be.tar.gz
libbb: Add xsetegid(), xseteuid(), xopen_as_uid_gid() functions
Signed-off-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 1315e5f8f..3ab1d6b46 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -461,6 +461,8 @@ void record_signo(int signo); /* not FAST_FUNC! */
void xsetgid(gid_t gid) FAST_FUNC;
void xsetuid(uid_t uid) FAST_FUNC;
+void xsetegid(gid_t egid) FAST_FUNC;
+void xseteuid(uid_t euid) FAST_FUNC;
void xchdir(const char *path) FAST_FUNC;
void xchroot(const char *path) FAST_FUNC;
void xsetenv(const char *key, const char *value) FAST_FUNC;
@@ -469,11 +471,12 @@ void bb_unsetenv_and_free(char *key) FAST_FUNC;
void xunlink(const char *pathname) FAST_FUNC;
void xstat(const char *pathname, struct stat *buf) FAST_FUNC;
void xfstat(int fd, struct stat *buf, const char *errmsg) FAST_FUNC;
+int open3_or_warn(const char *pathname, int flags, int mode) FAST_FUNC;
+int open_or_warn(const char *pathname, int flags) FAST_FUNC;
+int xopen3(const char *pathname, int flags, int mode) FAST_FUNC;
int xopen(const char *pathname, int flags) FAST_FUNC;
int xopen_nonblocking(const char *pathname) FAST_FUNC;
-int xopen3(const char *pathname, int flags, int mode) FAST_FUNC;
-int open_or_warn(const char *pathname, int flags) FAST_FUNC;
-int open3_or_warn(const char *pathname, int flags, int mode) FAST_FUNC;
+int xopen_as_uid_gid(const char *pathname, int flags, uid_t u, gid_t g) FAST_FUNC;
int open_or_warn_stdin(const char *pathname) FAST_FUNC;
int xopen_stdin(const char *pathname) FAST_FUNC;
void xrename(const char *oldpath, const char *newpath) FAST_FUNC;