The Samba-Bugzilla – Attachment 2770 Details for
Bug 4714
handle broken dns-server and No DNS error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch meantioned in bug
patch.net_ads (text/plain), 2.74 KB, created by
Alexander Spannagel
on 2007-06-19 15:48:30 UTC
(
hide
)
Description:
patch meantioned in bug
Filename:
MIME Type:
Creator:
Alexander Spannagel
Created:
2007-06-19 15:48:30 UTC
Size:
2.74 KB
patch
obsolete
>diff -r -c samba-3.0.25a/source/utils/net_ads.c samba-3.0.25a-patched/source/utils/net_ads.c >*** samba-3.0.25a/source/utils/net_ads.c 2007-03-20 23:25:40.000000000 +0100 >--- samba-3.0.25a-patched/source/utils/net_ads.c 2007-06-19 17:34:20.000000000 +0200 >*************** >*** 1292,1297 **** >--- 1292,1298 ---- > { > struct dns_rr_ns *nameservers = NULL; > int ns_count = 0; >+ int i; > NTSTATUS status = NT_STATUS_UNSUCCESSFUL; > DNS_ERROR dns_err; > fstring dns_server; >*************** >*** 1299,1308 **** > char *root_domain = NULL; > > if ( (dnsdomain = strchr_m( machine_name, '.')) == NULL ) { >! d_printf("No DNS domain configured for %s. " >! "Unable to perform DNS Update.\n", machine_name); >! status = NT_STATUS_INVALID_PARAMETER; >! goto done; > } > dnsdomain++; > >--- 1300,1311 ---- > char *root_domain = NULL; > > if ( (dnsdomain = strchr_m( machine_name, '.')) == NULL ) { >! if ( (dnsdomain = lp_realm()) == NULL ) { >! d_printf("Neither DNS domain nor REALM configured for %s. " >! "Unable to perform DNS Update.\n", machine_name); >! status = NT_STATUS_INVALID_PARAMETER; >! goto done; >! } > } > dnsdomain++; > >*************** >*** 1347,1356 **** > status = ads_dns_lookup_ns( ctx, root_domain, &nameservers, &ns_count ); > > if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) { >! DEBUG(3,("net_ads_join: Failed to find name server for the %s " >! "realm\n", ads->config.realm)); >! goto done; >! } > > dnsdomain = root_domain; > >--- 1350,1359 ---- > status = ads_dns_lookup_ns( ctx, root_domain, &nameservers, &ns_count ); > > if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) { >! DEBUG(3,("net_ads_join: Failed to find name server for the %s " >! "realm\n", ads->config.realm)); >! goto done; >! } > > dnsdomain = root_domain; > >*************** >*** 1359,1367 **** > /* Now perform the dns update - we'll try non-secure and if we fail, > we'll follow it up with a secure update */ > >! fstrcpy( dns_server, nameservers[0].hostname ); > >- dns_err = DoDNSUpdate(dns_server, dnsdomain, machine_name, addrs, num_addrs); > if (!ERR_DNS_IS_OK(dns_err)) { > status = NT_STATUS_UNSUCCESSFUL; > } >--- 1362,1374 ---- > /* Now perform the dns update - we'll try non-secure and if we fail, > we'll follow it up with a secure update */ > >! for (i=0;i<ns_count;i++) { >! fstrcpy( dns_server, nameservers[i].hostname ); >! DEBUG(1,("net_update_dns_internal: update %d IP's in DNS domain %s on %s.\n",num_addrs,dnsdomain,dns_server)); >! dns_err = DoDNSUpdate(dns_server, dnsdomain, machine_name, addrs, num_addrs); >! if (ERR_DNS_IS_OK(dns_err)) goto done; >! } > > if (!ERR_DNS_IS_OK(dns_err)) { > status = NT_STATUS_UNSUCCESSFUL; > }
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 4714
: 2770