linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ROOT_DEV usage in hostfs
@ 2005-01-25  9:10 Christoph Hellwig
  2005-01-25  9:55 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2005-01-25  9:10 UTC (permalink / raw)
  To: jdike, pasky; +Cc: linux-fsdevel

Could someone explain why hosts does thnings like:

	if((ino->i_sb->s_dev == ROOT_DEV) && (ino->i_uid == getuid()))
		ino->i_uid = 0;

(in fs/hostfs/hostfs_kern.c:read_name())

and

	if(attr->ia_valid & ATTR_UID){
		if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) &&
		   (attr->ia_uid == 0))
			attr->ia_uid = getuid();
		attrs.ia_valid |= HOSTFS_ATTR_UID;
		attrs.ia_uid = attr->ia_uid;
	}
	if(attr->ia_valid & ATTR_GID){
		if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) &&
		   (attr->ia_gid == 0))
			attr->ia_gid = getuid();
		attrs.ia_valid |= HOSTFS_ATTR_GID;
		attrs.ia_gid = attr->ia_gid;
	}

(hostfs_getattr)

A filesystems shouldn't have special casing for the rootfs, and
chowning files from root to the current user sounds like an extremly
bad idea to me aswell.

It's also the last thing preventing us from exporting ROOT_DEV

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-25 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25  9:10 ROOT_DEV usage in hostfs Christoph Hellwig
2005-01-25  9:55 ` Christoph Hellwig
2005-01-25 10:11 ` Petr Baudis
2005-01-25 18:30 ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).