From faf50b2d70228cce6b95a068bbe7da2a40d63419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Fri, 21 Dec 2018 01:00:09 +0100 Subject: winbind_nss_solaris: use WBFLAG_FROM_NSS Signed-off-by: Bjoern Jacke Reviewed-by: Stefan Metzmacher --- nsswitch/winbind_nss_solaris.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'nsswitch') diff --git a/nsswitch/winbind_nss_solaris.c b/nsswitch/winbind_nss_solaris.c index eb1ddb0f8b0..495854fb9f3 100644 --- a/nsswitch/winbind_nss_solaris.c +++ b/nsswitch/winbind_nss_solaris.c @@ -479,14 +479,15 @@ static NSS_STATUS _nss_winbind_ipnodes_getbyname(nss_backend_t* be, void *args) { nss_XbyY_args_t *argp = (nss_XbyY_args_t*) args; - struct winbindd_response response; - struct winbindd_request request; + struct winbindd_request request = { + .wb_flags = WBFLAG_FROM_NSS, + }; + struct winbindd_response response = { + .length = 0, + }; NSS_STATUS ret; int af; - ZERO_STRUCT(response); - ZERO_STRUCT(request); - /* I assume there that AI_ADDRCONFIG cases are handled in nss frontend code, at least it seems done so in solaris... @@ -524,13 +525,14 @@ static NSS_STATUS _nss_winbind_hosts_getbyname(nss_backend_t* be, void *args) { nss_XbyY_args_t *argp = (nss_XbyY_args_t*) args; - struct winbindd_response response; - struct winbindd_request request; + struct winbindd_request request = { + .wb_flags = WBFLAG_FROM_NSS, + }; + struct winbindd_response response = { + .length = 0, + }; NSS_STATUS ret; - ZERO_STRUCT(response); - ZERO_STRUCT(request); - strncpy(request.data.winsreq, argp->key.name, sizeof(request.data.winsreq) - 1); request.data.winsreq[sizeof(request.data.winsreq) - 1] = '\0'; @@ -548,14 +550,15 @@ static NSS_STATUS _nss_winbind_hosts_getbyaddr(nss_backend_t* be, void *args) { NSS_STATUS ret; - struct winbindd_response response; - struct winbindd_request request; + struct winbindd_request request = { + .wb_flags = WBFLAG_FROM_NSS, + }; + struct winbindd_response response = { + .length = 0, + }; nss_XbyY_args_t *argp = (nss_XbyY_args_t *)args; const char *p; - ZERO_STRUCT(response); - ZERO_STRUCT(request); - #if defined(AF_INET6) /* winbindd currently does not resolve IPv6 */ if(argp->key.hostaddr.type == AF_INET6) { -- cgit v1.2.1