Fix incorrect strnicmp len
authorSteve French <sfrench@samba.org>
Tue, 17 Feb 2004 22:51:42 +0000 (22:51 +0000)
committerSteve French <sfrench@samba.org>
Tue, 17 Feb 2004 22:51:42 +0000 (22:51 +0000)
(This used to be commit ad1ebb5000066d44ce94f0341fb31351b3900e95)

source3/client/mount.cifs.c

index bb893d0106aea3ec7b2d44947ba329493a11a625..fa7897fe6643a0d72e4c2030e8f2ac295e672bb8 100755 (executable)
@@ -432,33 +432,32 @@ static int parse_options(char * options, int * filesys_flags)
                        *filesys_flags |= MS_NOEXEC;
                } else if (strncmp(data, "exec", 4) == 0) {
                        *filesys_flags &= ~MS_NOEXEC;
-               } else if (strncmp(data, "ro", 3) == 0) {
+               } else if (strncmp(data, "ro", 2) == 0) {
                        *filesys_flags |= MS_RDONLY;
                } else if (strncmp(data, "rw", 2) == 0) {
                        *filesys_flags &= ~MS_RDONLY;
                } /* else if (strnicmp(data, "port", 4) == 0) {
-               if (value && *value) {
-                       vol->port =
-                               simple_strtoul(value, &value, 0);
-               }
-       } else if (strnicmp(data, "rsize", 5) == 0) {
-               if (value && *value) {
-                       vol->rsize =
-                               simple_strtoul(value, &value, 0);
-               }
-       } else if (strnicmp(data, "wsize", 5) == 0) {
-               if (value && *value) {
-                       vol->wsize =
-                               simple_strtoul(value, &value, 0);
-               }
-       } else if (strnicmp(data, "version", 3) == 0) {
-               
-       } else if (strnicmp(data, "rw", 2) == 0) {
-               
-       } else
-               printf("CIFS: Unknown mount option %s\n",data); */
+                       if (value && *value) {
+                               vol->port =
+                                       simple_strtoul(value, &value, 0);
+                       }
+               } else if (strnicmp(data, "rsize", 5) == 0) {
+                       if (value && *value) {
+                               vol->rsize =
+                                       simple_strtoul(value, &value, 0);
+                       }
+               } else if (strnicmp(data, "wsize", 5) == 0) {
+                       if (value && *value) {
+                               vol->wsize =
+                                       simple_strtoul(value, &value, 0);
+                       }
+               } else if (strnicmp(data, "version", 3) == 0) {
+               } else {
+                       printf("CIFS: Unknown mount option %s\n",data);
+               } */ /* nothing to do on those four mount options above.
+                       Just pass to kernel and ignore them here */
 
-               /* move to next option */
+                       /* move to next option */
                data = next_keyword+1;
 
                /* put overwritten equals sign back */
@@ -466,7 +465,7 @@ static int parse_options(char * options, int * filesys_flags)
                        value--;
                        *value = '=';
                }
-               
+       
                /* put previous overwritten comma back */
                if(next_keyword)
                        *next_keyword = ',';