On Thu, 26 Oct 2006, Sten Spans wrote:
This is with
root@backup:/root/backup# xfs_quota -V
xfs_quota version 2.8.11
root@backup:/backup# ln -s foo bar
root@backup:/backup# xfs_quota -x -c 'project -c 0'
Checking project 7 (path /backup)...
xfs_quota: cannot open /backup/bar: No such file or directory
Processed 1 /etc/projects paths for project 0
Would it be possible to handle symlinks better ?
Perhaps a check for symlinks in project.c ?
86 if ((fd = open(path, O_RDONLY|O_NOCTTY)) == -1)
87 fprintf(stderr, _("%s: cannot open %s: %s\n"),
88 progname, path, strerror(errno));
89 else if ((xfsctl(path, fd, XFS_IOC_FSGETXATTR, &fsx)) < 0)
If path is a symlink, then the project id is applied to a file
potentially on another filesystem. Wouldn't it be better to
add O_NOFOLLOW here ?
|