summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-07-08 15:23:18 +0000
committertrasz <trasz@FreeBSD.org>2009-07-08 15:23:18 +0000
commit09784497a28d12cd83a37f13a040e4ad325ef692 (patch)
treee525a39d82e8f09edff07a5f34dbc91455121d99 /sys/i386/ibcs2
parent82187ebf4442997e887a1eb21292f91962a323e1 (diff)
downloadFreeBSD-src-09784497a28d12cd83a37f13a040e4ad325ef692.zip
FreeBSD-src-09784497a28d12cd83a37f13a040e4ad325ef692.tar.gz
There is an optimization in chmod(1), that makes it not to call chmod(2)
if the new file mode is the same as it was before; however, this optimization must be disabled for filesystems that support NFSv4 ACLs. Chmod uses pathconf(2) to determine whether this is the case - however, pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't. This change adds lpathconf(3) to make it possible to solve that problem in a clean way. Reviewed by: rwatson (earlier version) Approved by: re (kib)
Diffstat (limited to 'sys/i386/ibcs2')
-rw-r--r--sys/i386/ibcs2/ibcs2_misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c
index 94fe50f..23c617d 100644
--- a/sys/i386/ibcs2/ibcs2_misc.c
+++ b/sys/i386/ibcs2/ibcs2_misc.c
@@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/file.h> /* Must come after sys/malloc.h */
#include <sys/mutex.h>
+#include <sys/namei.h>
#include <sys/priv.h>
#include <sys/reboot.h>
#include <sys/resourcevar.h>
@@ -763,7 +764,7 @@ ibcs2_pathconf(td, uap)
CHECKALTEXIST(td, uap->path, &path);
uap->name++; /* iBCS2 _PC_* defines are offset by one */
- error = kern_pathconf(td, path, UIO_SYSSPACE, uap->name);
+ error = kern_pathconf(td, path, UIO_SYSSPACE, uap->name, FOLLOW);
free(path, M_TEMP);
return (error);
}
OpenPOWER on IntegriCloud