add samba4 with mit-krb5 changes

This commit is contained in:
Mario Fetka
2013-04-20 19:16:45 +02:00
parent 4dedeb6724
commit a06e492c90
8 changed files with 2890 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From 2f34bfbc1941127d17a7a91c6598d6a6c35620e2 Mon Sep 17 00:00:00 2001
From: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Date: Thu, 6 Oct 2011 00:19:01 +0200
Subject: [PATCH] Add missing com_err dependencies
---
auth/kerberos/wscript_build | 2 +-
nsswitch/wscript_build | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/auth/kerberos/wscript_build b/auth/kerberos/wscript_build
index 1070770..2421b16 100644
--- a/auth/kerberos/wscript_build
+++ b/auth/kerberos/wscript_build
@@ -1,3 +1,3 @@
bld.SAMBA_SUBSYSTEM('KRB5_PAC',
source='gssapi_pac.c kerberos_pac.c',
- deps='gssapi_krb5 krb5 ndr-krb5pac')
+ deps='gssapi_krb5 krb5 ndr-krb5pac com_err')
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
index 298da06..4e353d3 100644
--- a/nsswitch/wscript_build
+++ b/nsswitch/wscript_build
@@ -33,7 +33,7 @@ if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
bld.SAMBA_LIBRARY('winbind_krb5_locator',
source='winbind_krb5_locator.c',
- deps='wbclient krb5',
+ deps='wbclient krb5 com_err',
realname='winbind_krb5_locator.so')
bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
--
1.7.3.4

View File

@@ -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"

View File

@@ -0,0 +1,59 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/4.0/samba4.initd-r1,v 1.1 2012/11/24 23:59:23 polynomial-c Exp $
extra_started_commands="reload"
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}
}
mkdir_sambadirs() {
[ -d /var/run/samba ] || mkdir -p /var/run/samba
}
start() {
${my_service_PRE}
mkdir_sambadirs
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
}

View File

@@ -0,0 +1,31 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba4.initd,v 1.3 2011/09/14 22:52:33 polynomial-c Exp $
extra_started_commands="reload"
description="The samba daemon init script"
description_reload="Reloads the samba daemon"
depend() {
need net
}
start() {
ebegin "Starting samba"
start-stop-daemon --start --exec /usr/sbin/samba
eend $?
}
stop() {
ebegin "Stopping samba"
start-stop-daemon --stop --pidfile /var/run/samba/samba.pid
eend $?
}
reload() {
ebegin "Reloading samba"
killall -HUP samba
eend $?
}