cifs-utils: update to v6.10
cifs-utils: update to v6.10 Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
This commit is contained in:
parent
19123477ac
commit
cf7ba6d730
@ -1,61 +0,0 @@
|
||||
From 0feb1a80f3777f4c244b46958aa9f730de9e18b6 Mon Sep 17 00:00:00 2001
|
||||
From: Steve French <stfrench@microsoft.com>
|
||||
Date: Fri, 1 Mar 2019 23:11:25 -0600
|
||||
Subject: [PATCH 25/39] setcifsacl: fix adding ACE when owner sid in unexpected
|
||||
location
|
||||
|
||||
If owner information is after the ACEs instead of before (e.g. Azure servers) in the ACL query
|
||||
then we would get "invalid argument" returned on setcifsacl -a (adding an ACE).
|
||||
|
||||
This fixes that.
|
||||
|
||||
Signed-off-by: Steve French <stfrench@microsoft.com>
|
||||
---
|
||||
setcifsacl.c | 29 ++++++++++++++++++++++++-----
|
||||
1 file changed, 24 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/setcifsacl.c b/setcifsacl.c
|
||||
index ba34403..1b98c37 100644
|
||||
--- a/setcifsacl.c
|
||||
+++ b/setcifsacl.c
|
||||
@@ -106,13 +106,32 @@ copy_sec_desc(const struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd,
|
||||
|
||||
/* copy owner sid */
|
||||
owner_sid_ptr = (struct cifs_sid *)((char *)pntsd + osidsoffset);
|
||||
- nowner_sid_ptr = (struct cifs_sid *)((char *)pnntsd + osidsoffset);
|
||||
- size = copy_cifs_sid(nowner_sid_ptr, owner_sid_ptr);
|
||||
- bufsize += size;
|
||||
+ group_sid_ptr = (struct cifs_sid *)((char *)pntsd + gsidsoffset);
|
||||
+ /*
|
||||
+ * some servers like Azure return the owner and group SIDs at end rather
|
||||
+ * than at the beginning of the ACL so don't want to overwrite the last ACEs
|
||||
+ */
|
||||
+ if (dacloffset <= osidsoffset) {
|
||||
+ /* owners placed at end of ACL */
|
||||
+ nowner_sid_ptr = (struct cifs_sid *)((char *)pnntsd + dacloffset + size);
|
||||
+ pnntsd->osidoffset = dacloffset + size;
|
||||
+ size = copy_cifs_sid(nowner_sid_ptr, owner_sid_ptr);
|
||||
+ bufsize += size;
|
||||
+ /* put group SID after owner SID */
|
||||
+ ngroup_sid_ptr = (struct cifs_sid *)((char *)nowner_sid_ptr + size);
|
||||
+ pnntsd->gsidoffset = pnntsd->osidoffset + size;
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * Most servers put the owner information at the beginning,
|
||||
+ * before the ACL
|
||||
+ */
|
||||
+ nowner_sid_ptr = (struct cifs_sid *)((char *)pnntsd + osidsoffset);
|
||||
+ size = copy_cifs_sid(nowner_sid_ptr, owner_sid_ptr);
|
||||
+ bufsize += size;
|
||||
+ ngroup_sid_ptr = (struct cifs_sid *)((char *)pnntsd + gsidsoffset);
|
||||
+ }
|
||||
|
||||
/* copy group sid */
|
||||
- group_sid_ptr = (struct cifs_sid *)((char *)pntsd + gsidsoffset);
|
||||
- ngroup_sid_ptr = (struct cifs_sid *)((char *)pnntsd + gsidsoffset);
|
||||
size = copy_cifs_sid(ngroup_sid_ptr, group_sid_ptr);
|
||||
bufsize += size;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
From 0540dfad55f8e668ef67b03ccc709e311ca9eb04 Mon Sep 17 00:00:00 2001
|
||||
From: Mikhail Novosyolov <samba-technical@lists.samba.org>
|
||||
Date: Thu, 16 Jul 2020 17:09:42 +0800
|
||||
Subject: [PATCH] cifs-utils: Respect DESTDIR when installing smb3 stuff
|
||||
|
||||
When make install is run during package building, DESTDIR parameter is passed, e.g.:
|
||||
$ rpm --eval %makeinstall_std
|
||||
make DESTDIR=/root/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}-rosa2016.1.x86_64-buildroot install
|
||||
|
||||
Without DESTDIR build scripts tried to create symlinks outside of the build root:
|
||||
make[3]: Entering directory '/tmp/abf/rpmbuild/BUILD/cifs-utils-6.10'
|
||||
(cd /sbin && ln -sf mount.cifs mount.smb3)
|
||||
ln: failed to create symbolic link 'mount.smb3': Permission denied
|
||||
|
||||
The same fix was introduced in Arch Linux package when updating from 6.9 to 6.10:
|
||||
https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/cifs-utils&id=c75b246a762ea9b90db404dfebc6d3
|
||||
5d5b16972f
|
||||
|
||||
backport from: https://lists.samba.org/archive/samba-technical/2020-January/134770.html
|
||||
---
|
||||
Makefile.am | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index fe9cd34..09ef293 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -119,11 +119,11 @@ endif
|
||||
SUBDIRS = contrib
|
||||
|
||||
install-exec-hook:
|
||||
- (cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
|
||||
+ (cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
|
||||
|
||||
install-data-hook:
|
||||
- (cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
|
||||
+ (cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
|
||||
|
||||
uninstall-hook:
|
||||
- (cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
|
||||
- (cd $(man8dir) && rm -f $(man8dir)/mount.smb3.8)
|
||||
+ (cd $(DESTDIR)$(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
|
||||
+ (cd $(DESTDIR)$(man8dir) && rm -f $(DESTDIR)$(man8dir)/mount.smb3.8)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
From 2244e109ae30aeb0a21deaa591f6e11fa2039e7d Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Shilovsky <pshilov@microsoft.com>
|
||||
Date: Sat, 16 Mar 2019 12:34:13 -0700
|
||||
Subject: [PATCH 28/39] cifs.upcall: fix a compiler warning
|
||||
|
||||
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
|
||||
---
|
||||
cifs.upcall.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cifs.upcall.c b/cifs.upcall.c
|
||||
index c92ee62..1559434 100644
|
||||
--- a/cifs.upcall.c
|
||||
+++ b/cifs.upcall.c
|
||||
@@ -126,6 +126,7 @@ drop_all_capabilities(void)
|
||||
static int
|
||||
trim_capabilities(bool unused)
|
||||
{
|
||||
+ (void)unused;
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
From fe54b753f57686382754521774fef46a537322fb Mon Sep 17 00:00:00 2001
|
||||
From: liujiawen <liujiawen10@huawei.com>
|
||||
Date: Wed, 24 Jul 2019 03:25:14 +0800
|
||||
Subject: [PATCH] Module: modification summary
|
||||
|
||||
reason:fix memory leaks
|
||||
---
|
||||
mount.cifs.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mount.cifs.c b/mount.cifs.c
|
||||
index ae7a899..029f01a 100644
|
||||
--- a/mount.cifs.c
|
||||
+++ b/mount.cifs.c
|
||||
@@ -1830,6 +1830,7 @@ assemble_mountinfo(struct parsed_mount_info *parsed_info,
|
||||
}
|
||||
|
||||
assemble_exit:
|
||||
+ free(orgoptions);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1994,8 +1995,11 @@ int main(int argc, char **argv)
|
||||
|
||||
/* chdir into mountpoint as soon as possible */
|
||||
rc = acquire_mountpoint(&mountpoint);
|
||||
- if (rc)
|
||||
+ if (rc){
|
||||
+ free(mountpoint);
|
||||
+ free(orgoptions);
|
||||
return rc;
|
||||
+ }
|
||||
|
||||
/*
|
||||
* mount.cifs does privilege separation. Most of the code to handle
|
||||
@@ -2014,6 +2018,7 @@ int main(int argc, char **argv)
|
||||
/* child */
|
||||
rc = assemble_mountinfo(parsed_info, thisprogram, mountpoint,
|
||||
orig_dev, orgoptions);
|
||||
+ free(mountpoint);
|
||||
return rc;
|
||||
} else {
|
||||
/* parent */
|
||||
@@ -2149,5 +2154,6 @@ mount_exit:
|
||||
}
|
||||
free(options);
|
||||
free(orgoptions);
|
||||
+ free(mountpoint);
|
||||
return rc;
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
BIN
cifs-utils-6.10.tar.bz2
Normal file
BIN
cifs-utils-6.10.tar.bz2
Normal file
Binary file not shown.
Binary file not shown.
@ -1,14 +1,12 @@
|
||||
Name: cifs-utils
|
||||
Version: 6.8
|
||||
Release: 6
|
||||
Version: 6.10
|
||||
Release: 1
|
||||
Summary: Utilities for doing and managing mounts of the Linux CIFS filesystem
|
||||
License: GPLv3+
|
||||
URL: http://linux-cifs.samba.org/cifs-utils/
|
||||
Source0: https://download.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}.tar.bz2
|
||||
|
||||
Patch0: 0000-setcifsacl-fix-adding-ACE-when-owner-sid-in-unexpect.patch
|
||||
Patch1: 0001-cifs.upcall-fix-a-compiler-warning.patch
|
||||
Patch2: 0002-mount.cifs-fix-memory-leaks.patch
|
||||
Patch1: 0001-cifs-utils-Respect-DESTDIR-when-installing-smb3-stuff.patch
|
||||
|
||||
BuildRequires: python3-docutils libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf
|
||||
BuildRequires: automake libwbclient-devel pam-devel git python3-samba pkg-config fdupes gcc
|
||||
@ -45,6 +43,7 @@ This contains man files for the using of cifs-utils.
|
||||
%autosetup -Sgit -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
autoreconf -vif
|
||||
%configure --prefix=/usr --with-pamdir=%{_libdir}/security ROOTSBINDIR=%{_sbindir}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -78,6 +77,9 @@ install -m 644 contrib/request-key.d/cifs.spnego.conf %{buildroot}%{_sysconfdir}
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 15 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 6.10-1
|
||||
- update to latest v6.10 version
|
||||
|
||||
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> - 6.8-6
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user