Added authoritative support.
[mod_auth_kerb.cvs/.git] / apache1 / auth_cmds.c
index c59a752..3649cb2 100644 (file)
@@ -20,19 +20,19 @@ static const char *kerb_set_type_slot(cmd_parms *cmd, char *struct_ptr,
        if
 #ifdef KRB5
           (!strncasecmp(arg, "v5", 2))
-               *(char **) (struct_ptr + offset) = "KerberosV5";
+               *(char **) (struct_ptr + offset) = ap_pstrdup(cmd->pool, "KerberosV5");
        else if
 #endif /* KRB5 */
 #ifdef KRB4
           (!strncasecmp(arg, "v4", 2))
-               *(char **) (struct_ptr + offset) = "KerberosV4";
+               *(char **) (struct_ptr + offset) = ap_pstrdup(cmd->pool, "KerberosV4");
 #endif /* KRB4 */
        else if
           (!strncasecmp(arg, "dualv5v4", 2))
-               *(char **) (struct_ptr + offset) = "KerberosDualV5V4";
+               *(char **) (struct_ptr + offset) = ap_pstrdup(cmd->pool, "KerberosDualV5V4");
        else if
           (!strncasecmp(arg, "dualv4v5", 2))
-               *(char **) (struct_ptr + offset) = "KerberosDualV4V5";
+               *(char **) (struct_ptr + offset) = ap_pstrdup(cmd->pool, "KerberosDualV4V5");
 #if defined(KRB4) && defined(KRB5)
 #endif /* KRB4 && KRB5 */
        else
@@ -59,5 +59,14 @@ command_rec kerb_auth_cmds[] = {
                "If auth fails, return status set here."
        },
 
+       {
+               "KrbAuthoritative",
+               ap_set_flag_slot,
+               (void*)XtOffsetOf(kerb_auth_config, krb_authoritative),
+               OR_AUTHCFG,
+               FLAG,
+               "Refuse to pass request down to lower modules."
+       },
+
        { NULL }
 };