Permalink
Browse files

Taking changes from the trunk between tags incremental-propagation-br…

…anchpoint

and update-mainline-to-incprop-20010621.


git-svn-id: svn://anonsvn.mit.edu/krb5/branches/incremental-propagation-branch@13435 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information...
1 parent fe8e100 commit 62f241338587ab57af446ada4c9e93c62ccc1a17 mitchb committed Jun 21, 2001
View
@@ -1,3 +1,8 @@
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * kcmd.c: Get rid of prototypes for krb5_write_message(),
+ krb5_net_write(), and krb5_net_read(). They are in krb5.h now.
+
2001-06-18 Ezra Peisach <epeisach@mit.edu>
* krcp.c (sink): Cast argument to isdigit() to int.
View
@@ -139,12 +139,6 @@ static int right_justify;
#endif
static int do_lencheck;
-/* XXX: These should be internal to krb5 library, or declared in krb5.h. */
-extern krb5_error_code krb5_write_message (krb5_context, krb5_pointer,
- krb5_data *);
-extern int krb5_net_read (krb5_context, int , char *, int);
-extern int krb5_net_write (krb5_context, int , const char *, int);
-/* XXX: And these should be declared in krb.h, or private. */
#ifdef KRB5_KRB4_COMPAT
extern int
krb_sendauth(long options, int fd, KTEXT ticket,
View
@@ -1,3 +1,9 @@
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * krb5.hin: Move prototypes for krb5_net_read() and
+ krb5_net_write() here.
+ * k5-int.h: From here.
+
2001-06-19 Ken Raeburn <raeburn@mit.edu>
* k5-int.h (struct addrlist): New type.
View
@@ -528,8 +528,6 @@ extern char *strdup (const char *);
/* libos.spec */
krb5_error_code krb5_lock_file (krb5_context, int, int);
krb5_error_code krb5_unlock_file (krb5_context, int);
-int krb5_net_read (krb5_context, int , char *, int);
-int krb5_net_write (krb5_context, int , const char *, int);
krb5_error_code krb5_sendto_kdc (krb5_context, const krb5_data *,
const krb5_data *, krb5_data *, int);
krb5_error_code krb5_get_krbhst (krb5_context, const krb5_data *, char *** );
@@ -1,3 +1,9 @@
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * krb.h: Add prototype for krb__get_srvtabname() which is invoked
+ in place of KEYFILE.
+ Add prototypes for krb_kntoln(), k_isinst(), k_isname(), k_isrealm().
+
2001-06-11 Ezra Peisach <epeisach@mit.edu>
* krb.h: Add prototype for krb_sendauth().
@@ -464,6 +464,14 @@ KRB5_DLLIMP int KRB5_CALLCONV krb_in_tkt
KRB5_DLLIMP int KRB5_CALLCONV kname_parse
(char FAR *name, char FAR *inst, char FAR *realm,
char FAR *fullname);
+KRB5_DLLIMP int KRB5_CALLCONV k_isname
+ (char FAR *);
+KRB5_DLLIMP int KRB5_CALLCONV k_isinst
+ (char FAR *);
+KRB5_DLLIMP int KRB5_CALLCONV k_isrealm
+ (char FAR *);
+
+
/* kuserok.c */
KRB5_DLLIMP int KRB5_CALLCONV kuserok
(AUTH_DAT FAR *kdata, char FAR *luser);
@@ -633,6 +641,10 @@ extern int krb_create_ticket(KTEXT tkt, unsigned int flags, char *pname,
char *session, int life, long time_sec,
char *sname, char *sinstance, C_Block key);
+extern char * krb__get_srvtabname(const char *);
+
+extern int krb_kntoln(AUTH_DAT *, char *);
+
#ifdef KRB5_GENERAL__
extern int krb_cr_tkt_krb5(KTEXT tkt, unsigned int flags, char *pname,
char *pinstance, char *prealm, long paddress,
View
@@ -2081,6 +2081,8 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey
krb5_error_code krb5_read_message (krb5_context, krb5_pointer, krb5_data *);
krb5_error_code krb5_write_message (krb5_context, krb5_pointer, krb5_data *);
+int krb5_net_read (krb5_context, int , char *, int);
+int krb5_net_write (krb5_context, int , const char *, int);
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV krb5_read_password
(krb5_context,
View
@@ -1,3 +1,10 @@
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * krb524d.c: Include <krb5/adm_proto.h> for krb5_log_init()
+ prototype.
+ (cleanup_and_exit) Conditionalize krb5_kt_close on keytab being
+ non-null.
+
2001-06-20 Mitchell Berger <mitchb@mit.edu>
* krb524d.c: Call krb5_klog_init before the first point where the
View
@@ -22,6 +22,7 @@
#include <krb5.h>
#include <kadm5/admin.h>
+#include <krb5/adm_proto.h>
#include <com_err.h>
#include <stdarg.h>
@@ -223,7 +224,7 @@ void cleanup_and_exit(ret, context)
if (use_master && handle) {
(void) kadm5_destroy(handle);
}
- if (use_keytab) krb5_kt_close(context, kt);
+ if (use_keytab && kt) krb5_kt_close(context, kt);
krb5_free_context(context);
exit(ret);
}
@@ -1,3 +1,9 @@
+2001-06-20 Ken Raeburn <raeburn@mit.edu>
+
+ * string2key.c (mit_des_string_to_key_int): Construct a krb5_data
+ object with proper length for the AFS case (indicated by a -1 salt
+ length on input).
+
2001-06-12 Ezra Peisach <epeisach@mit.edu>
* destest.c: main returns int instead of void. Add "const" to
@@ -71,9 +71,9 @@
krb5_error_code
mit_des_string_to_key_int (keyblock, data, salt)
-krb5_keyblock FAR * keyblock;
-const krb5_data FAR * data;
-const krb5_data FAR * salt;
+ krb5_keyblock FAR * keyblock;
+ const krb5_data FAR * data;
+ const krb5_data FAR * salt;
{
register krb5_octet *str, *copystr;
register krb5_octet *key;
@@ -97,13 +97,15 @@ const krb5_data FAR * salt;
key = keyblock->contents;
if (salt) {
- if (salt->length == SALT_TYPE_AFS_LENGTH || salt->length == (unsigned) -1) {
- /* cheat and do AFS string2key instead */
- return mit_afs_string_to_key (keyblock, data, salt);
- } else
- length = data->length + salt->length;
- }
- else
+ if (salt->length == SALT_TYPE_AFS_LENGTH || salt->length == (unsigned) -1) {
+ krb5_data salt2;
+ salt2.data = salt->data;
+ salt2.length = strlen (salt2.data);
+ /* cheat and do AFS string2key instead */
+ return mit_afs_string_to_key (keyblock, data, &salt2);
+ } else
+ length = data->length + salt->length;
+ } else
length = data->length;
copystr = malloc((size_t) length);
@@ -1,3 +1,8 @@
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * acquire_cred.c (acquire_init_cred): Include "k5-int.h" for
+ krb5int-cc_default() prototype.
+
2001-06-18 Ezra Peisach <epeisach@mit.edu>
* accept_sec_context.c acquire_cred.c import_sec_context.c
@@ -70,6 +70,7 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#include "k5-int.h"
#include "gssapiP_krb5.h"
#ifdef HAVE_STRING_H
#include <string.h>
View
@@ -513,89 +513,73 @@ krb5_klog_init(kcontext, ename, whoami, do_com_err)
* If there is a facility present, then parse that.
*/
if (cp2) {
- if (!strcasecmp(cp2, "AUTH")) {
- log_control.log_entries[i].lsu_facility = LOG_AUTH;
- }
+ const struct {
+ const char *name;
+ int value;
+ } facilities[] = {
+ { "AUTH", LOG_AUTH },
+#ifdef LOG_AUTHPRIV
+ { "AUTHPRIV", LOG_AUTHPRIV },
+#endif /* LOG_AUTHPRIV */
#ifdef LOG_KERN
- else if (!strcasecmp(cp2, "KERN")) {
- log_control.log_entries[i].lsu_facility = LOG_KERN;
- }
+ { "KERN", LOG_KERN },
#endif /* LOG_KERN */
#ifdef LOG_USER
- else if (!strcasecmp(cp2, "USER")) {
- log_control.log_entries[i].lsu_facility = LOG_USER;
- }
+ { "USER", LOG_USER },
#endif /* LOG_USER */
#ifdef LOG_MAIL
- else if (!strcasecmp(cp2, "MAIL")) {
- log_control.log_entries[i].lsu_facility = LOG_MAIL;
- }
+ { "MAIL", LOG_MAIL },
#endif /* LOG_MAIL */
#ifdef LOG_DAEMON
- else if (!strcasecmp(cp2, "DAEMON")) {
- log_control.log_entries[i].lsu_facility = LOG_DAEMON;
- }
+ { "DAEMON", LOG_DAEMON },
#endif /* LOG_DAEMON */
+#ifdef LOG_FTP
+ { "FTP", LOG_FTP },
+#endif /* LOG_FTP */
#ifdef LOG_LPR
- else if (!strcasecmp(cp2, "LPR")) {
- log_control.log_entries[i].lsu_facility = LOG_LPR;
- }
+ { "LPR", LOG_LPR },
#endif /* LOG_LPR */
#ifdef LOG_NEWS
- else if (!strcasecmp(cp2, "NEWS")) {
- log_control.log_entries[i].lsu_facility = LOG_NEWS;
- }
+ { "NEWS", LOG_NEWS },
#endif /* LOG_NEWS */
#ifdef LOG_UUCP
- else if (!strcasecmp(cp2, "UUCP")) {
- log_control.log_entries[i].lsu_facility = LOG_UUCP;
- }
+ { "UUCP", LOG_UUCP },
#endif /* LOG_UUCP */
#ifdef LOG_CRON
- else if (!strcasecmp(cp2, "CRON")) {
- log_control.log_entries[i].lsu_facility = LOG_CRON;
- }
+ { "CRON", LOG_CRON },
#endif /* LOG_CRON */
#ifdef LOG_LOCAL0
- else if (!strcasecmp(cp2, "LOCAL0")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL0;
- }
+ { "LOCAL0", LOG_LOCAL0 },
#endif /* LOG_LOCAL0 */
#ifdef LOG_LOCAL1
- else if (!strcasecmp(cp2, "LOCAL1")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL1;
- }
+ { "LOCAL1", LOG_LOCAL1 },
#endif /* LOG_LOCAL1 */
#ifdef LOG_LOCAL2
- else if (!strcasecmp(cp2, "LOCAL2")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL2;
- }
+ { "LOCAL2", LOG_LOCAL2 },
#endif /* LOG_LOCAL2 */
#ifdef LOG_LOCAL3
- else if (!strcasecmp(cp2, "LOCAL3")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL3;
- }
+ { "LOCAL3", LOG_LOCAL3 },
#endif /* LOG_LOCAL3 */
#ifdef LOG_LOCAL4
- else if (!strcasecmp(cp2, "LOCAL4")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL4;
- }
+ { "LOCAL4", LOG_LOCAL4 },
#endif /* LOG_LOCAL4 */
#ifdef LOG_LOCAL5
- else if (!strcasecmp(cp2, "LOCAL5")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL5;
- }
+ { "LOCAL5", LOG_LOCAL5 },
#endif /* LOG_LOCAL5 */
#ifdef LOG_LOCAL6
- else if (!strcasecmp(cp2, "LOCAL6")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL6;
- }
+ { "LOCAL6", LOG_LOCAL6 },
#endif /* LOG_LOCAL6 */
#ifdef LOG_LOCAL7
- else if (!strcasecmp(cp2, "LOCAL7")) {
- log_control.log_entries[i].lsu_facility = LOG_LOCAL7;
- }
+ { "LOCAL7", LOG_LOCAL7 },
#endif /* LOG_LOCAL7 */
+ };
+ int j;
+
+ for (j = 0; j < sizeof(facilities)/sizeof(facilities[0]); j++)
+ if (!strcasecmp(cp2, facilities[j].name)) {
+ log_control.log_entries[i].lsu_facility = facilities[j].value;
+ break;
+ }
cp2--;
*cp2 = savec;
}
View
@@ -1,3 +1,17 @@
+
+2001-06-20 Ezra Peisach <epeisach@mit.edu>
+
+ * kname_parse.c (k_isrealm, k_isname, k_isrealm): Add
+ KRB5_DLLIMP/KRB5_CALLCONV definitions for function with exported
+ prototype in krb.h.
+
+ * g_cnffile.c (krb__get_srvtabname, krb__v5_get_file): Declare
+ argument as const.
+
+ * g_svc_in_tkt.c, put_svc_key.c, rd_req.c, rd_svc_key.c: Get rid
+ of krb__get_srvtabname() prototype - in krb.h now.
+
+
2001-06-18 Ezra Peisach <epeisach@mit.edu>
* kparse.c (strutol): Cast argument to isupper()/tolower() to int.
View
@@ -23,7 +23,7 @@ krb5_context krb5__krb4_context = 0;
static FILE*
krb__v5_get_file(s)
- char *s;
+ const char *s;
{
FILE *cnffile = 0;
const char* names[3];
@@ -50,7 +50,7 @@ krb__v5_get_file(s)
char *
krb__get_srvtabname(default_srvtabname)
- char *default_srvtabname;
+ const char *default_srvtabname;
{
const char* names[3];
char **full_name = 0, **cpp;
@@ -16,8 +16,6 @@
#define NULL 0
#endif
-extern char *krb__get_srvtabname();
-
/*
* This file contains two routines: srvtab_to_key(), which gets
* a server's key from a srvtab file, and krb_get_svc_in_tkt() which
View
@@ -174,9 +174,9 @@ kname_parse(np, ip, rp, fullname)
* Kerberos name; returns 0 if it's not.
*/
-int
+KRB5_DLLIMP int KRB5_CALLCONV
k_isname(s)
- char *s;
+ char FAR *s;
{
register char c;
int backslash = 0;
@@ -213,9 +213,9 @@ k_isname(s)
* We now allow periods in instance names -- they are unambiguous.
*/
-int
+KRB5_DLLIMP int KRB5_CALLCONV
k_isinst(s)
- char *s;
+ char FAR *s;
{
register char c;
int backslash = 0;
@@ -244,9 +244,9 @@ k_isinst(s)
* Kerberos realm; returns 0 if it's not.
*/
-int
+KRB5_DLLIMP int KRB5_CALLCONV
k_isrealm(s)
- char *s;
+ char FAR *s;
{
register char c;
int backslash = 0;
@@ -32,8 +32,6 @@
#include <unistd.h>
#endif
-extern char *krb__get_srvtabname();
-
#define KEYSZ sizeof(C_Block)
/* strict put_svc_key.
The srvtab must already exist;
Oops, something went wrong.

0 comments on commit 62f2413

Please sign in to comment.