summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-20 18:37:43 +0000
committerJeremy Allison <jra@samba.org>2001-12-20 18:37:43 +0000
commit057e91c1c3833516d03b492f3ebe489d8216a0ba (patch)
tree91e0b58108fcf71c7b7232829c5a34bd353fb520
parent72d3b160229ce9ab8497579ee79668738a70a81f (diff)
downloadsamba-057e91c1c3833516d03b492f3ebe489d8216a0ba.tar.gz
Setup global_myworkgroup. Needed for secrets fetch code.
Jeremy.
-rw-r--r--source/nsswitch/winbindd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 0db16b6874f..c10cd9e2caa 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/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;