Accepting request 149676 from network:samba:STABLE

- Set parsed_info->got_user when a cred file supplies a username;
  (bnc#800018).

OBS-URL: https://build.opensuse.org/request/show/149676
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cifs-utils?expand=0&rev=29
This commit is contained in:
Stephan Kulow 2013-01-24 14:34:30 +00:00 committed by Git OBS Bridge
commit 75d021522f
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,29 @@
commit 1a01f7c4b90695211d12291d7a24bec05b1f2922
Author: Jeff Layton <jlayton@samba.org>
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." <grawity@gmail.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
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);

View File

@ -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

View File

@ -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"