mount.cifs: set parsed_info->got_user when a cred file supplies a username
[jlayton/cifs-utils.git] / mount.cifs.c
index c7c3055cb890764937193b1d50d1f0fb7ae18826..40b77e92e3f734c606f522ccf279a0508ad64eab 100644 (file)
@@ -581,7 +581,8 @@ static int open_cred_file(char *file_name,
                switch (parse_cred_line(line_buf + i, &temp_val)) {
                case CRED_USER:
                        strlcpy(parsed_info->username, temp_val,
-                               sizeof(parsed_info->domain));
+                               sizeof(parsed_info->username));
+                       parsed_info->got_user = 1;
                        break;
                case CRED_PASS:
                        i = set_password(parsed_info, temp_val);