krb5_context context;
char *dbname;
krb5_const_principal aname;
- const int lnsize;
+ const unsigned int lnsize;
char *lname;
{
#if (!defined(_MSDOS) && !defined(_WIN32) && !defined(macintosh))
krb5_context context;
char * rule;
krb5_const_principal aname;
- const int lnsize;
+ const unsigned int lnsize;
char * lname;
{
krb5_error_code kret;
) {
strncpy(cout,
datap->data,
- datap->length);
+ (unsigned) datap->length);
cout += datap->length;
*cout = '\0';
current++;
default_an_to_ln(context, aname, lnsize, lname)
krb5_context context;
krb5_const_principal aname;
- const int lnsize;
+ const unsigned int lnsize;
char *lname;
{
krb5_error_code retval;
char *def_realm;
- int realm_length;
+ unsigned int realm_length;
realm_length = krb5_princ_realm(context, aname)->length;
*/
krb5_error_code
-krb5_aname_to_localname(context, aname, lnsize, lname)
+krb5_aname_to_localname(context, aname, lnsize_in, lname)
krb5_context context;
krb5_const_principal aname;
- const int lnsize;
+ const int lnsize_in;
char *lname;
{
krb5_error_code kret;
int i, nvalid;
char *cp;
char *typep, *argp;
+ unsigned int lnsize;
+
+ if (lnsize_in < 0)
+ return KRB5_CONFIG_NOTENUFSPACE;
+
+ lnsize = lnsize_in; /* Unsigned */
/*
* First get the default realm.
#include "os-proto.h"
-void test_get_default_realm(ctx)
+static void test_get_default_realm(ctx)
krb5_context ctx;
{
char *realm;
free(realm);
}
-void test_set_default_realm(ctx, realm)
+static void test_set_default_realm(ctx, realm)
krb5_context ctx;
char *realm;
{
printf("krb5_set_default_realm(%s)\n", realm);
}
-void test_get_default_ccname(ctx)
+static void test_get_default_ccname(ctx)
krb5_context ctx;
{
const char *ccname;
printf("krb5_cc_default_name() returned NULL\n");
}
-void test_set_default_ccname(ctx, ccname)
+static void test_set_default_ccname(ctx, ccname)
krb5_context ctx;
char *ccname;
{
printf("krb5_set_default_ccname(%s)\n", ccname);
}
-void test_get_krbhst(ctx, realm)
+static void test_get_krbhst(ctx, realm)
krb5_context ctx;
char *realm;
{
printf("\n");
}
-void test_locate_kdc(ctx, realm)
+static void test_locate_kdc(ctx, realm)
krb5_context ctx;
char *realm;
{
struct sockaddr *addrs;
- struct sockaddr_in *sin;
+ struct sockaddr_in *s_sin;
int i, naddrs;
int get_masters=0;
krb5_data rlm;
}
printf("krb_get_krbhst(%s) returned:", realm);
for (i=0; i < naddrs; i++) {
- sin = (struct sockaddr_in *) &addrs[i];
- printf(" %s/%d", inet_ntoa(sin->sin_addr),
- ntohs(sin->sin_port));
+ s_sin = (struct sockaddr_in *) &addrs[i];
+ printf(" %s/%d", inet_ntoa(s_sin->sin_addr),
+ ntohs(s_sin->sin_port));
}
free(addrs);
printf("\n");
}
-void test_get_host_realm(ctx, host)
+static void test_get_host_realm(ctx, host)
krb5_context ctx;
char *host;
{
printf("\n");
}
-void test_get_realm_domain(ctx, realm)
+static void test_get_realm_domain(ctx, realm)
krb5_context ctx;
char *realm;
{
free(domain);
}
-void usage(progname)
+static void usage(progname)
char *progname;
{
fprintf(stderr, "%s: Usage: %s [-dc] [-k realm] [-r host] [-C ccname] [-D realm]\n",