krb5_encrypt_block master_encblock;
krb5_data tgt_princ_entries[] = {
- {sizeof(TGTNAME)-1, TGTNAME},
+ {KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME},
{0, 0} };
krb5_data db_creator_entries[] = {
krb5_encrypt_block master_encblock;
krb5_data tgt_princ_entries[] = {
- {sizeof(TGTNAME)-1, TGTNAME},
+ {KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME},
{0, 0} };
krb5_data db_creator_entries[] = {
#include <krb5/los-proto.h>
#include <krb5/ext-proto.h>
-#define TGTNAME "krbtgt" /* Else #include <krb5/kdb.h> */
#define KRB5_DEFAULT_LIFE 60*60*8 /* 8 hours */
/* helper function: convert flags to necessary KDC options */
#define flags2options(flags) (flags & KDC_TKT_COMMON_MASK)
if (retval = krb5_build_principal_ext(&creds.server,
strlen(hrealms[0]),
hrealms[0],
- sizeof(TGTNAME) - 1,
- TGTNAME,
+ KRB5_TGS_NAME_SIZE,
+ KRB5_TGS_NAME,
client->realm.length,
client->realm.data,
0))
#include <krb5/los-proto.h>
#include <krb5/ext-proto.h>
-#define TGTNAME "krbtgt" /* Else #include <krb5/kdb.h> */
#define KRB5_DEFAULT_LIFE 60*60*8 /* 8 hours */
/* helper function: convert flags to necessary KDC options */
#define flags2options(flags) (flags & KDC_TKT_COMMON_MASK)
if (retval = krb5_build_principal_ext(&creds.server,
strlen(hrealms[0]),
hrealms[0],
- sizeof(TGTNAME) - 1,
- TGTNAME,
+ KRB5_TGS_NAME_SIZE,
+ KRB5_TGS_NAME,
client->realm.length,
client->realm.data,
0))
#include <pwd.h>
#include <krb5/krb5.h>
-#include <krb5/kdb.h> /* for TGTNAME */
#include <krb5/ext-proto.h>
#include <krb5/los-proto.h>
}
krb5_data tgtname = {
- sizeof(TGTNAME)-1,
- TGTNAME
+ KRB5_TGT_NAME_SIZE,
+ KRB5_TGT_NAME
};
/*
typedef struct krb5_principal_data {
krb5_data realm;
- krb5_data *data;
+ krb5_data *data; /* An array of strings */
krb5_int32 length;
krb5_int32 type;
} krb5_principal_data;
-typedef krb5_principal_data *krb5_principal; /* array of strings */
+typedef krb5_principal_data *krb5_principal;
/*
* Per V5 spec on definition of principal types
#define krb5_princ_name(princ) (princ)->data
#define krb5_princ_component(princ,i) ((princ)->data + i)
+/* The name of the Kerberos ticket granting service... and its size */
+#define KRB5_TGS_NAME "krbtgt"
+#define KRB5_TGS_NAME_SIZE 6
+
#endif /* KRB5_BASE_DEFS__ */
#define KRB5_KDB_DEF_FLAGS 0
-/* XXX THIS REALLY BELONGS ELSEWHERE */
-#define TGTNAME "krbtgt"
-
#endif /* KRB5_KDB5__ */
int recv_seqno;
/*
-static krb5_data tgs_name = {sizeof(TGTNAME)-1, TGTNAME};
+static krb5_data tgs_name = {KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME};
krb5_data *tgs_server[4] = {0, &tgs_name, 0, 0};
*/
the master key name here is from the master_princ global,
so we can safely share its substructure
*/
- strcpy(tgs_name, TGTNAME);
+ strcpy(tgs_name, KRB5_TGS_NAME);
strcat(tgs_name, "/");
strcat(tgs_name, masterkeyname->realm.data);
krb5_parse_name(tgs_name, &tgs_server);
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <krb5/kdb.h>
/* This is an internal-only function, used by krb5_get_cred_from_kdc() */
krb5_principal *tgtprinc;
{
return krb5_build_principal_ext(tgtprinc, server->length, server->data,
- sizeof(TGTNAME) - 1, TGTNAME,
+ KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME,
client->length, client->data,
0);
}
#include <krb5/copyright.h>
#include <krb5/osconf.h>
#include <krb5/krb5.h>
-#include <krb5/kdb.h> /* for TGTNAME */
#include <krb5/ext-proto.h>
#include <krb5/los-proto.h>
}
krb5_data tgtname = {
- sizeof(TGTNAME)-1,
- TGTNAME
+ KRB5_TGS_NAME_SIZE,
+ KRB5_TGS_NAME
};
int verify_cs_pair PROTOTYPE((char *,