Fix guest mounts
authorSteve French <smfrench@gmail.com>
Tue, 24 Feb 2009 23:11:55 +0000 (17:11 -0600)
committerSteve French <smfrench@gmail.com>
Tue, 24 Feb 2009 23:11:55 +0000 (17:11 -0600)
     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>
source/client/mount.cifs.c

index 67e964d635169cc2d633a198be1af4dea90615ea..d05115b892d3d7aa207ad9df8dce7e53471ed9e5 100644 (file)
@@ -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) {