diff options
author | Björn Jacke <bj@sernet.de> | 2018-12-21 01:00:09 +0100 |
---|---|---|
committer | Bjoern Jacke <bj@sernet.de> | 2018-12-22 03:11:14 +0100 |
commit | faf50b2d70228cce6b95a068bbe7da2a40d63419 (patch) | |
tree | 0355a2eb2e0558c718699f60b81dd66d63af1051 | |
parent | fcda61bb41be5e638b9124cb5570bbb2fa214a13 (diff) | |
download | samba-faf50b2d70228cce6b95a068bbe7da2a40d63419.tar.gz |
winbind_nss_solaris: use WBFLAG_FROM_NSS
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | nsswitch/winbind_nss_solaris.c | 33 |
1 files changed, 18 insertions, 15 deletions
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) { |