diff options
author | Jeremy Allison <jra@samba.org> | 2001-12-20 18:27:42 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-12-20 18:27:42 +0000 |
commit | efbfab37d2d26130b54ee71b1e61001c24bd11f9 (patch) | |
tree | 5a19f4f129f0835f1cb1252e14d9b48b0a98f654 /source/nsswitch/winbindd.c | |
parent | d1a91050701d79254c565ce7cd32ad0f0536a94b (diff) | |
download | samba-efbfab37d2d26130b54ee71b1e61001c24bd11f9.tar.gz samba-efbfab37d2d26130b54ee71b1e61001c24bd11f9.tar.xz samba-efbfab37d2d26130b54ee71b1e61001c24bd11f9.zip |
Ensure global_myworkgroup is set in winbindd. Needed for some of the secrets
fetch code.
Jeremy.
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r-- | source/nsswitch/winbindd.c | 22 |
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; |