summaryrefslogtreecommitdiff
path: root/source3/python/py_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/python/py_common.c')
-rw-r--r--source3/python/py_common.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/python/py_common.c b/source3/python/py_common.c
index 6e299470bf..364271d57c 100644
--- a/source3/python/py_common.c
+++ b/source3/python/py_common.c
@@ -45,6 +45,9 @@ static BOOL initialised;
void py_samba_init(void)
{
+ extern pstring global_myname;
+ char *p;
+
if (initialised)
return;
@@ -56,7 +59,11 @@ void py_samba_init(void)
/* Misc other stuff */
load_interfaces();
- init_names();
+
+ fstrcpy(global_myname, myhostname());
+ p = strchr(global_myname, '.');
+ if (p)
+ *p = 0;
initialised = True;
}