summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdocs-xml/smbdotconf/generate-file-list.sh1
-rw-r--r--docs-xml/smbdotconf/security/mitkdccommand.xml16
-rw-r--r--docs-xml/wscript_build9
-rw-r--r--lib/param/loadparm.c5
-rw-r--r--python/samba/tests/docs.py3
-rw-r--r--source3/param/loadparm.c4
6 files changed, 37 insertions, 1 deletions
diff --git a/docs-xml/smbdotconf/generate-file-list.sh b/docs-xml/smbdotconf/generate-file-list.sh
index 9cfcd42d693..4a25f1e6d49 100755
--- a/docs-xml/smbdotconf/generate-file-list.sh
+++ b/docs-xml/smbdotconf/generate-file-list.sh
@@ -15,6 +15,7 @@ echo "<!DOCTYPE section [
<!ENTITY pathconfig.WINBINDD_SOCKET_DIR '\${prefix}/var/run/winbindd'>
<!ENTITY pathconfig.CACHEDIR '\${prefix}/var/cache'>
<!ENTITY pathconfig.NTP_SIGND_SOCKET_DIR '\${prefix}/var/lib/ntp_signd'>
+<!ENTITY pathconfig.MITKDCPATH '\${prefix}/sbin/krb5kdc'>
]>"
DIR=.
diff --git a/docs-xml/smbdotconf/security/mitkdccommand.xml b/docs-xml/smbdotconf/security/mitkdccommand.xml
new file mode 100644
index 00000000000..c8272de7908
--- /dev/null
+++ b/docs-xml/smbdotconf/security/mitkdccommand.xml
@@ -0,0 +1,16 @@
+<samba:parameter name="mit kdc command"
+ context="G"
+ type="list"
+ advanced="1"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>This option specifies the path to the MIT kdc binary.</para>
+
+ <para>If the KDC is not installed in the default location and wasn't
+ correctly detected during build then you should modify this variable and
+ point it to the correct binary.</para>
+</description>
+
+<value type="default">&pathconfig.MITKDCPATH;</value>
+<value type="example">/opt/mit/sbin/krb5kdc</value>
+</samba:parameter>
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index 0b690a878ff..cbc09a56559 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -111,6 +111,15 @@ def smbdotconf_generate_parameter_list(task):
for entity in entities:
t += "%s\n" % entity
+ # We need this if we build with Heimdal
+ mit_kdc_path = '"/usr/sbin/krb5kdc"'
+
+ # The MIT krb5kdc path is set if we build with MIT Kerberos
+ if bld.CONFIG_SET('MIT_KDC_PATH'):
+ mit_kdc_path = bld.CONFIG_GET('MIT_KDC_PATH')
+
+ t += "<!ENTITY pathconfig.MITKDCPATH %s>\n" % mit_kdc_path
+
t += "]>\n"
t += "<section>\n"
for article in articles:
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index c8a8b6d95c4..860f3e2c96c 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2732,6 +2732,11 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lpcfg_do_global_parameter_var(lp_ctx, "spn update command", "%s/samba_spnupdate", dyn_SCRIPTSBINDIR);
lpcfg_do_global_parameter_var(lp_ctx, "samba kcc command",
"%s/samba_kcc", dyn_SCRIPTSBINDIR);
+#ifdef MIT_KDC_PATH
+ lpcfg_do_global_parameter_var(lp_ctx,
+ "mit kdc command",
+ MIT_KDC_PATH);
+#endif
lpcfg_do_global_parameter(lp_ctx, "template shell", "/bin/false");
lpcfg_do_global_parameter(lp_ctx, "template homedir", "/home/%D/%U");
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index 202619a913e..521efe535be 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -108,7 +108,8 @@ class SmbDotConfTests(TestCase):
'lprm command', 'lpq command', 'print command', 'template homedir',
'spoolss: os_major', 'spoolss: os_minor', 'spoolss: os_build',
'max open files', 'fss: prune stale', 'fss: sequence timeout',
- 'include system krb5 conf', 'rpc server dynamic port range'])
+ 'include system krb5 conf', 'rpc server dynamic port range',
+ 'mit kdc command'])
def setUp(self):
super(SmbDotConfTests, self).setUp()
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 3c597ec2f40..91ecba88ad8 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -900,6 +900,10 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
Globals.samba_kcc_command = str_list_make_v3_const(NULL, s, NULL);
TALLOC_FREE(s);
+#ifdef MIT_KDC_PATH
+ Globals.mit_kdc_command = str_list_make_v3_const(NULL, MIT_KDC_PATH, NULL);
+#endif
+
s = talloc_asprintf(talloc_tos(), "%s/samba_dnsupdate", get_dyn_SCRIPTSBINDIR());
if (s == NULL) {
smb_panic("init_globals: ENOMEM");