summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 8874c55ad4f..f8145d99fac 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -727,6 +727,7 @@ struct winbindd_state server_state; /* Server state information */
int main(int argc, char **argv)
{
extern pstring global_myname;
+ extern fstring global_myworkgroup;
int accept_sock;
BOOL interactive = False;
int opt, new_debuglevel = -1;
@@ -780,15 +781,6 @@ int main(int argc, char **argv)
}
}
- if (!*global_myname) {
- char *p;
-
- fstrcpy(global_myname, myhostname());
- p = strchr(global_myname, '.');
- if (p)
- *p = 0;
- }
-
snprintf(debugf, sizeof(debugf), "%s/log.winbindd", LOGFILEBASE);
setup_logging("winbindd", interactive);
reopen_logs();
@@ -803,6 +795,18 @@ int main(int argc, char **argv)
codepage_initialise(lp_client_code_page());
+ /* Setup names. */
+ if (!*global_myname) {
+ char *p;
+
+ fstrcpy(global_myname, myhostname());
+ p = strchr(global_myname, '.');
+ if (p)
+ *p = 0;
+ }
+
+ fstrcpy(global_myworkgroup, lp_workgroup());
+
if (new_debuglevel != -1)
DEBUGLEVEL = new_debuglevel;