From 6ac6af60cb1898619e383c362d8338b2de3d4e28 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Dec 2001 18:37:43 +0000 Subject: Setup global_myworkgroup. Needed for secrets fetch code. Jeremy. (This used to be commit 057e91c1c3833516d03b492f3ebe489d8216a0ba) --- source3/nsswitch/winbindd.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'source3/nsswitch/winbindd.c') diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 0db16b6874..c10cd9e2ca 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -724,6 +724,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,6 +781,15 @@ int main(int argc, char **argv) setup_logging("winbindd", interactive); reopen_logs(); + DEBUG(1, ("winbindd version %s started.\n", VERSION ) ); + DEBUGADD( 1, ( "Copyright The Samba Team 2000-2001\n" ) ); + + if (!reload_services_file(False)) { + DEBUG(0, ("error opening config file\n")); + exit(1); + } + + /* Setup names. */ if (!*global_myname) { char *p; @@ -789,14 +799,7 @@ int main(int argc, char **argv) *p = 0; } - - DEBUG(1, ("winbindd version %s started.\n", VERSION ) ); - DEBUGADD( 1, ( "Copyright The Samba Team 2000-2001\n" ) ); - - if (!reload_services_file(False)) { - DEBUG(0, ("error opening config file\n")); - exit(1); - } + fstrcpy(global_myworkgroup, lp_workgroup()); if (new_debuglevel != -1) DEBUGLEVEL = new_debuglevel; -- cgit