[SCM] Samba Shared Repository - branch v3-3-stable updated -
release-3-2-0pre2-3818-gad14ec5
Karolin Seeger
kseeger at samba.org
Tue Aug 26 07:43:00 GMT 2008
The branch, v3-3-stable has been updated
via ad14ec5c2a58d658797e4728b15783aee22e1147 (commit)
via c533ae755921de27f0244fb55aee2bab625536e4 (commit)
from dd1357cb2ab3957da4be1c7429b604b7d68840a2 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-stable
- Log -----------------------------------------------------------------
commit ad14ec5c2a58d658797e4728b15783aee22e1147
Author: David Leonard <David.Leonard at quest.com>
Date: Mon Aug 25 15:18:14 2008 -0700
Fix bug 4516, no IPv6 on Solaris 2.6.
(cherry picked from commit 6121414b842882358326122cafe1f04ea0efa53d)
commit c533ae755921de27f0244fb55aee2bab625536e4
Author: Michael Adam <obnox at samba.org>
Date: Mon Aug 25 22:40:48 2008 +0200
WHATSNEW: fix typo
Michael
(cherry picked from commit 3880d3e4cd827d7bd148398f7c432cd28ff3a080)
-----------------------------------------------------------------------
Summary of changes:
WHATSNEW.txt | 2 +-
source/nsswitch/winbind_nss_solaris.c | 25 ++++++++++++++++++++++---
2 files changed, 23 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 4515cdc..bda05a4 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -33,7 +33,7 @@ Configure changes
The configure option "--with-libdir" has been removed. The library
directory can still be specified by using the existing "--libdir" option.
A new option "--with-modulesdir" has been added to allow the specification
-of a separate driectory for the shared modules.
+of a separate directory for the shared modules.
Winbind idmap backend changes
diff --git a/source/nsswitch/winbind_nss_solaris.c b/source/nsswitch/winbind_nss_solaris.c
index 5a72393..865b6eb 100644
--- a/source/nsswitch/winbind_nss_solaris.c
+++ b/source/nsswitch/winbind_nss_solaris.c
@@ -359,7 +359,9 @@ parse_response(int af, nss_XbyY_args_t* argp, struct winbindd_response *response
int addrcount = 0;
int len = 0;
struct in_addr *addrp;
+#if defined(AF_INET6)
struct in6_addr *addrp6;
+#endif
int i;
/* response is tab separated list of ip addresses with hostname
@@ -391,7 +393,9 @@ parse_response(int af, nss_XbyY_args_t* argp, struct winbindd_response *response
addrp -= addrcount;
he->h_addr_list = (char **)ROUND_DOWN(addrp, sizeof (char*));
he->h_addr_list -= addrcount+1;
- } else {
+ }
+#if defined(AF_INET6)
+ else {
he->h_length = sizeof(struct in6_addr);
addrp6 = (struct in6_addr *)ROUND_DOWN(buffer + buflen,
sizeof(struct in6_addr));
@@ -399,6 +403,7 @@ parse_response(int af, nss_XbyY_args_t* argp, struct winbindd_response *response
he->h_addr_list = (char **)ROUND_DOWN(addrp6, sizeof (char*));
he->h_addr_list -= addrcount+1;
}
+#endif
/* buffer too small?! */
if((char *)he->h_addr_list < buffer ) {
@@ -418,7 +423,9 @@ parse_response(int af, nss_XbyY_args_t* argp, struct winbindd_response *response
argp->erange = 1;
return NSS_STR_PARSE_ERANGE;
}
- } else {
+ }
+#if defined(AF_INET6)
+ else {
he->h_addr_list[i] = (char *)&addrp6[i];
if (strchr(data, ':') != 0) {
if (inet_pton(AF_INET6, data, &addrp6[i]) != 1) {
@@ -434,6 +441,7 @@ parse_response(int af, nss_XbyY_args_t* argp, struct winbindd_response *response
IN6_INADDR_TO_V4MAPPED(&in4, &addrp6[i]);
}
}
+#endif
data = p+1;
}
@@ -481,6 +489,7 @@ _nss_winbind_ipnodes_getbyname(nss_backend_t* be, void *args)
AF_INET or for AF_INET6 and AI_ALL|AI_V4MAPPED we have to map
IPv4 to IPv6.
*/
+#if defined(AF_INET6)
#ifdef HAVE_NSS_XBYY_KEY_IPNODE
af = argp->key.ipnode.af_family;
if(af == AF_INET6 && argp->key.ipnode.flags == 0) {
@@ -491,6 +500,7 @@ _nss_winbind_ipnodes_getbyname(nss_backend_t* be, void *args)
/* I'm not that sure if this is correct, but... */
af = AF_INET6;
#endif
+#endif
strncpy(request.data.winsreq, argp->key.name, sizeof(request.data.winsreq) - 1);
request.data.winsreq[sizeof(request.data.winsreq) - 1] = '\0';
@@ -539,6 +549,7 @@ _nss_winbind_hosts_getbyaddr(nss_backend_t* be, void *args)
ZERO_STRUCT(response);
ZERO_STRUCT(request);
+#if defined(AF_INET6)
/* winbindd currently does not resolve IPv6 */
if(argp->key.hostaddr.type == AF_INET6) {
argp->h_errno = NO_DATA;
@@ -546,7 +557,15 @@ _nss_winbind_hosts_getbyaddr(nss_backend_t* be, void *args)
}
p = inet_ntop(argp->key.hostaddr.type, argp->key.hostaddr.addr,
- request.data.winsreq, INET6_ADDRSTRLEN);
+ request.data.winsreq, sizeof request.data.winsreq);
+#else
+ snprintf(request.data.winsreq, sizeof request.data.winsreq,
+ "%u.%u.%u.%u",
+ ((unsigned char *)argp->key.hostaddr.addr)[0],
+ ((unsigned char *)argp->key.hostaddr.addr)[1],
+ ((unsigned char *)argp->key.hostaddr.addr)[2],
+ ((unsigned char *)argp->key.hostaddr.addr)[3]);
+#endif
ret = winbindd_request_response(WINBINDD_WINS_BYIP, &request, &response);
--
Samba Shared Repository
More information about the samba-cvs
mailing list