Loading source3/client/mount.cifs.c +40 −24 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ #include <fcntl.h> #define MOUNT_CIFS_VERSION_MAJOR "1" #define MOUNT_CIFS_VERSION_MINOR "2" #define MOUNT_CIFS_VERSION_MINOR "3" #ifndef MOUNT_CIFS_VENDOR_SUFFIX #define MOUNT_CIFS_VENDOR_SUFFIX "" Loading Loading @@ -285,9 +285,21 @@ static int parse_options(char * options, int * filesys_flags) if (strncmp(data, "user", 4) == 0) { if (!value || !*value) { printf("invalid or missing username\n"); if(data[4] == '\0') { if(verboseflag) printf("\nskipping empty user mount parameter\n"); /* remove the parm since it would otherwise be confusing to the kernel code which would think it was a real username */ data[0] = ','; data[1] = ','; data[2] = ','; data[3] = ','; /* BB remove it from mount line so as not to confuse kernel code */ } else { printf("username specified with no parameter\n"); return 1; /* needs_arg; */ } } else { if (strnlen(value, 260) < 260) { got_user=1; percent_char = strchr(value,'%'); Loading @@ -312,6 +324,7 @@ static int parse_options(char * options, int * filesys_flags) printf("username too long\n"); return 1; } } } else if (strncmp(data, "pass", 4) == 0) { if (!value || !*value) { if(got_password) { Loading Loading @@ -634,7 +647,7 @@ int main(int argc, char ** argv) /* add sharename in opts string as unc= parm */ while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsU:vVwt:", while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsSU:vVwt:", longopts, NULL)) != -1) { switch (c) { /* No code to do the following options yet */ Loading Loading @@ -712,6 +725,9 @@ int main(int argc, char ** argv) strncpy(mountpassword,optarg,64); } break; case 'S': get_password_from_file(0 /* stdin */,NULL); break; case 't': break; default: Loading Loading
source3/client/mount.cifs.c +40 −24 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ #include <fcntl.h> #define MOUNT_CIFS_VERSION_MAJOR "1" #define MOUNT_CIFS_VERSION_MINOR "2" #define MOUNT_CIFS_VERSION_MINOR "3" #ifndef MOUNT_CIFS_VENDOR_SUFFIX #define MOUNT_CIFS_VENDOR_SUFFIX "" Loading Loading @@ -285,9 +285,21 @@ static int parse_options(char * options, int * filesys_flags) if (strncmp(data, "user", 4) == 0) { if (!value || !*value) { printf("invalid or missing username\n"); if(data[4] == '\0') { if(verboseflag) printf("\nskipping empty user mount parameter\n"); /* remove the parm since it would otherwise be confusing to the kernel code which would think it was a real username */ data[0] = ','; data[1] = ','; data[2] = ','; data[3] = ','; /* BB remove it from mount line so as not to confuse kernel code */ } else { printf("username specified with no parameter\n"); return 1; /* needs_arg; */ } } else { if (strnlen(value, 260) < 260) { got_user=1; percent_char = strchr(value,'%'); Loading @@ -312,6 +324,7 @@ static int parse_options(char * options, int * filesys_flags) printf("username too long\n"); return 1; } } } else if (strncmp(data, "pass", 4) == 0) { if (!value || !*value) { if(got_password) { Loading Loading @@ -634,7 +647,7 @@ int main(int argc, char ** argv) /* add sharename in opts string as unc= parm */ while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsU:vVwt:", while ((c = getopt_long (argc, argv, "afFhilL:no:O:rsSU:vVwt:", longopts, NULL)) != -1) { switch (c) { /* No code to do the following options yet */ Loading Loading @@ -712,6 +725,9 @@ int main(int argc, char ** argv) strncpy(mountpassword,optarg,64); } break; case 'S': get_password_from_file(0 /* stdin */,NULL); break; case 't': break; default: Loading