diff options
author | Simo Sorce <idra@samba.org> | 2012-03-31 05:19:59 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2012-04-12 12:06:42 +0200 |
commit | f116262a733cdf24c13e7c44a54736a2755f8335 (patch) | |
tree | 5a513d1c327352c18668b078cdba2aa6889fa57d | |
parent | a46e465ce0d05d9b2e0ff016aa8db14dc149153b (diff) | |
download | samba-f116262a733cdf24c13e7c44a54736a2755f8335.tar.gz samba-f116262a733cdf24c13e7c44a54736a2755f8335.tar.bz2 samba-f116262a733cdf24c13e7c44a54736a2755f8335.zip |
s4-auth-krb: Remove dependency on credentials too.
Signed-off-by: Andreas Schneider <asn@samba.org>
-rw-r--r-- | auth/credentials/credentials_krb5.c | 9 | ||||
-rw-r--r-- | source4/auth/kerberos/srv_keytab.c | 14 | ||||
-rwxr-xr-x | source4/auth/kerberos/wscript_build | 2 |
3 files changed, 11 insertions, 14 deletions
diff --git a/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c index 40ae454a9d..74dbb0a5d8 100644 --- a/auth/credentials/credentials_krb5.c +++ b/auth/credentials/credentials_krb5.c @@ -690,9 +690,12 @@ _PUBLIC_ int cli_credentials_get_keytab(struct cli_credentials *cred, return ENOMEM; } - ret = smb_krb5_create_memory_keytab(mem_ctx, cred, - smb_krb5_context, - &keytab, &keytab_name); + ret = smb_krb5_create_memory_keytab(mem_ctx, smb_krb5_context, + cli_credentials_get_password(cred), + cli_credentials_get_username(cred), + cli_credentials_get_realm(cred), + cli_credentials_get_kvno(cred), + &keytab, &keytab_name); if (ret) { talloc_free(mem_ctx); return ret; diff --git a/source4/auth/kerberos/srv_keytab.c b/source4/auth/kerberos/srv_keytab.c index 475f09d934..cdf384e8b3 100644 --- a/source4/auth/kerberos/srv_keytab.c +++ b/source4/auth/kerberos/srv_keytab.c @@ -22,7 +22,6 @@ #include "includes.h" -#include "auth/credentials/credentials.h" #include "system/kerberos.h" #include "auth/kerberos/kerberos.h" #include "auth/kerberos/kerberos_srv_keytab.h" @@ -592,18 +591,17 @@ done: } krb5_error_code smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx, - struct cli_credentials *machine_account, struct smb_krb5_context *smb_krb5_context, + const char *new_secret, + const char *samAccountName, + const char *realm, + int kvno, krb5_keytab *keytab, const char **keytab_name) { krb5_error_code ret; TALLOC_CTX *mem_ctx = talloc_new(parent_ctx); const char *rand_string; - const char *new_secret; - const char *samAccountName; - const char *realm; - int kvno; const char *error_string; if (!mem_ctx) { return ENOMEM; @@ -621,10 +619,6 @@ krb5_error_code smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx, return ENOMEM; } - new_secret = cli_credentials_get_password(machine_account); - samAccountName = cli_credentials_get_username(machine_account); - realm = cli_credentials_get_realm(machine_account); - kvno = cli_credentials_get_kvno(machine_account); ret = smb_krb5_update_keytab(mem_ctx, smb_krb5_context, *keytab_name, samAccountName, realm, diff --git a/source4/auth/kerberos/wscript_build b/source4/auth/kerberos/wscript_build index 28269c54b4..619626fe19 100755 --- a/source4/auth/kerberos/wscript_build +++ b/source4/auth/kerberos/wscript_build @@ -17,5 +17,5 @@ bld.SAMBA_SUBSYSTEM('KERBEROS_UTIL', bld.SAMBA_SUBSYSTEM('KERBEROS_SRV_KEYTAB', autoproto='kerberos_srv_keytab.h', source='srv_keytab.c', - deps='authkrb5 samba-credentials', + deps='authkrb5', ) |