aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/applets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/applets/applets.c b/applets/applets.c
index 00102daa3..10d4c948c 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -135,7 +135,7 @@ static void parse_config_file(void)
135 || !S_ISREG(st.st_mode) /* Not a regular file? */ 135 || !S_ISREG(st.st_mode) /* Not a regular file? */
136 || (st.st_uid != 0) /* Not owned by root? */ 136 || (st.st_uid != 0) /* Not owned by root? */
137 || (st.st_mode & (S_IWGRP | S_IWOTH)) /* Writable by non-root? */ 137 || (st.st_mode & (S_IWGRP | S_IWOTH)) /* Writable by non-root? */
138 || !(f = fopen(config_file, "r")) /* Can not open? */ 138 || !(f = fopen(config_file, "r")) /* Cannot open? */
139 ) { 139 ) {
140 return; 140 return;
141 } 141 }
@@ -338,7 +338,7 @@ static void check_suid(struct BB_applet *applet)
338 m >>= 3; 338 m >>= 3;
339 339
340 if (!(m & S_IXOTH)) /* is x bit not set ? */ 340 if (!(m & S_IXOTH)) /* is x bit not set ? */
341 bb_error_msg_and_die ("You have no permission to run this applet!"); 341 bb_error_msg_and_die("you have no permission to run this applet!");
342 342
343 if ((sct->m_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { /* *both* have to be set for sgid */ 343 if ((sct->m_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { /* *both* have to be set for sgid */
344 xsetgid(sct->m_gid); 344 xsetgid(sct->m_gid);
@@ -365,7 +365,7 @@ static void check_suid(struct BB_applet *applet)
365#endif 365#endif
366 366
367 if (applet->need_suid == _BB_SUID_ALWAYS) { 367 if (applet->need_suid == _BB_SUID_ALWAYS) {
368 if (geteuid()) bb_error_msg_and_die("Applet requires root privileges!"); 368 if (geteuid()) bb_error_msg_and_die("applet requires root privileges!");
369 } else if (applet->need_suid == _BB_SUID_NEVER) { 369 } else if (applet->need_suid == _BB_SUID_NEVER) {
370 xsetgid(rgid); /* drop all privileges */ 370 xsetgid(rgid); /* drop all privileges */
371 xsetuid(ruid); 371 xsetuid(ruid);