diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /libbb/appletlib.c | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 1f1a18aab..ef7d1ccd9 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -650,7 +650,7 @@ static void check_suid(int applet_no) | |||
650 | /* same group / in group */ | 650 | /* same group / in group */ |
651 | m >>= 3; | 651 | m >>= 3; |
652 | if (!(m & S_IXOTH)) /* is x bit not set? */ | 652 | if (!(m & S_IXOTH)) /* is x bit not set? */ |
653 | bb_error_msg_and_die("you have no permission to run this applet"); | 653 | bb_simple_error_msg_and_die("you have no permission to run this applet"); |
654 | 654 | ||
655 | /* We set effective AND saved ids. If saved-id is not set | 655 | /* We set effective AND saved ids. If saved-id is not set |
656 | * like we do below, seteuid(0) can still later succeed! */ | 656 | * like we do below, seteuid(0) can still later succeed! */ |
@@ -662,7 +662,7 @@ static void check_suid(int applet_no) | |||
662 | rgid = sct->m_ugid.gid; | 662 | rgid = sct->m_ugid.gid; |
663 | /* else: we will set egid = rgid, thus dropping sgid effect */ | 663 | /* else: we will set egid = rgid, thus dropping sgid effect */ |
664 | if (setresgid(-1, rgid, rgid)) | 664 | if (setresgid(-1, rgid, rgid)) |
665 | bb_perror_msg_and_die("setresgid"); | 665 | bb_simple_perror_msg_and_die("setresgid"); |
666 | 666 | ||
667 | /* Are we directed to change uid | 667 | /* Are we directed to change uid |
668 | * (APPLET = s** USER.GROUP or APPLET = S** USER.GROUP)? | 668 | * (APPLET = s** USER.GROUP or APPLET = S** USER.GROUP)? |
@@ -672,7 +672,7 @@ static void check_suid(int applet_no) | |||
672 | uid = sct->m_ugid.uid; | 672 | uid = sct->m_ugid.uid; |
673 | /* else: we will set euid = ruid, thus dropping suid effect */ | 673 | /* else: we will set euid = ruid, thus dropping suid effect */ |
674 | if (setresuid(-1, uid, uid)) | 674 | if (setresuid(-1, uid, uid)) |
675 | bb_perror_msg_and_die("setresuid"); | 675 | bb_simple_perror_msg_and_die("setresuid"); |
676 | 676 | ||
677 | goto ret; | 677 | goto ret; |
678 | } | 678 | } |
@@ -682,7 +682,7 @@ static void check_suid(int applet_no) | |||
682 | 682 | ||
683 | if (!onetime) { | 683 | if (!onetime) { |
684 | onetime = 1; | 684 | onetime = 1; |
685 | bb_error_msg("using fallback suid method"); | 685 | bb_simple_error_msg("using fallback suid method"); |
686 | } | 686 | } |
687 | } | 687 | } |
688 | # endif | 688 | # endif |
@@ -692,7 +692,7 @@ static void check_suid(int applet_no) | |||
692 | /* Real uid is not 0. If euid isn't 0 too, suid bit | 692 | /* Real uid is not 0. If euid isn't 0 too, suid bit |
693 | * is most probably not set on our executable */ | 693 | * is most probably not set on our executable */ |
694 | if (geteuid()) | 694 | if (geteuid()) |
695 | bb_error_msg_and_die("must be suid to work properly"); | 695 | bb_simple_error_msg_and_die("must be suid to work properly"); |
696 | } else if (APPLET_SUID(applet_no) == BB_SUID_DROP) { | 696 | } else if (APPLET_SUID(applet_no) == BB_SUID_DROP) { |
697 | /* | 697 | /* |
698 | * Drop all privileges. | 698 | * Drop all privileges. |