diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-11 20:02:06 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-04-11 20:02:06 +0000 |
commit | 01dbbdf612b53132546517b7e73d82d46e6808b6 (patch) | |
tree | 591135c252482b7b928149b367c514ee161d02df /lib | |
parent | 74fdf19ae79901a077ae411a66bbdbe693b0c1a6 (diff) | |
download | coreutils-01dbbdf612b53132546517b7e73d82d46e6808b6.tar.xz |
Include unistd-safer.h.
(fts_safe_changedir): Use fd_safer.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fts.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 <stdlib.h> #include <string.h> #include <unistd.h> @@ -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; |