From 46061e96280c16574bd419c72acece12241cff2e Mon Sep 17 00:00:00 2001 From: markm Date: Sun, 9 Jan 2000 08:59:39 +0000 Subject: [PATCH] Update for KTH Kerberos (eBones) v1.0 --- kerberosIV/include/config.h | 144 +++++++++++++++++++++++++++---- kerberosIV/include/roken.h | 134 +++++++++++++++++++++------- kerberosIV/include/version.h | 6 +- kerberosIV/lib/libacl/Makefile | 2 + kerberosIV/lib/libkadm/Makefile | 2 + kerberosIV/lib/libkafs/Makefile | 2 +- kerberosIV/lib/libkrb/Makefile | 41 ++++----- kerberosIV/lib/libroken/Makefile | 7 +- 8 files changed, 265 insertions(+), 73 deletions(-) diff --git a/kerberosIV/include/config.h b/kerberosIV/include/config.h index 200dced88c0e..79676b766b0d 100644 --- a/kerberosIV/include/config.h +++ b/kerberosIV/include/config.h @@ -75,16 +75,16 @@ /* #undef WORDS_BIGENDIAN */ /* Define if the X Window System is missing or not being used. */ -/* #undef X_DISPLAY_MISSING */ +#define X_DISPLAY_MISSING 1 /* Define if you have the XauFileName function. */ -#define HAVE_XAUFILENAME 1 +/* #undef HAVE_XAUFILENAME */ /* Define if you have the XauReadAuth function. */ -#define HAVE_XAUREADAUTH 1 +/* #undef HAVE_XAUREADAUTH */ /* Define if you have the XauWriteAuth function. */ -#define HAVE_XAUWRITEAUTH 1 +/* #undef HAVE_XAUWRITEAUTH */ /* Define if you have the _getpty function. */ /* #undef HAVE__GETPTY */ @@ -107,12 +107,21 @@ /* Define if you have the atexit function. */ #define HAVE_ATEXIT 1 +/* Define if you have the cap_set_proc function. */ +/* #undef HAVE_CAP_SET_PROC */ + +/* Define if you have the cgetent function. */ +#define HAVE_CGETENT 1 + /* Define if you have the chown function. */ #define HAVE_CHOWN 1 /* Define if you have the chroot function. */ #define HAVE_CHROOT 1 +/* Define if you have the copyhostent function. */ +/* #undef HAVE_COPYHOSTENT */ + /* Define if you have the crypt function. */ #define HAVE_CRYPT 1 @@ -155,6 +164,9 @@ /* Define if you have the forkpty function. */ #define HAVE_FORKPTY 1 +/* Define if you have the freehostent function. */ +#define HAVE_FREEHOSTENT 1 + /* Define if you have the frevoke function. */ /* #undef HAVE_FREVOKE */ @@ -182,6 +194,12 @@ /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 +/* Define if you have the getipnodebyaddr function. */ +#define HAVE_GETIPNODEBYADDR 1 + +/* Define if you have the getipnodebyname function. */ +#define HAVE_GETIPNODEBYNAME 1 + /* Define if you have the getlogin function. */ #define HAVE_GETLOGIN 1 @@ -212,9 +230,6 @@ /* Define if you have the getspnam function. */ /* #undef HAVE_GETSPNAM */ -/* Define if you have the getspuid function. */ -/* #undef HAVE_GETSPUID */ - /* Define if you have the gettimeofday function. */ #define HAVE_GETTIMEOFDAY 1 @@ -239,6 +254,12 @@ /* Define if you have the inet_aton function. */ #define HAVE_INET_ATON 1 +/* Define if you have the inet_ntop function. */ +#define HAVE_INET_NTOP 1 + +/* Define if you have the inet_pton function. */ +#define HAVE_INET_PTON 1 + /* Define if you have the initgroups function. */ #define HAVE_INITGROUPS 1 @@ -296,12 +317,21 @@ /* Define if you have the readv function. */ #define HAVE_READV 1 +/* Define if you have the recvmsg function. */ +#define HAVE_RECVMSG 1 + /* Define if you have the res_search function. */ #define HAVE_RES_SEARCH 1 /* Define if you have the revoke function. */ #define HAVE_REVOKE 1 +/* Define if you have the sa_family_t function. */ +#define HAVE_SA_FAMILY_T 1 + +/* Define if you have the sendmsg function. */ +#define HAVE_SENDMSG 1 + /* Define if you have the setegid function. */ #define HAVE_SETEGID 1 @@ -374,6 +404,12 @@ /* Define if you have the strftime function. */ #define HAVE_STRFTIME 1 +/* Define if you have the strlcat function. */ +#define HAVE_STRLCAT 1 + +/* Define if you have the strlcpy function. */ +#define HAVE_STRLCPY 1 + /* Define if you have the strlwr function. */ /* #undef HAVE_STRLWR */ @@ -386,12 +422,18 @@ /* Define if you have the strnlen function. */ /* #undef HAVE_STRNLEN */ +/* Define if you have the strptime function. */ +#define HAVE_STRPTIME 1 + /* Define if you have the strsep function. */ #define HAVE_STRSEP 1 /* Define if you have the strtok_r function. */ #define HAVE_STRTOK_R 1 +/* Define if you have the struct_sockaddr_storage function. */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + /* Define if you have the strupr function. */ /* #undef HAVE_STRUPR */ @@ -768,7 +810,7 @@ /* #undef HAVE_LIBX11 */ /* Define if you have the Xau library (-lXau). */ -#define HAVE_LIBXAU 1 +/* #undef HAVE_LIBXAU */ /* Define if you have the c_r library (-lc_r). */ /* #undef HAVE_LIBC_R */ @@ -822,7 +864,7 @@ #define PACKAGE "krb4" /* Version number of package */ -#define VERSION "0.10pre3" +#define VERSION "1.0" /* Define to what version of SunOS you are running. */ /* #undef SunOS */ @@ -847,10 +889,10 @@ /* #undef DB_DIR */ /* Define to enable new master key code. */ -#define RANDOM_MKEY 1 +/* #undef RANDOM_MKEY */ /* Define this to the location of the master key. */ -#define MKEYFILE "file" +/* #undef MKEYFILE */ /* Define to enable basic OSF C2 support. */ /* #undef HAVE_OSFC2 */ @@ -859,7 +901,7 @@ /* #undef NO_MMAP */ /* Define if you don't wan't support for AFS. */ -#define NO_AFS 1 +/* #undef NO_AFS */ /* Set this to the type of des-quad-cheksum to use. */ #define DES_QUAD_DEFAULT DES_QUAD_GUESS @@ -978,16 +1020,16 @@ /* #undef HAVE___PROGNAME_DECLARATION */ /* define if your system declares optarg */ -/* #undef HAVE_OPTARG_DECLARATION */ +#define HAVE_OPTARG_DECLARATION 1 /* define if your system declares optind */ -/* #undef HAVE_OPTIND_DECLARATION */ +#define HAVE_OPTIND_DECLARATION 1 /* define if your system declares opterr */ -/* #undef HAVE_OPTERR_DECLARATION */ +#define HAVE_OPTERR_DECLARATION 1 /* define if your system declares optopt */ -/* #undef HAVE_OPTOPT_DECLARATION */ +#define HAVE_OPTOPT_DECLARATION 1 /* define if your system declares environ */ /* #undef HAVE_ENVIRON_DECLARATION */ @@ -1019,6 +1061,18 @@ /* Define if struct utmpx has field ut_syslen. */ /* #undef HAVE_STRUCT_UTMPX_UT_SYSLEN */ +/* Define if struct tm has field tm_gmtoff. */ +#define HAVE_STRUCT_TM_TM_GMTOFF 1 + +/* Define if struct tm has field tm_zone. */ +#define HAVE_STRUCT_TM_TM_ZONE 1 + +/* define if you have timezone */ +#define HAVE_TIMEZONE 1 + +/* define if your system declares timezone */ +#define HAVE_TIMEZONE_DECLARATION 1 + /* define if you have struct spwd */ /* #undef HAVE_STRUCT_SPWD */ @@ -1072,6 +1126,8 @@ #define HAVE_KRB_DISABLE_DEBUG 1 +#define HAVE_KRB_GET_OUR_IP_FOR_REALM 1 + #define RCSID(msg) \ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } @@ -1081,6 +1137,13 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } */ #define ORGANIZATION "FreeBSD Inc." +#if 0 +#define BINDIR "/usr/bin" +#define LIBDIR "/usr/lib" +#define LIBEXECDIR "/usr/libexec" +#define SBINDIR "/usr/sbin" +#endif + #if 0 #define KRB_CNF_FILES { "/etc/krb.conf", "/etc/kerberosIV/krb.conf", 0} #define KRB_RLM_FILES { "/etc/krb.realms", "/etc/kerberosIV/krb.realms", 0} @@ -1102,6 +1165,55 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } #define MaxHostNameLen (64+4) #define MaxPathLen (1024+4) +/* ftp stuff -------------------------------------------------- */ + +#define KERBEROS + +/* telnet stuff ----------------------------------------------- */ + +/* define this for OTP support */ +/* #undef OTP */ + +/* define this if you have kerberos 4 */ +#define KRB4 1 + +/* define this if you want encryption */ +#define ENCRYPTION 1 + +/* define this if you want authentication */ +#define AUTHENTICATION 1 + +#if defined(ENCRYPTION) && !defined(AUTHENTICATION) +#define AUTHENTICATION 1 +#endif + +/* Set this if you want des encryption */ +#define DES_ENCRYPTION 1 + +/* Set this to the default system lead string for telnetd + * can contain %-escapes: %s=sysname, %m=machine, %r=os-release + * %v=os-version, %t=tty, %h=hostname, %d=date and time + */ +/* #undef USE_IM */ + +/* define this if you want diagnostics in telnetd */ +#define DIAGNOSTICS 1 + +/* define this if you want support for broken ENV_{VALUE,VAR} systems */ +/* #undef ENV_HACK */ + +/* */ +#define OLD_ENVIRON 1 + +/* Used with login -p */ +/* #undef LOGIN_ARGS */ + +/* set this to a sensible login */ +#ifndef LOGIN_PATH +#define LOGIN_PATH BINDIR "/login" +#endif + + /* ------------------------------------------------------------ */ #ifdef BROKEN_REALLOC diff --git a/kerberosIV/include/roken.h b/kerberosIV/include/roken.h index 851f006100e0..e9bbff883ae9 100755 --- a/kerberosIV/include/roken.h +++ b/kerberosIV/include/roken.h @@ -21,12 +21,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Kungliga Tekniska - * Högskolan and its contributors. - * - * 4. Neither the name of the Institute nor the names of its contributors + * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -43,62 +38,139 @@ * SUCH DAMAGE. */ -/* $Id: roken.h.in,v 1.113.2.1 1999/07/22 03:20:59 assar Exp $ */ +/* $Id: roken.h.in,v 1.125 1999/12/02 16:58:52 joda Exp $ */ /* $FreeBSD$ */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include +#include #include -#include -#include -#include +#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include -#include + #define ROKEN_LIB_FUNCTION #include -int strcpy_truncate (char *dst, const char *src, size_t dst_sz); -int strcat_truncate (char *dst, const char *src, size_t dst_sz); -struct passwd *k_getpwnam (char *user); + + + + + + + + +int asnprintf (char **ret, size_t max_sz, const char *format, ...) + __attribute__ ((format (printf, 3, 4))); + +int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap) + __attribute__((format (printf, 3, 0))); + + +char * strndup(const char *old, size_t sz); + +char * strlwr(char *); + +size_t strnlen(const char*, size_t); + + + + + +char * strupr(char *); + + + + + + + + + + + +#include +struct passwd *k_getpwnam (const char *user); struct passwd *k_getpwuid (uid_t uid); const char *get_default_username (void); + + + + + + + + + + + + + + + + + + + time_t tm2time (struct tm tm, int local); + int unix_verify_user(char *user, char *password); + void inaddr2str(struct in_addr addr, char *s, size_t len); + void mini_inetd (int port); + int roken_concat (char *s, size_t len, ...); + size_t roken_mconcat (char **s, size_t max_len, ...); + int roken_vconcat (char *s, size_t len, va_list args); + size_t roken_vmconcat (char **s, size_t max_len, va_list args); + ssize_t net_write (int fd, const void *buf, size_t nbytes); + ssize_t net_read (int fd, void *buf, size_t nbytes); + int issuid(void); + + int get_window_size(int fd, struct winsize *); -extern char *optarg; -extern int optind; -extern int opterr; + + + extern const char *__progname; + extern char **environ; + + + +struct hostent * +copyhostent (const struct hostent *h); + + /* * kludges and such */ diff --git a/kerberosIV/include/version.h b/kerberosIV/include/version.h index 5127bc9497cc..b204605c6663 100644 --- a/kerberosIV/include/version.h +++ b/kerberosIV/include/version.h @@ -1,3 +1,5 @@ /* $FreeBSD$ */ -char *krb4_long_version = "@(#)$Version: krb4-0.10pre3 by root on greenpeace.grondar.za (i386-unknown-freebsd4.0) Wed Aug 18 19:04:21 SAST 1999 $"; -char *krb4_version = "krb4-0.10pre3"; +char *krb4_long_version = "@(#)$Version: krb4-1.0 by root on greenpeace.grondar.za (i386-unknown-freebsd4.0) Sat Jan 8 19:34:57 SAST 2000 $"; +char *krb4_version = "krb4-1.0"; +char *heimdal_long_version = "@(#)$Version: heimdal-0.1l by root on greenpeace.grondar.za (i386-unknown-freebsd4.0) Sat Jan 8 20:56:02 SAST 2000 $"; +char *heimdal_version = "heimdal-0.1l"; diff --git a/kerberosIV/lib/libacl/Makefile b/kerberosIV/lib/libacl/Makefile index 3710b2f26354..c657f092f9da 100644 --- a/kerberosIV/lib/libacl/Makefile +++ b/kerberosIV/lib/libacl/Makefile @@ -20,3 +20,5 @@ INCLUDES= ${KRB4DIR}/lib/acl/acl.h .include .PATH: ${KRB4DIR}/lib/acl + +CLEANFILES+= protos.h diff --git a/kerberosIV/lib/libkadm/Makefile b/kerberosIV/lib/libkadm/Makefile index 819fab8dacc7..b868be25a4ce 100644 --- a/kerberosIV/lib/libkadm/Makefile +++ b/kerberosIV/lib/libkadm/Makefile @@ -19,3 +19,5 @@ INCLUDES= ${KRB4DIR}/lib/kadm/kadm.h ${KADMOBJDIR}/kadm_err.h .include .PATH: ${KRB4DIR}/lib/kadm + +CLEANFILES+= protos.h diff --git a/kerberosIV/lib/libkafs/Makefile b/kerberosIV/lib/libkafs/Makefile index 368e80b76292..95e43808897b 100644 --- a/kerberosIV/lib/libkafs/Makefile +++ b/kerberosIV/lib/libkafs/Makefile @@ -7,7 +7,7 @@ CFLAGS+= -I${KRB4DIR}/include \ -I${KRB4DIR}/lib/krb \ -I${KRB4DIR}/lib/kafs SRCS= afssys.c afskrb.c common.c issuid.c \ - strcpy_truncate.c strcat_truncate.c + strlcpy.c strlcat.c MAN3= ${KRB4DIR}/man/kafs.3 MLINKS= kafs.3 k_hasafs.3 kafs.3 k_afsklog.3 kafs.3 k_afsklog_uid.3 \ kafs.3 k_pioctl.3 kafs.3 k_unlog.3 kafs.3 k_setpag.3 \ diff --git a/kerberosIV/lib/libkrb/Makefile b/kerberosIV/lib/libkrb/Makefile index 1d547a997e77..d173381602ed 100644 --- a/kerberosIV/lib/libkrb/Makefile +++ b/kerberosIV/lib/libkrb/Makefile @@ -9,26 +9,27 @@ CFLAGS+= -I${KRB4DIR}/include \ -I${.OBJDIR} DPADD+= ${LIBCRYPT} LDADD+= -lcrypt -SRCS= check_time.c cr_err_reply.c create_auth_reply.c create_ciph.c \ - create_death_packet.c create_ticket.c debug_decl.c \ - decomp_ticket.c dest_tkt.c encrypt_ktext.c extra.c \ - get_ad_tkt.c getfile.c get_cred.c get_default_principal.c \ - get_host.c get_in_tkt.c get_krbrlm.c get_svc_in_tkt.c \ - get_tf_fullname.c get_tf_realm.c getaddrs.c getrealm.c getst.c \ - k_getport.c k_getsockinst.c k_localtime.c kdc_reply.c kntoln.c \ - krb_check_auth.c krb_equiv.c krb_err_txt.c \ - krb_get_in_tkt.c kuserok.c lifetime.c logging.c \ - lsb_addr_comp.c mk_auth.c mk_err.c mk_priv.c mk_req.c \ - mk_safe.c month_sname.c name2name.c krb_net_read.c \ - krb_net_write.c one.c parse_name.c rd_err.c rd_priv.c rd_req.c \ - rd_safe.c read_service_key.c realm_parse.c recvauth.c rw.c \ - save_credentials.c send_to_kdc.c sendauth.c solaris_compat.c \ - stime.c str2key.c tf_util.c time.c tkt_string.c unparse_name.c \ - verify_user.c base64.c concat.c flock.c gethostname.c \ - gettimeofday.c getuid.c net_read.c net_write.c resolve.c \ - snprintf.c strcasecmp.c strcat_truncate.c strcpy_truncate.c \ - strdup.c strncasecmp.c strnlen.c strtok_r.c swab.c \ - ${KRBOBJDIR}/krb_err.c ${KRBOBJDIR}/krb_err.h protos.h +SRCS= check_time.c cr_err_reply.c create_auth_reply.c \ + create_ciph.c create_death_packet.c create_ticket.c \ + debug_decl.c decomp_ticket.c defaults.c dest_tkt.c \ + encrypt_ktext.c extra.c get_ad_tkt.c getfile.c get_cred.c \ + get_default_principal.c get_host.c get_in_tkt.c get_krbrlm.c \ + get_svc_in_tkt.c get_tf_fullname.c get_tf_realm.c getaddrs.c \ + getrealm.c getst.c k_getport.c k_getsockinst.c k_localtime.c \ + kdc_reply.c kntoln.c krb_check_auth.c krb_equiv.c \ + krb_err_txt.c krb_get_in_tkt.c kuserok.c lifetime.c \ + logging.c lsb_addr_comp.c mk_auth.c mk_err.c mk_priv.c \ + mk_req.c mk_safe.c month_sname.c name2name.c krb_net_read.c \ + krb_net_write.c one.c parse_name.c rd_err.c rd_priv.c \ + rd_req.c rd_safe.c read_service_key.c realm_parse.c \ + recvauth.c rw.c save_credentials.c send_to_kdc.c sendauth.c \ + solaris_compat.c stime.c str2key.c tf_util.c time.c \ + tkt_string.c unparse_name.c verify_user.c krb_ip_realm.c \ + base64.c concat.c flock.c gethostname.c gettimeofday.c \ + getuid.c net_read.c net_write.c resolve.c snprintf.c \ + strcasecmp.c strlcat.c strlcpy.c strdup.c strncasecmp.c \ + strnlen.c strtok_r.c swab.c ${KRBOBJDIR}/krb_err.c \ + ${KRBOBJDIR}/krb_err.h protos.h MAN3= ${KRB4DIR}/man/kerberos.3 \ ${KRB4DIR}/man/krb_realmofhost.3 \ ${KRB4DIR}/man/krb_sendauth.3 \ diff --git a/kerberosIV/lib/libroken/Makefile b/kerberosIV/lib/libroken/Makefile index 2cc2de6857e0..10ced7e5b369 100644 --- a/kerberosIV/lib/libroken/Makefile +++ b/kerberosIV/lib/libroken/Makefile @@ -9,9 +9,10 @@ SRCS= base64.c concat.c emalloc.c eread.c erealloc.c estrdup.c \ ewrite.c get_default_username.c get_window_size.c getarg.c \ inaddr2str.c issuid.c k_getpwnam.c k_getpwuid.c mini_inetd.c \ net_read.c net_write.c parse_time.c parse_units.c \ - print_version.c resolve.c roken_gethostby.c warnerr.c \ - strcat_truncate.c strcpy_truncate.c signal.c simple_exec.c \ - strupr.c tm2time.c print_version.h + print_version.c resolve.c roken_gethostby.c signal.c \ + simple_exec.c snprintf.c socket.c tm2time.c verify.c \ + warnerr.c copyhostent.c strlwr.c strndup.c strnlen.c \ + strupr.c print_version.h NOPIC= yes install: