summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth/credentials/credentials_krb5.c9
-rw-r--r--source4/auth/kerberos/srv_keytab.c14
-rwxr-xr-xsource4/auth/kerberos/wscript_build2
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',
)