* mount.cc (mount_info::from_fstab_line): Reorder to make sure all

mounts from user fstab are user mounts.
	(mount): Make sure all mounts are user mounts, even those added via
	mount -a.
This commit is contained in:
Corinna Vinschen 2010-09-04 08:44:59 +00:00
parent cb23162686
commit 0de488378f
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2010-09-04 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::from_fstab_line): Reorder to make sure all
mounts from user fstab are user mounts.
(mount): Make sure all mounts are user mounts, even those added via
mount -a.
2010-09-02 Christopher Faylor <me+cygwin@cgf.cx>
* sigoproc.cc (sigproc_init): Use American spelling in comment.

View File

@ -1050,8 +1050,6 @@ mount_info::from_fstab_line (char *line, bool user)
mount_flags |= MOUNT_NOPOSIX;
if (!fstab_read_flags (&c, mount_flags, false))
return true;
if (user)
mount_flags &= ~MOUNT_SYSTEM;
if (mount_flags & MOUNT_BIND)
{
/* Prepend root path to bound path. */
@ -1066,6 +1064,8 @@ mount_info::from_fstab_line (char *line, bool user)
mount_flags = (MOUNT_BIND | flags)
& ~(MOUNT_IMMUTABLE | MOUNT_AUTOMATIC);
}
if (user)
mount_flags &= ~MOUNT_SYSTEM;
if (!strcmp (fs_type, "cygdrive"))
{
cygdrive_flags = mount_flags | MOUNT_CYGDRIVE;
@ -1710,6 +1710,8 @@ mount (const char *win32_path, const char *posix_path, unsigned flags)
flags = (MOUNT_BIND | conv_flags)
& ~(MOUNT_IMMUTABLE | MOUNT_AUTOMATIC);
}
/* Make sure all mounts are user mounts, even those added via mount -a. */
flags &= ~MOUNT_SYSTEM;
res = mount_table->add_item (w32_path, posix_path, flags);
}