[cifs-utils] mount.cifs: fix regression in credential file handling
Jeff Layton
jlayton at fedoraproject.org
Sun Jan 13 10:58:24 UTC 2013
commit fef67dae061c17cdd6b171404f1f49801201eee2
Author: Jeff Layton <jlayton at redhat.com>
Date: Sun Jan 13 05:56:48 2013 -0500
mount.cifs: fix regression in credential file handling
Signed-off-by: Jeff Layton <jlayton at redhat.com>
...set-parsed_info-got_user-when-a-cred-file.patch | 35 ++++++++++++++++++++
cifs-utils.spec | 11 ++++--
2 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/0001-mount.cifs-set-parsed_info-got_user-when-a-cred-file.patch b/0001-mount.cifs-set-parsed_info-got_user-when-a-cred-file.patch
new file mode 100644
index 0000000..3b014ce
--- /dev/null
+++ b/0001-mount.cifs-set-parsed_info-got_user-when-a-cred-file.patch
@@ -0,0 +1,35 @@
+From 1a01f7c4b90695211d12291d7a24bec05b1f2922 Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton at samba.org>
+Date: Sat, 12 Jan 2013 22:02:01 -0500
+Subject: [PATCH] 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 at gmail.com>
+Signed-off-by: Jeff Layton <jlayton at samba.org>
+---
+ mount.cifs.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+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);
+--
+1.7.11.7
+
diff --git a/cifs-utils.spec b/cifs-utils.spec
index 4c918dc..a14420f 100644
--- a/cifs-utils.spec
+++ b/cifs-utils.spec
@@ -3,7 +3,7 @@
Name: cifs-utils
Version: 5.9
-Release: 1%{pre_release}%{?dist}
+Release: 2%{pre_release}%{?dist}
Summary: Utilities for mounting and managing CIFS mounts
Group: System Environment/Daemons
@@ -11,11 +11,12 @@ License: GPLv3
URL: http://linux-cifs.samba.org/cifs-utils/
BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n)
-Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
-
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel
Requires: keyutils
+Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
+Patch1: 0001-mount.cifs-set-parsed_info-got_user-when-a-cred-file.patch
+
%description
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
on Microsoft Windows machines. This package contains tools for mounting
@@ -35,6 +36,7 @@ necessary for building ID mapping plugins for cifs-utils.
%prep
%setup -q -n %{name}-%{version}%{pre_release}
+%patch1 -p1
%build
%configure --prefix=/usr ROOTSBINDIR=%{_sbindir}
@@ -77,6 +79,9 @@ rm -rf %{buildroot}
%{_includedir}/cifsidmap.h
%changelog
+* Sun Jan 13 2013 Jeff Layton <jlayton at redhat.com> 5.9-2
+- fix regression in credential file handling
+
* Mon Jan 07 2013 Jeff Layton <jlayton at redhat.com> 5.9-1
- update to 5.9
- move mount.cifs to /usr/sbin per new packaging guidelines
More information about the scm-commits
mailing list