View | Details | Raw Unified | Return to bug 235296
Collapse All | Expand All

(-)../spnego-http-auth-nginx-module-7e028a5/ngx_http_auth_spnego_module.c (-11 lines)
Lines 742-758 use_keytab( Link Here
742
        ngx_http_request_t * r,
742
        ngx_http_request_t * r,
743
        ngx_str_t *keytab)
743
        ngx_str_t *keytab)
744
{
744
{
745
    size_t kt_env_sz = sizeof("KRB5_KTNAME=") + keytab->len;
746
    char *kt_env = (char *) ngx_pcalloc(r->pool, kt_env_sz + 1);
747
    if (NULL == kt_env) {
748
        return false;
749
    }
750
    ngx_snprintf((u_char *) kt_env, kt_env_sz, "KRB5_KTNAME=%V%Z", keytab);
751
    if (putenv(kt_env) != 0) {
752
        spnego_debug0("Failed to update environment with keytab location");
753
        return false;
754
    }
755
756
    size_t kt_sz = keytab->len + 1;
745
    size_t kt_sz = keytab->len + 1;
757
    char *kt = (char *) ngx_pcalloc(r->pool, kt_sz);
746
    char *kt = (char *) ngx_pcalloc(r->pool, kt_sz);
758
    if (NULL == kt) {
747
    if (NULL == kt) {

Return to bug 235296