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 | 9ccac8abb0420393569dbca73e7daf2742aa1099 (patch) | |
tree | 0ac1020ca2ec142d5178f95fba0e93cfad2d43e5 /source/winbindd/winbindd_dual.c | |
parent | f9c8d62389f8cb47837e5360209936176537df13 (diff) | |
download | samba-9ccac8abb0420393569dbca73e7daf2742aa1099.tar.gz samba-9ccac8abb0420393569dbca73e7daf2742aa1099.tar.xz samba-9ccac8abb0420393569dbca73e7daf2742aa1099.zip |
Remove more pstrings, from the winbindd protocol def and
inside winbindd. Remove unused pstring types.
Jeremy.
Diffstat (limited to 'source/winbindd/winbindd_dual.c')
-rw-r--r-- | source/winbindd/winbindd_dual.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index c15af710f4d..91e60cca36e 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/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); } |