From 09784497a28d12cd83a37f13a040e4ad325ef692 Mon Sep 17 00:00:00 2001 From: trasz Date: Wed, 8 Jul 2009 15:23:18 +0000 Subject: 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) --- sys/compat/svr4/svr4_stat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/compat/svr4') diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index 9ef94be..cfb8276 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -669,7 +670,7 @@ svr4_sys_pathconf(td, uap) return (0); default: CHECKALTEXIST(td, uap->path, &path); - error = kern_pathconf(td, path, UIO_SYSSPACE, name); + error = kern_pathconf(td, path, UIO_SYSSPACE, name, FOLLOW); free(path, M_TEMP); return (error); } -- cgit v1.1