summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_child_helpers.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-05-11 17:51:02 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-05-16 13:28:15 -0400
commitebb6e30d687a4d6626c735234c85cbb5b06a26aa (patch)
tree3a925d3c8237c08d0959523858e6ec0ba71ad8a1 /src/providers/ldap/sdap_child_helpers.c
parente6ae55d5423434d5dc6c236e8647b33610d30e2e (diff)
downloadsssd-ebb6e30d687a4d6626c735234c85cbb5b06a26aa.tar.gz
sssd-ebb6e30d687a4d6626c735234c85cbb5b06a26aa.tar.xz
sssd-ebb6e30d687a4d6626c735234c85cbb5b06a26aa.zip
Add ldap_krb5_ticket_lifetime option
Diffstat (limited to 'src/providers/ldap/sdap_child_helpers.c')
-rw-r--r--src/providers/ldap/sdap_child_helpers.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_child_helpers.c b/src/providers/ldap/sdap_child_helpers.c
index c61f3cceb..b45e4eae5 100644
--- a/src/providers/ldap/sdap_child_helpers.c
+++ b/src/providers/ldap/sdap_child_helpers.c
@@ -137,6 +137,7 @@ static errno_t create_tgt_req_send_buffer(TALLOC_CTX *mem_ctx,
const char *realm_str,
const char *princ_str,
const char *keytab_name,
+ int32_t lifetime,
struct io_buffer **io_buf)
{
struct io_buffer *buf;
@@ -148,7 +149,7 @@ static errno_t create_tgt_req_send_buffer(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- buf->size = 3 * sizeof(uint32_t);
+ buf->size = 4 * sizeof(uint32_t);
if (realm_str) {
buf->size += strlen(realm_str);
}
@@ -194,6 +195,9 @@ static errno_t create_tgt_req_send_buffer(TALLOC_CTX *mem_ctx,
SAFEALIGN_SET_UINT32(&buf->data[rp], 0, &rp);
}
+ /* lifetime */
+ SAFEALIGN_SET_UINT32(&buf->data[rp], lifetime, &rp);
+
*io_buf = buf;
return EOK;
}
@@ -248,6 +252,7 @@ struct tevent_req *sdap_get_tgt_send(TALLOC_CTX *mem_ctx,
const char *realm_str,
const char *princ_str,
const char *keytab_name,
+ int32_t lifetime,
int timeout)
{
struct tevent_req *req, *subreq;
@@ -274,7 +279,7 @@ struct tevent_req *sdap_get_tgt_send(TALLOC_CTX *mem_ctx,
/* prepare the data to pass to child */
ret = create_tgt_req_send_buffer(state,
- realm_str, princ_str, keytab_name,
+ realm_str, princ_str, keytab_name, lifetime,
&buf);
if (ret != EOK) {
DEBUG(1, ("create_tgt_req_send_buffer failed.\n"));