NTSTATUS add_ccache_to_list(const char *princ_name,
const char *ccname,
- const char *service,
const char *username,
const char *pass,
const char *realm,
goto no_mem;
}
}
- if (service) {
- entry->service = talloc_strdup(entry, service);
- if (!entry->service) {
- goto no_mem;
- }
- }
if (canon_principal != NULL) {
entry->canon_principal = talloc_strdup(entry, canon_principal);
if (entry->canon_principal == NULL) {
goto no_mem;
}
+ entry->service = talloc_asprintf(entry,
+ "%s/%s@%s",
+ KRB5_TGS_NAME,
+ realm,
+ realm);
+ if (entry->service == NULL) {
+ goto no_mem;
+ }
+
entry->create_time = create_time;
entry->renew_until = renew_until;
entry->uid = uid;
krb5_error_code krb5_ret;
const char *cc = NULL;
const char *principal_s = NULL;
- const char *service = NULL;
char *realm = NULL;
fstring name_namespace, name_domain, name_user;
time_t ticket_lifetime = 0;
return NT_STATUS_NO_MEMORY;
}
- service = talloc_asprintf(mem_ctx, "%s/%s@%s", KRB5_TGS_NAME, realm, realm);
- if (service == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
local_service = talloc_asprintf(mem_ctx, "%s$@%s",
lp_netbios_name(), lp_realm());
if (local_service == NULL) {
result = add_ccache_to_list(principal_s,
cc,
- service,
user,
pass,
realm,
const char *cc = NULL;
char *realm = NULL;
const char *principal_s = NULL;
- const char *service = NULL;
const char *user_ccache_file;
if (domain->alt_name == NULL) {
return NT_STATUS_NO_MEMORY;
}
- service = talloc_asprintf(state->mem_ctx, "%s/%s@%s", KRB5_TGS_NAME, realm, realm);
- if (service == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
if (user_ccache_file != NULL) {
fstrcpy(state->response->data.auth.krb5ccname,
result = add_ccache_to_list(principal_s,
cc,
- service,
state->request->data.auth.user,
state->request->data.auth.pass,
realm,