diff options
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 fa19e8488..9fa17cfa1 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -631,7 +631,7 @@ static void check_suid(int applet_no) | |||
631 | /* same group / in group */ | 631 | /* same group / in group */ |
632 | m >>= 3; | 632 | m >>= 3; |
633 | if (!(m & S_IXOTH)) /* is x bit not set? */ | 633 | if (!(m & S_IXOTH)) /* is x bit not set? */ |
634 | bb_error_msg_and_die("you have no permission to run this applet"); | 634 | bb_simple_error_msg_and_die("you have no permission to run this applet"); |
635 | 635 | ||
636 | /* We set effective AND saved ids. If saved-id is not set | 636 | /* We set effective AND saved ids. If saved-id is not set |
637 | * like we do below, seteuid(0) can still later succeed! */ | 637 | * like we do below, seteuid(0) can still later succeed! */ |
@@ -643,7 +643,7 @@ static void check_suid(int applet_no) | |||
643 | rgid = sct->m_ugid.gid; | 643 | rgid = sct->m_ugid.gid; |
644 | /* else: we will set egid = rgid, thus dropping sgid effect */ | 644 | /* else: we will set egid = rgid, thus dropping sgid effect */ |
645 | if (setresgid(-1, rgid, rgid)) | 645 | if (setresgid(-1, rgid, rgid)) |
646 | bb_perror_msg_and_die("setresgid"); | 646 | bb_simple_perror_msg_and_die("setresgid"); |
647 | 647 | ||
648 | /* Are we directed to change uid | 648 | /* Are we directed to change uid |
649 | * (APPLET = s** USER.GROUP or APPLET = S** USER.GROUP)? | 649 | * (APPLET = s** USER.GROUP or APPLET = S** USER.GROUP)? |
@@ -653,7 +653,7 @@ static void check_suid(int applet_no) | |||
653 | uid = sct->m_ugid.uid; | 653 | uid = sct->m_ugid.uid; |
654 | /* else: we will set euid = ruid, thus dropping suid effect */ | 654 | /* else: we will set euid = ruid, thus dropping suid effect */ |
655 | if (setresuid(-1, uid, uid)) | 655 | if (setresuid(-1, uid, uid)) |
656 | bb_perror_msg_and_die("setresuid"); | 656 | bb_simple_perror_msg_and_die("setresuid"); |
657 | 657 | ||
658 | goto ret; | 658 | goto ret; |
659 | } | 659 | } |
@@ -663,7 +663,7 @@ static void check_suid(int applet_no) | |||
663 | 663 | ||
664 | if (!onetime) { | 664 | if (!onetime) { |
665 | onetime = 1; | 665 | onetime = 1; |
666 | bb_error_msg("using fallback suid method"); | 666 | bb_simple_error_msg("using fallback suid method"); |
667 | } | 667 | } |
668 | } | 668 | } |
669 | # endif | 669 | # endif |
@@ -673,7 +673,7 @@ static void check_suid(int applet_no) | |||
673 | /* Real uid is not 0. If euid isn't 0 too, suid bit | 673 | /* Real uid is not 0. If euid isn't 0 too, suid bit |
674 | * is most probably not set on our executable */ | 674 | * is most probably not set on our executable */ |
675 | if (geteuid()) | 675 | if (geteuid()) |
676 | bb_error_msg_and_die("must be suid to work properly"); | 676 | bb_simple_error_msg_and_die("must be suid to work properly"); |
677 | } else if (APPLET_SUID(applet_no) == BB_SUID_DROP) { | 677 | } else if (APPLET_SUID(applet_no) == BB_SUID_DROP) { |
678 | /* | 678 | /* |
679 | * Drop all privileges. | 679 | * Drop all privileges. |