[Reproducible-commits] [disorderfs] 01/06: Use l variants of xattr syscalls to avoid following symlinks

Andrew Ayer agwa at andrewayer.name
Tue Sep 22 03:34:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

agwa-guest pushed a commit to branch master
in repository disorderfs.

commit d4b934e8502bba6d2514abcf1bcf9db36f7445d7
Author: Andrew Ayer <agwa at andrewayer.name>
Date:   Mon Sep 21 17:12:49 2015 -0700

    Use l variants of xattr syscalls to avoid following symlinks
---
 disorderfs.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/disorderfs.cpp b/disorderfs.cpp
index c0cf06b..e41547a 100644
--- a/disorderfs.cpp
+++ b/disorderfs.cpp
@@ -184,18 +184,18 @@ int	main (int argc, char** argv)
 	};
 	*/
 	disorderfs_fuse_operations.setxattr = [] (const char* path, const char* name, const char* value, size_t size, int flags) -> int {
-		return wrap(setxattr((root + path).c_str(), name, value, size, flags));
+		return wrap(lsetxattr((root + path).c_str(), name, value, size, flags));
 	};
 	disorderfs_fuse_operations.getxattr = [] (const char* path, const char* name, char* value, size_t size) -> int {
-		ssize_t res = getxattr((root + path).c_str(), name, value, size);
+		ssize_t res = lgetxattr((root + path).c_str(), name, value, size);
 		return res >= 0 ? res : -errno;
 	};
 	disorderfs_fuse_operations.listxattr = [] (const char* path, char* list, size_t size) -> int {
-		ssize_t res = listxattr((root + path).c_str(), list, size);
+		ssize_t res = llistxattr((root + path).c_str(), list, size);
 		return res >= 0 ? res : -errno;
 	};
 	disorderfs_fuse_operations.removexattr = [] (const char* path, const char* name) -> int {
-		return wrap(removexattr((root + path).c_str(), name));
+		return wrap(lremovexattr((root + path).c_str(), name));
 	};
 	disorderfs_fuse_operations.opendir = [] (const char* path, struct fuse_file_info* info) -> int {
 		std::unique_ptr<Dirents> dirents{new Dirents};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/disorderfs.git



More information about the Reproducible-commits mailing list