From 981c12f9c7ed46c9c08688cb0a4912ba4c5728a1 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 3 Jun 1993 11:33:33 +0000 Subject: [PATCH] Portability changes git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2572 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb425/kuserok.c | 18 ++++++++++++++++-- src/lib/krb425/mk_priv.c | 2 ++ src/lib/krb425/mk_safe.c | 2 ++ src/lib/krb425/rd_priv.c | 2 ++ src/lib/krb425/rd_safe.c | 2 ++ src/lib/krb425/sendauth.c | 2 +- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/lib/krb425/kuserok.c b/src/lib/krb425/kuserok.c index 799a8befa..0090796df 100644 --- a/src/lib/krb425/kuserok.c +++ b/src/lib/krb425/kuserok.c @@ -30,6 +30,9 @@ #include #include +#if defined(aix) /* AIX needs BSD defined to some value for socket.h */ +#define _BSD 44 +#endif #include #include #include @@ -41,6 +44,17 @@ #define NOTOK 1 #define MAX_USERNAME 10 +#ifdef unicos61 +#ifdef MAXPATHLEN +#undef MAXPATHLEN +#endif +#define MAXPATHLEN PATHSIZE +#endif /* unicos61 */ + +#ifndef F_OK +#define F_OK 0 +#endif + /* * Given a Kerberos principal "kdata", and a local username "luser", * determine whether user is authorized to login according to the @@ -62,7 +76,7 @@ * one entry per line. * * The ATHENA_COMPAT code supports old-style Athena ~luser/.klogin - * file entries. See the file "kparse.c". + * file entries. See the file "kn_parse.c". */ @@ -83,7 +97,7 @@ kuserok(kdata, luser) int gobble; /* no account => no access */ - if ((pwd = getpwnam(luser)) == NULL) { + if ((pwd = (struct passwd *) getpwnam(luser)) == NULL) { return(NOTOK); } (void) strcpy(pbuf, pwd->pw_dir); diff --git a/src/lib/krb425/mk_priv.c b/src/lib/krb425/mk_priv.c index 96b8c3689..a37b5b033 100644 --- a/src/lib/krb425/mk_priv.c +++ b/src/lib/krb425/mk_priv.c @@ -31,7 +31,9 @@ static char rcsid_mk_priv_c[] = #endif /* !lint & !SABER */ #include "krb425.h" +#ifndef hpux #include +#endif long krb_mk_priv(in, out, in_length, sched, key, sender, receiver) diff --git a/src/lib/krb425/mk_safe.c b/src/lib/krb425/mk_safe.c index 45748f055..53e5deb5f 100644 --- a/src/lib/krb425/mk_safe.c +++ b/src/lib/krb425/mk_safe.c @@ -31,7 +31,9 @@ static char rcsid_mk_safe_c[] = #endif /* !lint & !SABER */ #include "krb425.h" +#ifndef hpux #include +#endif long krb_mk_safe(in, out, in_length, key, sender, receiver) diff --git a/src/lib/krb425/rd_priv.c b/src/lib/krb425/rd_priv.c index f402b6f2b..4c58abd0a 100644 --- a/src/lib/krb425/rd_priv.c +++ b/src/lib/krb425/rd_priv.c @@ -31,7 +31,9 @@ static char rcsid_rd_priv_c[] = #endif /* !lint & !SABER */ #include "krb425.h" +#ifndef hpux #include +#endif long krb_rd_priv(in, in_length, sched, key, sender, receiver, msg) diff --git a/src/lib/krb425/rd_safe.c b/src/lib/krb425/rd_safe.c index 9ee0221bc..4cfb00331 100644 --- a/src/lib/krb425/rd_safe.c +++ b/src/lib/krb425/rd_safe.c @@ -31,7 +31,9 @@ static char rcsid_rd_safe_c[] = #endif /* !lint & !SABER */ #include "krb425.h" +#ifndef hpux #include +#endif long krb_rd_safe(in, in_length, key, sender, receiver, msg) diff --git a/src/lib/krb425/sendauth.c b/src/lib/krb425/sendauth.c index eaaf1f84d..1cac41ea5 100644 --- a/src/lib/krb425/sendauth.c +++ b/src/lib/krb425/sendauth.c @@ -35,7 +35,7 @@ static char rcsid_sendauth_c[] = #include #include #include -#include +#include #define KRB_SENDAUTH_VERS "AUTHV0.1" /* MUST be KRB_SENDAUTH_VLEN chars */ /* -- 2.26.2