summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-10-18 06:08:32 +0200
committerJeremy Allison <jra@samba.org>2018-11-02 21:21:15 +0100
commit71549537b7a91ed61ae519b07b719f539a441fc0 (patch)
tree73e859510a532aed01be8951c442bbeaf725f43e /source3/winbindd
parent4c1d10760d9d0cc788eb8994b99ce238ba25bbd0 (diff)
downloadsamba-71549537b7a91ed61ae519b07b719f539a441fc0.tar.gz
idmap: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_script.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/winbindd/idmap_script.c b/source3/winbindd/idmap_script.c
index 7b7f8844c36..e4de1a09ba0 100644
--- a/source3/winbindd/idmap_script.c
+++ b/source3/winbindd/idmap_script.c
@@ -333,7 +333,7 @@ static struct tevent_req *idmap_script_sid2xid_send(
{
struct tevent_req *req, *subreq;
struct idmap_script_sid2xid_state *state;
- char sidbuf[DOM_SID_STR_BUFLEN];
+ struct dom_sid_buf sidbuf;
req = tevent_req_create(mem_ctx, &state,
struct idmap_script_sid2xid_state);
@@ -342,10 +342,11 @@ static struct tevent_req *idmap_script_sid2xid_send(
}
state->idx = idx;
- dom_sid_string_buf(sid, sidbuf, sizeof(sidbuf));
-
- state->syscmd = talloc_asprintf(state, "%s SIDTOID %s",
- script, sidbuf);
+ state->syscmd = talloc_asprintf(
+ state,
+ "%s SIDTOID %s",
+ script,
+ dom_sid_str_buf(sid, &sidbuf));
if (tevent_req_nomem(state->syscmd, req)) {
return tevent_req_post(req, ev);
}