}
ret = kerberos_kinit_password_ext(s, ads->auth.password,
- ads->auth.time_offset,
+ 0,
NULL, NULL,
ads->auth.ccache_name, false, false,
0,
ads->config.current_time = ads_parse_time(timestr);
if (ads->config.current_time != 0) {
- ads->auth.time_offset = ads->config.current_time - time(NULL);
- DEBUG(4,("KDC time offset is %d seconds\n", ads->auth.time_offset));
+ ads->config.time_offset = ads->config.current_time - time(NULL);
+ DBG_INFO("server time offset is %d seconds\n",
+ ads->config.time_offset);
+ } else {
+ ads->config.time_offset = 0;
}
+ DBG_INFO("server time offset is %d seconds\n",
+ ads->config.time_offset);
+
ads_msgfree(ads, res);
status = ADS_SUCCESS;
talloc_keep_secret(new_pw_blob.data);
new_password = (const char *)new_pw_blob.data;
- ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, ads->auth.time_offset);
+ ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, 0);
if (!ADS_ERR_OK(ret)) {
status = ads_ntstatus(ret);
string user_name;
string kdc_server;
ads_auth_flags flags;
- int time_offset;
string ccache_name;
NTTIME expire_time;
} ads_auth;
string server_site_name;
string client_site_name;
time_t current_time;
+ int time_offset;
string schema_path;
string config_path;
int ldap_page_size;
}
ret = json_add_int (&jsobj, "Server time offset",
- ads->auth.time_offset);
+ ads->config.time_offset);
if (ret != 0) {
goto failure;
}
http_timestring(tmp_ctx, ads->config.current_time));
d_printf(_("KDC server: %s\n"), ads->auth.kdc_server );
- d_printf(_("Server time offset: %d\n"), ads->auth.time_offset );
+ d_printf(_("Server time offset: %d\n"), ads->config.time_offset );
d_printf(_("Last machine account password change: %s\n"),
http_timestring(tmp_ctx, pass_time));
goto done;
}
- status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1],
- ads->auth.time_offset);
+ status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1], 0);
if (ADS_ERR_OK(status)) {
d_printf(_("User %s added\n"), argv[0]);
rc = 0;
auth_password,
user,
new_password,
- ads->auth.time_offset);
+ 0);
memset(new_password, '\0', strlen(new_password));
if (!ADS_ERR_OK(status)) {
d_fprintf(stderr, _("Password change failed: %s\n"),
char *name_user = NULL;
time_t ticket_lifetime = 0;
time_t renewal_until = 0;
- time_t time_offset = 0;
const char *user_ccache_file;
struct PAC_LOGON_INFO *logon_info = NULL;
struct PAC_UPN_DNS_INFO *upn_dns_info = NULL;
/* 2nd step:
* get kerberos properties */
- if (domain->backend_data.ads_conn != NULL) {
- time_offset = domain->backend_data.ads_conn->auth.time_offset;
- }
-
/* 3rd step:
* do kerberos auth and setup ccache as the user */
result = kerberos_return_pac(mem_ctx,
principal_s,
pass,
- time_offset,
+ 0, /* time_offset */
&ticket_lifetime,
&renewal_until,
cc,