diff options
author | Jim Meyering <jim@meyering.net> | 1995-05-13 02:31:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-05-13 02:31:46 +0000 |
commit | 274e5f86b524492a30af4f7cac38ef71722baf26 (patch) | |
tree | 073e8e172149c8bd407d15b2610bd046ca876b9f | |
parent | 31faa61270d33d103a88108d4efc6c1b1ca5b0c6 (diff) | |
download | coreutils-274e5f86b524492a30af4f7cac38ef71722baf26.tar.xz |
Use l?stat, not safe_l?stat.
-rw-r--r-- | src/pathchk.c | 3 | ||||
-rw-r--r-- | src/test.c | 10 | ||||
-rw-r--r-- | src/who.c | 3 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/pathchk.c b/src/pathchk.c index 01e30ea70..c1458f833 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -45,7 +45,6 @@ #include "version.h" #include "system.h" -#include "safe-stat.h" #include "error.h" #ifdef _POSIX_VERSION @@ -212,7 +211,7 @@ dir_ok (path) { struct stat stats; - if (safe_stat (path, &stats)) + if (stat (path, &stats)) return 2; if (!S_ISDIR (stats.st_mode)) diff --git a/src/test.c b/src/test.c index 2b37f78c3..ea2d5c580 100644 --- a/src/test.c +++ b/src/test.c @@ -35,8 +35,6 @@ #else /* TEST_STANDALONE */ # include "system.h" # include "version.h" -# include "safe-stat.h" -# include "safe-lstat.h" # include "group-member.h" # include "error.h" # if !defined (S_IXUGO) @@ -154,7 +152,7 @@ test_stat (path, finfo) errno = ENOENT; return (-1); } - return (safe_stat (path, finfo)); + return (stat (path, finfo)); } /* Do the same thing access(2) does, but use the effective uid and gid, @@ -595,9 +593,9 @@ binary_operator () pos += 3; if (l_is_l || r_is_l) test_syntax_error ("-ef does not accept -l\n", NULL); - if (safe_stat (argv[op - 1], &stat_buf) < 0) + if (stat (argv[op - 1], &stat_buf) < 0) return (FALSE); - if (safe_stat (argv[op + 1], &stat_spare) < 0) + if (stat (argv[op + 1], &stat_spare) < 0) return (FALSE); return (TRUE == (stat_buf.st_dev == stat_spare.st_dev && @@ -760,7 +758,7 @@ unary_operator () #else /* An empty filename is not a valid pathname. */ if ((argv[pos - 1][0] == '\0') || - (safe_lstat (argv[pos - 1], &stat_buf) < 0)) + (lstat (argv[pos - 1], &stat_buf) < 0)) return (FALSE); return (TRUE == (S_ISLNK (stat_buf.st_mode))); @@ -52,7 +52,6 @@ #include "system.h" #include "version.h" -#include "safe-stat.h" #include "error.h" #if !defined (UTMP_FILE) && defined (_PATH_UTMP) /* 4.4BSD. */ @@ -217,7 +216,7 @@ print_entry (this) line[DEV_DIR_LEN + sizeof (this->ut_line)] = '\0'; } - if (safe_stat (line, &stats) == 0) + if (stat (line, &stats) == 0) { mesg = (stats.st_mode & S_IWGRP) ? '+' : '-'; last_change = stats.st_atime; |