Re: [PATCH] afs: proc cells and rootcell are writeable

From: David Howells
Date: Thu Jan 30 2014 - 19:09:01 EST


Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:

> These files have been read-only since this code was merged in 2002.
> Over a decade of not being used seems like a strong indication that no
> one cares about the write path.

Actually, things aren't as simple as they seem. Without the patch applied:

[root@andromeda ~]# ls -l /proc/fs/afs/cells
-r--r--r--. 1 root root 0 Jan 31 00:04 /proc/fs/afs/cells
[root@andromeda ~]# echo add your-file-system.com 204.29.154.37 >/proc/fs/afs/cells
[root@andromeda ~]#

You'll observe there is no error reported on the echo command.

Further, looking in dmesg, I see:

kAFS: Added new cell 'your-file-system.com'

So the file *is* writable, *despite* i_mode.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/