1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# On Ubuntu edgy (and perhaps other distributions), eaccess is provided by
# unistd.h - This renames the function so as not to conflict.
--- coreutils-5.1.3/src/test.c.old 2006-08-17 15:29:41.000000000 +0100
+++ coreutils-5.1.3/src/test.c 2006-08-17 15:30:44.000000000 +0100
@@ -125,7 +125,7 @@
/* Do the same thing access(2) does, but use the effective uid and gid. */
static int
-eaccess (char const *file, int mode)
+_eaccess (char const *file, int mode)
{
static int have_ids;
static uid_t uid, euid;
@@ -158,7 +158,7 @@
return result;
}
#else
-# define eaccess(F, M) euidaccess (F, M)
+# define _eaccess(F, M) euidaccess (F, M)
#endif
/* Increment our position in the argument list. Check that we're not
@@ -623,17 +623,17 @@
case 'r': /* file is readable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], R_OK);
+ value = -1 != _eaccess (argv[pos - 1], R_OK);
return (TRUE == value);
case 'w': /* File is writable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], W_OK);
+ value = -1 != _eaccess (argv[pos - 1], W_OK);
return (TRUE == value);
case 'x': /* File is executable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], X_OK);
+ value = -1 != _eaccess (argv[pos - 1], X_OK);
return (TRUE == value);
case 'O': /* File is owned by you? */
|