aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-05-02 23:01:32 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-05-02 23:01:32 +0000
commitd94108a8b93c96f6a829aae2dc03706eb98f827e (patch)
treec1f857892931a55c1f651b44d8f0c60121ea8e43 /libbb
parent5a5a24e33b297a1cbaeac8dc9f14a7bd5685d6d9 (diff)
downloadbusybox-w32-d94108a8b93c96f6a829aae2dc03706eb98f827e.tar.gz
busybox-w32-d94108a8b93c96f6a829aae2dc03706eb98f827e.tar.bz2
busybox-w32-d94108a8b93c96f6a829aae2dc03706eb98f827e.zip
fix suid config handling
git-svn-id: svn://busybox.net/trunk/busybox@18547 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 7e1109470..a85a046cf 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -386,13 +386,13 @@ char *bin2hex(char *p, const char *cp, int count)
386// setgid() will fail and we'll _still_be_root_, which is bad.) 386// setgid() will fail and we'll _still_be_root_, which is bad.)
387void xsetgid(gid_t gid) 387void xsetgid(gid_t gid)
388{ 388{
389 if (setgid(gid)) bb_error_msg_and_die("setgid"); 389 if (setgid(gid)) bb_perror_msg_and_die("setgid");
390} 390}
391 391
392// Die with an error message if we can't set uid. (See xsetgid() for why.) 392// Die with an error message if we can't set uid. (See xsetgid() for why.)
393void xsetuid(uid_t uid) 393void xsetuid(uid_t uid)
394{ 394{
395 if (setuid(uid)) bb_error_msg_and_die("setuid"); 395 if (setuid(uid)) bb_perror_msg_and_die("setuid");
396} 396}
397 397
398// Return how long the file at fd is, if there's any way to determine it. 398// Return how long the file at fd is, if there's any way to determine it.