summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJeff Layton <jlayton@samba.org>2009-06-29 06:16:38 -0400
committerJeff Layton <jlayton@redhat.com>2009-06-29 06:16:38 -0400
commit595d07d0ab494e3749c71caf86887ad1cebda229 (patch)
treead2d47393b28892a229bba3ec63318d268b825b0 /client
parent6e92505080fd6764461563e4fdf1172be1ba2963 (diff)
downloadsamba-595d07d0ab494e3749c71caf86887ad1cebda229.tar.gz
samba-595d07d0ab494e3749c71caf86887ad1cebda229.tar.bz2
samba-595d07d0ab494e3749c71caf86887ad1cebda229.zip
mount.cifs: don't pass text ro/rw options to kernel
/bin/mount strips off the ro/rw options after setting the MS_RDONLY flag appropriately. Make mount.cifs do the same thing. Signed-off-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'client')
-rw-r--r--client/mount.cifs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/mount.cifs.c b/client/mount.cifs.c
index db05665f96..4387f5945a 100644
--- a/client/mount.cifs.c
+++ b/client/mount.cifs.c
@@ -771,8 +771,10 @@ static int parse_options(char ** optionsp, unsigned long * filesys_flags)
got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
+ goto nocopy;
} else if (strncmp(data, "rw", 2) == 0) {
*filesys_flags &= ~MS_RDONLY;
+ goto nocopy;
} else if (strncmp(data, "remount", 7) == 0) {
*filesys_flags |= MS_REMOUNT;
} /* else if (strnicmp(data, "port", 4) == 0) {