* os-proto.h: Moved extern definition of krb5_max_dgram_size,
krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
krb5_skdc_timeout_1 here.
* accessor.c: Definition for krb5_max_dgram_size,
krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
krb5_skdc_timeout_1 moved to os-proto.h
* osconfig.c: Changed definition for krb5_max_dgram_size,
krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
krb5_skdc_timeout_1 to unsigned int.
* get_krbhst.c, init_os_context.c, locate_kdc.c, prompter.c:
Unsigned/signed int cleanup.
* read_pwd.c (krb5_read_password): Change size_return to unsigned
int *.
* sendto_kdc.c: Remove definition for krb5_max_dgram_size,
krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
krb5_skdc_timeout_1. (moved to os-proto.h). Cast arguments to int
for send() and recv().
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12783
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-10-17 Ezra Peisach <epeisach@mit.edu>
+
+ * changepw.c: Cast length argument to recvfrom/sendto to int.
+
+ * os-proto.h: Moved extern definition of krb5_max_dgram_size,
+ krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
+ krb5_skdc_timeout_1 here.
+
+ * accessor.c: Definition for krb5_max_dgram_size,
+ krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
+ krb5_skdc_timeout_1 moved to os-proto.h
+
+ * osconfig.c: Changed definition for krb5_max_dgram_size,
+ krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
+ krb5_skdc_timeout_1 to unsigned int.
+
+ * get_krbhst.c, init_os_context.c, locate_kdc.c, prompter.c:
+ Unsigned/signed int cleanup.
+
+ * read_pwd.c (krb5_read_password): Change size_return to unsigned
+ int *.
+
+ * sendto_kdc.c: Remove definition for krb5_max_dgram_size,
+ krb5_max_skdc_timeout, krb5_skdc_timeout_shift,
+ krb5_skdc_timeout_1. (moved to os-proto.h). Cast arguments to int
+ for send() and recv().
+
+
2000-10-09 Ken Raeburn <raeburn@mit.edu>
Support for getifaddrs() interface added in BSD.
#include "k5-int.h"
#include "os-proto.h"
-extern int krb5_max_skdc_timeout;
-extern int krb5_skdc_timeout_shift;
-extern int krb5_skdc_timeout_1;
-extern int krb5_max_dgram_size;
-
KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
krb5int_accessor(internals, version)
krb5int_access* internals;
goto cleanup;
}
- if ((cc = sendto(s1, chpw_req.data, chpw_req.length, 0,
+ if ((cc = sendto(s1, chpw_req.data, (int) chpw_req.length, 0,
(struct sockaddr *) &addr_p[i],
sizeof(addr_p[i]))) != chpw_req.length)
{
SunOS 4.1.4 or Irix 5.3. Thus we must actually accept the
value and discard it. */
tmp_len = sizeof(tmp_addr);
- if ((cc = recvfrom(s1, chpw_rep.data, chpw_rep.length, 0, &tmp_addr, &tmp_len)) < 0)
+ if ((cc = recvfrom(s1, chpw_rep.data, (int) chpw_rep.length,
+ 0, &tmp_addr, &tmp_len)) < 0)
{
code = SOCKET_ERRNO;
goto cleanup;
goto cleanup;
}
for (i = 0; i < count; i++) {
- int len = strlen (values[i]) + 1;
+ unsigned int len = strlen (values[i]) + 1;
rethosts[i] = malloc(len);
if (!rethosts[i]) {
retval = ENOMEM;
#else /* !_MSDOS && !_WIN32 */
char* filepath = 0;
int n_entries, i;
- int ent_len;
+ unsigned int ent_len;
const char *s, *t;
if (!secure) filepath = getenv("KRB5_CONFIG");
if ( strlen(service) + strlen(protocol) + realm->length + 6
> MAX_DNS_NAMELEN )
goto out;
- sprintf(host, "%s.%s.%.*s", service, protocol, realm->length,
+ sprintf(host, "%s.%s.%.*s", service, protocol, (int) realm->length,
realm->data);
/* Realm names don't (normally) end with ".", but if the query
int _krb5_use_dns_kdc KRB5_PROTOTYPE((krb5_context));
int _krb5_conf_boolean KRB5_PROTOTYPE((const char *));
+extern unsigned int krb5_max_skdc_timeout;
+extern unsigned int krb5_skdc_timeout_shift;
+extern unsigned int krb5_skdc_timeout_1;
+extern unsigned int krb5_max_dgram_size;
+
#endif /* KRB5_LIBOS_INT_PROTO__ */
char *krb5_defkeyname = DEFAULT_KEYTAB_NAME;
-int krb5_max_dgram_size = MAX_DGRAM_SIZE;
-int krb5_max_skdc_timeout = MAX_SKDC_TIMEOUT;
-int krb5_skdc_timeout_shift = SKDC_TIMEOUT_SHIFT;
-int krb5_skdc_timeout_1 = SKDC_TIMEOUT_1;
+unsigned int krb5_max_dgram_size = MAX_DGRAM_SIZE;
+unsigned int krb5_max_skdc_timeout = MAX_SKDC_TIMEOUT;
+unsigned int krb5_skdc_timeout_shift = SKDC_TIMEOUT_SHIFT;
+unsigned int krb5_skdc_timeout_1 = SKDC_TIMEOUT_1;
char *krb5_default_pwd_prompt1 = DEFAULT_PWD_STRING1;
char *krb5_default_pwd_prompt2 = DEFAULT_PWD_STRING2;
(void) fflush(stdout);
(void) memset(prompts[i].reply->data, 0, prompts[i].reply->length);
- if (fgets(prompts[i].reply->data, prompts[i].reply->length, stdin)
+ if (fgets(prompts[i].reply->data, (int) prompts[i].reply->length, stdin)
== NULL) {
if (prompts[i].hidden)
(void) putchar('\n');
const char *prompt;
const char *prompt2;
char *return_pwd;
- int *size_return;
+ unsigned int *size_return;
{
/* adapted from Kerberos v4 des/read_password.c */
/* readin_string is used after a longjmp, so must be volatile */
(void) fflush(stdout);
(void) memset(return_pwd, 0, *size_return);
- if (fgets(return_pwd, *size_return, stdin) == NULL) {
+ if (fgets(return_pwd, (int) *size_return, stdin) == NULL) {
(void) putchar('\n');
errcode = KRB5_LIBOS_CANTREADPWD;
goto cleanup;
goto cleanup;
}
(void) memset((char *)readin_string, 0, *size_return);
- if (fgets((char *)readin_string, *size_return, stdin) == NULL) {
+ if (fgets((char *)readin_string, (int) *size_return, stdin) == NULL) {
(void) putchar('\n');
errcode = KRB5_LIBOS_CANTREADPWD;
goto cleanup;
* when finished.
*/
-extern int krb5_max_dgram_size;
-extern int krb5_max_skdc_timeout;
-extern int krb5_skdc_timeout_shift;
-extern int krb5_skdc_timeout_1;
-
krb5_error_code
krb5_sendto_kdc (context, message, realm, reply, use_master)
krb5_context context;
continue;
}
if (send(socklist[host],
- message->data, message->length, 0) != message->length)
+ message->data, (int) message->length, 0)
+ != message->length)
continue;
retry:
waitlen.tv_usec = 0;
goto out;
}
if ((cc = recv(socklist[host],
- reply->data, reply->length, 0)) == SOCKET_ERROR)
+ reply->data, (int) reply->length,
+ 0)) == SOCKET_ERROR)
{
/* man page says error could be:
EBADF: won't happen