xfs
[Top] [All Lists]

Re: xfs_quota project + symlinks

To: xfs@xxxxxxxxxxx
Subject: Re: xfs_quota project + symlinks
From: Sten Spans <sten@xxxxxxxxxxxxxxxx>
Date: Thu, 26 Oct 2006 15:45:59 +0200 (CEST)
In-reply-to: <Pine.LNX.4.64.0610261519250.30903@zaphod.blinkenlights.nl>
References: <Pine.LNX.4.64.0610261519250.30903@zaphod.blinkenlights.nl>
Sender: xfs-bounce@xxxxxxxxxxx
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 ?


<Prev in Thread] Current Thread [Next in Thread>