* recvauth.c (recvauth_common): Declare recvauth_common as static.
* parse.c, sendauth.c: Changes to prevent shadowing of local
variables.
* get_in_tkt.c, tgtname.c: Include int-proto.h for prototypes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13073
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-03-10 Ezra Peisach <epeisach@mit.edu>
+
+ * init_ctx.c: Provide a full prototype for init_common().
+
+ * recvauth.c (recvauth_common): Declare recvauth_common as static.
+
+ * parse.c, sendauth.c: Changes to prevent shadowing of local
+ variables.
+
+ * get_in_tkt.c, tgtname.c: Include int-proto.h for prototypes.
+
2001-03-03 Ken Raeburn <raeburn@mit.edu>
* preauth2.c (pa_sam): Return an error if no prompter was
#include <string.h>
#include "k5-int.h"
+#include "int-proto.h"
/*
All-purpose initial ticket routine, usually called via
extern void krb5_win_ccdll_load(krb5_context context);
#endif
-static krb5_error_code init_common ();
+static krb5_error_code init_common (krb5_context *, krb5_boolean);
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5_init_context(context)
krb5_princ_set_realm_length(context, principal, realmsize);
krb5_princ_set_realm_data(context, principal, tmpdata);
for (i=0; i < components; i++) {
- char *tmpdata =
+ char *tmpdata2 =
malloc(krb5_princ_component(context, principal, i)->length + 1);
- if (!tmpdata) {
+ if (!tmpdata2) {
for (i--; i >= 0; i--)
krb5_xfree(krb5_princ_component(context, principal, i)->data);
krb5_xfree(krb5_princ_realm(context, principal)->data);
krb5_xfree(principal);
return(ENOMEM);
}
- krb5_princ_component(context, principal, i)->data = tmpdata;
+ krb5_princ_component(context, principal, i)->data = tmpdata2;
krb5_princ_component(context, principal, i)->magic = KV5M_DATA;
}
static char *sendauth_version = "KRB5_SENDAUTH_V1.0";
-krb5_error_code
+static krb5_error_code
recvauth_common(krb5_context context,
krb5_auth_context FAR * auth_context,
/* IN */
not to guarantee randomness, but to make it less likely
that multiple sessions could pick the same subkey. */
char rnd_data[1024];
- size_t len;
+ size_t len2;
krb5_data d;
d.length = sizeof (rnd_data);
d.data = rnd_data;
- len = sizeof (rnd_data);
- if (getpeername (*(int*)fd, (struct sockaddr *) rnd_data, &len) == 0) {
- d.length = len;
+ len2 = sizeof (rnd_data);
+ if (getpeername (*(int*)fd, (struct sockaddr *) rnd_data,
+ &len2) == 0) {
+ d.length = len2;
(void) krb5_c_random_seed (context, &d);
}
- len = sizeof (rnd_data);
- if (getsockname (*(int*)fd, (struct sockaddr *) rnd_data, &len) == 0) {
- d.length = len;
+ len2 = sizeof (rnd_data);
+ if (getsockname (*(int*)fd, (struct sockaddr *) rnd_data,
+ &len2) == 0) {
+ d.length = len2;
(void) krb5_c_random_seed (context, &d);
}
}
*/
#include "k5-int.h"
+#include "int-proto.h"
/* This is an internal-only function, used by krb5_get_cred_from_kdc() */