pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0034-ipa-adtrust-install-configure-host-netbios-name-by-d.patch

9991ea
From 7358fdd85215b9ee9becb2e352480abd2789691f Mon Sep 17 00:00:00 2001
9991ea
From: Alexander Bokovoy <abokovoy@redhat.com>
9991ea
Date: Fri, 17 Jan 2014 14:09:34 +0200
9991ea
Subject: [PATCH 34/34] ipa-adtrust-install: configure host netbios name by
9991ea
 default
9991ea
9991ea
Ensure we set host netbios name by default in smb.conf
9991ea
9991ea
https://fedorahosted.org/freeipa/ticket/4116
9991ea
---
9991ea
 install/share/smb.conf.template      | 1 +
9991ea
 ipaserver/install/adtrustinstance.py | 3 +++
9991ea
 2 files changed, 4 insertions(+)
9991ea
9991ea
diff --git a/install/share/smb.conf.template b/install/share/smb.conf.template
9991ea
index 086b0fcfe5cff2bc3582f2a89962a99c9095b4bb..2908b998cc85fcb84f60847135aaa4b008e121f8 100644
9991ea
--- a/install/share/smb.conf.template
9991ea
+++ b/install/share/smb.conf.template
9991ea
@@ -1,5 +1,6 @@
9991ea
 [global]
9991ea
 workgroup = $NETBIOS_NAME
9991ea
+netbios name = $HOST_NETBIOS_NAME
9991ea
 realm = $REALM
9991ea
 kerberos method = dedicated keytab
9991ea
 dedicated keytab file = FILE:/etc/samba/samba.keytab
9991ea
diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py
9991ea
index 4aa8322e3e2cfb6fbc07696097c3e6e21fc7f665..621e3fd46780beb15f3d642cb9e3eb1c5fa721ad 100644
9991ea
--- a/ipaserver/install/adtrustinstance.py
9991ea
+++ b/ipaserver/install/adtrustinstance.py
9991ea
@@ -124,6 +124,7 @@ def __init__(self, fstore=None):
9991ea
         self.secondary_rid_base = None
9991ea
 
9991ea
         self.fqdn = None
9991ea
+        self.host_netbios_name = None
9991ea
         self.realm = None
9991ea
         self.domain_name = None
9991ea
 
9991ea
@@ -151,6 +152,7 @@ def __setup_default_attributes(self):
9991ea
 
9991ea
         # Values obtained from API.env
9991ea
         self.fqdn = self.fqdn or api.env.host
9991ea
+        self.host_netbios_name = make_netbios_name(self.fqdn)
9991ea
         self.realm = self.realm or api.env.realm
9991ea
         self.domain_name = self.domain_name or api.env.domain
9991ea
 
9991ea
@@ -769,6 +771,7 @@ def __setup_sub_dict(self):
9991ea
         self.sub_dict = dict(REALM = self.realm,
9991ea
                              SUFFIX = self.suffix,
9991ea
                              NETBIOS_NAME = self.netbios_name,
9991ea
+                             HOST_NETBIOS_NAME = self.host_netbios_name,
9991ea
                              SMB_DN = self.smb_dn,
9991ea
                              LDAPI_SOCKET = self.ldapi_socket,
9991ea
                              FQDN = self.fqdn)
9991ea
-- 
9991ea
1.8.4.2
9991ea