diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-20 03:54:52 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-20 03:54:52 +0000 |
commit | 6c7e9dfb293f1243d9d8d8a2ac50ef12d738198e (patch) | |
tree | 06d8b7089381fa14e9c353a0a6a5d2c4b80ac082 /source3/libads/kerberos.c | |
parent | 2fe6d5d5a1025007a3e67d6040c1962734cbb6ea (diff) | |
download | samba-6c7e9dfb293f1243d9d8d8a2ac50ef12d738198e.tar.gz samba-6c7e9dfb293f1243d9d8d8a2ac50ef12d738198e.tar.bz2 samba-6c7e9dfb293f1243d9d8d8a2ac50ef12d738198e.zip |
net ads password and net ads chostpass commands from Remus Koos
(This used to be commit 412e79c448bf02e3097b5c14a36fe0172d8d2895)
Diffstat (limited to 'source3/libads/kerberos.c')
-rw-r--r-- | source3/libads/kerberos.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 8378442885..aba22e023b 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -3,6 +3,8 @@ Version 3.0 kerberos utility library Copyright (C) Andrew Tridgell 2001 + Copyright (C) Remus Koos 2001 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,8 +29,7 @@ simulate a kinit, putting the tgt in the default cache location remus@snapserver.com */ -int kerberos_kinit_password(const char *principal, const char *password, - time_t real_time) +int kerberos_kinit_password(const char *principal, const char *password) { krb5_context ctx; krb5_error_code code = 0; @@ -44,10 +45,6 @@ int kerberos_kinit_password(const char *principal, const char *password, if ((code = krb5_init_context(&ctx))) return code; - if (real_time) { - krb5_set_real_time(ctx, real_time, 0); - } - if ((code = krb5_cc_default(ctx, &cc))) { krb5_free_context(ctx); return code; @@ -58,7 +55,7 @@ int kerberos_kinit_password(const char *principal, const char *password, return code; } - if ((code = krb5_get_init_creds_password(ctx, &my_creds, me, password, NULL, + if ((code = krb5_get_init_creds_password(ctx, &my_creds, me, (char*)password, NULL, NULL, 0, NULL, NULL))) { krb5_free_principal(ctx, me); krb5_free_context(ctx); @@ -105,7 +102,7 @@ int ads_kinit_password(ADS_STRUCT *ads) asprintf(&ads->user_name, "HOST/%s", global_myname); } asprintf(&s, "%s@%s", ads->user_name, ads->realm); - ret = kerberos_kinit_password(s, ads->password, 0); + ret = kerberos_kinit_password(s, ads->password); if (ret) { DEBUG(0,("kerberos_kinit_password %s failed: %s\n", |