Update to 5.0 release

This commit is contained in:
Jeff Layton 2011-06-01 16:27:37 -04:00
parent 18b089282b
commit 158ad7785a
4 changed files with 10 additions and 94 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ cifs-utils-4.6.tar.bz2
/cifs-utils-4.8.tar.bz2 /cifs-utils-4.8.tar.bz2
/cifs-utils-4.8.1.tar.bz2 /cifs-utils-4.8.1.tar.bz2
/cifs-utils-4.9.tar.bz2 /cifs-utils-4.9.tar.bz2
/cifs-utils-5.0.tar.bz2

View File

@ -1,87 +0,0 @@
From ffac601c45b167a1af1d35561f1c01ab0813cc14 Mon Sep 17 00:00:00 2001
From: Luk Claes <luk@debian.org>
Date: Fri, 8 Apr 2011 14:13:35 -0400
Subject: [PATCH] mount.cifs: Use original device string all the way
Don't construct a device name, but use the original device string
to mount so the device name in /proc/mounts matches the one in
/etc/fstab.
Signed-off-by: Luk Claes <luk@debian.org>
---
mount.cifs.c | 27 +++------------------------
1 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/mount.cifs.c b/mount.cifs.c
index 8e1e32b..29b0d4c 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1673,12 +1673,11 @@ int main(int argc, char **argv)
char *orgoptions = NULL;
char *mountpoint = NULL;
char *options = NULL;
- char *dev_name = NULL, *orig_dev = NULL;
+ char *orig_dev = NULL;
char *currentaddress, *nextaddress;
int rc = 0;
int already_uppercased = 0;
size_t options_size = MAX_OPTIONS_LEN;
- size_t dev_len;
struct parsed_mount_info *parsed_info = NULL;
pid_t pid;
const char *fstype;
@@ -1823,25 +1822,6 @@ 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)) +
- 2 + 1 + 1 + 1;
- dev_name = calloc(dev_len, 1);
- if (!dev_name) {
- rc = EX_SYSERR;
- goto mount_exit;
- }
-
- /* rebuild device name with forward slashes */
- strlcpy(dev_name, "//", dev_len);
- 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;
nextaddress = strchr(currentaddress, ',');
if (nextaddress)
@@ -1889,7 +1869,7 @@ mount_retry:
if (parsed_info->verboseflag)
fprintf(stderr, "\n");
- rc = check_mtab(thisprogram, dev_name, mountpoint);
+ rc = check_mtab(thisprogram, orig_dev, mountpoint);
if (rc)
goto mount_exit;
@@ -1900,7 +1880,7 @@ mount_retry:
if (!parsed_info->fakemnt) {
toggle_dac_capability(0, 1);
- rc = mount(dev_name, ".", fstype, parsed_info->flags, options);
+ rc = mount(orig_dev, ".", fstype, parsed_info->flags, options);
toggle_dac_capability(0, 0);
if (rc == 0)
goto do_mtab;
@@ -1948,7 +1928,6 @@ mount_exit:
memset(parsed_info->password, 0, sizeof(parsed_info->password));
munmap(parsed_info, sizeof(*parsed_info));
}
- SAFE_FREE(dev_name);
SAFE_FREE(options);
SAFE_FREE(orgoptions);
return rc;
--
1.7.4.4

View File

@ -2,8 +2,8 @@
%define pre_release %nil %define pre_release %nil
Name: cifs-utils Name: cifs-utils
Version: 4.9 Version: 5.0
Release: 2%{pre_release}%{?dist} Release: 1%{pre_release}%{?dist}
Summary: Utilities for mounting and managing CIFS mounts Summary: Utilities for mounting and managing CIFS mounts
Group: System Environment/Daemons Group: System Environment/Daemons
@ -13,9 +13,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%
Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2 Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
Patch1: 0001-mount.cifs-Use-original-device-string-all-the-way.patch BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake samba-winbind-devel
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
Requires: keyutils Requires: keyutils
%description %description
@ -28,7 +26,6 @@ file system.
%prep %prep
%setup -q -n %{name}-%{version}%{pre_release} %setup -q -n %{name}-%{version}%{pre_release}
%patch1 -p1
%build %build
%configure --prefix=/usr %configure --prefix=/usr
@ -46,10 +43,15 @@ rm -rf %{buildroot}
%doc %doc
/sbin/mount.cifs /sbin/mount.cifs
%{_sbindir}/cifs.upcall %{_sbindir}/cifs.upcall
%{_sbindir}/cifs.idmap
%{_mandir}/man8/cifs.upcall.8.gz %{_mandir}/man8/cifs.upcall.8.gz
%{_mandir}/man8/cifs.idmap.8.gz
%{_mandir}/man8/mount.cifs.8.gz %{_mandir}/man8/mount.cifs.8.gz
%changelog %changelog
* Wed Jun 01 2011 Jeff Layton <jlayton@redhat.com> 5.0-1
- update to 5.0
* Mon May 16 2011 Jeff Layton <jlayton@redhat.com> 4.9-2 * Mon May 16 2011 Jeff Layton <jlayton@redhat.com> 4.9-2
- mount.cifs: pass unadulterated device string to kernel (bz# 702664) - mount.cifs: pass unadulterated device string to kernel (bz# 702664)

View File

@ -1 +1 @@
908d904e6b9e58f09f530de151a88ef8 cifs-utils-4.9.tar.bz2 50e55aed038e55b4a7668ee628f934e4 cifs-utils-5.0.tar.bz2