* [gentoo-commits] proj/musl:master commit in: net-fs/samba/files/4.4/
@ 2022-07-19 17:50 Anthony G. Basile
0 siblings, 0 replies; only message in thread
From: Anthony G. Basile @ 2022-07-19 17:50 UTC (permalink / raw
To: gentoo-commits
commit: 269a5ccfd3b9cfb67e28d3edfc7ee63c66492c02
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 17:50:20 2022 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 17:50:20 2022 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=269a5ccf
net-fs/samba: add missing config files from tree
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>
net-fs/samba/files/4.4/samba4.confd | 45 +++++++++++++++++++++
net-fs/samba/files/4.4/samba4.initd-r1 | 54 ++++++++++++++++++++++++++
net-fs/samba/files/4.4/system-auth-winbind.pam | 18 +++++++++
3 files changed, 117 insertions(+)
diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd
new file mode 100644
index 00000000..629a6050
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.confd
@@ -0,0 +1,45 @@
+# Add "winbind" to the daemon_list if you also want winbind to start.
+# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
+# file server part or the rpc proxy to start.
+# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
+# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
+# accordingly.
+daemon_list="smbd nmbd"
+
+piddir="/run/samba"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_command="/usr/sbin/smbd"
+smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_command="/usr/sbin/nmbd"
+nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"
+nmbd_reload="killall -HUP nmbd"
+
+samba4_start_options=""
+samba4_command="/usr/sbin/samba"
+samba4_pidfile="${piddir}/samba.pid"
+samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"
+samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"
+samba4_reload="killall -HUP samba"
+
+winbind_start_options=""
+winbind_command="/usr/sbin/winbindd"
+winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1
new file mode 100644
index 00000000..0a528982
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.initd-r1
@@ -0,0 +1,54 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+[ -z "${piddir}" ] && piddir="/run/samba"
+
+depend() {
+ after slapd
+ use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+
+start() {
+ ${my_service_PRE}
+ [ -d "${piddir}" ] || mkdir -p "${piddir}"
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}
diff --git a/net-fs/samba/files/4.4/system-auth-winbind.pam b/net-fs/samba/files/4.4/system-auth-winbind.pam
new file mode 100644
index 00000000..8d6746b7
--- /dev/null
+++ b/net-fs/samba/files/4.4/system-auth-winbind.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+# $Id$
+
+auth required pam_env.so
+auth sufficient pam_winbind.so
+auth sufficient pam_unix.so likeauth nullok use_first_pass
+auth required pam_deny.so
+
+account sufficient pam_winbind.so
+account required pam_unix.so
+
+password required pam_cracklib.so retry=3
+password sufficient pam_unix.so nullok use_authtok md5 shadow
+password required pam_deny.so
+
+session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
+session required pam_limits.so
+session required pam_unix.so
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-19 17:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 17:50 [gentoo-commits] proj/musl:master commit in: net-fs/samba/files/4.4/ Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox