clean-up
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1318 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_auth_con_init(krb5_context context,
|
||||
krb5_auth_context *auth_context)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_build_ap_req (krb5_context context,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_build_authenticator (krb5_context context,
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
/* XXX shouldn't be here */
|
||||
|
||||
void
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __CACHE_H__
|
||||
#define __CACHE_H__
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
#include "md4.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_create_checksum (krb5_context context,
|
||||
krb5_cksumtype type,
|
||||
@@ -36,9 +37,9 @@ krb5_verify_checksum (krb5_context context,
|
||||
u_char csum[16];
|
||||
|
||||
if (cksum->cksumtype != CKSUMTYPE_RSA_MD4)
|
||||
return KRB_AP_ERR_INAPP_CKSUM;
|
||||
return KRB5KRB_AP_ERR_INAPP_CKSUM;
|
||||
if (cksum->checksum.length != 16)
|
||||
return KRB_AP_ERR_MODIFIED;
|
||||
return KRB5KRB_AP_ERR_MODIFIED;
|
||||
|
||||
md4_init (&m);
|
||||
md4_update (&m, ptr, len);
|
||||
@@ -46,5 +47,5 @@ krb5_verify_checksum (krb5_context context,
|
||||
if (memcmp (cksum->checksum.data, csum, 16) == 0)
|
||||
return 0;
|
||||
else
|
||||
return KRB_AP_ERR_MODIFIED;
|
||||
return KRB5KRB_AP_ERR_MODIFIED;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __CONF_H__
|
||||
#define __CONF_H__
|
||||
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#include "krb5_locl.h"
|
||||
#include "config_file.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static char section[128];
|
||||
static FILE *F;
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
const char krb5_config_file[] = "/etc/krb5.conf";
|
||||
const char krb5_defkeyname[] = "/etc/v5srvtab";
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
/* XXX */
|
||||
|
||||
#ifdef sun
|
||||
|
@@ -1,3 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
#include <stdio.h>
|
||||
#include "crc.h"
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#define CRC_GEN 0xEDB88320L
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
/* XXX */
|
||||
|
||||
#ifdef sun
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
#include "crc.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_encrypt (krb5_context context,
|
||||
void *ptr,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
/*
|
||||
* Try to get all addresses, but return the one corresponding to
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
#include <md4.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_get_host_realm(krb5_context context,
|
||||
const char *host,
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#include "krb5_locl.h"
|
||||
#include <krb5_error.h>
|
||||
|
||||
krb5_error_code
|
||||
RCSID("$Id$");
|
||||
|
||||
static krb5_error_code
|
||||
krb5_get_salt (krb5_principal princ,
|
||||
krb5_data *salt)
|
||||
{
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static krb5_error_code
|
||||
key_proc (krb5_context context,
|
||||
krb5_keytype type,
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include <krb5_locl.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
int
|
||||
krb5_getportbyname (const char *service,
|
||||
const char *proto,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __KEYTAB_H__
|
||||
#define __KEYTAB_H__
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __KRB5_H__
|
||||
#define __KRB5_H__
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef __KRB5_LOCL_H__
|
||||
#define __KRB5_LOCL_H__
|
||||
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_get_krbhst (krb5_context context,
|
||||
const krb5_data *realm,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_get_lrealm(char **realm)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_mk_rep(krb5_context context,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_mk_req(krb5_context context,
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
#include "md4.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_mk_safe(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include "krb5_locl.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_principal_alloc(krb5_principal *p)
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_rd_rep(krb5_context context,
|
||||
@@ -17,9 +18,9 @@ krb5_rd_rep(krb5_context context,
|
||||
if (len < 0)
|
||||
return ASN1_PARSE_ERROR;
|
||||
if (ap_rep.pvno != 5)
|
||||
return KRB_AP_ERR_BADVERSION;
|
||||
return KRB5KRB_AP_ERR_BADVERSION;
|
||||
if (ap_rep.msg_type != krb_ap_rep)
|
||||
return KRB_AP_ERR_MSG_TYPE;
|
||||
return KRB5KRB_AP_ERR_MSG_TYPE;
|
||||
|
||||
des_set_key (auth_context->key.contents.data, schedule);
|
||||
len = ap_rep.enc_part.cipher.length;
|
||||
@@ -44,13 +45,13 @@ krb5_rd_rep(krb5_context context,
|
||||
return ASN1_PARSE_ERROR;
|
||||
if ((*repl)->ctime != auth_context->authenticator->ctime ||
|
||||
(*repl)->cusec != auth_context->authenticator->cusec) {
|
||||
printf("KRB_AP_ERR_MUT_FAIL\n");
|
||||
printf("KRB5KRB_AP_ERR_MUT_FAIL\n");
|
||||
printf ("(%u, %u) != (%u, %u)\n",
|
||||
(*repl)->ctime, (*repl)->cusec,
|
||||
auth_context->authenticator->ctime,
|
||||
auth_context->authenticator->cusec);
|
||||
#if 0 /* Something wrong with the coding??? */
|
||||
return KRB_AP_ERR_MUT_FAIL;
|
||||
return KRB5KRB_AP_ERR_MUT_FAIL;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static krb5_error_code
|
||||
decrypt_tkt_enc_part (krb5_context context,
|
||||
@@ -86,11 +87,11 @@ krb5_rd_req(krb5_context context,
|
||||
if (len < 0)
|
||||
return ASN1_PARSE_ERROR;
|
||||
if (ap_req.pvno != 5)
|
||||
return KRB_AP_ERR_BADVERSION;
|
||||
return KRB5KRB_AP_ERR_BADVERSION;
|
||||
if (ap_req.msg_type != krb_ap_req)
|
||||
return KRB_AP_ERR_MSG_TYPE;
|
||||
return KRB5KRB_AP_ERR_MSG_TYPE;
|
||||
if (ap_req.ticket.tkt_vno != 5)
|
||||
return KRB_AP_ERR_BADVERSION;
|
||||
return KRB5KRB_AP_ERR_BADVERSION;
|
||||
if (ap_req.ap_options.use_session_key)
|
||||
abort ();
|
||||
else {
|
||||
@@ -139,7 +140,7 @@ krb5_rd_req(krb5_context context,
|
||||
return ret;
|
||||
|
||||
if (strcmp (authenticator.crealm, decr_part.crealm) != 0)
|
||||
return KRB_AP_ERR_BADMATCH;
|
||||
return KRB5KRB_AP_ERR_BADMATCH;
|
||||
{
|
||||
krb5_principal p1, p2;
|
||||
|
||||
@@ -148,7 +149,7 @@ krb5_rd_req(krb5_context context,
|
||||
principalname2krb5_principal(&p2, decr_part.cname,
|
||||
decr_part.crealm);
|
||||
if (!krb5_principal_compare (context, p1, p2))
|
||||
return KRB_AP_ERR_BADMATCH;
|
||||
return KRB5KRB_AP_ERR_BADMATCH;
|
||||
}
|
||||
(*auth_context)->authenticator->cusec = authenticator.cusec;
|
||||
(*auth_context)->authenticator->ctime = authenticator.ctime;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <krb5_locl.h>
|
||||
#include <krb5_error.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
krb5_error_code
|
||||
krb5_rd_safe(krb5_context context,
|
||||
@@ -16,11 +17,11 @@ krb5_rd_safe(krb5_context context,
|
||||
if (len < 0)
|
||||
return ASN1_PARSE_ERROR;
|
||||
if (safe.pvno != 5)
|
||||
return KRB_AP_ERR_BADVERSION;
|
||||
return KRB5KRB_AP_ERR_BADVERSION;
|
||||
if (safe.msg_type != krb_safe)
|
||||
return KRB_AP_ERR_MSG_TYPE;
|
||||
return KRB5KRB_AP_ERR_MSG_TYPE;
|
||||
if (safe.cksum.cksumtype != CKSUMTYPE_RSA_MD4)
|
||||
return KRB_AP_ERR_INAPP_CKSUM;
|
||||
return KRB5KRB_AP_ERR_INAPP_CKSUM;
|
||||
/* XXX */
|
||||
r = krb5_verify_checksum (context,
|
||||
safe.safe_body.user_data.data,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "krb5_locl.h"
|
||||
#include "krb5_error.h"
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
static int
|
||||
send_and_recv (int fd,
|
||||
|
@@ -67,7 +67,7 @@ mem_seek(krb5_storage *sp, off_t offset, int whence)
|
||||
SEEK_SET);
|
||||
break;
|
||||
case SEEK_END:
|
||||
sp->seek(sp, (char *)(MEM(sp)->len) + offset, SEEK_SET);
|
||||
sp->seek(sp, MEM(sp)->len + offset, SEEK_SET);
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
@@ -1,5 +1,7 @@
|
||||
#include <krb5_locl.h>
|
||||
|
||||
RCSID("$Id$");
|
||||
|
||||
/*
|
||||
* Reverse 8 bytes
|
||||
*/
|
||||
|
Reference in New Issue
Block a user