Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-09-04 12:44:59 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-09-04 12:44:59 +0400
commit0de488378f3bb2b881436a9e0781b66a0eda815f (patch)
tree77a67db2b9770697b45194fdf3d97d45856e5428 /winsup/cygwin
parentcb2316268656eca4e86e713c15b82f23e9c79623 (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')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/mount.cc6
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4d995daa1..49d85a0ed 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
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);
}