param: Add 'mit kdc command' to change the default.
authorAndreas Schneider <asn@samba.org>
Mon, 28 Apr 2014 13:22:34 +0000 (15:22 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Sat, 29 Apr 2017 21:31:09 +0000 (23:31 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
docs-xml/smbdotconf/generate-file-list.sh
docs-xml/smbdotconf/security/mitkdccommand.xml [new file with mode: 0644]
docs-xml/wscript_build
lib/param/loadparm.c
python/samba/tests/docs.py
source3/param/loadparm.c

index 9cfcd42d69349711a506736c03ab1c39a232ab6d..4a25f1e6d49dd7647a41421665fb5562ff1afc4e 100755 (executable)
@@ -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 (file)
index 0000000..c8272de
--- /dev/null
@@ -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>
index 0b690a878ff0931370be7180d64bc72dd8e2f75f..cbc09a56559c1efc760dff021313f7f33ca71781 100644 (file)
@@ -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:
index c8a8b6d95c495493cc8c3d64a449e4ffa9e12a8a..860f3e2c96c8fcb366fadfe449967da32f06d81d 100644 (file)
@@ -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");
 
index 202619a913e54c8ff916956ff66e90733e132f07..521efe535beb4ecd1c4a56394c2e44640a2d825b 100644 (file)
@@ -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()
index 3c597ec2f404b35b6651cba22376eead4ca88dcc..91ecba88ad836ae68ea3127de8eddaad8aa0ee54 100644 (file)
@@ -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");