+2002-09-03 Ken Raeburn <raeburn@mit.edu>
+
+ * accessor.c, an_to_ln.c, c_ustime.c, ccdefname.c, changepw.c,
+ def_realm.c, free_hstrl.c, free_krbhs.c, full_ipadr.c, gen_port.c,
+ gen_rname.c, genaddrs.c, get_krbhst.c, gmt_mktime.c, hostaddr.c,
+ hst_realm.c, init_os_ctx.c, krbfileio.c, ktdefname.c, kuserok.c,
+ localaddr.c, locate_kdc.c, lock_file.c, mk_faddr.c, net_read.c,
+ net_write.c, port2ip.c, prompter.c, promptusr.c, read_msg.c,
+ read_pwd.c, realm_dom.c, realm_iter.c, sendto_kdc.c, sn2princ.c,
+ t_an_to_ln.c, t_gifconf.c, t_locate_kdc.c, t_realm_iter.c,
+ t_std_conf.c, timeofday.c, toffset.c, unlck_file.c, ustime.c,
+ write_msg.c: Use prototype-style function definitions.
+
+ * c_ustime.c, timeofday.c: Don't declare errno.
+ * hst_realm.c (krb5_try_realm_txt_rr), locate_kdc.c
+ (krb5_locate_srv_dns_1): Avoid variable name "class".
+ * lock_file.c (krb5_lock_file): Initialize flock_zero.
+ * sendto_kdc.c (enum conn_states): Define separately from
+ conn_state 'state' field declaration.
+
2002-08-29 Ken Raeburn <raeburn@mit.edu>
* Makefile.in: Revert $(S)=>/ change, for Windows support.
#include "os-proto.h"
krb5_error_code KRB5_CALLCONV
-krb5int_accessor(internals, version)
- krb5int_access* internals;
- krb5_int32 version;
+krb5int_accessor(krb5int_access *internals, krb5_int32 version)
{
if (version == KRB5INT_ACCESS_VERSION)
{
* Find the portion of the flattened principal name that we use for mapping.
*/
static char *
-aname_full_to_mapping_name(fprincname)
- char *fprincname;
+aname_full_to_mapping_name(char *fprincname)
{
char *atp;
size_t mlen;
* If no re_comp() or regcomp(), then always return a match.
*/
static krb5_error_code
-aname_do_match(string, contextp)
- char *string;
- char **contextp;
+aname_do_match(char *string, char **contextp)
{
krb5_error_code kret;
char *regexp, *startp, *endp = 0;
* string.
*/
static void
-do_replacement(regexp, repl, doall, in, out)
- char *regexp;
- char *repl;
- int doall;
- char *in;
- char *out;
+do_replacement(char *regexp, char *repl, int doall, char *in, char *out)
{
#if HAVE_REGCOMP
regex_t match_exp;
* This routine enforces the "s/<pattern>/<replacement>/[g]" syntax.
*/
static krb5_error_code
-aname_replacer(string, contextp, result)
- char *string;
- char **contextp;
- char **result;
+aname_replacer(char *string, char **contextp, char **result)
{
krb5_error_code kret;
char *in;
* the principal name.
*/
static krb5_error_code
-rule_an_to_ln(context, rule, aname, lnsize, lname)
- krb5_context context;
- char * rule;
- krb5_const_principal aname;
- const unsigned int lnsize;
- char * lname;
+rule_an_to_ln(krb5_context context, char *rule, krb5_const_principal aname, const unsigned int lnsize, char *lname)
{
krb5_error_code kret;
char *current;
* that name is returned as the lname.
*/
static krb5_error_code
-default_an_to_ln(context, aname, lnsize, lname)
- krb5_context context;
- krb5_const_principal aname;
- const unsigned int lnsize;
- char *lname;
+default_an_to_ln(krb5_context context, krb5_const_principal aname, const unsigned int lnsize, char *lname)
{
krb5_error_code retval;
char *def_realm;
*/
krb5_error_code KRB5_CALLCONV
-krb5_aname_to_localname(context, aname, lnsize_in, lname)
- krb5_context context;
- krb5_const_principal aname;
- const int lnsize_in;
- char *lname;
+krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, const int lnsize_in, char *lname)
{
krb5_error_code kret;
char *realm;
/* We're a Unix machine -- do Unix time things. */
-extern int errno;
-
static struct timeval last_tv = {0, 0};
krb5_error_code
-krb5_crypto_us_timeofday(seconds, microseconds)
- register krb5_int32 *seconds, *microseconds;
+krb5_crypto_us_timeofday(register krb5_int32 *seconds, register krb5_int32 *microseconds)
{
struct timeval tv;
#endif
krb5_error_code KRB5_CALLCONV
-krb5_cc_set_default_name(context, name)
- krb5_context context;
- const char *name;
+krb5_cc_set_default_name(krb5_context context, const char *name)
{
char name_buf[1024];
char *new_name;
const char * KRB5_CALLCONV
-krb5_cc_default_name(context)
- krb5_context context;
+krb5_cc_default_name(krb5_context context)
{
krb5_os_context os_ctx;
krb5_error_code KRB5_CALLCONV
-krb5_change_password(context, creds, newpw, result_code,
- result_code_string, result_string)
- krb5_context context;
- krb5_creds *creds;
- char *newpw;
- int *result_code;
- krb5_data *result_code_string;
- krb5_data *result_string;
+krb5_change_password(krb5_context context, krb5_creds *creds, char *newpw, int *result_code, krb5_data *result_code_string, krb5_data *result_string)
{
krb5_auth_context auth_context;
krb5_data ap_req, chpw_req, chpw_rep;
*/
krb5_error_code KRB5_CALLCONV
-krb5_get_default_realm(context, lrealm)
- krb5_context context;
- char **lrealm;
+krb5_get_default_realm(krb5_context context, char **lrealm)
{
char *realm = 0;
char *cp;
}
krb5_error_code KRB5_CALLCONV
-krb5_set_default_realm(context, lrealm)
- krb5_context context;
- const char *lrealm;
+krb5_set_default_realm(krb5_context context, const char *lrealm)
{
if (!context || (context->magic != KV5M_CONTEXT))
return KV5M_CONTEXT;
}
void KRB5_CALLCONV
-krb5_free_default_realm(context, lrealm)
- krb5_context context;
- char *lrealm;
+krb5_free_default_realm(krb5_context context, char *lrealm)
{
free (lrealm);
}
*/
krb5_error_code KRB5_CALLCONV
-krb5_free_host_realm(context, realmlist)
- krb5_context context;
- char * const *realmlist;
+krb5_free_host_realm(krb5_context context, char *const *realmlist)
{
/* same format, so why duplicate code? */
return krb5_free_krbhst(context, realmlist);
*/
krb5_error_code
-krb5_free_krbhst(context, hostlist)
- krb5_context context;
- char * const *hostlist;
+krb5_free_krbhst(krb5_context context, char *const *hostlist)
{
register char * const *cp;
#include "os-proto.h"
krb5_error_code
-krb5_make_full_ipaddr(context, adr, port, outaddr)
- krb5_context context;
- krb5_int32 adr;
- krb5_int16 port;
- krb5_address ** outaddr;
+krb5_make_full_ipaddr(krb5_context context, krb5_int32 adr,
+ /*krb5_int16*/int port, krb5_address **outaddr)
{
unsigned long smushaddr = (unsigned long) adr; /* already in net order */
unsigned short smushport = (unsigned short) port; /* ditto */
#include "os-proto.h"
krb5_error_code
-krb5_gen_portaddr(context, addr, ptr, outaddr)
- krb5_context context;
- const krb5_address *addr;
- krb5_const_pointer ptr;
- krb5_address **outaddr;
+krb5_gen_portaddr(krb5_context context, const krb5_address *addr, krb5_const_pointer ptr, krb5_address **outaddr)
{
#ifdef HAVE_NETINET_IN_H
krb5_int32 adr;
#include "os-proto.h"
krb5_error_code
-krb5_gen_replay_name(context, address, uniq, string)
- krb5_context context;
- const krb5_address * address;
- const char * uniq;
- char ** string;
+krb5_gen_replay_name(krb5_context context, const krb5_address *address, const char *uniq, char **string)
{
char * tmp;
int i;
}
krb5_error_code KRB5_CALLCONV
-krb5_auth_con_genaddrs(context, auth_context, infd, flags)
- krb5_context context;
- krb5_auth_context auth_context;
- int infd;
- int flags;
+krb5_auth_con_genaddrs(krb5_context context, krb5_auth_context auth_context, int infd, int flags)
{
krb5_error_code retval;
krb5_address * laddr;
*/
krb5_error_code
-krb5_get_krbhst(context, realm, hostlist)
- krb5_context context;
- const krb5_data *realm;
- char ***hostlist;
+krb5_get_krbhst(krb5_context context, const krb5_data *realm, char ***hostlist)
{
char **values, **cpp, *cp;
const char *realm_kdc_names[4];
#define hasleapday(year) (year%400?(year%100?(year%4?0:1):0):1)
-time_t gmt_mktime(t)
- struct tm* t;
+time_t gmt_mktime(struct tm *t)
{
time_t accum;
#include "fake-addrinfo.h"
krb5_error_code
-krb5_os_hostaddr(context, name, ret_addrs)
- krb5_context context;
- const char *name;
- krb5_address ***ret_addrs;
+krb5_os_hostaddr(krb5_context context, const char *name, krb5_address ***ret_addrs)
{
krb5_error_code retval;
krb5_address **addrs;
*/
krb5_error_code
-krb5_try_realm_txt_rr(prefix, name, realm)
- const char *prefix, *name;
- char **realm;
+krb5_try_realm_txt_rr(const char *prefix, const char *name, char **realm)
{
union {
unsigned char bytes[2048];
unsigned char *p;
char host[MAX_DNS_NAMELEN], *h;
int size;
- int type, class, numanswers, numqueries, rdlen, len;
+ int type, rrclass, numanswers, numqueries, rdlen, len;
/*
* Form our query, and send it via DNS
/* Next is the query class; also skip over 4 byte TTL */
CHECK(p,6);
- class = NTOHSP(p,6);
+ rrclass = NTOHSP(p,6);
/* Record data length - make sure we aren't truncated */
*/
/* XXX What about flagging multiple TXT records as an error? */
- if (class == C_IN && type == T_TXT) {
+ if (rrclass == C_IN && type == T_TXT) {
len = *p++;
if (p + len > answer.bytes + size)
return KRB5_ERR_HOST_REALM_UNKNOWN;
}
krb5_error_code KRB5_CALLCONV
-krb5_get_host_realm(context, host, realmsp)
- krb5_context context;
- const char *host;
- char ***realmsp;
+krb5_get_host_realm(krb5_context context, const char *host, char ***realmsp)
{
char **retrealms;
char *default_realm, *realm, *cp, *temp_realm;
#endif /* _WIN32 */
static void
-free_filespecs(files)
- profile_filespec_t *files;
+free_filespecs(profile_filespec_t *files)
{
#if !TARGET_OS_MAC
char **cp;
}
static krb5_error_code
-os_get_default_config_files(pfiles, secure)
- profile_filespec_t ** pfiles;
- krb5_boolean secure;
+os_get_default_config_files(profile_filespec_t **pfiles, krb5_boolean secure)
{
profile_filespec_t* files;
#if defined(_WIN32)
do not include user paths (from environment variables, etc.)
*/
static krb5_error_code
-os_init_paths(ctx)
- krb5_context ctx;
+os_init_paths(krb5_context ctx)
{
krb5_error_code retval = 0;
profile_filespec_t *files = 0;
}
krb5_error_code
-krb5_os_init_context(ctx)
- krb5_context ctx;
+krb5_os_init_context(krb5_context ctx)
{
krb5_os_context os_ctx;
krb5_error_code retval = 0;
}
krb5_error_code KRB5_CALLCONV
-krb5_get_profile (ctx, profile)
- krb5_context ctx;
- profile_t* profile;
+krb5_get_profile (krb5_context ctx, profile_t *profile)
{
krb5_error_code retval = 0;
profile_filespec_t *files = 0;
krb5_error_code
-krb5_set_config_files(ctx, filenames)
- krb5_context ctx;
- const char **filenames;
+krb5_set_config_files(krb5_context ctx, const char **filenames)
{
krb5_error_code retval;
profile_t profile;
}
krb5_error_code KRB5_CALLCONV
-krb5_get_default_config_files(pfilenames)
- char ***pfilenames;
+krb5_get_default_config_files(char ***pfilenames)
{
if (!pfilenames)
return EINVAL;
}
void KRB5_CALLCONV
-krb5_free_config_files(filenames)
- char **filenames;
+krb5_free_config_files(char **filenames)
{
free_filespecs(filenames);
}
krb5_error_code
-krb5_secure_config_files(ctx)
- krb5_context ctx;
+krb5_secure_config_files(krb5_context ctx)
{
/* Obsolete interface; always return an error.
}
void
-krb5_os_free_context(ctx)
- krb5_context ctx;
+krb5_os_free_context(krb5_context ctx)
{
krb5_os_context os_ctx;
#endif
krb5_error_code
-krb5_create_secure_file(context, pathname)
- krb5_context context;
- const char * pathname;
+krb5_create_secure_file(krb5_context context, const char *pathname)
{
int fd;
}
krb5_error_code
-krb5_sync_disk_file(context, fp)
- krb5_context context;
- FILE *fp;
+krb5_sync_disk_file(krb5_context context, FILE *fp)
{
fflush(fp);
#if !defined(MSDOS_FILESYSTEM) && !defined(macintosh)
char *krb5_overridekeyname = NULL;
krb5_error_code KRB5_CALLCONV
-krb5_kt_default_name(context, name, namesize)
- krb5_context context;
- char *name;
- int namesize;
+krb5_kt_default_name(krb5_context context, char *name, int namesize)
{
char *cp = 0;
char *retval;
*/
krb5_boolean KRB5_CALLCONV
-krb5_kuserok(context, principal, luser)
- krb5_context context;
- krb5_principal principal;
- const char *luser;
+krb5_kuserok(krb5_context context, krb5_principal principal, const char *luser)
{
struct stat sbuf;
struct passwd *pwd;
return 0;
for (iter = values; *iter; iter++) {
- char *cp = *iter, *next, *this;
+ char *cp = *iter, *next, *current;
int i, count;
#ifdef DEBUG
#ifdef DEBUG
fprintf (stderr, " addr found in '%s'\n", cp);
#endif
- this = cp;
+ current = cp;
while (*cp != 0 && !isspace((int) *cp) && *cp != ',')
cp++;
if (*cp != 0) {
next = cp;
/* Got a single address, process it. */
#ifdef DEBUG
- fprintf (stderr, " processing '%s'\n", this);
+ fprintf (stderr, " processing '%s'\n", current);
#endif
newaddrs = 0;
- err = krb5_os_hostaddr (context, this, &newaddrs);
+ err = krb5_os_hostaddr (context, current, &newaddrs);
if (err)
continue;
for (i = 0; newaddrs[i]; i++) {
}
krb5_error_code KRB5_CALLCONV
-krb5_os_localaddr(context, addr)
- krb5_context context;
- krb5_address ***addr;
+krb5_os_localaddr(krb5_context context, krb5_address ***addr)
{
return get_localaddrs(context, addr, 1);
}
#endif
static int
-maybe_use_dns (context, name, defalt)
- krb5_context context;
- const char *name;
- int defalt;
+maybe_use_dns (krb5_context context, const char *name, int defalt)
{
krb5_error_code code;
char * value = NULL;
}
int
-_krb5_use_dns_kdc(context)
- krb5_context context;
+_krb5_use_dns_kdc(krb5_context context)
{
return maybe_use_dns (context, "dns_lookup_kdc", DEFAULT_LOOKUP_KDC);
}
int
-_krb5_use_dns_realm(context)
- krb5_context context;
+_krb5_use_dns_realm(krb5_context context)
{
return maybe_use_dns (context, "dns_lookup_realm", DEFAULT_LOOKUP_REALM);
}
#ifdef TEST
static krb5_error_code
-krb5_locate_srv_conf(context, realm, name, al, get_masters,
- udpport, sec_udpport)
- krb5_context context;
- const krb5_data *realm;
- const char * name;
- struct addrlist *al;
- int get_masters;
- int udpport, sec_udpport;
+krb5_locate_srv_conf(krb5_context context, const krb5_data *realm, const char *name, struct addrlist *al, int get_masters, int udpport, int sec_udpport)
{
krb5_error_code ret;
} answer;
unsigned char *p=NULL;
char host[MAX_DNS_NAMELEN], *h;
- int type, class;
+ int type, rrclass;
int priority, weight, size, len, numanswers, numqueries, rdlen;
unsigned short port;
const int hdrsize = sizeof(HEADER);
/* Next is the query class; also skip over 4 byte TTL */
CHECK(p, 6);
- class = NTOHSP(p,6);
+ rrclass = NTOHSP(p,6);
/* Record data length */
* Server name
*/
- if (class == C_IN && type == T_SRV) {
+ if (rrclass == C_IN && type == T_SRV) {
CHECK(p,2);
priority = NTOHSP(p,2);
CHECK(p, 2);
/*ARGSUSED*/
krb5_error_code
-krb5_lock_file(context, fd, mode)
- krb5_context context;
- int fd;
- int mode;
+krb5_lock_file(krb5_context context, int fd, int mode)
{
int lock_flag = -1;
krb5_error_code retval = 0;
#ifdef POSIX_FILE_LOCKS
int lock_cmd = F_SETLKW;
- static const struct flock flock_zero;
+ static const struct flock flock_zero = { 0 };
struct flock lock_arg;
lock_arg = flock_zero;
#endif
krb5_error_code
-krb5_make_fulladdr(context, kaddr, kport, raddr)
- krb5_context context;
- krb5_address * kaddr;
- krb5_address * kport;
- krb5_address * raddr;
+krb5_make_fulladdr(krb5_context context, krb5_address *kaddr, krb5_address *kport, krb5_address *raddr)
{
register krb5_octet * marshal;
krb5_int32 tmp32;
*/
int
-krb5_net_read(context, fd, buf, len)
- krb5_context context;
- int fd;
- register char *buf;
- register int len;
+krb5_net_read(krb5_context context, int fd, register char *buf, register int len)
{
int cc, len2 = 0;
*/
int
-krb5_net_write(context, fd, buf, len)
- krb5_context context;
- int fd;
- register const char *buf;
- int len;
+krb5_net_write(krb5_context context, int fd, register const char *buf, int len)
{
int cc;
register int wrlen = len;
#include "os-proto.h"
krb5_error_code
-krb5_unpack_full_ipaddr(context, inaddr, adr, port)
- krb5_context context;
- const krb5_address *inaddr;
- krb5_int32 *adr;
- krb5_int16 *port;
+krb5_unpack_full_ipaddr(krb5_context context, const krb5_address *inaddr, krb5_int32 *adr, krb5_int16 *port)
{
unsigned long smushaddr;
unsigned short smushport;
static jmp_buf pwd_jump;
static krb5_sigtype
-intr_routine(signo)
- int signo;
+intr_routine(int signo)
{
longjmp(pwd_jump, 1);
/*NOTREACHED*/
#endif /* Windows or Mac */
void
-krb5int_set_prompt_types(context, types)
- krb5_context context;
- krb5_prompt_type *types;
+krb5int_set_prompt_types(krb5_context context, krb5_prompt_type *types)
{
context->prompt_types = types;
}
krb5_prompt_type*
KRB5_CALLCONV
-krb5_get_prompt_types(context)
- krb5_context context;
+krb5_get_prompt_types(krb5_context context)
{
return context->prompt_types;
}
static jmp_buf pwd_jump;
static krb5_sigtype
-intr_routine(signo)
- int signo;
+intr_routine(int signo)
{
longjmp(pwd_jump, 1);
/*NOTREACHED*/
}
krb5_error_code
-krb5_os_get_tty_uio(context, uio)
- krb5_context context;
- krb5_uio uio;
+krb5_os_get_tty_uio(krb5_context context, krb5_uio uio)
{
volatile krb5_error_code retval;
krb5_sigtype (*volatile ointrfunc)();
}
void
-krb5_free_uio(context, uio)
- krb5_context context;
- krb5_uio uio;
+krb5_free_uio(krb5_context context, krb5_uio uio)
{
krb5_uio p, next;
#include <errno.h>
krb5_error_code
-krb5_read_message(context, fdp, inbuf)
- krb5_context context;
- krb5_pointer fdp;
- krb5_data *inbuf;
+krb5_read_message(krb5_context context, krb5_pointer fdp, krb5_data *inbuf)
{
krb5_int32 len;
int len2, ilen;
static jmp_buf pwd_jump;
static krb5_sigtype
-intr_routine(signo)
- int signo;
+intr_routine(int signo)
{
longjmp(pwd_jump, 1);
/*NOTREACHED*/
}
krb5_error_code
-krb5_read_password(context, prompt, prompt2, return_pwd, size_return)
- krb5_context context;
- const char *prompt;
- const char *prompt2;
- char *return_pwd;
- unsigned int *size_return;
+krb5_read_password(krb5_context context, const char *prompt, const char *prompt2, char *return_pwd, unsigned int *size_return)
{
/* adapted from Kerberos v4 des/read_password.c */
/* readin_string is used after a longjmp, so must be volatile */
#include <stdio.h>
krb5_error_code KRB5_CALLCONV
-krb5_get_realm_domain(context, realm, domain)
- krb5_context context;
- const char *realm;
- char **domain;
+krb5_get_realm_domain(krb5_context context, const char *realm, char **domain)
{
krb5_error_code retval;
char *temp_domain = 0;
#include <stdio.h>
krb5_error_code KRB5_CALLCONV
-krb5_realm_iterator_create(context, iter_p)
- krb5_context context;
- void **iter_p;
+krb5_realm_iterator_create(krb5_context context, void **iter_p)
{
static const char *names[] = { "realms", 0 };
}
krb5_error_code KRB5_CALLCONV
-krb5_realm_iterator(context, iter_p, ret_realm)
- krb5_context context;
- void **iter_p;
- char **ret_realm;
+krb5_realm_iterator(krb5_context context, void **iter_p, char **ret_realm)
{
return profile_iterator(iter_p, ret_realm, 0);
}
void KRB5_CALLCONV
-krb5_realm_iterator_free(context, iter_p)
- krb5_context context;
- void **iter_p;
+krb5_realm_iterator_free(krb5_context context, void **iter_p)
{
profile_iterator_free(iter_p);
}
void KRB5_CALLCONV
-krb5_free_realm_string(context, str)
- krb5_context context;
- char *str;
+krb5_free_realm_string(krb5_context context, char *str)
{
profile_release_string(str);
}
*/
krb5_error_code
-krb5_sendto_kdc (context, message, realm, reply, use_master, tcp_only)
- krb5_context context;
- const krb5_data * message;
- const krb5_data * realm;
- krb5_data * reply;
- int use_master;
- int tcp_only;
+krb5_sendto_kdc (krb5_context context, const krb5_data *message, const krb5_data *realm, krb5_data *reply, int use_master, int tcp_only)
{
krb5_error_code retval;
struct addrlist addrs;
static const char *state_strings[] = {
"INITIALIZING", "CONNECTING", "WRITING", "READING", "FAILED"
};
+enum conn_states { INITIALIZING, CONNECTING, WRITING, READING, FAILED };
struct conn_state {
SOCKET fd;
krb5_error_code err;
- enum { INITIALIZING, CONNECTING, WRITING, READING, FAILED } state;
+ enum conn_states state;
unsigned int is_udp : 1;
struct addrinfo *addr;
struct {
#endif
krb5_error_code KRB5_CALLCONV
-krb5_sname_to_principal(context, hostname, sname, type, ret_princ)
- krb5_context context;
- const char * hostname;
- const char * sname;
- krb5_int32 type;
- krb5_principal * ret_princ;
+krb5_sname_to_principal(krb5_context context, const char *hostname, const char *sname, krb5_int32 type, krb5_principal *ret_princ)
{
char **hrealms, *realm, *remote_host;
krb5_error_code retval;
#include <stdio.h>
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
krb5_error_code kret;
krb5_context kcontext;
#define INIT 0xc3
-int main () {
+int main (void) {
char buffer[2048];
int i, sock, t, olen = -9, omod = -9;
struct ifconf ifc;
}
}
-void print_addrs ()
+void print_addrs (void)
{
int i;
#include <stdio.h>
-void test_realm_iterator(ctx)
+void test_realm_iterator(int ctx)
{
krb5_error_code retval;
char *realm;
}
}
-int main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
krb5_context ctx;
krb5_error_code retval;
#include "os-proto.h"
-static void test_get_default_realm(ctx)
- krb5_context ctx;
+static void test_get_default_realm(krb5_context ctx)
{
char *realm;
krb5_error_code retval;
free(realm);
}
-static void test_set_default_realm(ctx, realm)
- krb5_context ctx;
- char *realm;
+static void test_set_default_realm(krb5_context ctx, char *realm)
{
krb5_error_code retval;
printf("krb5_set_default_realm(%s)\n", realm);
}
-static void test_get_default_ccname(ctx)
- krb5_context ctx;
+static void test_get_default_ccname(krb5_context ctx)
{
const char *ccname;
printf("krb5_cc_default_name() returned NULL\n");
}
-static void test_set_default_ccname(ctx, ccname)
- krb5_context ctx;
- char *ccname;
+static void test_set_default_ccname(krb5_context ctx, char *ccname)
{
krb5_error_code retval;
printf("krb5_set_default_ccname(%s)\n", ccname);
}
-static void test_get_krbhst(ctx, realm)
- krb5_context ctx;
- char *realm;
+static void test_get_krbhst(krb5_context ctx, char *realm)
{
char **hostlist, **cpp;
krb5_data rlm;
printf("\n");
}
-static void test_locate_kdc(ctx, realm)
- krb5_context ctx;
- char *realm;
+static void test_locate_kdc(krb5_context ctx, char *realm)
{
struct addrlist addrs;
int i;
printf("\n");
}
-static void test_get_host_realm(ctx, host)
- krb5_context ctx;
- char *host;
+static void test_get_host_realm(krb5_context ctx, char *host)
{
char **realms, **cpp;
krb5_error_code retval;
printf("\n");
}
-static void test_get_realm_domain(ctx, realm)
- krb5_context ctx;
- char *realm;
+static void test_get_realm_domain(krb5_context ctx, char *realm)
{
krb5_error_code retval;
char *domain;
free(domain);
}
-static void usage(progname)
- char *progname;
+static void usage(char *progname)
{
fprintf(stderr, "%s: Usage: %s [-dc] [-k realm] [-r host] [-C ccname] [-D realm]\n",
progname, progname);
exit(1);
}
-int main(argc, argv)
- int argc;
- char **argv;
+int main(int argc, char **argv)
{
int c;
krb5_context ctx;
#include <time.h>
-#ifndef HAVE_ERRNO
-extern int errno;
-#endif
-
krb5_error_code KRB5_CALLCONV
-krb5_timeofday(context, timeret)
- krb5_context context;
- register krb5_int32 *timeret;
+krb5_timeofday(krb5_context context, register krb5_int32 *timeret)
{
krb5_os_context os_ctx = context->os_context;
time_t tval;
* routine
*/
krb5_error_code
-krb5_set_real_time(context, seconds, microseconds)
- krb5_context context;
- krb5_int32 seconds, microseconds;
+krb5_set_real_time(krb5_context context, krb5_int32 seconds, krb5_int32 microseconds)
{
krb5_os_context os_ctx = context->os_context;
krb5_int32 sec, usec;
* is useful for running the krb5 routines through test suites
*/
krb5_error_code
-krb5_set_debugging_time(context, seconds, microseconds)
- krb5_context context;
- krb5_int32 seconds, microseconds;
+krb5_set_debugging_time(krb5_context context, krb5_int32 seconds, krb5_int32 microseconds)
{
krb5_os_context os_ctx = context->os_context;
* routines return the "natural" time.
*/
krb5_error_code
-krb5_use_natural_time(context)
- krb5_context context;
+krb5_use_natural_time(krb5_context context)
{
krb5_os_context os_ctx = context->os_context;
* This routine returns the current time offsets in use.
*/
krb5_error_code KRB5_CALLCONV
-krb5_get_time_offsets(context, seconds, microseconds)
- krb5_context context;
- krb5_int32 *seconds, *microseconds;
+krb5_get_time_offsets(krb5_context context, krb5_int32 *seconds, krb5_int32 *microseconds)
{
krb5_os_context os_ctx = context->os_context;
* This routine sets the time offsets directly.
*/
krb5_error_code
-krb5_set_time_offsets(context, seconds, microseconds)
- krb5_context context;
- krb5_int32 seconds, microseconds;
+krb5_set_time_offsets(krb5_context context, krb5_int32 seconds, krb5_int32 microseconds)
{
krb5_os_context os_ctx = context->os_context;
#include <stdio.h>
krb5_error_code
-krb5_unlock_file(context, fd)
- krb5_context context;
- int fd;
+krb5_unlock_file(krb5_context context, int fd)
{
return krb5_lock_file(context, fd, KRB5_LOCKMODE_UNLOCK);
}
#include "k5-int.h"
krb5_error_code KRB5_CALLCONV
-krb5_us_timeofday(context, seconds, microseconds)
- krb5_context context;
- krb5_int32 *seconds;
- krb5_int32 *microseconds;
+krb5_us_timeofday(krb5_context context, krb5_int32 *seconds, krb5_int32 *microseconds)
{
krb5_os_context os_ctx = context->os_context;
krb5_int32 sec, usec;
#include <errno.h>
krb5_error_code
-krb5_write_message(context, fdp, outbuf)
- krb5_context context;
- krb5_pointer fdp;
- krb5_data *outbuf;
+krb5_write_message(krb5_context context, krb5_pointer fdp, krb5_data *outbuf)
{
krb5_int32 len;
int fd = *( (int *) fdp);