From 4f88b7015de4a802ca98e6b9935b4d79115e48e0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 3 Apr 2010 13:44:49 +0200 Subject: libwbclient: Make wbcLookupRids not use talloc --- nsswitch/libwbclient/wbc_sid.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'nsswitch/libwbclient') diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c index 8637b4743f2..a2ed5e1d3f3 100644 --- a/nsswitch/libwbclient/wbc_sid.c +++ b/nsswitch/libwbclient/wbc_sid.c @@ -310,36 +310,34 @@ wbcErr wbcLookupRids(struct wbcDomainSid *dom_sid, ridbuf_size = (sizeof(char)*11) * num_rids + 1; - ridlist = talloc_zero_array(NULL, char, ridbuf_size); + ridlist = (char *)malloc(ridbuf_size); BAIL_ON_PTR_ERROR(ridlist, wbc_status); len = 0; - for (i=0; i0; i++) { - char ridstr[12]; - - len = strlen(ridlist); - p = ridlist + len; - - snprintf( ridstr, sizeof(ridstr)-1, "%u\n", rids[i]); - strncat(p, ridstr, ridbuf_size-len-1); + for (i=0; i