From owner-freebsd-alpha Wed Jul 8 15:15:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA07573 for freebsd-alpha-outgoing; Wed, 8 Jul 1998 15:15:50 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from mixer.visi.com (root@mixer.visi.com [209.98.98.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA07530 for ; Wed, 8 Jul 1998 15:15:40 -0700 (PDT) (envelope-from nordquis@visi.com) Received: from bambi.visi.com (nordquis@bambi.visi.com [209.98.98.24]) by mixer.visi.com (8.8.8/8.7.5) with ESMTP id RAA16845 for ; Wed, 8 Jul 1998 17:15:37 -0500 (CDT) Received: (from nordquis@localhost) by bambi.visi.com (8.8.5/8.6.12) id RAA26145 for freebsd-alpha@freebsd.org; Wed, 8 Jul 1998 17:15:36 -0500 (CDT) Posted-Date: Wed, 8 Jul 1998 17:15:36 -0500 (CDT) Message-Id: <199807082215.RAA26145@bambi.visi.com> Subject: ELF and Alpha conflict (lib/libc/nlist.c) To: freebsd-alpha@FreeBSD.ORG Date: Wed, 8 Jul 1998 17:15:35 -0500 (CDT) From: "Brent J. Nordquist" Reply-to: "Brent J. Nordquist" X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org My bootstrap buildworld stopped in lib/libc/nlist.c, throughout which Elf32_* structs are sprinkled liberally. I hacked around it by #define'ing them to their Elf64_* equivalents in sys/alpha/elf.h (ick). Has anyone raised this issue with the ELFmeisters? It seems like all code should use something like Elf_* structs that are mapped to Elf32_* or Elf64_* depending on platform. -- Brent J. Nordquist / bjn@visi.com W: +1 612 905-7806 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message From owner-freebsd-alpha Wed Jul 8 16:24:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA15260 for freebsd-alpha-outgoing; Wed, 8 Jul 1998 16:24:31 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA15245 for ; Wed, 8 Jul 1998 16:24:28 -0700 (PDT) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.8.8/8.8.7) id JAA24415; Thu, 9 Jul 1998 09:38:04 +1000 (EST) (envelope-from jb) From: John Birrell Message-Id: <199807082338.JAA24415@cimlogic.com.au> Subject: Re: ELF and Alpha conflict (lib/libc/nlist.c) In-Reply-To: <199807082215.RAA26145@bambi.visi.com> from "Brent J. Nordquist" at "Jul 8, 98 05:15:35 pm" To: bjn@visi.com Date: Thu, 9 Jul 1998 09:38:04 +1000 (EST) Cc: freebsd-alpha@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brent J. Nordquist wrote: > My bootstrap buildworld stopped in lib/libc/nlist.c, throughout > which Elf32_* structs are sprinkled liberally. I hacked around it by > #define'ing them to their Elf64_* equivalents in sys/alpha/elf.h (ick). > > Has anyone raised this issue with the ELFmeisters? It seems like all > code should use something like Elf_* structs that are mapped to Elf32_* > or Elf64_* depending on platform. I have a version with the 64 bit code in the same style as the rest of the file. I haven't committed this because I don't think it is a clean solution. NetBSD has a far cleaner way of dealing with the similarities or 32 and 64 bit elf without duplicating code. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/ CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message From owner-freebsd-alpha Thu Jul 9 05:29:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA07531 for freebsd-alpha-outgoing; Thu, 9 Jul 1998 05:29:15 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from mixer.visi.com (root@mixer.visi.com [209.98.98.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA07526 for ; Thu, 9 Jul 1998 05:29:14 -0700 (PDT) (envelope-from nordquis@visi.com) Received: from bambi.visi.com (nordquis@bambi.visi.com [209.98.98.24]) by mixer.visi.com (8.8.8/8.7.5) with ESMTP id HAA21439 for ; Thu, 9 Jul 1998 07:29:12 -0500 (CDT) Received: (from nordquis@localhost) by bambi.visi.com (8.8.5/8.6.12) id HAA09093 for freebsd-alpha@freebsd.org; Thu, 9 Jul 1998 07:29:11 -0500 (CDT) Posted-Date: Thu, 9 Jul 1998 07:29:11 -0500 (CDT) Message-Id: <199807091229.HAA09093@bambi.visi.com> Subject: Alpha patch for lib/libc/net/res_query.c To: freebsd-alpha@FreeBSD.ORG Date: Thu, 9 Jul 1998 07:29:11 -0500 (CDT) From: "Brent J. Nordquist" Reply-to: "Brent J. Nordquist" X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Here's a patch for the only thing that got between me and "Building everything.." -- it seems to be in line with the method used in lib/libc/gen/glob.c e.g. This is great! Thanks everyone (especially John B.) for the work put in to date, and getting me up and running. On to plunder! Index: lib/libc/net/res_query.c =================================================================== RCS file: /var/cvs/src/lib/libc/net/res_query.c,v retrieving revision 1.16 diff -u -r1.16 res_query.c --- res_query.c 1998/06/11 09:03:00 1.16 +++ res_query.c 1998/07/09 01:24:22 @@ -379,7 +379,12 @@ if (_res.options & RES_NOALIASES) return (NULL); +#ifdef __NETBSD_SYSCALLS + /* XXX issetguid() would be better here, but we don't have that. */ + if (getuid() != geteuid() || getgid() != getegid()) +#else if (issetugid()) +#endif return (NULL); file = getenv("HOSTALIASES"); if (file == NULL || (fp = fopen(file, "r")) == NULL) -- Brent J. Nordquist / bjn@visi.com W: +1 612 905-7806 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message From owner-freebsd-alpha Thu Jul 9 21:26:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA17304 for freebsd-alpha-outgoing; Thu, 9 Jul 1998 21:26:50 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from mixer.visi.com (root@mixer.visi.com [209.98.98.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA17299 for ; Thu, 9 Jul 1998 21:26:49 -0700 (PDT) (envelope-from nordquis@visi.com) Received: from thumper.visi.com (nordquis@thumper.visi.com [209.98.98.3]) by mixer.visi.com (8.8.8/8.7.5) with ESMTP id XAA21481 for ; Thu, 9 Jul 1998 23:26:46 -0500 (CDT) Posted-Date: Thu, 9 Jul 1998 23:26:46 -0500 (CDT) Received: (from nordquis@localhost) by thumper.visi.com (8.8.5/8.8.8) id XAA27506 for freebsd-alpha@freebsd.org; Thu, 9 Jul 1998 23:26:45 -0500 (CDT) Message-Id: <199807100426.XAA27506@thumper.visi.com> Subject: Alpha S/Key fixed/verified To: freebsd-alpha@FreeBSD.ORG Date: Thu, 9 Jul 1998 23:26:44 -0500 (CDT) From: "Brent J. Nordquist" Reply-to: "Brent J. Nordquist" X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I have fixed/verified the following: lib/libmd ? [MD4 and MD5 seem to work] lib/libskey Green usr.bin/key Green usr.bin/keyinfo Green [bright green--it's a perl script :-)] usr.bin/keyinit Green I've tested the S/Key tools, verified that they're interoperable with the i386 ones (see below), and verified that S/Key authentication works in su. (I expect login and ftpd to work also; on the list for tomorrow.) Enclosed are the following: (1) A patch to lib/libskey/skeysubr.c -- u_long was used to select a 32-bit quantity, which breaks on the Alpha. I'm sure we're going to see a lot of these. Do we have an agreed-on method of handling them? (Is there a type that's mapped to 32 bits on all systems, or are we just going to use unsigned int as that type?) If there's a type that should be used, then this patch should change. (2) A patch to usr.bin/keyinit/skeyinit.c -- FreeBSD's gethostname() will give you as many characters as it can, given the limit of the passed buffer. NetBSD's gethostname() returns -1 if the full name won't fit. This patch solves the problem, and seems like a good idea in general, apart from the Alpha effort (it's much more consistent with how gethostname() is handled in su, login, etc.). (3) A patch to usr.bin/su/Makefile -- was missing -lmd after -lskey (non-Alpha-specific, but tripped us up:) (4) A patch to lib/libskey/Makefile -- is the comment below because of the MD4 unresolved links, above? MD5 was probably being found in -lcrypt, and that's why it worked whereas MD4 needed -lmd. revision 1.12 date: 1998/05/11 09:15:03; author: jb; state: Exp; lines: +6 -1 [...] And for some reason, alpha needs MD5. Find that out later! I changed the Makefile back to use MD4 like i386 does, and ended up with a set of key* tools that are interoperable with my i386 box. I think this is a desirable goal. Index: lib/libskey/skeysubr.c =================================================================== RCS file: /var/cvs/src/lib/libskey/skeysubr.c,v retrieving revision 1.8 diff -u -r1.8 skeysubr.c --- skeysubr.c 1998/02/27 22:36:51 1.8 +++ skeysubr.c 1998/07/10 03:18:39 @@ -21,7 +21,7 @@ { char *buf; MDX_CTX md; - u_long results[4]; + unsigned int results[4]; unsigned int buflen; buflen = strlen(seed) + strlen(passwd); @@ -51,7 +51,7 @@ char *x; { MDX_CTX md; - u_long results[4]; + unsigned int results[4]; MDXInit(&md); MDXUpdate(&md,(unsigned char *)x,8); Index: usr.bin/keyinit/skeyinit.c =================================================================== RCS file: /var/cvs/src/usr.bin/keyinit/skeyinit.c,v retrieving revision 1.7 diff -u -r1.7 skeyinit.c --- skeyinit.c 1997/07/17 06:42:26 1.7 +++ skeyinit.c 1998/07/10 03:43:17 @@ -1,6 +1,8 @@ /* change password or add user to S/KEY authentication system. * S/KEY is a tradmark of Bellcore */ +#include + #include #include #include @@ -24,7 +26,7 @@ char seed[18],tmp[80],key[8]; struct passwd *ppuser,*pp; char defaultseed[17], passwd[256],passwd2[256] ; - + char localhost[MAXHOSTNAMELEN]; time_t now; struct tm *tm; @@ -39,8 +41,10 @@ #else sprintf(tbuf, "%05ld", (long) (now % 100000)); #endif - gethostname(defaultseed,NAMELEN); - strcpy(&defaultseed[NAMELEN],tbuf); + gethostname(localhost,sizeof(localhost)); + strncpy(defaultseed,localhost,NAMELEN); + defaultseed[NAMELEN] = '\0'; + strcat(defaultseed,tbuf); pp = ppuser = getpwuid(getuid()); strcpy(me,pp->pw_name); Index: usr.bin/su/Makefile =================================================================== RCS file: /var/cvs/src/usr.bin/su/Makefile,v retrieving revision 1.15 diff -u -r1.15 Makefile --- Makefile 1997/09/28 09:02:15 1.15 +++ Makefile 1998/07/10 03:48:23 @@ -10,7 +10,7 @@ .if !defined(LC_AUTH) COPTS+= -DSKEY -LDADD+= -lskey -lcrypt +LDADD+= -lskey -lmd -lcrypt DPADD+= ${LIBSKEY} ${LIBCRYPT} .endif Index: lib/libskey/Makefile =================================================================== RCS file: /var/cvs/src/lib/libskey/Makefile,v retrieving revision 1.12 diff -u -r1.12 Makefile --- Makefile 1998/05/11 09:15:03 1.12 +++ Makefile 1998/07/10 04:10:55 @@ -13,8 +13,6 @@ CFLAGS+=-W -Wall .if ${MACHINE_ARCH} == "i386" CFLAGS+=-Werror -.else -CFLAGS+=-DMD5 .endif .if ${BINFORMAT} == elf -- Brent J. Nordquist / bjn@visi.com W: +1 612 905-7806 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message From owner-freebsd-alpha Thu Jul 9 23:14:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA26358 for freebsd-alpha-outgoing; Thu, 9 Jul 1998 23:14:39 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from diablo.OntheNet.com.au (diablo.OntheNet.com.au [203.10.89.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA26351 for ; Thu, 9 Jul 1998 23:14:36 -0700 (PDT) (envelope-from tonyg@OntheNet.com.au) Received: from OntheNet.com.au (swanee.nt.com.au [203.14.201.3]) by diablo.OntheNet.com.au (8.9.1/8.9.1) with ESMTP id QAA16143; Fri, 10 Jul 1998 16:14:27 +1000 (EST) Message-ID: <35A5AF6D.4D1BED1B@OntheNet.com.au> Date: Fri, 10 Jul 1998 16:06:37 +1000 From: Tony Griffiths Reply-To: tonyg@OntheNet.com.au Organization: On the Net (ISP on the Gold Coast, Australia) X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: "Brent J. Nordquist" CC: freebsd-alpha@FreeBSD.ORG Subject: Re: Alpha S/Key fixed/verified References: <199807100426.XAA27506@thumper.visi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brent J. Nordquist wrote: > [snip] > (1) A patch to lib/libskey/skeysubr.c -- u_long was used to select a > 32-bit quantity, which breaks on the Alpha. I'm sure we're going to > see a lot of these. Do we have an agreed-on method of handling them? > (Is there a type that's mapped to 32 bits on all systems, or are we just > going to use unsigned int as that type?) If there's a type that should > be used, then this patch should change. In file "/usr/include/machine/types.h" you will find the definitions of the u_int{8,16,32,64] and int{8,16,32,64} typedefs. Obviously Alpha will have a _slightly_ different definition for u_int64 and int64 but you should be guaranteed the bit size on both architectures! Tony To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message From owner-freebsd-alpha Fri Jul 10 00:51:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA04763 for freebsd-alpha-outgoing; Fri, 10 Jul 1998 00:51:31 -0700 (PDT) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA04758 for ; Fri, 10 Jul 1998 00:51:28 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by nlsystems.com (8.8.8/8.8.5) with SMTP id IAA15515; Fri, 10 Jul 1998 08:53:05 +0100 (BST) Date: Fri, 10 Jul 1998 08:53:05 +0100 (BST) From: Doug Rabson Reply-To: Doug Rabson To: "Brent J. Nordquist" cc: freebsd-alpha@FreeBSD.ORG Subject: Re: Alpha S/Key fixed/verified In-Reply-To: <199807100426.XAA27506@thumper.visi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 9 Jul 1998, Brent J. Nordquist wrote: > I have fixed/verified the following: > > lib/libmd ? [MD4 and MD5 seem to work] > lib/libskey Green > usr.bin/key Green > usr.bin/keyinfo Green [bright green--it's a perl script :-)] > usr.bin/keyinit Green > > I've tested the S/Key tools, verified that they're interoperable with the > i386 ones (see below), and verified that S/Key authentication works in su. > (I expect login and ftpd to work also; on the list for tomorrow.) Thanks a lot for your help. I am making rapid progress on the kernel here and expect to have it stable enough to build its own kernel Real Soon Now. It already boots on my AlphaPC 164LX with working ncr and de drivers. > > Enclosed are the following: > > (1) A patch to lib/libskey/skeysubr.c -- u_long was used to select a > 32-bit quantity, which breaks on the Alpha. I'm sure we're going to > see a lot of these. Do we have an agreed-on method of handling them? > (Is there a type that's mapped to 32 bits on all systems, or are we just > going to use unsigned int as that type?) If there's a type that should > be used, then this patch should change. I think the right thing is to use u_int32_t for unsigned 32bit types and int32_t for signed. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message