if (c->opt_password) {
use_in_memory_ccache();
- SAFE_FREE(ads->auth.password);
- ads->auth.password = smb_xstrdup(c->opt_password);
+ SAFE_FREE(ads->auth._password);
+ ads->auth._password = smb_xstrdup(c->opt_password);
}
ads->auth.flags |= auth_flags;
- SAFE_FREE(ads->auth.user_name);
- ads->auth.user_name = smb_xstrdup(c->opt_user_name);
+ SAFE_FREE(ads->auth._user_name);
+ ads->auth._user_name = smb_xstrdup(c->opt_user_name);
/*
* If the username is of the form "name@realm",
* extract the realm and convert to upper case.
* This is only used to establish the connection.
*/
- if ((cp = strchr_m(ads->auth.user_name, '@'))!=0) {
+ if ((cp = strchr_m(ads->auth._user_name, '@'))!=0) {
*cp++ = '\0';
- SAFE_FREE(ads->auth.realm);
- ads->auth.realm = smb_xstrdup(cp);
- if (!strupper_m(ads->auth.realm)) {
+ SAFE_FREE(ads->auth._realm);
+ ads->auth._realm = smb_xstrdup(cp);
+ if (!strupper_m(ads->auth._realm)) {
ads_destroy(&ads);
return ADS_ERROR(LDAP_NO_MEMORY);
}
use_in_memory_ccache();
- ret = asprintf(&ads_dns->auth.user_name, "%s$", lp_netbios_name());
+ ret = asprintf(&ads_dns->auth._user_name, "%s$", lp_netbios_name());
if (ret == -1) {
d_fprintf(stderr, _("DNS update failed: out of memory\n"));
goto done;
}
- ads_dns->auth.password = secrets_fetch_machine_password(
+ ads_dns->auth._password = secrets_fetch_machine_password(
r->out.netbios_domain_name, NULL, NULL);
- if (ads_dns->auth.password == NULL) {
+ if (ads_dns->auth._password == NULL) {
d_fprintf(stderr, _("DNS update failed: out of memory\n"));
goto done;
}
- ads_dns->auth.realm = SMB_STRDUP(r->out.dns_domain_name);
- if (ads_dns->auth.realm == NULL) {
+ ads_dns->auth._realm = SMB_STRDUP(r->out.dns_domain_name);
+ if (ads_dns->auth._realm == NULL) {
d_fprintf(stderr, _("DNS update failed: out of memory\n"));
goto done;
}
- if (!strupper_m(ads_dns->auth.realm)) {
- d_fprintf(stderr, _("strupper_m %s failed\n"), ads_dns->auth.realm);
+ if (!strupper_m(ads_dns->auth._realm)) {
+ d_fprintf(stderr, _("strupper_m %s failed\n"), ads_dns->auth._realm);
goto done;
}