aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/crond.c8
-rw-r--r--networking/httpd.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index ebd48121d..e3714df19 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -292,9 +292,9 @@ static void ChangeUser(struct passwd *pas)
292 /* careful: we're after vfork! */ 292 /* careful: we're after vfork! */
293 change_identity(pas); /* - initgroups, setgid, setuid */ 293 change_identity(pas); /* - initgroups, setgid, setuid */
294 if (chdir(pas->pw_dir) < 0) { 294 if (chdir(pas->pw_dir) < 0) {
295 crondlog(WARN9 "can't chdir(%s)", pas->pw_dir); 295 crondlog(WARN9 "chdir(%s)", pas->pw_dir);
296 if (chdir(TMPDIR) < 0) { 296 if (chdir(TMPDIR) < 0) {
297 crondlog(DIE9 "can't chdir(%s)", TMPDIR); /* exits */ 297 crondlog(DIE9 "chdir(%s)", TMPDIR); /* exits */
298 } 298 }
299 } 299 }
300} 300}
@@ -575,14 +575,14 @@ static void SynchronizeDir(void)
575 */ 575 */
576 unlink(CRONUPDATE); 576 unlink(CRONUPDATE);
577 if (chdir(CDir) < 0) { 577 if (chdir(CDir) < 0) {
578 crondlog(DIE9 "can't chdir(%s)", CDir); 578 crondlog(DIE9 "chdir(%s)", CDir);
579 } 579 }
580 { 580 {
581 DIR *dir = opendir("."); 581 DIR *dir = opendir(".");
582 struct dirent *den; 582 struct dirent *den;
583 583
584 if (!dir) 584 if (!dir)
585 crondlog(DIE9 "can't chdir(%s)", "."); /* exits */ 585 crondlog(DIE9 "chdir(%s)", "."); /* exits */
586 while ((den = readdir(dir)) != NULL) { 586 while ((den = readdir(dir)) != NULL) {
587 if (strchr(den->d_name, '.') != NULL) { 587 if (strchr(den->d_name, '.') != NULL) {
588 continue; 588 continue;
diff --git a/networking/httpd.c b/networking/httpd.c
index 227803abf..5bbc7ee85 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1432,7 +1432,7 @@ static void send_cgi_and_exit(
1432 if (script != url) { /* paranoia */ 1432 if (script != url) { /* paranoia */
1433 *script = '\0'; 1433 *script = '\0';
1434 if (chdir(url + 1) != 0) { 1434 if (chdir(url + 1) != 0) {
1435 bb_perror_msg("chdir %s", url + 1); 1435 bb_perror_msg("chdir(%s)", url + 1);
1436 goto error_execing_cgi; 1436 goto error_execing_cgi;
1437 } 1437 }
1438 // not needed: *script = '/'; 1438 // not needed: *script = '/';