From: Paul Eggert Date: Mon, 11 Apr 2005 20:02:06 +0000 (+0000) Subject: Include unistd-safer.h. X-Git-Tag: CPPI-1_12~1047 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01dbbdf612b53132546517b7e73d82d46e6808b6;p=thirdparty%2Fcoreutils.git Include unistd-safer.h. (fts_safe_changedir): Use fd_safer. --- diff --git a/lib/fts.c b/lib/fts.c index c4f704dcba..9990426e34 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -68,6 +68,7 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #include "dirfd.h" #include "fts_.h" #include "intprops.h" +#include "unistd-safer.h" #include #include #include @@ -1429,7 +1430,7 @@ fts_safe_changedir(sp, p, fd, path) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = diropen (path)) < 0) + if (fd < 0 && (newfd = fd_safer (diropen (path))) < 0) return (-1); if (fstat(newfd, &sb)) { ret = -1;