summaryrefslogtreecommitdiff
path: root/kerberosIV
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-03-25 21:50:15 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-03-25 21:50:15 +0000
commit700baeb3104752ce250dfafadf3bfb5b38cfae78 (patch)
tree2282f0ffdddf5ad12c185228addaa1fc4b8a6887 /kerberosIV
parent8fc3c4f47d5bc79a7be4979907540946aa02ae7f (diff)
get_ad_tkt.c : -Wall
get_host.c : "==" != "=" + -Wall getaddrs.c : #include <err.h> krb_locl.h : add prototypes for k_{{,v},{,v}m}concat
Diffstat (limited to 'kerberosIV')
-rw-r--r--kerberosIV/krb/get_ad_tkt.c7
-rw-r--r--kerberosIV/krb/get_host.c7
-rw-r--r--kerberosIV/krb/getaddrs.c4
-rw-r--r--kerberosIV/krb/krb_locl.h7
4 files changed, 17 insertions, 8 deletions
diff --git a/kerberosIV/krb/get_ad_tkt.c b/kerberosIV/krb/get_ad_tkt.c
index c4cbe53256d..861cd0e8c96 100644
--- a/kerberosIV/krb/get_ad_tkt.c
+++ b/kerberosIV/krb/get_ad_tkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: get_ad_tkt.c,v 1.4 1997/12/12 05:30:20 art Exp $ */
+/* $OpenBSD: get_ad_tkt.c,v 1.5 1998/03/25 21:50:10 art Exp $ */
/* $KTH: get_ad_tkt.c,v 1.16 1997/05/30 17:43:34 bg Exp $ */
/*
@@ -118,14 +118,15 @@ get_ad_tkt(char *service, char *sinstance, char *realm, int lifetime)
*/
if ((strncmp(realm, lrealm, REALM_SZ)) == 0)
return(AD_NOTGT);
- else{
+ else {
if ((kerror =
get_ad_tkt(KRB_TICKET_GRANTING_TICKET,
- realm, lrealm, lifetime)) != KSUCCESS)
+ realm, lrealm, lifetime)) != KSUCCESS) {
if (kerror == KDC_PR_UNKNOWN)
return(AD_INTR_RLM_NOTGT);
else
return(kerror);
+ }
if ((kerror = krb_get_cred(KRB_TICKET_GRANTING_TICKET,
realm, lrealm, &cr)) != KSUCCESS)
return(kerror);
diff --git a/kerberosIV/krb/get_host.c b/kerberosIV/krb/get_host.c
index 8fa1c5bf10e..aff806a8d02 100644
--- a/kerberosIV/krb/get_host.c
+++ b/kerberosIV/krb/get_host.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: get_host.c,v 1.5 1997/12/12 05:30:21 art Exp $ */
+/* $OpenBSD: get_host.c,v 1.6 1998/03/25 21:50:11 art Exp $ */
/* $KTH: get_host.c,v 1.31 1997/09/26 17:42:37 joda Exp $ */
/*
@@ -182,7 +182,7 @@ add_host(char *realm, char *address, int admin, int validate)
p = (struct host_list*)malloc(sizeof(struct host_list));
if (p == NULL) {
free(host->realm);
- host->realm==NULL;
+ host->realm = NULL;
free(host->host);
host->host = NULL;
free(host);
@@ -322,11 +322,12 @@ krb_get_host(int nth, char *realm, int admin)
for(p = hosts; p; p = p->next){
if(strcmp(orealm, p->this->realm) == 0 &&
- (!admin || p->this->admin))
+ (!admin || p->this->admin)) {
if(nth == 1)
return p->this;
else
nth--;
+ }
}
return NULL;
}
diff --git a/kerberosIV/krb/getaddrs.c b/kerberosIV/krb/getaddrs.c
index 212fd02aed1..7248415d31b 100644
--- a/kerberosIV/krb/getaddrs.c
+++ b/kerberosIV/krb/getaddrs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrs.c,v 1.5 1997/12/09 20:01:38 deraadt Exp $ */
+/* $OpenBSD: getaddrs.c,v 1.6 1998/03/25 21:50:13 art Exp $ */
/* $KTH: getaddrs.c,v 1.20 1997/11/09 06:13:32 assar Exp $ */
/*
@@ -45,6 +45,8 @@
#include <net/if.h>
#include <sys/sockio.h>
+#include <err.h>
+
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif /* MAX */
diff --git a/kerberosIV/krb/krb_locl.h b/kerberosIV/krb/krb_locl.h
index 2518c6c08ae..10454225ff2 100644
--- a/kerberosIV/krb/krb_locl.h
+++ b/kerberosIV/krb/krb_locl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: krb_locl.h,v 1.4 1998/02/18 11:54:02 art Exp $ */
+/* $OpenBSD: krb_locl.h,v 1.5 1998/03/25 21:50:14 art Exp $ */
/* $KTH: krb_locl.h,v 1.44 1997/10/28 15:37:40 bg Exp $ */
/*
@@ -134,6 +134,11 @@ fixup_quad_cksum __P((
char *strtok_r(char *s1, const char *s2, char **lasts);
+int k_concat(char *, size_t, ...);
+int k_vconcat(char *, size_t, va_list);
+size_t k_vmconcat(char **, size_t, va_list);
+size_t k_mconcat(char **, size_t, ...);
+
/* Temporary fixes for krb_{rd,mk}_safe */
#define DES_QUAD_GUESS 0
#define DES_QUAD_NEW 1