diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-fs/samba/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-fs/samba/files')
-rw-r--r-- | net-fs/samba/files/4.2/samba4.confd | 38 | ||||
-rw-r--r-- | net-fs/samba/files/4.2/samba4.initd-r1 | 55 | ||||
-rw-r--r-- | net-fs/samba/files/4.4/samba4.confd | 38 | ||||
-rw-r--r-- | net-fs/samba/files/4.4/samba4.initd-r1 | 55 | ||||
-rw-r--r-- | net-fs/samba/files/nmbd.service | 12 | ||||
-rw-r--r-- | net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch | 22 | ||||
-rw-r--r-- | net-fs/samba/files/samba-4.2.7-pam.patch | 36 | ||||
-rw-r--r-- | net-fs/samba/files/samba-4.4.0-pam.patch | 29 | ||||
-rw-r--r-- | net-fs/samba/files/samba-4.5.1-compile_et_fix.patch | 16 | ||||
-rw-r--r-- | net-fs/samba/files/samba.conf | 2 | ||||
-rw-r--r-- | net-fs/samba/files/samba.service | 10 | ||||
-rw-r--r-- | net-fs/samba/files/smbd.service | 12 | ||||
-rw-r--r-- | net-fs/samba/files/smbd.socket | 9 | ||||
-rw-r--r-- | net-fs/samba/files/smbd_at.service | 7 | ||||
-rw-r--r-- | net-fs/samba/files/talloc-disable-python.patch | 34 | ||||
-rw-r--r-- | net-fs/samba/files/winbindd.service | 12 |
16 files changed, 387 insertions, 0 deletions
diff --git a/net-fs/samba/files/4.2/samba4.confd b/net-fs/samba/files/4.2/samba4.confd new file mode 100644 index 000000000000..58b2c7827bdf --- /dev/null +++ b/net-fs/samba/files/4.2/samba4.confd @@ -0,0 +1,38 @@ +# 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" + +#---------------------------------------------------------------------------- +# 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_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}" +smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd" +smbd_reload="killall -HUP smbd" + +nmbd_start_options="-D" +nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}" +nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd" +nmbd_reload="killall -HUP nmbd" + +samba4_start_options="" +samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}" +samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba" +samba4_reload="killall -HUP samba" + +winbind_start_options="" +winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}" +winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd" +winbind_reload="killall -HUP winbindd" + diff --git a/net-fs/samba/files/4.2/samba4.initd-r1 b/net-fs/samba/files/4.2/samba4.initd-r1 new file mode 100644 index 000000000000..52a9b68bba80 --- /dev/null +++ b/net-fs/samba/files/4.2/samba4.initd-r1 @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" +piddir="/run/samba" + +depend() { + after slapd + need net + 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/samba4.confd b/net-fs/samba/files/4.4/samba4.confd new file mode 100644 index 000000000000..58b2c7827bdf --- /dev/null +++ b/net-fs/samba/files/4.4/samba4.confd @@ -0,0 +1,38 @@ +# 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" + +#---------------------------------------------------------------------------- +# 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_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}" +smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd" +smbd_reload="killall -HUP smbd" + +nmbd_start_options="-D" +nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}" +nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd" +nmbd_reload="killall -HUP nmbd" + +samba4_start_options="" +samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}" +samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba" +samba4_reload="killall -HUP samba" + +winbind_start_options="" +winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}" +winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd" +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 000000000000..52a9b68bba80 --- /dev/null +++ b/net-fs/samba/files/4.4/samba4.initd-r1 @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_started_commands="reload" +piddir="/run/samba" + +depend() { + after slapd + need net + 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/nmbd.service b/net-fs/samba/files/nmbd.service new file mode 100644 index 000000000000..44b4ffba1f7f --- /dev/null +++ b/net-fs/samba/files/nmbd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Samba NetBIOS name server +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/samba/nmbd.pid +ExecStart=/usr/sbin/nmbd -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch b/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch new file mode 100644 index 000000000000..c6f50073317a --- /dev/null +++ b/net-fs/samba/files/samba-4.2.3-heimdal_compilefix.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/542638 + +From: Stephan Wolf <stephan@letzte-bankreihe.de> + +Samba uses the build in implementation of heimdal from year 2011. +The ebuild uses the portage version of heimdal. +I got it fixed to patch samba kdc_init function. + +--- samba-4.2.3/source4/kdc/kdc.c ++++ samba-4.2.3/source4/kdc/kdc.c +@@ -967,9 +967,9 @@ + * The old behavior in the _kdc_get_preferred_key() + * function is use_strongest_server_key=TRUE. + */ +- kdc->config->as_use_strongest_session_key = false; ++ kdc->config->tgt_use_strongest_session_key = false; + kdc->config->preauth_use_strongest_session_key = false; +- kdc->config->tgs_use_strongest_session_key = false; ++ kdc->config->svc_use_strongest_session_key = false; + kdc->config->use_strongest_server_key = true; + + /* Register hdb-samba4 hooks for use as a keytab */ diff --git a/net-fs/samba/files/samba-4.2.7-pam.patch b/net-fs/samba/files/samba-4.2.7-pam.patch new file mode 100644 index 000000000000..22b393e78677 --- /dev/null +++ b/net-fs/samba/files/samba-4.2.7-pam.patch @@ -0,0 +1,36 @@ +--- samba-4.2.7/source3/wscript ++++ samba-4.2.7/source3/wscript +@@ -853,11 +853,11 @@ + if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'): + conf.env.with_iconv = False + if conf.env.with_iconv: + conf.DEFINE('HAVE_ICONV', 1) + +- if Options.options.with_pam: ++ if Options.options.with_pam != False: + use_pam=True + conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): + Logs.warn("--with-pam=yes but pam_appl.h not found") + use_pam=False +@@ -926,10 +926,20 @@ + msg="Checking whether PAM_RADIO_TYPE is available"); + if use_pam: + conf.DEFINE('WITH_PAM', 1) + conf.DEFINE('WITH_PAM_MODULES', 1) + ++ else: ++ Logs.warn("PAM disabled") ++ use_pam=False ++ conf.undefine('WITH_PAM') ++ conf.undefine('WITH_PAM_MODULES') ++ conf.undefine('HAVE_SECURITY_PAM_APPL_H') ++ conf.undefine('PAM_RHOST') ++ conf.undefine('PAM_TTY') ++ conf.undefine('HAVE_PAM_PAM_APPL_H') ++ + if Options.options.with_pam_smbpass: + conf.env.with_pam_smbpass = True + + seteuid = False + diff --git a/net-fs/samba/files/samba-4.4.0-pam.patch b/net-fs/samba/files/samba-4.4.0-pam.patch new file mode 100644 index 000000000000..451601383d4b --- /dev/null +++ b/net-fs/samba/files/samba-4.4.0-pam.patch @@ -0,0 +1,29 @@ +--- samba-4.4.0rc2/source3/wscript ++++ samba-4.4.0rc2/source3/wscript +@@ -870,7 +870,7 @@ + if conf.env.with_iconv: + conf.DEFINE('HAVE_ICONV', 1) + +- if Options.options.with_pam: ++ if Options.options.with_pam != False: + use_pam=True + conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): +@@ -943,6 +943,17 @@ + conf.DEFINE('WITH_PAM', 1) + conf.DEFINE('WITH_PAM_MODULES', 1) + ++ else: ++ Logs.warn("PAM disabled") ++ use_pam=False ++ conf.undefine('WITH_PAM') ++ conf.undefine('WITH_PAM_MODULES') ++ conf.undefine('HAVE_SECURITY_PAM_APPL_H') ++ conf.undefine('PAM_RHOST') ++ conf.undefine('PAM_TTY') ++ conf.undefine('HAVE_PAM_PAM_APPL_H') ++ ++ + seteuid = False + + # diff --git a/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch new file mode 100644 index 000000000000..463512f9a9c8 --- /dev/null +++ b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch @@ -0,0 +1,16 @@ +--- samba-4.5.1/source4/heimdal_build/wscript_configure ++++ samba-4.5.1/source4/heimdal_build/wscript_configure +@@ -258,7 +258,11 @@ + + # With the proper checks in place we should be able to build against the system libtommath. + #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'): + # conf.define('USING_SYSTEM_TOMMATH', 1) + +-check_system_heimdal_binary("compile_et") +-check_system_heimdal_binary("asn1_compile") ++# comment out next line to stop Gentoo Samba build from using the compile_et in e2fsprogs-libs ++# to compile the error tables. This produces a compile error later on. ++#check_system_heimdal_binary("compile_et") ++# ++# As a precaution do the same for asn1_compile ++#check_system_heimdal_binary("asn1_compile") diff --git a/net-fs/samba/files/samba.conf b/net-fs/samba/files/samba.conf new file mode 100644 index 000000000000..e0a6f325cf9a --- /dev/null +++ b/net-fs/samba/files/samba.conf @@ -0,0 +1,2 @@ +D /run/samba 0755 root root +D /run/lock/samba 0755 root root diff --git a/net-fs/samba/files/samba.service b/net-fs/samba/files/samba.service new file mode 100644 index 000000000000..8214ff863182 --- /dev/null +++ b/net-fs/samba/files/samba.service @@ -0,0 +1,10 @@ +[Unit] +Description=Samba AD server +After=network.target winbindd.service +Conflicts=nmbd.service smbd.service + +[Service] +ExecStart=/usr/sbin/samba --interactive + +[Install] +WantedBy=multi-user.target diff --git a/net-fs/samba/files/smbd.service b/net-fs/samba/files/smbd.service new file mode 100644 index 000000000000..5c006a44edb6 --- /dev/null +++ b/net-fs/samba/files/smbd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Samba SMB/CIFS server +After=network.target nmbd.service winbindd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-fs/samba/files/smbd.socket b/net-fs/samba/files/smbd.socket new file mode 100644 index 000000000000..833bf438832f --- /dev/null +++ b/net-fs/samba/files/smbd.socket @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server socket + +[Socket] +ListenStream=445 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/net-fs/samba/files/smbd_at.service b/net-fs/samba/files/smbd_at.service new file mode 100644 index 000000000000..e1f71be3f7fa --- /dev/null +++ b/net-fs/samba/files/smbd_at.service @@ -0,0 +1,7 @@ +[Unit] +Description=Samba SMB/CIFS server instance + +[Service] +ExecStart=/usr/sbin/smbd -F +ExecReload=/bin/kill -HUP $MAINPID +StandardInput=socket diff --git a/net-fs/samba/files/talloc-disable-python.patch b/net-fs/samba/files/talloc-disable-python.patch new file mode 100644 index 000000000000..6ef45eb37fb8 --- /dev/null +++ b/net-fs/samba/files/talloc-disable-python.patch @@ -0,0 +1,34 @@ +--- a/lib/talloc/wscript 2017-04-28 04:57:26.000000000 -0400 ++++ b/lib/talloc/wscript 2017-07-05 14:30:42.700580464 -0400 +@@ -74,19 +74,22 @@ + implied_deps='replace'): + conf.define('USING_SYSTEM_TALLOC', 1) + +- using_system_pytalloc_util = True +- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, +- implied_deps='talloc replace'): ++ if conf.env.disable_python: + using_system_pytalloc_util = False +- +- # We need to get a pytalloc-util for all the python versions +- # we are building for +- if conf.env['EXTRA_PYTHON']: +- name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] +- if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, ++ else: ++ using_system_pytalloc_util = True ++ if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, + implied_deps='talloc replace'): + using_system_pytalloc_util = False + ++ # We need to get a pytalloc-util for all the python versions ++ # we are building for ++ if conf.env['EXTRA_PYTHON']: ++ name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] ++ if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, ++ implied_deps='talloc replace'): ++ using_system_pytalloc_util = False ++ + if using_system_pytalloc_util: + conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) + diff --git a/net-fs/samba/files/winbindd.service b/net-fs/samba/files/winbindd.service new file mode 100644 index 000000000000..67a778fc76c7 --- /dev/null +++ b/net-fs/samba/files/winbindd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Samba Winbind daemon +After=network.target nmbd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/winbindd.pid +ExecStart=/usr/sbin/winbindd -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |