Subject: Re: kern/36963
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Jan Danielsson <jan.m.danielsson@gmail.com>
List: netbsd-bugs
Date: 09/16/2007 21:10:03
The following reply was made to PR kern/36963; it has been noted by GNATS.
From: Jan Danielsson <jan.m.danielsson@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/36963
Date: Sun, 16 Sep 2007 23:06:12 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I put together the program below. And tried running it in various
environments.
- ----------------------------------
#include <stdio.h>
#include <dirent.h>
int main(void)
{
DIR *dirp = opendir(".");
if (dirp != NULL)
{
puts("Success!");
(void)closedir(dirp);
}
else
{
puts("Error!");
}
return 0;
}
- ----------------------------------
Using my normal "jan" user (it has never exhibited the permission
problem):
$ gcc -o permtest permtest.c
$ ./permtest
Success!
$ cp permtest /tmp/permtest
$ chmod 755 /tmp/permtest
$ ls -l /tmp | grep perm
- -rwxr-xr-x 1 jan wheel 8431 Sep 16 22:55 permtest
root:
# useradd -m test
# su - test
$ pwd
/home/test
$ /tmp/permtest
Error!
.. a few minutes later ..
# su - test
$ /tmp/permtest
Success!
Note: No changes were made between the runs. It will revert to
showing "Error!" sooner or later.
- --
Kind regards,
Jan Danielsson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
iD8DBQFG7ZrEuPlHKFfKXTYRCuTFAJ0bfDyB24T1PvxR2AqlMaiyGs8ewgCfVg/i
ulS3IVkMSw6AK9kf4jWoqt0=
=Ptre
-----END PGP SIGNATURE-----