Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/krb5
File: kdcpolicy_plugin.h
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[0] Fix | Delete
/* include/krb5/kdcpolicy_plugin.h - KDC policy plugin interface */
[1] Fix | Delete
/*
[2] Fix | Delete
* Copyright (C) 2017 by Red Hat, Inc.
[3] Fix | Delete
* All rights reserved.
[4] Fix | Delete
*
[5] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[6] Fix | Delete
* modification, are permitted provided that the following conditions
[7] Fix | Delete
* are met:
[8] Fix | Delete
*
[9] Fix | Delete
* * Redistributions of source code must retain the above copyright
[10] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[11] Fix | Delete
*
[12] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright
[13] Fix | Delete
* notice, this list of conditions and the following disclaimer in
[14] Fix | Delete
* the documentation and/or other materials provided with the
[15] Fix | Delete
* distribution.
[16] Fix | Delete
*
[17] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
[18] Fix | Delete
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
[19] Fix | Delete
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
[20] Fix | Delete
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
[21] Fix | Delete
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
[22] Fix | Delete
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
[23] Fix | Delete
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
[24] Fix | Delete
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[25] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
[26] Fix | Delete
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
[27] Fix | Delete
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
[28] Fix | Delete
* OF THE POSSIBILITY OF SUCH DAMAGE.
[29] Fix | Delete
*/
[30] Fix | Delete
[31] Fix | Delete
/*
[32] Fix | Delete
* Declarations for kdcpolicy plugin module implementors.
[33] Fix | Delete
*
[34] Fix | Delete
* The kdcpolicy pluggable interface currently has only one supported major
[35] Fix | Delete
* version, which is 1. Major version 1 has a current minor version number of
[36] Fix | Delete
* 1.
[37] Fix | Delete
*
[38] Fix | Delete
* kdcpolicy plugin modules should define a function named
[39] Fix | Delete
* kdcpolicy_<modulename>_initvt, matching the signature:
[40] Fix | Delete
*
[41] Fix | Delete
* krb5_error_code
[42] Fix | Delete
* kdcpolicy_modname_initvt(krb5_context context, int maj_ver, int min_ver,
[43] Fix | Delete
* krb5_plugin_vtable vtable);
[44] Fix | Delete
*
[45] Fix | Delete
* The initvt function should:
[46] Fix | Delete
*
[47] Fix | Delete
* - Check that the supplied maj_ver number is supported by the module, or
[48] Fix | Delete
* return KRB5_PLUGIN_VER_NOTSUPP if it is not.
[49] Fix | Delete
*
[50] Fix | Delete
* - Cast the vtable pointer as appropriate for maj_ver:
[51] Fix | Delete
* maj_ver == 1: Cast to krb5_kdcpolicy_vtable
[52] Fix | Delete
*
[53] Fix | Delete
* - Initialize the methods of the vtable, stopping as appropriate for the
[54] Fix | Delete
* supplied min_ver. Optional methods may be left uninitialized.
[55] Fix | Delete
*
[56] Fix | Delete
* Memory for the vtable is allocated by the caller, not by the module.
[57] Fix | Delete
*/
[58] Fix | Delete
[59] Fix | Delete
#ifndef KRB5_POLICY_PLUGIN_H
[60] Fix | Delete
#define KRB5_POLICY_PLUGIN_H
[61] Fix | Delete
[62] Fix | Delete
#include <krb5/krb5.h>
[63] Fix | Delete
[64] Fix | Delete
/* Abstract module datatype. */
[65] Fix | Delete
typedef struct krb5_kdcpolicy_moddata_st *krb5_kdcpolicy_moddata;
[66] Fix | Delete
[67] Fix | Delete
/* A module can optionally include kdb.h to inspect principal entries when
[68] Fix | Delete
* authorizing requests. */
[69] Fix | Delete
struct _krb5_db_entry_new;
[70] Fix | Delete
[71] Fix | Delete
/*
[72] Fix | Delete
* Optional: Initialize module data. Return 0 on success,
[73] Fix | Delete
* KRB5_PLUGIN_NO_HANDLE if the module is inoperable (due to configuration, for
[74] Fix | Delete
* example), and any other error code to abort KDC startup. Optionally set
[75] Fix | Delete
* *data_out to a module data object to be passed to future calls.
[76] Fix | Delete
*/
[77] Fix | Delete
typedef krb5_error_code
[78] Fix | Delete
(*krb5_kdcpolicy_init_fn)(krb5_context context,
[79] Fix | Delete
krb5_kdcpolicy_moddata *data_out);
[80] Fix | Delete
[81] Fix | Delete
/* Optional: Clean up module data. */
[82] Fix | Delete
typedef krb5_error_code
[83] Fix | Delete
(*krb5_kdcpolicy_fini_fn)(krb5_context context,
[84] Fix | Delete
krb5_kdcpolicy_moddata moddata);
[85] Fix | Delete
[86] Fix | Delete
/*
[87] Fix | Delete
* Optional: return an error code and set status to an appropriate string
[88] Fix | Delete
* literal to deny an AS request; otherwise return 0. lifetime_out, if set,
[89] Fix | Delete
* restricts the ticket lifetime. renew_lifetime_out, if set, restricts the
[90] Fix | Delete
* ticket renewable lifetime.
[91] Fix | Delete
*/
[92] Fix | Delete
typedef krb5_error_code
[93] Fix | Delete
(*krb5_kdcpolicy_check_as_fn)(krb5_context context,
[94] Fix | Delete
krb5_kdcpolicy_moddata moddata,
[95] Fix | Delete
const krb5_kdc_req *request,
[96] Fix | Delete
const struct _krb5_db_entry_new *client,
[97] Fix | Delete
const struct _krb5_db_entry_new *server,
[98] Fix | Delete
const char *const *auth_indicators,
[99] Fix | Delete
const char **status, krb5_deltat *lifetime_out,
[100] Fix | Delete
krb5_deltat *renew_lifetime_out);
[101] Fix | Delete
[102] Fix | Delete
/*
[103] Fix | Delete
* Optional: return an error code and set status to an appropriate string
[104] Fix | Delete
* literal to deny a TGS request; otherwise return 0. lifetime_out, if set,
[105] Fix | Delete
* restricts the ticket lifetime. renew_lifetime_out, if set, restricts the
[106] Fix | Delete
* ticket renewable lifetime.
[107] Fix | Delete
*/
[108] Fix | Delete
typedef krb5_error_code
[109] Fix | Delete
(*krb5_kdcpolicy_check_tgs_fn)(krb5_context context,
[110] Fix | Delete
krb5_kdcpolicy_moddata moddata,
[111] Fix | Delete
const krb5_kdc_req *request,
[112] Fix | Delete
const struct _krb5_db_entry_new *server,
[113] Fix | Delete
const krb5_ticket *ticket,
[114] Fix | Delete
const char *const *auth_indicators,
[115] Fix | Delete
const char **status, krb5_deltat *lifetime_out,
[116] Fix | Delete
krb5_deltat *renew_lifetime_out);
[117] Fix | Delete
[118] Fix | Delete
typedef struct krb5_kdcpolicy_vtable_st {
[119] Fix | Delete
const char *name;
[120] Fix | Delete
krb5_kdcpolicy_init_fn init;
[121] Fix | Delete
krb5_kdcpolicy_fini_fn fini;
[122] Fix | Delete
krb5_kdcpolicy_check_as_fn check_as;
[123] Fix | Delete
krb5_kdcpolicy_check_tgs_fn check_tgs;
[124] Fix | Delete
} *krb5_kdcpolicy_vtable;
[125] Fix | Delete
[126] Fix | Delete
#endif /* KRB5_POLICY_PLUGIN_H */
[127] Fix | Delete
[128] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function