From d75df717336e063f52af1415f99b6e16ccbf918c Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 24 Feb 2009 20:53:46 -0600 Subject: Fix guest mounts guest session setup, login (user id) as anonymous. This patch is for samba bugzilla bug 4640. Signed-off-by: Shirish Pargaonkar Acked-by: Jeff Layton Signed-off-by: Steve French --- source3/client/mount.cifs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c index ae8a7fd186..8623d3c04b 100644 --- a/source3/client/mount.cifs.c +++ b/source3/client/mount.cifs.c @@ -649,7 +649,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) { -- cgit