Lines Matching +full:2 +full:- +full:cell
2 * Copyright (c) 1995-2003 Kungliga Tekniska Högskolan
13 * 2. Redistributions in binary form must reproduce the above copyright
52 kt->ticket = NULL; in v5_to_kt()
55 if (cred->session.keyvalue.length != 8) in v5_to_kt()
66 ret = decode_Ticket(cred->ticket.data, cred->ticket.length, &t, &len); in v5_to_kt()
70 return -1; in v5_to_kt()
82 kt->ticket = buf; in v5_to_kt()
83 kt->ticket_len = buf_len; in v5_to_kt()
87 kt->ticket = malloc(cred->ticket.length); in v5_to_kt()
88 if (kt->ticket == NULL) in v5_to_kt()
90 kt->ticket_len = cred->ticket.length; in v5_to_kt()
91 memcpy(kt->ticket, cred->ticket.data, kt->ticket_len); in v5_to_kt()
99 kt->ct.AuthHandle = kvno; in v5_to_kt()
100 memcpy(kt->ct.HandShakeKey, cred->session.keyvalue.data, 8); in v5_to_kt()
101 kt->ct.ViceId = uid; in v5_to_kt()
102 kt->ct.BeginTimestamp = cred->times.starttime; in v5_to_kt()
103 kt->ct.EndTimestamp = cred->times.endtime; in v5_to_kt()
105 _kafs_fixup_viceid(&kt->ct, uid); in v5_to_kt()
113 const char *cell, in v5_convert() argument
119 c = strdup(cell); in v5_convert()
125 "afs-use-524", "2b", &val); in v5_convert()
129 strcasecmp(val, "2b") == 0) in v5_convert()
149 struct krb5_kafs_data *d = data->data; in get_cred()
154 ret = krb5_make_principal(d->context, &in_creds.server, in get_cred()
158 ret = krb5_cc_get_principal(d->context, d->id, &in_creds.client); in get_cred()
160 krb5_free_principal(d->context, in_creds.server); in get_cred()
167 invalid = krb5_enctype_valid(d->context, in_creds.session.keytype); in get_cred()
169 krb5_enctype_enable(d->context, in_creds.session.keytype); in get_cred()
171 ret = krb5_get_credentials(d->context, 0, d->id, &in_creds, &out_creds); in get_cred()
174 ret = krb5_get_credentials(d->context, 0, d->id, &in_creds, &out_creds); in get_cred()
178 krb5_enctype_disable(d->context, in_creds.session.keytype); in get_cred()
180 krb5_free_principal(d->context, in_creds.server); in get_cred()
181 krb5_free_principal(d->context, in_creds.client); in get_cred()
185 ret = v5_convert(d->context, d->id, out_creds, uid, in get_cred()
187 krb5_free_creds(d->context, out_creds); in get_cred()
195 struct krb5_kafs_data *d = data->data; in get_error()
196 return krb5_get_error_message(d->context, error); in get_error()
202 struct krb5_kafs_data *d = data->data; in free_error()
203 krb5_free_error_message(d->context, str); in free_error()
207 afslog_uid_int(struct kafs_data *data, const char *cell, const char *rh, in afslog_uid_int() argument
214 struct krb5_kafs_data *d = data->data; in afslog_uid_int()
216 if (cell == 0 || cell[0] == 0) in afslog_uid_int()
219 ret = krb5_cc_get_principal (d->context, d->id, &princ); in afslog_uid_int()
223 trealm = krb5_principal_get_realm (d->context, princ); in afslog_uid_int()
226 ret = _kafs_get_cred(data, cell, d->realm, trealm, uid, &kt); in afslog_uid_int()
227 krb5_free_principal (d->context, princ); in afslog_uid_int()
230 ret = kafs_settoken_rxkad(cell, &kt.ct, kt.ticket, kt.ticket_len); in afslog_uid_int()
239 struct krb5_kafs_data *d = data->data; in get_realm()
242 if(krb5_get_host_realm(d->context, host, &realms)) in get_realm()
245 krb5_free_host_realm(d->context, realms); in get_realm()
252 const char *cell, in krb5_afslog_uid_home() argument
281 ret = afslog_uid_int(&kd, cell, 0, uid, homedir); in krb5_afslog_uid_home()
293 const char *cell, in krb5_afslog_uid() argument
297 return krb5_afslog_uid_home (context, id, cell, realm, uid, NULL); in krb5_afslog_uid()
303 const char *cell, in krb5_afslog() argument
306 return krb5_afslog_uid (context, id, cell, realm, getuid()); in krb5_afslog()
312 const char *cell, in krb5_afslog_home() argument
316 return krb5_afslog_uid_home (context, id, cell, realm, getuid(), homedir); in krb5_afslog_home()
324 krb5_realm_of_cell(const char *cell, char **realm) in krb5_realm_of_cell() argument
332 return _kafs_realm_of_cell(&kd, cell, realm); in krb5_realm_of_cell()
340 kafs_settoken5(krb5_context context, const char *cell, uid_t uid, in kafs_settoken5() argument
346 ret = v5_convert(context, NULL, cred, uid, cell, &kt); in kafs_settoken5()
350 ret = kafs_settoken_rxkad(cell, &kt.ct, kt.ticket, kt.ticket_len); in kafs_settoken5()