diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-09-04 12:44:59 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-09-04 12:44:59 +0400 |
commit | 0de488378f3bb2b881436a9e0781b66a0eda815f (patch) | |
tree | 77a67db2b9770697b45194fdf3d97d45856e5428 /winsup/cygwin/mount.cc | |
parent | cb2316268656eca4e86e713c15b82f23e9c79623 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/mount.cc')
-rw-r--r-- | winsup/cygwin/mount.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc index 93c0d24dc..da0e744de 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc @@ -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); } |