diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-03 17:57:46 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-03 17:57:46 -0800 |
commit | 328a57e1ca5fc0e0206fdb565d5951912e84dc5e (patch) | |
tree | 4bb6f8476e33c8fc297d24c1019aefb9fd794830 /source3/winbindd | |
parent | 6f46f75dfc2c80b99a6a5fb277bab456a5fd247b (diff) | |
download | samba-328a57e1ca5fc0e0206fdb565d5951912e84dc5e.tar.gz samba-328a57e1ca5fc0e0206fdb565d5951912e84dc5e.tar.bz2 samba-328a57e1ca5fc0e0206fdb565d5951912e84dc5e.zip |
Remove more pstrings, from the winbindd protocol def and
inside winbindd. Remove unused pstring types.
Jeremy.
(This used to be commit 9ccac8abb0420393569dbca73e7daf2742aa1099)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd.h | 8 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd.h b/source3/winbindd/winbindd.h index 454a4b9698..248bcff92b 100644 --- a/source3/winbindd/winbindd.h +++ b/source3/winbindd/winbindd.h @@ -150,7 +150,7 @@ struct winbindd_child { pid_t pid; struct winbindd_domain *domain; - pstring logfilename; + char *logfilename; struct fd_event event; struct timed_event *lockout_policy_event; @@ -166,8 +166,8 @@ struct winbindd_domain { fstring alt_name; /* alt Domain name, if any (FQDN for ADS) */ fstring forest_name; /* Name of the AD forest we're in */ DOM_SID sid; /* SID for this domain */ - uint32 domain_flags; /* Domain flags from rpc_ds.h */ - uint32 domain_type; /* Domain type from rpc_ds.h */ + uint32 domain_flags; /* Domain flags from rpc_ds.h */ + uint32 domain_type; /* Domain type from rpc_ds.h */ uint32 domain_trust_attribs; /* Trust attribs from rpc_ds.h */ bool initialized; /* Did we already ask for the domain mode? */ bool native_mode; /* is this a win2k domain in native mode ? */ @@ -187,7 +187,7 @@ struct winbindd_domain { /* Private data for the backends (used for connection cache) */ - void *private_data; + void *private_data; /* A working DC */ fstring dcname; diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index c15af710f4..91e60cca36 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -471,11 +471,15 @@ void setup_domain_child(struct winbindd_domain *domain, const char *explicit_logfile) { if (explicit_logfile != NULL) { - pstr_sprintf(child->logfilename, "%s/log.winbindd-%s", - dyn_LOGFILEBASE, explicit_logfile); + if (asprintf(&child->logfilename, "%s/log.winbindd-%s", + dyn_LOGFILEBASE, explicit_logfile) < 0) { + smb_panic("Internal error: asprintf failed"); + } } else if (domain != NULL) { - pstr_sprintf(child->logfilename, "%s/log.wb-%s", - dyn_LOGFILEBASE, domain->name); + if (asprintf(&child->logfilename, "%s/log.wb-%s", + dyn_LOGFILEBASE, domain->name) < 0) { + smb_panic("Internal error: asprintf failed"); + } } else { smb_panic("Internal error: domain == NULL && " "explicit_logfile == NULL"); @@ -507,6 +511,7 @@ void winbind_child_died(pid_t pid) child->event.fd = 0; child->event.flags = 0; child->pid = 0; + SAFE_FREE(child->logfilename); schedule_async_request(child); } |