r22982: Do not prompt for password on sec=none for mount.cifs (and allow guest
authorSteve French <sfrench@samba.org>
Thu, 17 May 2007 22:40:48 +0000 (22:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:22:13 +0000 (12:22 -0500)
option to pass to kernel code so it can know when to retry)
(This used to be commit 500d9236c419be6ec32cc209279aeea2234f1a21)

source3/client/mount.cifs.c

index 77074644e050e50d0bbc1705c728173a40e09375..2e48a42aafed33cf484a06506907ae6f77bf9b7f 100755 (executable)
@@ -419,6 +419,11 @@ static int parse_options(char ** optionsp, int * filesys_flags)
                                printf("password too long\n");
                                return 1;
                        }
+               } else if (strncmp(data, "sec", 3) == 0) {
+                       if (value) {
+                               if (!strcmp(value, "none"))
+                                       got_password = 1;
+                       }
                } else if (strncmp(data, "ip", 2) == 0) {
                        if (!value || !*value) {
                                printf("target ip address argument missing");
@@ -567,8 +572,6 @@ static int parse_options(char ** optionsp, int * filesys_flags)
                        *filesys_flags &= ~MS_NOEXEC;
                } else if (strncmp(data, "guest", 5) == 0) {
                        got_password=1;
-                        /* remove the parm since it would otherwise be logged by kern */
-                       goto nocopy;
                } else if (strncmp(data, "ro", 2) == 0) {
                        *filesys_flags |= MS_RDONLY;
                } else if (strncmp(data, "rw", 2) == 0) {