automatic version update by autodist [release 4.19.0-1mamba;Sat Sep 09 2023]

This commit is contained in:
Automatic Build System 2024-01-05 17:37:38 +01:00
parent 80f842c79f
commit fc1b156686
9 changed files with 19 additions and 471 deletions

View File

@ -1,57 +0,0 @@
#!/bin/sh
# Copyright (c) 2003-2007 Silvan Calarco <ilvan.calarco@mambasotf@org>
# Copyright (c) 2007 Davide Madrisan <davide.madrisan@gmail.com>
#
# chkconfig: 2345 55 15
# description: start Samba daemons (nmbd and smbd)
. /etc/sysconfig/rc
. $rc_functions
NAME=samba
NMBD=/usr/sbin/nmbd
SMBD=/usr/sbin/smbd
NMBDPID=/run/nmbd.pid
SMBDPID=/run/smbd.pid
[ -x $SMBD -a -x $NMBD ] || exit 0
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
case "$1" in
start)
echo -n "Starting nmbd: "
daemon --pidfile=$NMBDPID $NMBD -D
evaluate_retval; echo
echo -n "Starting smbd: "
daemon --pidfile=$SMBDPID $SMBD -D
evaluate_retval; echo
;;
stop)
echo -n "Stopping nmbd: "
killproc -p $NMBDPID $NMBD -TERM
echo
sleep 1
echo -n "Stopping smbd: "
killproc -p $SMBDPID $SMBD -TERM
echo
;;
reload)
echo -n "Reloading smbd: "
reloadproc $SMBD
echo
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
status)
statusproc $NMBD
statusproc $SMBD
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|status}"
exit 1
;;
esac

View File

@ -1 +0,0 @@
/usr/lib/samba

View File

@ -1,7 +0,0 @@
# This file provides the same function that the lmhosts file does for
# Windows. It's another way to map netbios names to ip addresses.
#
# Cf. section 'name resolve order' in the manual page of smb.conf for
# more information.
127.0.0.1 localhost

View File

@ -1,8 +0,0 @@
#%PAM-1.0
auth sufficient pam_unix.so
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_limits.so
#session optional pam_console.so

View File

@ -1,285 +0,0 @@
#!/bin/bash
#
# qilinux_samba_ldap.sh :
# Configures LDAP directory for use with SAMBA as a PDC
# as well as Idealx SMB-LDAP scripts
#
# Copyright (c) 2004 by Silvan Calarco <silvan.calarco@qilinux.it>
#
source /etc/rc.d/init.d/ldap-functions
source /etc/sysconfig/defaults
test $UID = 0 ||
{ echo "error: $0: must be superuser" >&2
{ (exit 1); exit 1; }; }
set_ldap_environment
case $? in
0) ;;
1) echo "error: $0: cannot read base dn from /etc/ldap.conf; aborting.";
exit 1 ;;
*) echo "error: $0: cannot find host DN. Check HOSTDC in /etc/sysconfig/
ldap." ;;
esac
argc=$#
for ((i=1; i<=argc; i++)); do
case ${!i} in
*) if test -z "$LDAPPASSWORD"; then LDAPPASSWORD=${!i}
fi
esac
done
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/qilinux_samba_ldap.ldif
trap "rm -f $tempfile" 0 1 2 5 15
echo "Configuring Samba"
# this must be done before any other thing or net getlocalsid won't work
grep "ldap suffix" /etc/samba/smb.conf > /dev/null
if [ $? -eq 1 ]; then
sed -i "/.*logon script.*/a\\
ldap admin dn = $LDAPBINDDN\\
ldap server = 127.0.0.1\\
ldap port = 636\\
ldap ssl = start tls\\
ldap suffix = $LDAPHOSTDN" /etc/samba/smb.conf
fi
grep "ldap machine suffix" /etc/samba/smb.conf > /dev/null
if [ $? -eq 1 ]; then
sed -i "/.*ldap suffix.*/a\\
ldap user suffix = ou=People\\
ldap group suffix = ou=Groups\\
ldap machine suffix = ou=Domain Computers\\
ldap idmap suffix = ou=Idmap" /etc/samba/smb.conf
fi
sed -i "s|passdb backend =.*)|passdb backend = ldapsam|" /etc/samba/smb.conf
echo "Setting samba password for LDAP"
smbpasswd -w "`cat /etc/ldap.secret`"
echo "Adding LDAP entries"
DESTHOME="/home"
DN=$LDAPHOSTDN
STSID="`net getlocalsid 2>/dev/null`" || { echo "Error getting localsid. Aborting."; exit 1; }
SID=${STSID#*: }
sed -i "s|\$SID=.*|\$SID=\'$SID\';|
s|\$suffix = .*|\$suffix = \"$DN\";|
s|\$binddn = .*|\$binddn = \"$LDAPBINDDN\";|
s|\$UID_START = .*|\$UID_START = $MINUID;|
s|\$GID_START = .*|\$GID_START = $MINUID;|" \
/etc/samba/smbldap-tools/smbldap.conf
cat > $tempfile << _EOF
#
# $DN: LDAP base DN
# $DESTHOME: /home
# $_userSmbHome (optional)
# $_userHomeDrive (optional)
# $_userProfile (optional)
# $SID: machine SID
dn: ou=Groups,$LDAPHOSTDN
objectClass: organizationalUnit
ou: Groups
dn: ou=Machines,$LDAPHOSTDN
objectClass: organizationalUnit
ou: Machines
dn: uid=Administrator,ou=People,$LDAPHOSTDN
cn: Administrator
sn: Administrator
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
gidNumber: 65400
uid: Administrator
uidNumber: 65400
homeDirectory: $DESTHOME/Administrator
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaPrimaryGroupSID: $SID-65400
sambaLMPassword: XXX
sambaNTPassword: XXX
sambaAcctFlags: [U ]
sambaSID: $SID-2996
loginShell: /bin/false
gecos: Netbios Domain Administrator
dn: uid=guest,ou=People,$LDAPHOSTDN
cn: guest
sn: guest
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
gidNumber: 65401
uid: guest
uidNumber: 65401
homeDirectory: /dev/null
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaPrimaryGroupSID: $SID-514
sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaAcctFlags: [NU ]
sambaSID: $SID-2998
loginShell: /bin/false
dn: cn=Domain Admins,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65400
cn: Domain Admins
memberUid: Administrator
description: Netbios Domain Administrators
sambaSID: $SID-65400
sambaGroupType: 2
displayName: Domain Admins
dn: cn=Domain Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65401
cn: Domain Users
description: Netbios Domain Users
sambaSID: $SID-65401
sambaGroupType: 2
displayName: Domain Users
dn: cn=Domain Guests,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65402
cn: Domain Guests
description: Netbios Domain Guests Users
sambaSID: $SID-65402
sambaGroupType: 2
displayName: Domain Guests
dn: cn=Administrators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65403
cn: Administrators
description: Netbios Domain Members can fully administer the computer/sambaDomainName
sambaSID: $SID-65403
sambaGroupType: 2
displayName: Administrators
dn: cn=Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65404
cn: Users
description: Netbios Domain Ordinary users
sambaSID: $SID-65404
sambaGroupType: 2
displayName: users
dn: cn=Guests,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65405
cn: Guests
memberUid: guest
description: Netbios Domain Users granted guest access to the computer/sambaDomainName
sambaSID: $SID-65405
sambaGroupType: 2
displayName: Guests
dn: cn=Power Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65406
cn: Power Users
description: Netbios Domain Members can share directories and printers
sambaSID: $SID-65406
sambaGroupType: 2
displayName: Power Users
dn: cn=Account Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65407
cn: Account Operators
description: Netbios Domain Users to manipulate users accounts
sambaSID: $SID-65407
sambaGroupType: 2
displayName: Account Operators
dn: cn=Server Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65408
cn: Server Operators
description: Netbios Domain Server Operators
sambaSID: $SID-65408
sambaGroupType: 2
displayName: Server Operators
dn: cn=Print Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65409
cn: Print Operators
description: Netbios Domain Print Operators
sambaSID: $SID-65409
sambaGroupType: 2
displayName: Print Operators
dn: cn=Backup Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65410
cn: Backup Operators
description: Netbios Domain Members can bypass file security to back up files
sambaSID: $SID-65410
sambaGroupType: 2
displayName: Backup Operators
dn: cn=Replicator,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65411
cn: Replicator
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: $SID-65411
sambaGroupType: 2
displayName: Replicator
dn: cn=Domain Computers,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65412
cn: Domain Computers
description: Netbios Domain Computers accounts
sambaSID: $SID-65412
sambaGroupType: 2
displayName: Domain Computers
dn: ou=Idmap,$LDAPHOSTDN
objectClass: organizationalUnit
ou: idmap
#structuralObjectClass: organizationalUnit
_EOF
echo $LDAPBINDDN $LDAPPASSWORD
if test -z "$LDAPPASSWORD"; then
ldapadd -x -c -D $LDAPBINDDN -W -h localhost -f $tempfile
else
ldapadd -x -c -D $LDAPBINDDN -w $LDAPPASSWORD -h localhost -f $tempfile
fi
rm -f $tempfile
exit 0

View File

@ -1 +0,0 @@
root = Administrator

View File

@ -1,15 +0,0 @@
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

View File

@ -6,7 +6,7 @@
%define smbldap_tools_ver 0.9.2 %define smbldap_tools_ver 0.9.2
Name: samba Name: samba
Version: 4.18.6 Version: 4.19.0
Release: 1mamba Release: 1mamba
Summary: Samba provides seamless file and print services to SMB/CIFS clients Summary: Samba provides seamless file and print services to SMB/CIFS clients
Group: System/Servers Group: System/Servers
@ -16,20 +16,10 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.samba.org URL: https://www.samba.org
Source0: http://us1.samba.org/samba/ftp/stable/samba-%{version}.tar.gz Source0: http://us1.samba.org/samba/ftp/stable/samba-%{version}.tar.gz
Source1: samba-conf Source1: samba-conf
Source2: samba-initscript
Source3: samba-xinetd-swat
Source4: samba-pam
Source5: samba-lmhosts
Source6: samba-qilinux_smbldap_conf.sh
Source7: winbind-initscript
Source8: samba-smbusers
Source9: samba-smbldap_conf.pm Source9: samba-smbldap_conf.pm
Source10: samba-mkhomedir.sh Source10: samba-mkhomedir.sh
Source11: samba-swat_desktopfile Source11: samba-swat_desktopfile
Source12: samba-ld.so.conf
Source13: winbind-nm-dispatcher Source13: winbind-nm-dispatcher
# official patches (http://us1.samba.org/samba/ftp/patches/):
#
Patch0: samba-4.0.6-libtirpc.patch Patch0: samba-4.0.6-libtirpc.patch
Patch1: samba-4.1.14-no-as-needed.patch Patch1: samba-4.1.14-no-as-needed.patch
# openmamba patches: # openmamba patches:
@ -37,7 +27,7 @@ Patch2: samba-4.9.4-conf-idmap.patch
Patch10: %{name}-3.0.23-smbldaptools-rootbinddn.patch Patch10: %{name}-3.0.23-smbldaptools-rootbinddn.patch
Patch11: %{name}-3.2.4-remove_strlcpy_strlcat.patch Patch11: %{name}-3.2.4-remove_strlcpy_strlcat.patch
Patch12: %{name}-3.5.8-mount_disable_setuid_check.patch Patch12: %{name}-3.5.8-mount_disable_setuid_check.patch
Patch13: samba-4.11.4-glibc-2.30.patch Patch13: samba-4.11.4-glibc-2.30.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -53,6 +43,7 @@ BuildRequires: libgnutls-devel
BuildRequires: libgpgme-devel BuildRequires: libgpgme-devel
BuildRequires: libicu-devel BuildRequires: libicu-devel
BuildRequires: libjansson-devel BuildRequires: libjansson-devel
BuildRequires: libkeyutils-devel
BuildRequires: libldb-devel BuildRequires: libldb-devel
BuildRequires: liblttng-ust-devel BuildRequires: liblttng-ust-devel
BuildRequires: libncurses-devel BuildRequires: libncurses-devel
@ -75,6 +66,7 @@ BuildRequires: python-talloc-py3
BuildRequires: liblttng-ust-devel >= 2.13.0 BuildRequires: liblttng-ust-devel >= 2.13.0
BuildRequires: libsystemd-devel >= 2:230-1mamba BuildRequires: libsystemd-devel >= 2:230-1mamba
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: python-ldb >= 1:2.8.0
BuildRequires: valgrind BuildRequires: valgrind
BuildRequires: libldb-devel BuildRequires: libldb-devel
BuildRequires: python-ldb BuildRequires: python-ldb
@ -274,9 +266,15 @@ PATH=/usr/bin:$PATH \
--enable-cups \ --enable-cups \
--bundled-libraries=auto \ --bundled-libraries=auto \
--systemd-nmb-extra "TimeoutStartSec=300" \ --systemd-nmb-extra "TimeoutStartSec=300" \
%ifarch arm
--with-experimental-mit-ad-dc \
--with-system-mitkrb5 \
%endif
--python=%{__python3} \ --python=%{__python3} \
PYTHON=%{__python3} PYTHON=%{__python3}
# ARM: building with-systme-mitkrb5 to bypass atomic link problem with embedded build
# --bundled-libraries=wind,roken,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,\ # --bundled-libraries=wind,roken,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,\
#kdc,ntdb,subunit #kdc,ntdb,subunit
@ -293,6 +291,7 @@ PATH=/usr/bin:$PATH \
#waf %{?_smp_mflags} build #waf %{?_smp_mflags} build
#export LIBS="-ltirpc -ltermcap" #export LIBS="-ltirpc -ltermcap"
%make %make
%install %install
@ -317,15 +316,6 @@ sed -i "s|/usr/local/samba/var/log|/var/log/samba/log|;\
s|/usr/spool/samba|/var/spool/samba|;" \ s|/usr/spool/samba|/var/spool/samba|;" \
%{buildroot}%{_sysconfdir}/samba/smb.conf %{buildroot}%{_sysconfdir}/samba/smb.conf
# #
#install -D -m 0755 %{S:2} %{buildroot}%{_initrddir}/samba
#install -D -m 0755 %{S:7} %{buildroot}%{_initrddir}/winbind
#
#install -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/xinetd.d/swat
#install -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/samba
#install -D -m 0644 %{S:5} %{buildroot}%{_sysconfdir}/samba/lmhosts
#install -D -m 0644 %{S:8} %{buildroot}%{_sysconfdir}/samba/smbusers
##install -D -m 0644 %{S:12} %{buildroot}%{_sysconfdir}/ld.so.conf.d/samba.conf
#
#systemd #systemd
#for f in samba nmb smb winbind; do #for f in samba nmb smb winbind; do
# install -D -m0644 packaging/systemd/$f.service %{buildroot}%{_unitdir}/$f.service # install -D -m0644 packaging/systemd/$f.service %{buildroot}%{_unitdir}/$f.service
@ -495,6 +485,7 @@ fi
%{_bindir}/pdbedit %{_bindir}/pdbedit
%{_bindir}/profiles %{_bindir}/profiles
%{_bindir}/rpcclient %{_bindir}/rpcclient
%{_bindir}/samba-log-parser
%{_bindir}/samba-regedit %{_bindir}/samba-regedit
%{_bindir}/sharesec %{_bindir}/sharesec
%{_bindir}/smbcacls %{_bindir}/smbcacls
@ -567,6 +558,9 @@ fi
#%{_libdir}/libtorture.so.* #%{_libdir}/libtorture.so.*
#%{_libdir}/samba/lib*-samba4.so.* #%{_libdir}/samba/lib*-samba4.so.*
%{_libdir}/samba/lib*-samba4.so %{_libdir}/samba/lib*-samba4.so
%ifarch arm
%{_libdir}/krb5/plugins/kdb/samba.so
%endif
%{_libexecdir}/samba/rpcd_* %{_libexecdir}/samba/rpcd_*
%{_libexecdir}/samba/samba-bgqd %{_libexecdir}/samba/samba-bgqd
%{_libexecdir}/samba/samba-dcerpcd %{_libexecdir}/samba/samba-dcerpcd
@ -765,6 +759,9 @@ fi
%{_mandir}/man8/winbindd.* %{_mandir}/man8/winbindd.*
%changelog %changelog
* Sat Sep 09 2023 Automatic Build System <autodist@mambasoft.it> 4.19.0-1mamba
- automatic version update by autodist
* Thu Aug 17 2023 Automatic Build System <autodist@mambasoft.it> 4.18.6-1mamba * Thu Aug 17 2023 Automatic Build System <autodist@mambasoft.it> 4.18.6-1mamba
- automatic version update by autodist - automatic version update by autodist

View File

@ -1,75 +0,0 @@
#!/bin/sh
#
# chkconfig: 345 91 35
# description: Starts and stops the Samba winbind daemon
#
# pidfile: /run/winbindd.pid
# config: /etc/samba/smb.conf
# source function library
. /etc/sysconfig/rc
. $rc_functions
NAME=winbindd
DAEMON=/usr/sbin/$NAME
DAEMONPID=/run/$NAME.pid
DAEMONCONF=/etc/samba/smb.conf
OPTIONS=""
[ -x $DAEMON ] || exit 0
# source networking configuration
. /etc/sysconfig/network
# check that networking is up
[ ${NETWORKING} = "no" ] && exit 0
# avoid using root's TMPDIR
unset TMPDIR
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# check that smb.conf exists
[ -r $DAEMONCONF ] || exit 0
RETVAL=0
case "$1" in
start)
echo -n $"Starting $NAME: "
daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
;;
stop)
echo -n $"Stopping $NAME: "
killproc -p $DAEMONPID $DAEMON
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME $DAEMONPID
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
reload)
echo -n "Reloading $NAME: "
reloadproc $DAEMON
echo
;;
condrestart)
[ -e /var/lock/subsys/$NAME ] && $0 restart || :
;;
status)
statusproc $DAEMON
RETVAL=$?
;;
*)
echo $"Usage: ""/etc/init.d/$NAME {start|stop|status|reload|restart|condrestart}"
exit 1
;;
esac
exit $?