[RFC] does # really need to be escaped in devnames?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	On one hand, we have commit ed5fce76b5ea "vfs: escape hash as
well" which added # to the escape set for devname in /prov/*/mount*;
on another there's nfs_show_devname() doing
                seq_escape(m, devname, " \t\n\\");
and similar for btrfs.  And then there is afs_show_devname() that outright
includes # in that thing on regular basis:
	char pref = '%';
	...
        switch (volume->type) {
	case AFSVL_RWVOL:
		break;
	case AFSVL_ROVOL:
		pref = '#';
		if (volume->type_force)
			suf = ".readonly";
		break;
	case AFSVL_BACKVOL:
		pref = '#';
		suf = ".backup";
		break;
	}

	seq_printf(m, "%c%s:%s%s", pref, cell->name, volume->name, suf);

For NFS and btrfs ones I might be convinced to add # to escape set; for
AFS, though, I strongly suspect that userland would be very unhappy,
and that's userland predating whatever code that "aims to parse fstab as
well as /proc/mounts with the same logic" ed5fce76b5ea is refering to.

So...  Siddhesh, could you clarify the claim about breaking getmntent(3)?
Does it or does it not happen on every system that has readonly AFS
volumes mounted?




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux