Bug#640325: faccessat broken for user root?
Hi!
Christoph Egger <christoph@debian.org> writes:
> -------------------------------------------------------
> #include <fcntl.h>
> #include <unistd.h>
> #include <stdio.h>
>
> int main () {
> printf("%d\n", faccessat(AT_FDCWD, "test", X_OK, AT_EACCESS));
> }
> -------------------------------------------------------
Some improved programm:
christoph@myron /var/tmp
13:31 0 % cat /tmp/test.c
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
int main () {
printf("%d\n", faccessat(AT_FDCWD, "test", X_OK, AT_EACCESS));
perror("test");
}
christoph@myron /var/tmp
13:32 0 % gcc -o /tmp/test /tmp/test.c
christoph@myron /var/tmp
13:33 0 % sudo /tmp/test
0
test: Success
christoph@myron /var/tmp
13:33 0 % /tmp/test
-1
test: Permission denied
christoph@myron /var/tmp
13:33 0 % ls -lha test
-rw-r--r-- 1 christoph root 0 Sep 3 13:09 test
Regards
Christoph
--
9FED 5C6C E206 B70A 5857 70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer
Reply to: