summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2009-02-24 17:11:55 -0600
committerKarolin Seeger <kseeger@samba.org>2009-07-30 09:22:12 +0200
commit3b6017fa7cae1a2cda488da0cc2dee7b08b63267 (patch)
treee0d01aaf48ef63b8a04f99cab9a5d1061d77007e
parent41f8c6547298635adf990bd4db60e498d74d9fc4 (diff)
downloadsamba-3b6017fa7cae1a2cda488da0cc2dee7b08b63267.tar.gz
Fix guest mounts
guest session setup, login (user id) as anonymous. This patch is for samba bugzilla bug 4640. Signed-off-by: Shirish Pargaonkar <shirishp@us.ibm.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@samba.org> (cherry picked from commit a8f10f4469b31565e33669560657c2b3df68c13b)
-rw-r--r--source/client/mount.cifs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 67e964d6351..d05115b892d 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -650,7 +650,9 @@ static int parse_options(char ** optionsp, int * filesys_flags)
} else if (strncmp(data, "exec", 4) == 0) {
*filesys_flags &= ~MS_NOEXEC;
} else if (strncmp(data, "guest", 5) == 0) {
- got_password=1;
+ user_name = (char *)calloc(1, 1);
+ got_user = 1;
+ got_password = 1;
} else if (strncmp(data, "ro", 2) == 0) {
*filesys_flags |= MS_RDONLY;
} else if (strncmp(data, "rw", 2) == 0) {