Sync from SUSE:ALP:Source:Standard:1.0 cifs-utils revision 3b7c0cb05125e1b1bd27d050c0c76b18

This commit is contained in:
Adrian Schröter 2024-10-14 14:03:20 +02:00
commit cff7399906
9 changed files with 7136 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

22
README.cifstab.migration Normal file
View File

@ -0,0 +1,22 @@
openSUSE pre-13.2 and SUSE Linux Enterprise pre-12 cifstab migration
====================================================================
The /etc/samba/cifstab approach to handle mounting of cifs shares at systems
startup has been discontinued and obsoleted by the generic /etc/fstab one.
The migration process requires two steps:
1. Append all your mount points from /etc/samba/cifstab.rpmsave to /etc/fstab
2. Add "0 0" to the end of each new cifs mount line in /etc/fstab
Example:
An existing configuration used in /etc/samba/cifstab:
//DATA01/someshare /media/DATA01/someshare cifs credentials=/etc/samba/mycredentials,uid=1000,gid=100,file_mode=0644,dir_mode=0755,domain=MYDOMAIN,rw,setuids
results in the following line in /etc/fstab:
//DATA01/someshare /media/DATA01/someshare cifs credentials=/etc/samba/mycredentials,uid=1000,gid=100,file_mode=0644,dir_mode=0755,domain=MYDOMAIN,rw,setuids 0 0

BIN
cifs-utils-7.0.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJi9WznAAoJEN9bqdMGQtWg6I0QAKUaE3ZPgRJMeLxiZAF/u8Lu
qERzPy/BsFgFufJMT/PCJi8BOBEcKBU4rcOSzh0w6/B1m7T4V/Zjr6GLV9mYBAjl
S0ZHmkI4HE7+QVONt7rp0wdz3goRr+TjJhnahrmHe/qq2Ed+cGLOkpo/GAlajwBe
G12FkJfXcE1KYtyw183Ftdqr1sXd/oR+Et247cPJPVYKmYCQCEBNIGhi0d32MfC8
62EOa1IbYNPn+zzVmk7j4ulYsqWYyNFrhdXuYNBPJe7prEAQnqJEFPiJEtDmz/ZV
dNd3WprGSW1R3JxoH5wzLQ5YPdZzGTmquvrE0LRR47AEDcPuQMu2Y2cZA0Md0vr5
ah0Zj1Q83XC/JeB6MhMEejx77dyAVboR/MMisafX42XDoVwbE+ckUyUTJ33k78JC
hwZ7v7uIB0UBskC6wbpm6c+/nsPXboGJkI9iDIXCXqVPzhLlRSh0wzxotA5Lnqg5
SnVs9jRWvA1jlCNhye8sQg6U20azYCALXw3k9JULWvxwaCA3o9RQ1YY/tXogzG76
0xYy9oZnu3YIIH3TjYvJvMN3eyku/PhX4lFtWIDy+4SGRaHCctDGn6HS0i5z89Vr
Zrs3mDXH7eix5hyWtrgOMngpp0QIRO+mZf9qpgEvD9n2D1X2OWLsdZ1wafndWZ69
r1d2+6n+87J3+V5RO8NY
=67ni
-----END PGP SIGNATURE-----

6602
cifs-utils.changes Normal file

File diff suppressed because it is too large Load Diff

52
cifs-utils.keyring Normal file
View File

@ -0,0 +1,52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eCgximBayrfR1K0+KyTjE145sn+RZrNSLXrXx87C
p7fHKpqBZrM/nxtdXW8CrwwgydCLjDuTngEuLq+Jr92Bz+Z71YiJKTKF4c21fQD8
7+wyEpu7H793yXft9+Ku0c2b0R3SiYyA8P/yBbN73HDsH2ya+L90pjGglS3zClkP
ZyU95vhWVQARAQABiQIfBBgBAgAJBQJaowuSAhsMAAoJEN9bqdMGQtWgCCcP/3pW
eayAOG060ASE/0C6s306HAiJKePHkWRV2rZHbO3eIfTYOFv7sjW/GCFaVfWSArAn
dtxQO8udqzzHEeAx3Wp3i3kiGjs6VH0qtWEMNgxKjNMc5tFrdYl70Vvnva4Bp7RV
V8c6VIxyW4rd+OYZ3vxK+xo5+TwXoT9wKUIeHDmVHB5mVGJzvQDA2YJJeBnWkBnl
ovJ9kHLU7oPAA4XYqAl8TWc3731Ag19teaA1AGqbSEWlOGVIkWVGfl3BynbHgfqN
XbUSmmOOGqp/A9mMDIimdOWtUPQq05YvO8xmeQPNHaOEVzbPp6U0kMnz9K9X+PDS
6VK+xTekF8QTS4fsWneq5DQpKBHtiUTbSz3I52xO3vWCM6q9I7DI7ZGYaJKPwN5d
2u6yrGuq1wGMRsr36GIaRzN/7SKwWInItxFu4eH9BF3lcwv1v76nHp1mX4ObycAo
STJS5m4NGJIwuE/yPvUVy43i8jrTSOnqv0cjEr7AcoAQIUybZG09igeBHTGJ5FnL
SEJ4Cm9aJQ7ry+pclSFqzrS8iEIEES4GmYmLp6onvi+TV7YlC9w0GDikWg0Uk3xf
cwEFFZGeCvgM4bqdIHCEq37ZPDNbZ4I3P6kWblYgrnIhPfKfVkKY5mybRA+uiNkq
kwcfWNBaJWVaFFiM+ol3YE0wiTy/lyL6oHQ/iZLz
=+QS8
-----END PGP PUBLIC KEY BLOCK-----

244
cifs-utils.spec Normal file
View File

@ -0,0 +1,244 @@
#
# spec file for package cifs-utils
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if %{undefined _pamdir}
%define _pamdir /%{_lib}/security
%endif
Name: cifs-utils
Version: 7.0
Release: 0
Summary: Utilities for doing and managing mounts of the Linux CIFS filesystem
License: GPL-3.0-or-later
Group: System/Filesystems
URL: http://www.samba.org/linux-cifs/cifs-utils/
# origin git://git.samba.org/cifs-utils.git
# for-next https://github.com/piastry/cifs-utils.git
Source: https://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2
Source5: https://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2.asc
# http://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-pubkey_70F3B981.asc
Source6: cifs-utils.keyring
Source100: README.cifstab.migration
Source1: cifs.init
Patch1: fix-sbin-install-error.patch
# Both SSSD and cifs-utils provide an idmap plugin for cifs.ko
# /etc/cifs-utils/idmap-plugin should be a symlink to one of the 2 idmap plugins
# * cifs-utils one is the default (priority 20)
# * installing SSSD should NOT switch to SSSD plugin (priority 10)
%define cifs_idmap_plugin %{_sysconfdir}/cifs-utils/idmap-plugin
%define cifs_idmap_lib %{_libdir}/cifs-utils/idmapwb.so
%define cifs_idmap_name cifs-idmap-plugin
%define cifs_idmap_priority 20
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun):update-alternatives
# cifs-utils 6.8 switched to python for man page generation
# we need to require either py2 or py3 package
# some products do not have a py2/py3 versions
%if 0%{?suse_version} >= 1500
BuildRequires: python3-docutils
%else
BuildRequires: python-docutils
%endif
%if 0%{?suse_version} >= 1221
%define systemd 1
%else
%define systemd 0
%endif
%if 0%{?suse_version} < 1221
PreReq: insserv %{?fillup_prereq}
%endif
%define initdir %{_sysconfdir}/init.d
Provides: cifs-mount = %{version}
Obsoletes: cifs-mount < %{version}
%if 0%{?suse_version} > 1140
BuildRequires: autoconf
%endif
BuildRequires: automake
BuildRequires: keyutils-devel
BuildRequires: krb5-devel
%if 0%{?suse_version} > 1120
BuildRequires: libcap-ng-devel
%else
BuildRequires: libcap-devel
%endif
BuildRequires: libtalloc-devel
%if 0%{?suse_version} > 1110
BuildRequires: fdupes
%endif
BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(wbclient)
Requires: keyutils
%if ! %{defined _rundir}
%define _rundir %{_localstatedir}/run
%endif
%description
The cifs-utils package consist of utilities for doing and managing mounts of
the Linux CIFS filesystem.
%package devel
Summary: Files needed for building plugins for cifs-utils
Group: Development/Libraries/C and C++
%description devel
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
on Microsoft Windows machines. This package contains the header file
necessary for building ID mapping plugins for cifs-utils.
%package -n pam_cifscreds
Summary: PAM module to manage NTLM credentials in kernel keyring
Group: System/Libraries
%description -n pam_cifscreds
The pam_cifscreds PAM module is a tool for automatically adding
credentials (username and password) for the purpose of establishing
sessions in multiuser mounts.
When a cifs filesystem is mounted with the "multiuser" option, and does
not use krb5 authentication, it needs to be able to get the credentials
for each user from somewhere. The pam_cifscreds module can be used to
provide these credentials to the kernel automatically at login.
%prep
%setup -q
cp -a ${RPM_SOURCE_DIR}/README.cifstab.migration .
pyscripts="smb2-quota smbinfo"
for i in $pyscripts; do
if [ -e $i ]; then
sed -i 's,^#!/usr/bin/env python.*$,#!/usr/bin/python3,' $i
fi
done
%patch1 -p1
%build
export CFLAGS="%{optflags} -D_GNU_SOURCE -fpie"
export LDFLAGS="-pie"
autoreconf -i
%if 0%{?suse_version} >= 1550
export ROOTSBINDIR="%{_sbindir}"
%endif
%configure \
--with-pamdir=%{_pamdir}
make %{?_smp_mflags}
%install
%if ! %{systemd}
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
%endif
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
install -m 644 -p contrib/request-key.d/cifs.idmap.conf %{buildroot}%{_sysconfdir}/request-key.d
install -m 644 -p contrib/request-key.d/cifs.spnego.conf %{buildroot}%{_sysconfdir}/request-key.d
%if 0%{?suse_version} > 1221
mkdir -p \
%{buildroot}/%{_sysconfdir}/sysconfig/network/if-{down,up}.d \
%{buildroot}/%{_sysconfdir}/samba \
%{buildroot}/%{_sbindir} \
%{buildroot}/%{_rundir}
%if ! %{systemd}
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init %{buildroot}/%{_sysconfdir}/init.d/cifs
ln -s service %{buildroot}/%{_sbindir}/rccifs
%endif
# dummy target for cifs-idmap-plugin
mkdir -p %{buildroot}%{_sysconfdir}/alternatives %{buildroot}%{_sysconfdir}/cifs-utils
ln -s -f %{_sysconfdir}/alternatives/%{cifs_idmap_name} %{buildroot}%{cifs_idmap_plugin}
touch %{buildroot}/%{_sysconfdir}/sysconfig/network/if-{down,up}.d/${script} \
%{buildroot}%{_rundir}/cifs
%endif
# Hardlink duplicate files
%if 0%{?suse_version} > 1110
%fdupes %{buildroot}
%endif
%post
# install cifs-utils cifs-idmap plugin using alternatives system
update-alternatives --install %{cifs_idmap_plugin} %{cifs_idmap_name} %{cifs_idmap_lib} %{cifs_idmap_priority}
%postun
if [ ! -f %{cifs_idmap_lib} ] ; then
update-alternatives --remove %{cifs_idmap_name} %{cifs_idmap_lib}
fi
%files
%if 0%{?suse_version} >= 1550
%{_sbindir}/mount.cifs
%{_sbindir}/mount.smb3
%else
/sbin/mount.cifs
/sbin/mount.smb3
%endif
%{_bindir}/getcifsacl
%{_bindir}/setcifsacl
%{_sbindir}/cifs.idmap
%{_mandir}/man1/getcifsacl.1%{ext_man}
%{_mandir}/man1/setcifsacl.1%{ext_man}
%{_mandir}/man8/cifs.idmap.8%{ext_man}
%{_bindir}/cifscreds
%{_sbindir}/cifs.upcall
%{_bindir}/smbinfo
%{_bindir}/smb2-quota
%{_mandir}/man1/cifscreds.1%{ext_man}
%{_mandir}/man1/smbinfo.1%{ext_man}
%{_mandir}/man1/smb2-quota.1%{ext_man}
%{_mandir}/man8/cifs.upcall.8%{ext_man}
%{_mandir}/man8/mount.cifs.8%{ext_man}
%{_mandir}/man8/mount.smb3.8%{ext_man}
# request keys
%dir %{_sysconfdir}/request-key.d
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
# idmap plugin
%dir %_sysconfdir/cifs-utils
%{cifs_idmap_plugin}
%dir %_libdir/cifs-utils
%{cifs_idmap_lib}
%ghost %_sysconfdir/alternatives/%{cifs_idmap_name}
%{_mandir}/man8/idmapwb.8%{ext_man}
%if 0%{?suse_version} > 1221
%if ! %{systemd}
%attr(0754,root,root) %config %{_sysconfdir}/init.d/cifs
%{_sbindir}/rccifs
%endif
%dir %{_sysconfdir}/samba
%ghost %{_rundir}/cifs
%endif
%doc README.cifstab.migration
%files devel
%{_includedir}/cifsidmap.h
%files -n pam_cifscreds
/%{_pamdir}/pam_cifscreds.so
%{_mandir}/man8/pam_cifscreds.8%{ext_man}
%changelog

162
cifs.init Normal file
View File

@ -0,0 +1,162 @@
#! /bin/sh
# Copyright (c) 1999-2014 SUSE Linux Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# Author: Thomas Fehr, 1999-2001
# Lars Mueller <lmuelle@suse.com>, 2002-2014
# Bjoern Jacke <bjacke@SerNet.de> 2004
#
# /etc/init.d/cifs
# and its symbolic link
# /usr/sbin/rccifs
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
### BEGIN INIT INFO
# Provides: cifs
# Required-Start: $network $syslog
# Should-Start: nfs nmb
# Required-Stop: $network $syslog
# Should-Stop: nfs nmb
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Import remote CIFS file systems
# Description: Import remote CIFS file systems
### END INIT INFO
# To access CIFS servers beyond the network broadcast domain it may be
# necessary to also activate the nmb service. Also see section 'cifs
# and nmb service' in /usr/share/doc/packages/samba/README.SUSE
. /etc/rc.status
rc_reset
LC_ALL=en_US
SMB_CONF="/etc/samba/smb.conf"
CIFS_STATE_FILE="/run/cifs.state"
SLEEP=1
TIMEOUT=10
grep -q " cifs " /proc/mounts
test $? -eq 0 && cifs_used=yes || cifs_used=no
case "$1" in
start)
grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab
rc=$?
if [ ${rc} -ne 0 ]; then
echo -n >&2 "No filesystem of type cifs active in /etc/fstab. "
rc_status -s
exit 6
fi
echo -n "Mount CIFS File Systems "
timer=${TIMEOUT}
JOBS="none"
printdot=""
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
if [ -z "${printdot}" ]; then
echo -en "\nfrom /etc/fstab "
mount -at cifs >/dev/null &
PID=$!
fi
test -e /proc/$PID || JOBS=""
if [ "${JOBS}" ]; then
timer=$[${timer}-1]
echo -n "."
sleep ${SLEEP}
printdot="yes"
fi
done
test "${printdot}" && echo -n " "
if [ "${JOBS}" -a ${timer} -eq 0 ]; then
echo -n >&2 " Error: timeout while mount. "
rc_failed
fi
rc_status -v
touch ${CIFS_STATE_FILE}
;;
stop)
echo -n "Umount CIFS File Systems "
if [ "${cifs_used}" = "yes" ]; then
#
# Unmount in background due to possible long timeouts
#
timer=${TIMEOUT}
JOBS="none"
printdot=""
while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
if [ -z "${printdot}" ]; then
umount -at cifs &
PID=$!
fi
test -e /proc/$PID || JOBS=""
if [ "${JOBS}" ]; then
timer=$[${timer}-1]
echo -n "."
sleep ${SLEEP}
printdot="yes"
fi
done
test "${printdot}" && echo -n " "
if [ "${JOBS}" -a ${timer} -eq 0 ]; then
echo -n >&2 " Error: timeout while umount. "
rc_failed
fi
fi
rc_status -v
;;
try-restart|condrestart)
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset
fi
rc_status
;;
force-reload|restart)
$0 stop
$0 start
rc_status
;;
reload)
echo -n "Reload mounted CIFS File Systems "
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for mounted CIFS File Systems "
if [ "${cifs_used}" = "yes" ]; then
mount -t cifs | while read service on mountpoint type vfstype rest; do
echo
echo -n "${service} on ${mountpoint} type ${vfstype} "
done
else
rc_failed 3
fi
rc_status -v
;;
probe)
test ${CIFSTAB} -nt ${CIFS_STATE_FILE} -o \
${SMB_CONF} -nt ${CIFS_STATE_FILE} && echo restart
;;
*)
echo "Usage: $0 {start|stop|status|force-reload|reload|restart|reload|probe}"
exit 1
;;
esac
rc_exit

View File

@ -0,0 +1,11 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -118,7 +118,7 @@ endif
SUBDIRS = contrib
install-exec-hook: install-sbinPROGRAMS
- (cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+ (mkdir -p $(DESTDIR)$(ROOTSBINDIR) && cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
install-data-hook:
if CONFIG_MAN