--- sudo.c.orig 2009-04-07 11:51:14.000000000 +0000 +++ sudo.c 2009-04-07 11:51:30.000000000 +0000 @@ -1086,7 +1086,7 @@ log_error(USE_ERRNO, "can't read %s", sudoers); rewind(fp); } - (void) fcntl(fileno(fp), F_SETFD, 1); + if (fp) (void) fcntl(fileno(fp), F_SETFD, 1); set_perms(PERM_ROOT); /* change back to root */ return(fp);