From: Björn Jacke Date: Fri, 21 Dec 2018 00:00:09 +0000 (+0100) Subject: winbind_nss_solaris: use WBFLAG_FROM_NSS X-Git-Tag: tdb-1.3.17~143 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;ds=sidebyside;h=faf50b2d70228cce6b95a068bbe7da2a40d63419;p=kai%2Fsamba-autobuild%2F.git winbind_nss_solaris: use WBFLAG_FROM_NSS Signed-off-by: Bjoern Jacke Reviewed-by: Stefan Metzmacher --- 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) {