summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2021-02-12 23:22:18 +0100
committerMinkyu Kang <mk7.kang@samsung.com>2021-02-23 15:43:21 +0900
commit0d9ff95cd6df6ab25a79eba1ba2f9b81244f48eb (patch)
tree528abd31614a6d54e5bf129027d8c86ec9644f2d /scripts
parentd9f960046cbaab136633015a2fec26bf9a871524 (diff)
serial: s5p: Allow independent selection
Currently support for the Samsung serial port driver is part of CONFIG_S5P which controls selection of several drivers for the S5P family. Give it its own config option such that we can use it on other SoCs as well. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Patrick Wildt <patrick@blueri.se> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
id='n99' href='#n99'>99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
#ifndef _KRB5_KDB5_H_
#define _KRB5_KDB5_H_

#if HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <errno.h>
#include <utime.h>
#include <utime.h>
#include <k5-int.h>
#include "kdb.h"

#define KDB_MAX_DB_NAME 128
#define KDB_REALM_SECTION  "realms"
#define KDB_MODULE_POINTER "database_module"
#define KDB_MODULE_DEF_SECTION "dbdefaults"
#define KDB_MODULE_SECTION "dbmodules"
#define KDB_LIB_POINTER    "db_library"
#define KDB_DATABASE_CONF_FILE  DEFAULT_SECURE_PROFILE_PATH
#define KDB_DATABASE_ENV_PROF KDC_PROFILE_ENV

#define KRB5_KDB_OPEN_RW                0
#define KRB5_KDB_OPEN_RO                1

#define KRB5_KDB_OPT_SET_DB_NAME        0
#define KRB5_KDB_OPT_SET_LOCK_MODE      1

#define KRB5_DB_GET_DB_CONTEXT(kcontext)   ( ((kdb5_dal_handle*) (kcontext)->db_context)->db_context )
#define KRB5_DB_GET_PROFILE(kcontext)  ( (kcontext)->profile )
#define KRB5_DB_GET_REALM(kcontext)    ( (kcontext)->default_realm )

typedef struct _kdb_vftabl{
    short int maj_ver;
    short int min_ver;

    krb5_error_code (*init_library)();
    krb5_error_code (*fini_library)();
    krb5_error_code (*init_module) ( krb5_context kcontext,
				     char * conf_section,
				     char ** db_args,
				     int mode );

    krb5_error_code (*fini_module) ( krb5_context kcontext );

    krb5_error_code (*db_create) ( krb5_context kcontext,
				   char * conf_section,
				   char ** db_args );

    krb5_error_code (*db_destroy) ( krb5_context kcontext,
				    char *conf_section,
				    char ** db_args );

    krb5_error_code (*db_get_age) ( krb5_context kcontext, 
				    char *db_name, 
				    time_t *age );

    krb5_error_code (*db_set_option) ( krb5_context kcontext,
				       int option,
				       void *value );

    krb5_error_code (*db_lock) ( krb5_context kcontext,
				 int mode );

    krb5_error_code (*db_unlock) ( krb5_context kcontext);

    krb5_error_code (*db_get_principal) ( krb5_context kcontext,
					  krb5_const_principal search_for,
					  krb5_db_entry *entries,
					  int *nentries,
					  krb5_boolean *more );

    krb5_error_code (*db_free_principal) ( krb5_context kcontext,
					   krb5_db_entry *entry,
					   int count );

    krb5_error_code (*db_put_principal) ( krb5_context kcontext,
					  krb5_db_entry *entries,
					  int *nentries,
					  char **db_args);

    krb5_error_code (*db_delete_principal) ( krb5_context kcontext,
					     krb5_const_principal search_for,
					     int *nentries );

    krb5_error_code (*db_iterate) ( krb5_context kcontext,
				    char *match_entry,
				    int (*func) (krb5_pointer, krb5_db_entry *),
				    krb5_pointer func_arg );

    krb5_error_code (*db_create_policy) ( krb5_context kcontext,
					  osa_policy_ent_t policy );

    krb5_error_code (*db_get_policy) ( krb5_context kcontext,
				       char *name,
				       osa_policy_ent_t *policy,
				       int *cnt);

    krb5_error_code (*db_put_policy) ( krb5_context kcontext,
				       osa_policy_ent_t policy );

    krb5_error_code (*db_iter_policy) ( krb5_context kcontext,
					char *match_entry,
					osa_adb_iter_policy_func func,
					void *data );


    krb5_error_code (*db_delete_policy) ( krb5_context kcontext,
					  char *policy );

    void (*db_free_policy) ( krb5_context kcontext,
			     osa_policy_ent_t val );

    krb5_error_code (*db_supported_realms) ( krb5_context kcontext,
					    char **realms );

    krb5_error_code (*db_free_supported_realms) ( krb5_context kcontext,
						  char **realms );


    const char * (*errcode_2_string) ( krb5_context kcontext,
				       long err_code );

    void * (*db_alloc) (krb5_context kcontext, void *ptr, size_t size);
    void   (*db_free)  (krb5_context kcontext, void *ptr);



    /* optional functions */
    krb5_error_code (*set_master_key)    ( krb5_context kcontext, 
					   char *pwd, 
					   krb5_keyblock *key);

    krb5_error_code (*get_master_key)    ( krb5_context kcontext,
					   krb5_keyblock **key);


    krb5_error_code (*setup_master_key_name) ( krb5_context kcontext,
					       char *keyname,
					       char *realm, 
					       char **fullname, 
					       krb5_principal  *principal);

    krb5_error_code (*store_master_key)  ( krb5_context kcontext, 
					   char *db_arg, 
					   krb5_principal mname,
					   krb5_keyblock *key,
					   char *master_pwd);

    krb5_error_code (*fetch_master_key)  ( krb5_context kcontext,
					   krb5_principal mname,
					   krb5_keyblock *key,
					   int *kvno,
					   char *db_args);

    krb5_error_code (*verify_master_key) ( krb5_context kcontext,
					   krb5_principal mprinc,
					   krb5_keyblock *mkey );