On Wed, May 30, 2018 at 05:26:46PM -0700, Ilya Pronin wrote: > Hello, > > I am trying to recursively check/change projid on a directory that > contains symlinks among other files. The way I do it is like this > (attributes reading part as an example, modulo error handling): > > oflags = O_NOFOLLOW | O_RDONLY; > if (S_ISDIR(stat->st_mode)) > oflags |= O_DIRECTORY; > if (S_ISLNK(stat->st_mode)) > oflags |= O_PATH; > fd = open(path, oflags, 0); > xfsctl(NULL, fd, XFS_IOC_FSGETXATTR, &attr); > > The xfsctl() call fails with EBADF. Apparently this is because > xfsctl() is implemented as ioctl(), at least on Linux, which doesn't > work with file descriptors obtained with O_PATH. Is there any way to > manipulate projid on symlinks? > Not sure if somebody already replied you, I couldn't find anything in my mbox, but you can't. Out of curiosity, why would you do that though? > Thanks! > > -- > Ilya Pronin > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Carlos -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html