summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_sid.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@sernet.de>2007-12-11 15:08:18 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-11 16:51:44 +0100
commitaf3cc957f003444ef1f0ef13afbed2ed4e8ea264 (patch)
tree03f0d746a618e08eb94d3d934e6dc6fdad3239eb /source3/winbindd/winbindd_sid.c
parenta347ff84bcc86a54327e2bb15640c4540de44bfb (diff)
downloadsamba-af3cc957f003444ef1f0ef13afbed2ed4e8ea264.tar.gz
samba-af3cc957f003444ef1f0ef13afbed2ed4e8ea264.tar.bz2
samba-af3cc957f003444ef1f0ef13afbed2ed4e8ea264.zip
winbindd: pass const char *logfile to winbindd_dump_maps_async()
metze (This used to be commit a52237e3a10aa4ac15cd9e7b859a54c46bfa9cdf)
Diffstat (limited to 'source3/winbindd/winbindd_sid.c')
-rw-r--r--source3/winbindd/winbindd_sid.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_sid.c b/source3/winbindd/winbindd_sid.c
index 601971e36b..c01c6f04ab 100644
--- a/source3/winbindd/winbindd_sid.c
+++ b/source3/winbindd/winbindd_sid.c
@@ -532,6 +532,8 @@ static void dump_maps_recv(void *private_data, bool success)
void winbindd_dump_maps(struct winbindd_cli_state *state)
{
+ const char *logfile;
+
if ( ! state->privileged) {
DEBUG(0, ("Only root is allowed to ask for an idmap dump!\n"));
request_error(state);
@@ -540,9 +542,15 @@ void winbindd_dump_maps(struct winbindd_cli_state *state)
DEBUG(3, ("[%5lu]: dump maps\n", (unsigned long)state->pid));
- winbindd_dump_maps_async(state->mem_ctx,
- state->request.extra_data.data,
- state->request.extra_len,
- dump_maps_recv, state);
+ logfile = talloc_strndup(state->mem_ctx,
+ (const char *)state->request.extra_data.data,
+ state->request.extra_len);
+ if (!logfile) {
+ request_error(state);
+ return;
+ }
+
+ winbindd_dump_maps_async(state->mem_ctx, logfile,
+ dump_maps_recv, state);
}