--- stmpclean-0.3.orig/stmpclean.c +++ stmpclean-0.3/stmpclean.c @@ -405,7 +405,11 @@ main(argc, argv) * For logging niceties in case one of the directories on the command * line is bad. */ - chdir("/"); + if (chdir("/") < 0) { + syslog(LOG_ERR, + "cannot chdir to /: %m, exiting"); + exit(1); + } now = time(NULL); rlp.rlim_max = 0; rlp.rlim_cur = 0;