The Samba-Bugzilla – Attachment 5750 Details for
Bug 7472
dn_expand() and res_query() used unconditionally in .../source3/libads/dns.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
samba-3.5.3-bug7472.diff (text/plain), 1.92 KB, created by
Joachim Schmitz (mail address dead)
on 2010-05-30 15:17:50 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joachim Schmitz (mail address dead)
Created:
2010-05-30 15:17:50 UTC
Size:
1.92 KB
patch
obsolete
>diff -u ./source3/libads/dns.c.orig ./source3/libads/dns.c >--- ./source3/libads/dns.c.orig 2010-05-17 06:51:23.000000000 -0500 >+++ ./source3/libads/dns.c 2010-05-30 13:07:12.000000000 -0500 >@@ -87,7 +87,11 @@ > > /* See RFC 1035 for details. If this fails, then return. */ > >+#ifdef HAVE_DN_EXPAND > namelen = dn_expand( start, end, p, hostname, sizeof(hostname) ); >+#else >+ namelen = -1; /* TODO!!! */ >+#endif > if ( namelen < 0 ) { > return False; > } >@@ -124,7 +128,11 @@ > ZERO_STRUCTP( rr ); > /* pull the name from the answer */ > >+#ifdef HAVE_DN_EXPAND > namelen = dn_expand( start, end, p, hostname, sizeof(hostname) ); >+#else >+ namelen = -1; /* TODO!!! */ >+#endif > if ( namelen < 0 ) { > return -1; > } >@@ -198,7 +206,11 @@ > > p += 6; > >+#ifdef HAVE_DN_EXPAND > namelen = dn_expand( start, end, p, dcname, sizeof(dcname) ); >+#else >+ namelen = -1; /* TODO!!! */ >+#endif > if ( namelen < 0 ) { > DEBUG(1,("ads_dns_parse_rr_srv: Failed to uncompress name!\n")); > return False; >@@ -247,7 +259,11 @@ > > /* ame server hostname */ > >+#ifdef HAVE_DN_EXPAND > namelen = dn_expand( start, end, p, nsname, sizeof(nsname) ); >+#else >+ namelen = -1; /* TODO!!! */ >+#endif > if ( namelen < 0 ) { > DEBUG(1,("ads_dns_parse_rr_ns: Failed to uncompress name!\n")); > return False; >@@ -336,6 +352,7 @@ > } > } > >+#ifdef HAVE_RES_QUERY /* or #ifdef HAVE_DN_EXPANS? */ > if ((resp_len = res_query(name, C_IN, q_type, buffer, buf_len)) > < 0 ) { > DEBUG(3,("ads_dns_lookup_srv: " >@@ -353,6 +370,15 @@ > last_dns_check = time(NULL); > return last_dns_status; > } >+#else /* TODO!!! */ >+ DEBUG(3,("ads_dns_lookup_srv: " >+ "Failed to resolve %s (%s)\n", >+ name, strerror(ENOTSUP))); >+ TALLOC_FREE( buffer ); >+ last_dns_status = NT_STATUS_UNSUCCESSFUL; >+ last_dns_check = time(NULL); >+ return last_dns_status; >+#endif > > /* On AIX, Solaris, and possibly some older glibc systems (e.g. SLES8) > truncated replies never give back a resp_len > buflen
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7472
: 5750