| /freebsd/crypto/krb5/src/appl/gss-sample/ |
| H A D | t_gss_sample.py | 25 appdir = os.path.join(buildtop, 'appl', 'gss-sample') 26 gss_client = os.path.join(appdir, 'gss-client') 27 gss_server = os.path.join(appdir, 'gss-server') 29 # Run a gss-server process and a gss-client process, with additional 30 # gss-client flags given by options and additional gss-server flags 31 # given by server_options. Return the output of gss-client. 32 def run_client_server(realm, options, server_options, **kwargs): argument 33 portstr = str(realm.server_port()) 34 server_args = [gss_server, '-export', '-port', portstr] 36 server = realm.start_server(server_args, 'starting...') [all …]
|
| /freebsd/crypto/krb5/src/clients/kvno/ |
| H A D | t_kvno.py | 3 realm = K5Realm() variable 7 lines = realm.run([klist, '-c', ccache]).splitlines() 26 realm.run([kvno, realm.user_princ], expected_msg='user@KRBTEST.COM: kvno = 1') 27 check_cache(realm.ccache, [realm.krbtgt_princ, realm.user_princ]) 29 mark('-e') 30 msgs = ('etypes requested in TGS request: camellia128-cts', 32 realm.run([kvno, '-e', 'camellia128-cts', realm.host_princ], 35 mark('--cached-only') 36 realm.run([kvno, '--cached-only', realm.user_princ], expected_msg='kvno = 1') 37 realm.run([kvno, '--cached-only', realm.host_princ], [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/krb/ |
| H A D | t_vfy_increds.py | 25 realm = K5Realm() variable 27 # Verify the default test realm credentials with the default keytab. 29 realm.run(['./t_vfy_increds']) 30 realm.run(['./t_vfy_increds', '-n']) 33 # version 1 key followed by an up-to-date version 2 key). 35 realm.run([kadminl, 'ktadd', realm.host_princ]) 36 realm.run(['./t_vfy_increds']) 37 realm.run(['./t_vfy_increds', '-n']) 42 realm.run([kadminl, 'change_password', '-randkey', realm.host_princ]) 43 realm.run(['./t_vfy_increds'], expected_code=1) [all …]
|
| H A D | t_in_ccache_patypes.py | 25 # Create a bare-bones KDC. 26 realm = K5Realm(create_user=False, create_host=False) variable 29 realm.run([kadminl, 'addprinc', '-pw', 'pass', 'nopreauth']) 30 realm.run([kadminl, 'addprinc', '-pw', 'pass', '+requires_preauth', 'preauth']) 34 realm.run(['./t_in_ccache', 'nopreauth', 'pass']) 38 realm.run(['./t_in_ccache', 'preauth', 'pass']) 40 # Check that we can get creds while supplying a now-populated input ccache that 42 realm.run(['./t_in_ccache', 'nopreauth', 'pass']) 43 realm.run(['./t_in_ccache', '-I', realm.ccache, 'preauth', 'pass']) 45 # Check that we can get creds while supplying a now-populated input ccache. [all …]
|
| H A D | t_get_etype_info.py | 4 realm = K5Realm(create_host=False, krb5_conf=conf) variable 6 realm.run([kadminl, 'ank', '-pw', 'pw', '+preauth', 'puser']) 7 realm.run([kadminl, 'ank', '-nokey', 'nokey']) 8 realm.run([kadminl, 'ank', '-nokey', '+preauth', 'pnokey']) 9 realm.run([kadminl, 'ank', '-e', 'aes256-cts:special', '-pw', 'pw', 'exp']) 10 realm.run([kadminl, 'ank', '-e', 'aes256-cts:special', '-pw', 'pw', '+preauth', 14 out = realm.run([kdb5_util, 'tabdump', 'keyinfo']) 20 out = realm.run(['./t_get_etype_info', 'notfound'], expected_code=1, 26 realm.run(['./t_get_etype_info', 'user'], 27 expected_msg='etype: aes256-cts\nsalt: KRBTEST.COMuser\n') [all …]
|
| H A D | get_creds.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 29 * ticket for the client identified by in_creds->client, the server identified 30 * by in_creds->server, with options options, expiration date specified in 31 * in_creds->times.endtime (0 means as long as possible), session key type 32 * specified in in_creds->keyblock.enctype (if non-zero) 34 * Any returned ticket and intermediate ticket-granting tickets are stored in 40 #include "k5-int.h" 41 #include "int-proto.h" 42 #include "os-proto.h" 58 if (!in_creds || !in_creds->server || !in_creds->client) in construct_matching_creds() [all …]
|
| H A D | parse.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* lib/krb5/krb/parse.c - Parse strings into krb5_principals */ 27 #include "k5-int.h" 28 #include "int-proto.h" 34 * whether name contains a realm separator. 54 princ->data = k5alloc(sizeof(*princ->data), &ret); in allocate_princ() 55 if (princ->data == NULL) in allocate_princ() 57 princ->realm = empty_data(); in allocate_princ() 58 princ->data[0] = empty_data(); in allocate_princ() 59 princ->length = 1; in allocate_princ() [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/ccache/ |
| H A D | t_cccol.py | 3 realm = K5Realm(create_kdb=False) variable 6 out = realm.run([klist, '-c', 'KEYRING:process:abcd'], expected_code=1) 12 # Run the collection test program against each collection-enabled type. 13 realm.run(['./t_cccol', 'DIR:' + os.path.join(realm.testdir, 'cc')]) 16 out = realm.run(['keyctl', 'list', anchor]) 18 keyid = realm.run(['keyctl', 'search', anchor, 'keyring', name]) 19 realm.run(['keyctl', 'unlink', keyid.strip(), anchor]) 23 cname = realm.testdir 34 realm.run(['./t_cccol', 'KEYRING:' + cname]) 36 realm.run(['./t_cccol', 'KEYRING:legacy:' + cname]) [all …]
|
| /freebsd/crypto/krb5/src/clients/ksu/ |
| H A D | t_ksu.py | 6 krb5_conf_save = krb5_conf + '.save-ksutest' 7 krb5_conf_nosave = krb5_conf + '.nosave-ksutest' 15 os.chown('testlog', caller_uid, -1) 32 out = subprocess.check_output(['userdel', '-r', 'ksutest'], 64 subprocess.check_call(['useradd', '-m', '-r', 'ksutest']) 68 # Make krb5.conf a copy of realm's krb5.conf file. Save the old 71 def setup_krb5_conf(realm): argument 76 shutil.copyfile(os.path.join(realm.testdir, 'krb5.conf'), krb5_conf) 88 os.chown(path, caller_uid, -1) 104 # Set up a realm. Set default_keytab_name since ksu won't respect the [all …]
|
| /freebsd/crypto/heimdal/doc/ |
| H A D | setup.texi | 3 @node Setting up a realm, Applications, Building and Installing, Top 5 @chapter Setting up a realm 8 @cindex realm 9 realm is an administrative domain. The name of a Kerberos realm is 10 usually the Internet domain name in uppercase. Call your realm the same 26 * Credential cache server - KCM:: 27 * Cross realm:: 32 * Setting up PK-INIT:: 36 @node Configuration file, Creating the database, Setting up a realm, Setting up a realm 39 To setup a realm you will first have to create a configuration file: [all …]
|
| /freebsd/crypto/krb5/src/kdc/ |
| H A D | t_sockact.py | 3 if not which('systemd-socket-activate'): 4 skip_rest('socket activation tests', 'systemd-socket-activate not found') 7 kdc_conf = {'realms': {'$realm': { 10 realm = K5Realm(kdc_conf=kdc_conf, start_kdc=False) variable 14 realm.start_server(['./t_sockact', os.path.join(realm.testdir, 'sock1'), 15 str(realm.portbase + 8), '--', krb5kdc, '-n'], 19 cconf1 = {'realms': {'$realm': {'kdc': '$testdir/sock1'}}} 20 env1 = realm.special_env('sock1', False, krb5_conf=cconf1) 21 realm.kinit(realm.user_princ, password('user'), env=env1) 24 cconf2 = {'realms': {'$realm': {'kdc': '$hostname:$port8'}}} [all …]
|
| H A D | kdc_transit.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 33 #include "k5-int.h" 39 * subrealm - determine if r2 is a subrealm of r1 65 if((*r1 == '/') && (*r2 == '/') && (strncmp(r1,r2,l1) == 0)) return(l1-l2); in subrealm() 66 if((*r1 != '/') && (*r2 != '/') && (strncmp(r1,r2+l2-l1,l1) == 0)) in subrealm() 67 return(l2-l1); in subrealm() 72 * add_to_transited Adds the name of the realm which issued the 75 * the realm of the server listed in the ticket 80 * in compressed form. It will add the new realm while 82 * realm is added using this (or a similar) routine, the [all …]
|
| H A D | realm_data.h | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 38 * General Kerberos per-realm data. 40 char * realm_name; /* Realm name */ 42 * The db_context is then associated with the realm keytab using 44 * cannot span multiple realms -- proven */ 45 krb5_context realm_context; /* Context to be used for realm */ 46 krb5_keytab realm_keytab; /* keytab to be used for this realm */ 47 char * realm_hostbased; /* referral services for NT-UNKNOWN */ 48 char * realm_no_referral; /* non-referral services */ 50 * Database per-realm data. [all …]
|
| /freebsd/contrib/pam-krb5/tests/module/ |
| H A D | realm-t.c | 2 * Authentication tests for realm support in pam-krb5. 4 * Test the realm and user_realm option in the PAM configuration, which is 10 * Copyright 2011-2012 13 * SPDX-License-Identifier: BSD-3-clause or GPL-1+ 41 config.user = krbconf->username; in main() 42 config.authtok = krbconf->password; in main() 47 /* Start with a nonexistent default realm for authentication failure. */ in main() 50 run_script("data/scripts/realm/fail-no-realm", &config); in main() 51 run_script("data/scripts/realm/fail-no-realm-debug", &config); in main() 53 /* Running a script that sets realm properly should pass. */ in main() [all …]
|
| /freebsd/crypto/krb5/src/lib/kadm5/ |
| H A D | t_kadm5.py | 4 supported_enctypes = 'aes256-cts:normal aes128-cts:normal' 5 conf = {'realms': {'$realm': {'supported_enctypes': supported_enctypes}}} 6 realm = K5Realm(create_user=False, create_host=False, kdc_conf=conf) variable 8 with open(os.path.join(realm.testdir, 'acl'), 'w') as f: 18 with open(os.path.join(realm.testdir, 'dictfile'), 'w') as f: 25 realm.start_kadmind() 27 realm.run([kadminl, 'addpol', '-maxlife', '10000s', '-minlength', '8', 28 '-minclasses', '2', '-maxfailure', '2', 29 '-failurecountinterval', '90s', '-lockoutduration', '180s', 30 'test-pol']) [all …]
|
| /freebsd/crypto/heimdal/kuser/ |
| H A D | kdigest.8 | 49 .Bl -tag -width Ds 64 .Bl -tag -width Ds 65 .It Xo digest-probe 66 .Op Fl Fl realm= Ns Ar string 69 .Bl -tag -width Ds 71 .Fl Fl realm= Ns Ar string 73 Kerberos realm to communicate with 75 .It Xo digest-server-init 77 .Op Fl Fl kerberos-realm= Ns Ar realm 78 .Op Fl Fl digest= Ns Ar digest-type [all …]
|
| /freebsd/crypto/krb5/src/util/ |
| H A D | k5test.py | 28 check-pytests:: 36 for realm in multipass_realms(): 37 realm.run(['./testprog', 'arg']) 40 realm = K5Realm() 41 realm.start_server(['./serverprog'], 'starting...') 42 realm.run(['./clientprog', realm.host_princ]) 47 By default, the realm will have: 54 * Principals named realm.user_princ and realm.admin_princ; call 56 * Credentials for realm.user_princ in realm.ccache 57 * Admin rights for realm.admin_princ in the kadmind acl file [all …]
|
| /freebsd/crypto/heimdal/doc/doxyout/krb5/man/man3/ |
| H A D | krb5_principal.3 | 1 …s 5 principal functions" 3 "11 Jan 2012" "Version 1.5.2" "HeimdalKerberos5library" \" -*- nroff -*- 5 Heimdal Kerberos 5 principal functions \- 49 …b5_principal_set_realm\fP (krb5_context context, krb5_principal principal, krb5_const_realm realm)" 52 …incipal\fP (krb5_context context, krb5_principal *principal, int rlen, krb5_const_realm realm,...)" 55 …b5_make_principal\fP (krb5_context context, krb5_principal *principal, krb5_const_realm realm,...)" 87 …incipal (krb5_context context, krb5_principal * principal, int rlen, krb5_const_realm realm, ...)" 97 \fIrlen\fP length of realm 99 \fIrealm\fP realm name 146 …b5_make_principal (krb5_context context, krb5_principal * principal, krb5_const_realm realm, ...)" 156 \fIrealm\fP realm name [all …]
|
| /freebsd/crypto/heimdal/lib/krb5/ |
| H A D | krbhst.c | 2 * Copyright (c) 2001 - 2003 Kungliga Tekniska Högskolan 47 return -1; in string_to_proto() 52 * `proto', `proto', `realm' using `dns_type'. 58 const char *realm, const char *dns_type, in srv_find_realm() argument 86 snprintf(domain, sizeof(domain), "_%s._%s.%s.", service, proto, realm); in srv_find_realm() 95 for(num_srv = 0, rr = r->head; rr; rr = rr->next) in srv_find_realm() 96 if(rr->type == rk_ns_t_srv) in srv_find_realm() 115 for(num_srv = 0, rr = r->head; rr; rr = rr->next) in srv_find_realm() 116 if(rr->type == rk_ns_t_srv) { in srv_find_realm() 118 size_t len = strlen(rr->u.srv->target); in srv_find_realm() [all …]
|
| H A D | principal.c | 2 * Copyright (c) 1997-2007 Kungliga Tekniska Högskolan 39 * realm the principal belongs to and the former is a list of 0 or 60 #define princ_num_comp(P) ((P)->name.name_string.len) 61 #define princ_type(P) ((P)->name.name_type) 62 #define princ_comp(P) ((P)->name.name_string.val) 63 #define princ_ncomp(P, N) ((P)->name.name_string.val[(N)]) 64 #define princ_realm(P) ((P)->realm) 128 * Get the realm of the principal 131 * @param principal principal to get the realm for 133 * @return realm of the principal, don't free or use after krb5_principal is freed [all …]
|
| H A D | transited.c | 2 * Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska Högskolan 37 schemes that has ever been invented; it's so amazingly brain-dead 42 char *realm; member 55 r = r->next; in free_realms() 56 free(p->realm); in free_realms() 75 if(strcmp(from + strlen(from) - strlen(to), to) == 0){ in make_path() 89 tmp->next = r->next; in make_path() 90 r->next = tmp; in make_path() 91 tmp->realm = strdup(p); in make_path() 92 if(tmp->realm == NULL){ in make_path() [all …]
|
| H A D | krb5_principal.3 | 1 .\" Copyright (c) 2003 - 2007 Kungliga Tekniska Högskolan 69 Kerberos 5 Library (libkrb5, -lkrb5) 93 .Fn krb5_princ_set_realm "krb5_context context" "krb5_principal principal" "krb5_realm *realm" 95 …ncipal "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "..." 97 …"krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "va_list ap" 99 …l_ext" "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "..." 101 …"krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "va_list ap" 103 .Fn krb5_make_principal "krb5_context context" "krb5_principal *principal" "krb5_const_realm realm"… 137 .Li realm . 140 The PrincipalName also has a name-type. [all …]
|
| /freebsd/crypto/krb5/src/lib/krb5/os/ |
| H A D | hostrealm_dns.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* lib/krb5/os/hostream_dns.c - dns hostrealm module */ 34 * This file implements the built-in dns module for the hostrealm interface, 35 * which uses TXT records in the DNS to determine the default realm or the 36 * fallback realm of a host. 39 #include "k5-int.h" 40 #include "os-proto.h" 46 * resulting realm (caller must free) or NULL. */ 50 char *realm; in txt_lookup() local 53 if (k5_try_realm_txt_rr(context, "_kerberos", fqdn, &realm) == 0) in txt_lookup() [all …]
|
| H A D | locate_kdc.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* lib/krb5/os/locate_kdc.c - Get addresses for realm KDCs and other servers */ 27 #include "k5-int.h" 28 #include "fake-addrinfo.h" 29 #include "os-proto.h" 42 krb5_data realm; member 58 code = profile_get_string(context->profile, KRB5_CONF_LIBDEFAULTS, in maybe_use_dns() 61 code = profile_get_string(context->profile, KRB5_CONF_LIBDEFAULTS, in maybe_use_dns() 81 ret = profile_get_boolean(ctx->profile, KRB5_CONF_LIBDEFAULTS, in use_dns_uri() 102 get_sitename(krb5_context context, const krb5_data *realm, char **out) in get_sitename() argument [all …]
|
| /freebsd/crypto/heimdal/lib/kafs/ |
| H A D | common.c | 2 * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan 44 #define ToAsciiUpper(c) ((c) - 'a' + 'A') 112 parms.in_size = t - buf; in kafs_settoken_rxkad() 124 * (EndTimestamp - BeginTimestamp) is odd. By decrementing EndTime in _kafs_fixup_viceid() 127 * (issue_date, life) -> (StartTime, EndTime) -> (issue_date, life) in _kafs_fixup_viceid() 132 if (!ODD(ct->EndTimestamp - ct->BeginTimestamp)) in _kafs_fixup_viceid() 133 ct->EndTimestamp--; in _kafs_fixup_viceid() 137 if (ODD(ct->EndTimestamp - ct->BeginTimestamp)) in _kafs_fixup_viceid() 138 ct->EndTimestamp--; in _kafs_fixup_viceid() 142 /* Try to get a db-server for an AFS cell from a AFSDB record */ [all …]
|