"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source3/libnet/libnet_join.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

libnet_join.c  (samba-4.12.3):libnet_join.c  (samba-4.12.5)
skipping to change at line 510 skipping to change at line 510
Set a machines dNSHostName and servicePrincipalName attributes Set a machines dNSHostName and servicePrincipalName attributes
****************************************************************/ ****************************************************************/
static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx, static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
struct libnet_JoinCtx *r) struct libnet_JoinCtx *r)
{ {
TALLOC_CTX *frame = talloc_stackframe(); TALLOC_CTX *frame = talloc_stackframe();
ADS_STATUS status; ADS_STATUS status;
ADS_MODLIST mods; ADS_MODLIST mods;
fstring my_fqdn; fstring my_fqdn;
fstring my_alias;
const char **spn_array = NULL; const char **spn_array = NULL;
size_t num_spns = 0; size_t num_spns = 0;
char *spn = NULL; char *spn = NULL;
const char **netbios_aliases = NULL; const char **netbios_aliases = NULL;
const char **addl_hostnames = NULL; const char **addl_hostnames = NULL;
/* Find our DN */ /* Find our DN */
status = libnet_join_find_machine_acct(mem_ctx, r); status = libnet_join_find_machine_acct(mem_ctx, r);
if (!ADS_ERR_OK(status)) { if (!ADS_ERR_OK(status)) {
skipping to change at line 548 skipping to change at line 549
if (!strupper_m(spn)) { if (!strupper_m(spn)) {
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
goto done; goto done;
} }
status = add_uniq_spn(frame, spn, &spn_array, &num_spns); status = add_uniq_spn(frame, spn, &spn_array, &num_spns);
if (!ADS_ERR_OK(status)) { if (!ADS_ERR_OK(status)) {
goto done; goto done;
} }
fstr_sprintf(my_fqdn, "%s.%s", r->in.machine_name, lp_dnsdomain()); if (r->in.dnshostname != NULL) {
fstr_sprintf(my_fqdn, "%s", r->in.dnshostname);
} else {
fstr_sprintf(my_fqdn, "%s.%s", r->in.machine_name,
lp_dnsdomain());
}
if (!strlower_m(my_fqdn)) { if (!strlower_m(my_fqdn)) {
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
goto done; goto done;
} }
spn = talloc_asprintf(frame, "HOST/%s", my_fqdn); spn = talloc_asprintf(frame, "HOST/%s", my_fqdn);
if (spn == NULL) { if (spn == NULL) {
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
goto done; goto done;
skipping to change at line 590 skipping to change at line 596
} }
status = add_uniq_spn(frame, spn, &spn_array, &num_spns); status = add_uniq_spn(frame, spn, &spn_array, &num_spns);
if (!ADS_ERR_OK(status)) { if (!ADS_ERR_OK(status)) {
goto done; goto done;
} }
/* /*
* Add HOST/netbiosname.domainname * Add HOST/netbiosname.domainname
*/ */
fstr_sprintf(my_fqdn, "%s.%s", fstr_sprintf(my_alias, "%s.%s",
*netbios_aliases, *netbios_aliases,
lp_dnsdomain()); lp_dnsdomain());
spn = talloc_asprintf(frame, "HOST/%s", my_fqdn); spn = talloc_asprintf(frame, "HOST/%s", my_alias);
if (spn == NULL) { if (spn == NULL) {
status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); status = ADS_ERROR_LDAP(LDAP_NO_MEMORY);
goto done; goto done;
} }
status = add_uniq_spn(frame, spn, &spn_array, &num_spns); status = add_uniq_spn(frame, spn, &spn_array, &num_spns);
if (!ADS_ERR_OK(status)) { if (!ADS_ERR_OK(status)) {
goto done; goto done;
} }
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)