this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use vchroot in listxattr

+12
+12
src/kernel/emulation/linux/xattr/listxattr.c
··· 2 2 #include "../base.h" 3 3 #include "../errno.h" 4 4 #include <linux-syscalls/linux.h> 5 + #include "../vchroot_expand.h" 6 + #include "../bsdthread/per_thread_wd.h" 5 7 6 8 #define XATTR_NOFOLLOW 1 7 9 8 10 long sys_listxattr(const char* path, char* namebuf, unsigned long size, int options) 9 11 { 10 12 int ret; 13 + struct vchroot_expand_args vc; 14 + 15 + vc.flags = (options & XATTR_NOFOLLOW) ? 0 : VCHROOT_FOLLOW; 16 + vc.dfd = get_perthread_wd(); 17 + 18 + strcpy(vc.path, path); 19 + 20 + ret = vchroot_expand(&vc); 21 + if (ret < 0) 22 + return errno_linux_to_bsd(ret); 11 23 12 24 if (options & XATTR_NOFOLLOW) 13 25 ret = LINUX_SYSCALL(__NR_llistxattr, path, namebuf, size);