summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-03-20 19:05:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:38 -0500
commit485a286a65d3b37f424f5701179f73c99eb9b5b9 (patch)
tree3447057a50073442149f12b4562396091406f0b6 /source3/libads
parent4b000b2c95ec064db18d59bff9bf9957717632c4 (diff)
downloadsamba-485a286a65d3b37f424f5701179f73c99eb9b5b9.tar.gz
samba-485a286a65d3b37f424f5701179f73c99eb9b5b9.tar.bz2
samba-485a286a65d3b37f424f5701179f73c99eb9b5b9.zip
r14585: Tighten argument list of kerberos_kinit_password again,
kerberos_kinit_password_ext provides access to more options. Guenther (This used to be commit afc519530f94b420b305fc28f83c16db671d0d7f)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/kerberos.c24
-rw-r--r--source3/libads/krb5_setpw.c2
2 files changed, 21 insertions, 5 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 17e350d754..029e42c0c2 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -58,7 +58,7 @@ kerb_prompter(krb5_context ctx, void *data,
place in default cache location.
remus@snapserver.com
*/
-int kerberos_kinit_password(const char *principal,
+int kerberos_kinit_password_ext(const char *principal,
const char *password,
int time_offset,
time_t *expire_time,
@@ -187,7 +187,7 @@ int ads_kinit_password(ADS_STRUCT *ads)
return KRB5_LIBOS_CANTREADPWD;
}
- ret = kerberos_kinit_password(s, ads->auth.password, ads->auth.time_offset,
+ ret = kerberos_kinit_password_ext(s, ads->auth.password, ads->auth.time_offset,
&ads->auth.expire, NULL, NULL, False, ads->auth.renewable);
if (ret) {
@@ -380,8 +380,8 @@ static krb5_error_code get_service_ticket(krb5_context ctx,
if (password == NULL) {
goto out;
}
- if ((err = kerberos_kinit_password(machine_account, password, 0, NULL, NULL,
- LIBADS_CCACHE_NAME, False, 0)) != 0) {
+ if ((err = kerberos_kinit_password(machine_account, password,
+ 0, LIBADS_CCACHE_NAME)) != 0) {
DEBUG(0,("get_service_ticket: kerberos_kinit_password %s failed: %s\n",
machine_account,
error_message(err)));
@@ -811,4 +811,20 @@ BOOL kerberos_derive_cifs_salting_principals(void)
}
return retval;
}
+
+int kerberos_kinit_password(const char *principal,
+ const char *password,
+ int time_offset,
+ const char *cache_name)
+{
+ return kerberos_kinit_password_ext(principal,
+ password,
+ time_offset,
+ 0,
+ 0,
+ cache_name,
+ False,
+ 0);
+}
+
#endif
diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c
index 42ca36f344..415c1e9229 100644
--- a/source3/libads/krb5_setpw.c
+++ b/source3/libads/krb5_setpw.c
@@ -685,7 +685,7 @@ ADS_STATUS kerberos_set_password(const char *kpasswd_server,
{
int ret;
- if ((ret = kerberos_kinit_password(auth_principal, auth_password, time_offset, NULL, NULL, NULL, False, 0))) {
+ if ((ret = kerberos_kinit_password(auth_principal, auth_password, time_offset, NULL))) {
DEBUG(1,("Failed kinit for principal %s (%s)\n", auth_principal, error_message(ret)));
return ADS_ERROR_KRB5(ret);
}