diff --git a/1a01f7c4b90695211d12291d7a24bec05b1f2922.diff b/1a01f7c4b90695211d12291d7a24bec05b1f2922.diff new file mode 100644 index 0000000..ca79837 --- /dev/null +++ b/1a01f7c4b90695211d12291d7a24bec05b1f2922.diff @@ -0,0 +1,29 @@ +commit 1a01f7c4b90695211d12291d7a24bec05b1f2922 +Author: Jeff Layton +Date: Sat Jan 12 22:02:01 2013 -0500 + + mount.cifs: set parsed_info->got_user when a cred file supplies a username + + commit 85d18a1ed introduced a regression when using a credentials file. + It set the username in the parsed mount info properly, but didn't set + the "got_user" flag in it. + + Also, fix an incorrect strlcpy length specifier in open_cred_file. + + Reported-by: "Mantas M." + Signed-off-by: Jeff Layton + +diff --git a/mount.cifs.c b/mount.cifs.c +index c7c3055..40b77e9 100644 +--- a/mount.cifs.c ++++ b/mount.cifs.c +@@ -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); diff --git a/cifs-utils.changes b/cifs-utils.changes index cb915c9..463afc4 100644 --- a/cifs-utils.changes +++ b/cifs-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 23 11:06:31 UTC 2013 - lmuelle@suse.com + +- Set parsed_info->got_user when a cred file supplies a username; + (bnc#800018). + ------------------------------------------------------------------- Wed Jan 16 14:51:39 UTC 2013 - lmuelle@suse.com @@ -11,7 +17,7 @@ Wed Nov 21 04:03:45 UTC 2012 - crrodriguez@opensuse.org - Version 5.8 * NFS-style device names are being deprecated in 6.0. -* Many bugs in cifs.idmap, getcifsacl and setcifsacl have been fixed. +* Many bugs in cifs.idmap, getcifsacl and setcifsacl have been fixed. ------------------------------------------------------------------- Wed Aug 8 17:09:22 UTC 2012 - lmuelle@suse.com diff --git a/cifs-utils.spec b/cifs-utils.spec index 483ab03..9ac06a9 100644 --- a/cifs-utils.spec +++ b/cifs-utils.spec @@ -27,6 +27,7 @@ Source: %{name}-%{version}.tar.bz2 Source1: cifs.init Source2: mkinitrd_scripts_boot-cifs.sh Source3: mkinitrd_scripts_setup-cifs.sh +Patch: 1a01f7c4b90695211d12291d7a24bec05b1f2922.diff %if 0%{?suse_version} PreReq: insserv %{?fillup_prereq} mkinitrd %else @@ -82,6 +83,7 @@ necessary for building ID mapping plugins for cifs-utils. %prep %setup -q +%patch -p1 %build export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"