diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2009-07-08 15:23:18 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2009-07-08 15:23:18 +0000 |
commit | c38898116a2737ea168993b9419c4370e7280303 (patch) | |
tree | e525a39d82e8f09edff07a5f34dbc91455121d99 /sys/compat/svr4 | |
parent | 6b53d5c0e71582ff79b1490b71c13fcdb9a1680b (diff) | |
download | src-c38898116a2737ea168993b9419c4370e7280303.tar.gz src-c38898116a2737ea168993b9419c4370e7280303.zip |
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)
Notes
Notes:
svn path=/head/; revision=195458
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_stat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index 9ef94be5da1f..cfb8276cee44 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/jail.h> #include <sys/kernel.h> #include <sys/malloc.h> +#include <sys/namei.h> #include <sys/unistd.h> #include <sys/time.h> #include <sys/syscallsubr.h> @@ -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); } |