summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/aclocal.m417
-rw-r--r--source3/nsswitch/wb_common.c2
-rw-r--r--source3/nsswitch/wbinfo.c21
3 files changed, 36 insertions, 4 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index b66a1c253e..00c57bacee 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -362,6 +362,23 @@ AC_DEFUN(jm_ICONV,
jm_cv_func_iconv=yes
jm_cv_lib_iconv="iconv")
LIBS="$jm_save_LIBS"
+
+ if test "$jm_cv_lib_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -lbiconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <biconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_lib_iconv=yes
+ jm_cv_func_iconv=yes
+ jm_cv_include="biconv.h"
+ jm_cv_biconv=yes
+ jm_cv_lib_iconv="biconv")
+
+ LIBS="$jm_save_LIBS"
+ fi
fi
fi
fi
diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c
index 05d2a660e7..13cefd135d 100644
--- a/source3/nsswitch/wb_common.c
+++ b/source3/nsswitch/wb_common.c
@@ -504,7 +504,7 @@ int read_reply(struct winbindd_response *response)
/* Mallocate memory for extra data */
- if (!(response->extra_data.data = malloc(extra_data_len))) {
+ if (!(response->extra_data.data = SMB_MALLOC(extra_data_len))) {
return -1;
}
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index cabf995042..826b4fc040 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -638,7 +638,7 @@ static BOOL wbinfo_lookupsid(char *sid)
/* Lookup a list of RIDs */
-static BOOL wbinfo_lookuprids(char *domain_sid, char *arg)
+static BOOL wbinfo_lookuprids(char *domain, char *arg)
{
size_t i;
DOM_SID sid;
@@ -650,9 +650,24 @@ static BOOL wbinfo_lookuprids(char *domain_sid, char *arg)
enum lsa_SidType *types;
const char *domain_name;
TALLOC_CTX *mem_ctx;
+ struct winbindd_request request;
+ struct winbindd_response response;
+
+ if ((domain == NULL) || (strequal(domain, ".")) || (domain[0] == '\0'))
+ fstrcpy(request.domain_name, get_winbind_domain());
+ else
+ fstrcpy(request.domain_name, domain);
+
+ /* Send request */
+
+ if (winbindd_request_response(WINBINDD_DOMAIN_INFO, &request, &response) !=
+ NSS_STATUS_SUCCESS) {
+ d_printf("Could not get domain sid for %s\n", request.domain_name);
+ return False;
+ }
- if (!string_to_sid(&sid, domain_sid)) {
- d_printf("Could not convert %s to sid\n", domain_sid);
+ if (!string_to_sid(&sid, response.data.domain_info.sid)) {
+ d_printf("Could not convert %s to sid\n", response.data.domain_info.sid);
return False;
}