summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
committerGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
commit1e6e5b299c235b513095a76a4cd9fffc41e8fc9c (patch)
tree9f741529073ad411cc7328334e26d3e35b1d33f1 /source/nsswitch/winbindd.c
parenta11c5d7ad07d259d764aede4745d13f8163a8212 (diff)
downloadsamba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.gz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.xz
samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.zip
beginning to sync up for 2.2.5 release....
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 666472eddbe..65361b571c4 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -50,14 +50,21 @@ static BOOL reload_services_file(BOOL test)
snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE);
lp_set_logfile(logfile);
- reopen_logs();
+ if (!reopen_logs()) {
+ fprintf(stderr, "Could not open logfile: %s\n", logfile);
+ fprintf(stderr, "Continuing in the hope that that is OK\n");
+ }
ret = lp_load(servicesf,False,False,True);
snprintf(logfile, sizeof(logfile), "%s/log.winbindd", LOGFILEBASE);
lp_set_logfile(logfile);
- reopen_logs();
+ if (!reopen_logs()) {
+ fprintf(stderr, "Could not open logfile: %s\n", logfile);
+ fprintf(stderr, "Continuing in the hope that that is OK\n");
+ }
+
load_interfaces();
return(ret);
@@ -228,7 +235,9 @@ static struct dispatch_table dispatch_table[] = {
/* PAM auth functions */
{ WINBINDD_PAM_AUTH, winbindd_pam_auth, "PAM_AUTH" },
+#ifdef WITH_WINBIND_AUTH_CRAP
{ WINBINDD_PAM_AUTH_CRAP, winbindd_pam_auth_crap, "AUTH_CRAP" },
+#endif
{ WINBINDD_PAM_CHAUTHTOK, winbindd_pam_chauthtok, "CHAUTHTOK" },
/* Enumeration functions */
@@ -750,7 +759,10 @@ int main(int argc, char **argv)
lp_set_logfile(logfile);
setup_logging("winbindd", interactive);
- reopen_logs();
+ if (!reopen_logs()) {
+ fprintf(stderr, "Could not open logfile: %s\n", logfile);
+ fprintf(stderr, "Continuing in the hope that that is OK\n");
+ }
DEBUG(1, ("winbindd version %s started.\n", VERSION ) );
DEBUGADD( 1, ( "Copyright The Samba Team 2000-2001\n" ) );
@@ -760,8 +772,6 @@ int main(int argc, char **argv)
exit(1);
}
- pidfile_create("winbindd");
-
codepage_initialise(lp_client_code_page());
/* Setup names. */
@@ -777,8 +787,11 @@ int main(int argc, char **argv)
fstrcpy(global_myworkgroup, lp_workgroup());
- if (!interactive)
+ if (!interactive) {
become_daemon();
+ pidfile_create("winbindd");
+ }
+
#if HAVE_SETPGID
/*
@@ -791,7 +804,12 @@ int main(int argc, char **argv)
load_interfaces();
- secrets_init();
+ if (!secrets_init()) {
+
+ DEBUG(0,("Could not initialize domain trust account secrets. Giving up\n"));
+ return 1;
+
+ }
/* Get list of domains we look up requests for. This includes the
domain which we are a member of as well as any trusted