mount.cifs: strip leading delimiter from prefixpath
This commit is contained in:
parent
3a19490219
commit
ea0d74b02d
46
cifs-utils-mount.cifs-strip-leading-delimiter.patch
Normal file
46
cifs-utils-mount.cifs-strip-leading-delimiter.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 6fb698300a3193bc03b491ff4cfdf281e8fcf605 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Layton <jlayton@samba.org>
|
||||
Date: Thu, 29 Apr 2010 11:04:51 -0400
|
||||
Subject: [PATCH] mount.cifs: strip leading delimiter off of prefixpath option
|
||||
|
||||
...the kernel doesn't expect to see it and it causes a regression
|
||||
when mounting some UNCs.
|
||||
|
||||
Reported-by: Ales Zelinka <azelinka@redhat.com>
|
||||
Signed-off-by: Jeff Layton <jlayton@samba.org>
|
||||
---
|
||||
mount.cifs.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
||||
index 1040e8b..6e5afe3 100644
|
||||
--- a/mount.cifs.c
|
||||
+++ b/mount.cifs.c
|
||||
@@ -1168,7 +1168,7 @@ static int parse_unc(const char *unc_name, struct parsed_mount_info *parsed_info
|
||||
return EX_USAGE;
|
||||
}
|
||||
|
||||
- prepath = share + sharelen;
|
||||
+ prepath = share + sharelen + 1;
|
||||
prepathlen = strlen(prepath);
|
||||
|
||||
if (prepathlen + 1 > sizeof(parsed_info->prefix)) {
|
||||
@@ -1669,6 +1669,7 @@ int main(int argc, char **argv)
|
||||
goto mount_exit;
|
||||
}
|
||||
|
||||
+ /* lengths of different strings + slashes + trailing \0 */
|
||||
dev_len = strnlen(parsed_info->host, sizeof(parsed_info->host)) +
|
||||
strnlen(parsed_info->share, sizeof(parsed_info->share)) +
|
||||
strnlen(parsed_info->prefix, sizeof(parsed_info->prefix)) +
|
||||
@@ -1684,6 +1685,7 @@ int main(int argc, char **argv)
|
||||
strlcat(dev_name, parsed_info->host, dev_len);
|
||||
strlcat(dev_name, "/", dev_len);
|
||||
strlcat(dev_name, parsed_info->share, dev_len);
|
||||
+ strlcat(dev_name, "/", dev_len);
|
||||
strlcat(dev_name, parsed_info->prefix, dev_len);
|
||||
|
||||
currentaddress = parsed_info->addrlist;
|
||||
--
|
||||
1.6.6.1
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: cifs-utils
|
||||
Version: 4.4
|
||||
Release: 1%{pre_release}%{?dist}
|
||||
Release: 2%{pre_release}%{?dist}
|
||||
Summary: Utilities for mounting and managing CIFS mounts
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -12,6 +12,7 @@ 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
|
||||
Patch1: cifs-utils-mount.cifs-strip-leading-delimiter.patch
|
||||
|
||||
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
|
||||
Requires: keyutils
|
||||
@ -26,6 +27,7 @@ file system.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{pre_release}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --prefix=/usr
|
||||
@ -47,6 +49,9 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man8/mount.cifs.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Apr 29 2010 Jeff Layton <jlayton@redhat.com> 4.4-2
|
||||
- mount.cifs: strip leading delimiter from prefixpath
|
||||
|
||||
* Wed Apr 28 2010 Jeff Layton <jlayton@redhat.com> 4.4-1
|
||||
- update to 4.4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user