Update to 4.9 release
This commit is contained in:
parent
fe63fa41af
commit
858614420e
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ cifs-utils-4.6.tar.bz2
|
|||||||
/cifs-utils-4.7.tar.bz2
|
/cifs-utils-4.7.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
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
%define pre_release %nil
|
%define pre_release %nil
|
||||||
|
|
||||||
Name: cifs-utils
|
Name: cifs-utils
|
||||||
Version: 4.8.1
|
Version: 4.9
|
||||||
Release: 4%{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
|
||||||
@ -16,9 +16,6 @@ Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}
|
|||||||
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
|
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake
|
||||||
Requires: keyutils
|
Requires: keyutils
|
||||||
|
|
||||||
Patch0: mount.cifs-don-t-try-to-alter-mtab-if-it-s-a-symlink.patch
|
|
||||||
Patch1: mount.cifs-reacquire-CAP_DAC_READ_SEARCH-before-call.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
|
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
|
||||||
on Microsoft Windows machines. This package contains tools for mounting
|
on Microsoft Windows machines. This package contains tools for mounting
|
||||||
@ -29,8 +26,6 @@ file system.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{pre_release}
|
%setup -q -n %{name}-%{version}%{pre_release}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --prefix=/usr
|
%configure --prefix=/usr
|
||||||
@ -52,6 +47,9 @@ rm -rf %{buildroot}
|
|||||||
%{_mandir}/man8/mount.cifs.8.gz
|
%{_mandir}/man8/mount.cifs.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 04 2011 Jeff Layton <jlayton@redhat.com> 4.9-1
|
||||||
|
- update to 4.9
|
||||||
|
|
||||||
* Tue Feb 08 2011 Jeff Layton <jlayton@redhat.com> 4.8.1-4
|
* Tue Feb 08 2011 Jeff Layton <jlayton@redhat.com> 4.8.1-4
|
||||||
- mount.cifs: reenable CAP_DAC_READ_SEARCH when mounting (bz# 675761)
|
- mount.cifs: reenable CAP_DAC_READ_SEARCH when mounting (bz# 675761)
|
||||||
|
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
From fba28cfe2f13dd8bdae3cec76178f42b001a40ca Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@samba.org>
|
|
||||||
Date: Mon, 31 Jan 2011 15:04:35 -0500
|
|
||||||
Subject: [PATCH] mount.cifs: don't try to alter mtab if it's a symlink
|
|
||||||
|
|
||||||
Some distros replace /etc/mtab with a symlink to /proc/mounts. In that
|
|
||||||
situation, mount.cifs will hang for a while trying to lock the mtab.
|
|
||||||
/bin/mount checks to see if the mtab is a symlink. If it is or if a
|
|
||||||
stat() call on it fails, it doesn't try to to update the mtab. Have
|
|
||||||
mount.cifs do the same.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@samba.org>
|
|
||||||
---
|
|
||||||
mount.cifs.c | 2 +-
|
|
||||||
mount.h | 1 +
|
|
||||||
mtab.c | 16 ++++++++++++++++
|
|
||||||
3 files changed, 18 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
|
||||||
index f537a07..5f29761 100644
|
|
||||||
--- a/mount.cifs.c
|
|
||||||
+++ b/mount.cifs.c
|
|
||||||
@@ -1934,7 +1934,7 @@ mount_retry:
|
|
||||||
goto mount_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!parsed_info->nomtab)
|
|
||||||
+ if (!parsed_info->nomtab && !mtab_unusable())
|
|
||||||
rc = add_mtab(orig_dev, mountpoint, parsed_info->flags, fstype);
|
|
||||||
|
|
||||||
mount_exit:
|
|
||||||
diff --git a/mount.h b/mount.h
|
|
||||||
index 23ea4f0..d49c2ea 100644
|
|
||||||
--- a/mount.h
|
|
||||||
+++ b/mount.h
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
|
|
||||||
#define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
|
|
||||||
|
|
||||||
+extern int mtab_unusable(void);
|
|
||||||
extern int lock_mtab(void);
|
|
||||||
extern void unlock_mtab(void);
|
|
||||||
|
|
||||||
diff --git a/mtab.c b/mtab.c
|
|
||||||
index 64e7250..9cd50d8 100644
|
|
||||||
--- a/mtab.c
|
|
||||||
+++ b/mtab.c
|
|
||||||
@@ -77,6 +77,22 @@ mono_time(void) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * See if mtab is present and whether it's a symlink. Returns errno from stat()
|
|
||||||
+ * call or EMLINK if it's a symlink.
|
|
||||||
+ */
|
|
||||||
+int
|
|
||||||
+mtab_unusable(void)
|
|
||||||
+{
|
|
||||||
+ struct stat mstat;
|
|
||||||
+
|
|
||||||
+ if(lstat(_PATH_MOUNTED, &mstat))
|
|
||||||
+ return errno;
|
|
||||||
+ else if (S_ISLNK(mstat.st_mode))
|
|
||||||
+ return EMLINK;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* Remove lock file. */
|
|
||||||
void
|
|
||||||
unlock_mtab (void) {
|
|
||||||
--
|
|
||||||
1.7.3.4
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
From 13a8647625d556e583abaff4ab248e465374f914 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeff Layton <jlayton@samba.org>
|
|
||||||
Date: Tue, 8 Feb 2011 15:01:37 -0500
|
|
||||||
Subject: [PATCH] mount.cifs: reacquire CAP_DAC_READ_SEARCH before calling mount(2)
|
|
||||||
|
|
||||||
It's possible that the user is trying to mount onto a directory to which
|
|
||||||
he doesn't have execute perms. If that's the case then the mount will
|
|
||||||
currently fail. Fix this by reenabling CAP_DAC_READ_SEARCH before
|
|
||||||
calling mount(2). That will ensure that the kernel's permissions check
|
|
||||||
for this is bypassed.
|
|
||||||
|
|
||||||
Reported-by: Erik Logtenberg <erik@logtenberg.eu>
|
|
||||||
Signed-off-by: Jeff Layton <jlayton@samba.org>
|
|
||||||
---
|
|
||||||
mount.cifs.c | 10 ++++++++--
|
|
||||||
1 files changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
|
||||||
index 3a2b539..8e1e32b 100644
|
|
||||||
--- a/mount.cifs.c
|
|
||||||
+++ b/mount.cifs.c
|
|
||||||
@@ -1898,8 +1898,13 @@ mount_retry:
|
|
||||||
else
|
|
||||||
fstype = cifs_fstype;
|
|
||||||
|
|
||||||
- if (!parsed_info->fakemnt
|
|
||||||
- && mount(dev_name, ".", fstype, parsed_info->flags, options)) {
|
|
||||||
+ if (!parsed_info->fakemnt) {
|
|
||||||
+ toggle_dac_capability(0, 1);
|
|
||||||
+ rc = mount(dev_name, ".", fstype, parsed_info->flags, options);
|
|
||||||
+ toggle_dac_capability(0, 0);
|
|
||||||
+ if (rc == 0)
|
|
||||||
+ goto do_mtab;
|
|
||||||
+
|
|
||||||
switch (errno) {
|
|
||||||
case ECONNREFUSED:
|
|
||||||
case EHOSTUNREACH:
|
|
||||||
@@ -1934,6 +1939,7 @@ mount_retry:
|
|
||||||
goto mount_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
+do_mtab:
|
|
||||||
if (!parsed_info->nomtab && !mtab_unusable())
|
|
||||||
rc = add_mtab(orig_dev, mountpoint, parsed_info->flags, fstype);
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user