diff options
30 files changed, 1370 insertions, 188 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 2e367d2dc7..c8c154f557 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -38,8 +38,8 @@ Person: Cliff Brake Mail: cbrake@bec-systems.com Website: http://bec-systems.com Interests: Support in OE for single board computers, web application support -Machines: cm-x270, logicpd-pxa270, em-x270, gesbc-9302 -Recipes: mono argtable vala +Machines: cm-x270, em-x270, gesbc-9302 +Recipes: mono, argtable, vala, socketcan Person: Erik Hovland Mail: erik@hovland.org @@ -255,6 +255,16 @@ Person: Takashi Nemoto Mail: tnemoto@sourceforge.jp Recipes: mkbold-mkitalic +Person: Tim Ellis +Mail: tim.ellis@foonas.org +Interests: NAS +Distros: Ångström, foonas +Machines: dns323, kuropro, lsmipsel, lspro, lsppchd, lsppchg +Machines: mv2120, n2100, tsx09 +Recipes: avr-evtd, bftpd, iscsi-target, jfsutils, hddtemp, krb5 +Recipes: linux-linkstationppc, linux-n1200, linux-orion, micro-evtd +Recipes: netatalk, piccontrol, p910nd, samba, temper, transmission + Person: Tim Sander Mail: oe@iss.tu-darmstadt.de Receipes: fxload diff --git a/conf/checksums.ini b/conf/checksums.ini index 6abcf5a75f..e75900d7dd 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -122,6 +122,10 @@ sha256=771206f2b7a916ce0dfb93d82200472beaeb910248482734179bf36808e486b1 md5=86d95ee16854a5503dc9f86a2f2ffa83 sha256=8750d58745e57654820aa9359891cb0d875d804dbfcfa2e1bb95c56531e423d1 +[http://coherence.beebits.net/download/Coherence-0.6.0.tar.gz] +md5=3180cf36a7bc401aefb236f4b5dbf14e +sha256=2aa1906562387a5de05df25a3140ada89df648ccc4eac4ae7b583d0e029103e7 + [http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Zlib-1.42.tar.gz] md5=1ab76bfd6731d80f6abbd1643c90cabd sha256=7794d91711e8c9e526431da72c53bb08e14790f326d0e330d9e9d651f3f6fc6c @@ -21394,6 +21398,10 @@ sha256=3df5eb8f877648799ab623cf1718ecc6f86eb0c2f51d344d8e860442dcc5cd6f md5=5a1a4476087973852e30f8cdb5b0ff92 sha256=c762525fdbf5f5dd32c6c950f2a63d8c1b15ec3dc7afca5d2dc3dbd1b129a00d +[http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/watchdog-5.4.tar.gz] +md5=66480128b9dabcced2e4c8db3e60fa50 +sha256=6c5bfb2edae5c289233b6cd65393bb7414a2d30ad4d1239c207a659a4232d91a + [http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/watchdog_5.3.1.tar.gz] md5=ba97ddce396bfccd8d409bc3141d7ef4 sha256=b7bf9feeedea26d7e06935369a1a556089426e94f9ead946018526c96cd9b12e @@ -24826,3 +24834,11 @@ sha256=5cc1a53bb909922596bdd0fa967b654fe1bfbe0dcf1d34608f0b7c90e0c27867 md5=5f7b88ebb2bcd7e8044328482d079661 sha256=f57c4e33eb2cdd87a6c2f01bfa4794340fbe61ea1a1cfc7dac3b6671e1dd22af +[http://davehylands.com/gumstix-wiki/gpio-event/gpio-event-2.6.21-1444-select.tar.gz] +md5=b5cc96cba5a70e19d58534c250de67e2 +sha256=a937f4ba6b450b1330049c90e5e787490eff5bb376dbfe9099abbcdc7a8f6b6c + +[http://www.davehylands.com/gumstix-wiki/char-driver/char-driver-2.6.21.tar.gz] +md5=70113b86db5dea86c282053e15f36cb7 +sha256=9a87282052a8c0807bbcb46367102f97896a1cf4fcc0d35cfe34b2e5a1456a31 + diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf index 0aeabe4f15..72787d69cf 100644 --- a/conf/distro/angstrom-2008.1.conf +++ b/conf/distro/angstrom-2008.1.conf @@ -95,6 +95,8 @@ ANGSTROM_GCC_VERSION_bfin = "4.1.2" #ANGSTROM_GCC_VERSION_armv7a = "4.2.1+csl-arm-2007q3-53" ANGSTROM_GCC_VERSION_armv7a = "4.3.1" +ANGSTROM_GCC_VERSION_486sx = "4.3.2" + #Horrible workaround for armv7a follows: # gcc 4.3.1 builds a kernel that oopses with a null-pointer in the rcu-update function # gcc 4.2.1 (the one from *gasp* csl) builds a working kernel, but non-working userspace diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc index 4156c971aa..3aaa13276d 100644 --- a/conf/distro/include/sane-srcrevs.inc +++ b/conf/distro/include/sane-srcrevs.inc @@ -60,7 +60,7 @@ SRCREV_pn-fso-monitord ?= "31b4d3d1a40b1cc2cbe186e5ea80490a0c80b55f" SRCREV_pn-fso-sounds ?= "b24d3c2e66fee10a5e288101cd1b6f5bbd3da7e2" SRCREV_pn-fstests ?= "204" SRCREV_pn-gconf-dbus ?= "641" -SRCREV_pn-gnuradio ?= "9809" +SRCREV_pn-gnuradio ?= "10302" SRCREV_pn-gpe-contacts ?= "9312" SRCREV_pn-gpe-sketchbook ?= "9547" SRCREV_pn-gpe-conf ?= "9798" @@ -208,6 +208,7 @@ SRCREV_pn-s3c24xx-gpio ?= "4130" SRCREV_pn-serial-forward ?= "4214" SRCREV_pn-settings-daemon ?= "2006" SRCREV_pn-sjf2410-linux-native ?= "4268" +SRCREV_pn-socketcan-modules ?= "917" SRCREV_pn-sphyrna-python ?= "45" SRCREV_pn-starling ?= "9574" SRCREV_pn-table ?= "2191" diff --git a/conf/machine/include/tune-i486sx.inc b/conf/machine/include/tune-i486sx.inc new file mode 100644 index 0000000000..bd8025924a --- /dev/null +++ b/conf/machine/include/tune-i486sx.inc @@ -0,0 +1,9 @@ +TARGET_ARCH = "i486" +TARGET_CC_ARCH = "-march=i486" +PACKAGE_EXTRA_ARCHS = "486sx" +BASE_PACKAGE_ARCH = "486sx" +FEED_ARCH = "${BASE_PACKAGE_ARCH}" + +# gcc doesn't understand softfloat: +# "This target does not support --with-float" + diff --git a/conf/machine/vortex86sx.conf b/conf/machine/vortex86sx.conf new file mode 100644 index 0000000000..4595b6aebe --- /dev/null +++ b/conf/machine/vortex86sx.conf @@ -0,0 +1,16 @@ +#@TYPE: Machine +#@NAME: Vortex86sx i486sx clone + +require conf/machine/include/tune-i486sx.inc + +MACHINE_FEATURES += "x86" +MACHINE_EXTRA_RRECOMMENDS = "kernel-module-uvesafb v86d" + +KERNEL_IMAGETYPE = "bzImage" + +SERIAL_CONSOLE = "115200 ttyS0" + +PREFERRED_PROVIDER_virtual/kernel = "linux" + +GLIBC_ADDONS = "nptl" +GLIBC_EXTRA_OECONF = "--with-tls" diff --git a/contrib/angstrom/build-feeds.sh b/contrib/angstrom/build-feeds.sh index ab252db53d..02cce69d25 100755 --- a/contrib/angstrom/build-feeds.sh +++ b/contrib/angstrom/build-feeds.sh @@ -167,6 +167,7 @@ do iperf \ iptables \ irssi \ + iscsi-target \ jamvm \ kismet \ konqueror-embedded \ diff --git a/packages/busybox/busybox.inc b/packages/busybox/busybox.inc index cdc59b4006..4b195d5584 100644 --- a/packages/busybox/busybox.inc +++ b/packages/busybox/busybox.inc @@ -179,7 +179,7 @@ PACKAGES =+ "${PN}-mdev" FILES_${PN}-mdev = "${sysconfdir}/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/init.d/mdev" RDEPENDS_${PN}-mdev += "${PN}" -pkg_postinst_mdev() { +pkg_postinst_${PN}-mdev() { if test "x$D" != "x"; then OPT="-r $D" else diff --git a/packages/busybox/busybox_1.11.3.bb b/packages/busybox/busybox_1.11.3.bb index df710970db..c006e31e91 100644 --- a/packages/busybox/busybox_1.11.3.bb +++ b/packages/busybox/busybox_1.11.3.bb @@ -1,5 +1,5 @@ require busybox.inc -PR = "r11" +PR = "r12" SRC_URI = "\ http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ diff --git a/packages/busybox/busybox_1.13.2.bb b/packages/busybox/busybox_1.13.2.bb index d316b16472..c8aac79d6d 100644 --- a/packages/busybox/busybox_1.13.2.bb +++ b/packages/busybox/busybox_1.13.2.bb @@ -1,6 +1,6 @@ require busybox.inc -PR = "r8" +PR = "r9" SRC_URI = "\ http://www.busybox.net/downloads/busybox-${PV}.tar.gz \ diff --git a/packages/cwiid/cwiid_0.6.00.bb b/packages/cwiid/cwiid_0.6.00.bb index c35676e465..2f7f93d062 100644 --- a/packages/cwiid/cwiid_0.6.00.bb +++ b/packages/cwiid/cwiid_0.6.00.bb @@ -1,5 +1,6 @@ DESCRIPTION = "wiimote library + tools" LICENSE = "GPLv2" +HOMEPAGE = "http://abstrakraft.org/cwiid/" PR = "r0" diff --git a/packages/gnuradio/gnuradio.inc b/packages/gnuradio/gnuradio.inc index 30a4ee8154..65cfa4072c 100644 --- a/packages/gnuradio/gnuradio.inc +++ b/packages/gnuradio/gnuradio.inc @@ -2,14 +2,7 @@ DESCRIPTION = "GNU Radio" SECTION = "apps" PRIORITY = "optional" LICENSE = "GPL" -DEPENDS = " guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy" - -RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils \ - python-shell python-pickle python-compiler python-pkgutil python-pydoc python-mmap \ - python-netclient python-unittest python-difflib python-pprint python-numpy \ - " - -RDEPENDS_gnuradio-usrp = "python-core" +DEPENDS = "guile-native fftwf python virtual/libsdl alsa-lib jack boost cppunit sdcc-native swig-native python-numpy" inherit distutils-base autotools pkgconfig @@ -19,34 +12,42 @@ export HOST_SYS=${MULTIMACH_TARGET_SYS} CXXFLAGS_powerpc += "-lstdc++" EXTRA_OECONF = " \ - --disable-gr-atsc \ - --enable-gr-video-sdl \ - --enable-gr-audio-alsa \ - --enable-gr-audio-jack \ - --enable-gr-audio-oss \ - --enable-mblock \ - --disable-html-docs \ - PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/python2.5 \ - " + --disable-gr-atsc \ + --enable-gr-video-sdl \ + --enable-gr-audio-alsa \ + --enable-gr-audio-jack \ + --enable-gr-audio-oss \ + --enable-mblock \ + --disable-html-docs \ + PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR} \ +" do_configure_prepend() { -if [ -e ${WORKDIR}/acinclude.m4 ] ; then - cp ${WORKDIR}/acinclude.m4 ${S} -fi + if [ -e ${WORKDIR}/acinclude.m4 ] ; then + cp ${WORKDIR}/acinclude.m4 ${S} + fi } do_configure_append() { - find ${S} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g + find ${S} -name Makefile | xargs sed -i s:'-I/usr/include':'-I${STAGING_INCDIR}':g } -PACKAGES =+ "libpmt libpmt-qa \ - libmblock libmblock-qa \ - libgr-audio-alsa libgr-audio-oss libgr-audio-jack\ - libusrp libusrp-inband libusrp-inband-qa \ - libgromnithread \ - libgnuradio-core libgnuradio-core-qa \ - gnuradio-usrp-dbg gnuradio-usrp gnuradio-examples" +RDEPENDS_${PN} = "python-core python-audio python-threading python-codecs python-lang python-textutils \ + python-shell python-pickle python-compiler python-pkgutil python-pydoc python-mmap \ + python-netclient python-unittest python-difflib python-pprint python-numpy \ +" + +RDEPENDS_gnuradio-usrp = "python-core" +PACKAGES =+ "\ + libpmt libpmt-qa \ + libmblock libmblock-qa \ + libgr-audio-alsa libgr-audio-oss libgr-audio-jack\ + libusrp libusrp-inband libusrp-inband-qa \ + libgromnithread \ + libgnuradio-core libgnuradio-core-qa \ + gnuradio-usrp-dbg gnuradio-usrp gnuradio-examples \ +" FILES_gnuradio-examples = "${datadir}/gnuradio/examples" diff --git a/packages/gnuradio/gnuradio_3.0.4.bb b/packages/gnuradio/gnuradio_3.0.4.bb index 9bf605b982..8a3e25bedb 100644 --- a/packages/gnuradio/gnuradio_3.0.4.bb +++ b/packages/gnuradio/gnuradio_3.0.4.bb @@ -1,6 +1,6 @@ require gnuradio.inc -PR = "r3" +PR = "r4" SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \ file://no-trellis-doc.patch;patch=1 \ diff --git a/packages/gnuradio/gnuradio_3.1.2.bb b/packages/gnuradio/gnuradio_3.1.2.bb index 62e5f3cdc7..3a6b977288 100644 --- a/packages/gnuradio/gnuradio_3.1.2.bb +++ b/packages/gnuradio/gnuradio_3.1.2.bb @@ -1,6 +1,6 @@ require gnuradio.inc -PR = "r6" +PR = "r7" SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \ file://no-trellis-doc.patch;patch=1 \ diff --git a/packages/gnuradio/gnuradio_3.1.3.bb b/packages/gnuradio/gnuradio_3.1.3.bb index b6b7d4a041..17089dd487 100644 --- a/packages/gnuradio/gnuradio_3.1.3.bb +++ b/packages/gnuradio/gnuradio_3.1.3.bb @@ -1,6 +1,6 @@ require gnuradio.inc -PR = "r2" +PR = "r3" SRC_URI = "ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-${PV}.tar.gz \ # file://gnuradio-libusb.patch;patch=1 \ diff --git a/packages/krb/files/fix-uclibc-ruserpass-collision.patch b/packages/krb/files/fix-uclibc-ruserpass-collision.patch new file mode 100644 index 0000000000..b98baf93e3 --- /dev/null +++ b/packages/krb/files/fix-uclibc-ruserpass-collision.patch @@ -0,0 +1,673 @@ +diff -urN src.old//appl/gssftp/ftp/ftp.c src//appl/gssftp/ftp/ftp.c +--- src.old//appl/gssftp/ftp/ftp.c 2006-10-15 09:43:30.000000000 +0100 ++++ src//appl/gssftp/ftp/ftp.c 2009-01-26 18:55:18.300386663 +0000 +@@ -327,7 +327,7 @@ + int n, aflag = 0; + + l_user = pass = l_acct = 0; +- if (ruserpass(host, &l_user, &pass, &l_acct) < 0) { ++ if (rkuserpass(host, &l_user, &pass, &l_acct) < 0) { + code = -1; + return(0); + } +diff -urN src.old//appl/gssftp/ftp/ftp_var.h src//appl/gssftp/ftp/ftp_var.h +--- src.old//appl/gssftp/ftp/ftp_var.h 2003-06-16 20:02:01.000000000 +0100 ++++ src//appl/gssftp/ftp/ftp_var.h 2009-01-26 18:55:30.484695949 +0000 +@@ -270,8 +270,8 @@ + struct cmd *getcmd (char *); + + +-/* ruserpass.c */ +-int ruserpass (char *, char **, char **, char **); ++/* rkuserpass.c */ ++int rkuserpass (char *, char **, char **, char **); + + /* radix.h */ + int radix_encode (unsigned char *, unsigned char *, int *, int); +diff -urN src.old//appl/gssftp/ftp/Makefile.in src//appl/gssftp/ftp/Makefile.in +--- src.old//appl/gssftp/ftp/Makefile.in 2006-12-19 00:12:32.000000000 +0000 ++++ src//appl/gssftp/ftp/Makefile.in 2009-01-26 18:55:57.322361169 +0000 +@@ -12,14 +12,14 @@ + SRCS = $(srcdir)/cmds.c $(srcdir)/cmdtab.c $(srcdir)/domacro.c \ + $(srcdir)/ftp.c $(srcdir)/getpass.c $(srcdir)/glob.c \ + $(srcdir)/main.c $(srcdir)/radix.c \ +- $(srcdir)/ruserpass.c $(srcdir)/secure.c ++ $(srcdir)/rkuserpass.c $(srcdir)/secure.c + + + OBJS = $(OUTPRE)cmds.$(OBJEXT) $(OUTPRE)cmdtab.$(OBJEXT) \ + $(OUTPRE)domacro.$(OBJEXT) $(OUTPRE)ftp.$(OBJEXT) \ + $(OUTPRE)getpass.$(OBJEXT) $(OUTPRE)glob.$(OBJEXT) \ + $(OUTPRE)main.$(OBJEXT) $(OUTPRE)radix.$(OBJEXT) \ +- $(OUTPRE)ruserpass.$(OBJEXT) $(OUTPRE)secure.$(OBJEXT) ++ $(OUTPRE)rkuserpass.$(OBJEXT) $(OUTPRE)secure.$(OBJEXT) + + LOCALINCLUDES = -I$(srcdir)/.. -I$(srcdir) @KRB4_INCLUDES@ + +@@ -54,7 +54,7 @@ + done + + ftp.o cmds.o main.o: $(srcdir)/../arpa/ftp.h +-ftp.o cmds.o cmdtab.o domacro.o main.o ruserpass.o: $(srcdir)/ftp_var.h ++ftp.o cmds.o cmdtab.o domacro.o main.o rkuserpass.o: $(srcdir)/ftp_var.h + secure.o: secure.h + + cmds.o: $(srcdir)/cmds.c +@@ -64,7 +64,7 @@ + glob.o: $(srcdir)/glob.c + main.o: $(srcdir)/main.c + pclose.o: $(srcdir)/pclose.c +-ruserpass.o: $(srcdir)/ruserpass.c ++rkuserpass.o: $(srcdir)/rkuserpass.c + domacro.o: $(srcdir)/domacro.c + radix.o: $(srcdir)/radix.c + secure.o: $(srcdir)/secure.c +@@ -96,7 +96,7 @@ + $(SRCTOP)/include/port-sockets.h $(srcdir)/../arpa/ftp.h \ + ftp_var.h main.c + $(OUTPRE)radix.$(OBJEXT): ftp_var.h radix.c +-$(OUTPRE)ruserpass.$(OBJEXT): ftp_var.h ruserpass.c ++$(OUTPRE)rkuserpass.$(OBJEXT): ftp_var.h rkuserpass.c + $(OUTPRE)secure.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \ + $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssapi/gssapi_generic.h \ + $(KRB_ERR_H_DEP) $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) \ +diff -urN src.old//appl/gssftp/ftp/rkuserpass.c src//appl/gssftp/ftp/rkuserpass.c +--- src.old//appl/gssftp/ftp/rkuserpass.c 1970-01-01 01:00:00.000000000 +0100 ++++ src//appl/gssftp/ftp/rkuserpass.c 2009-01-26 18:54:57.899256052 +0000 +@@ -0,0 +1,296 @@ ++/* ++ * Copyright (c) 1985 Regents of the University of California. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * 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 University of ++ * California, Berkeley and its contributors. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#ifndef lint ++static char sccsid[] = "@(#)rkuserpass.c 5.3 (Berkeley) 3/1/91"; ++#endif /* not lint */ ++ ++#include <sys/types.h> ++#include <stdio.h> ++#include <string.h> ++#ifdef HAVE_STDLIB_H ++#include <stdlib.h> ++#endif ++#ifdef HAVE_UNISTD_H ++#include <unistd.h> ++#endif ++#include <ctype.h> ++#include <sys/stat.h> ++#include <errno.h> ++#include "ftp_var.h" ++ ++#ifdef _WIN32 ++#include <win-mac.h> ++#endif ++ ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 64 ++#endif ++ ++static int token (void); ++static FILE *cfile; ++ ++#define DEFAULT 1 ++#define LOGIN 2 ++#define PASSWD 3 ++#define ACCOUNT 4 ++#define MACDEF 5 ++#define ID 10 ++#define MACH 11 ++ ++static char tokval[100]; ++ ++static struct toktab { ++ char *tokstr; ++ int tval; ++} toktab[]= { ++ { "default", DEFAULT }, ++ { "login", LOGIN }, ++ { "password", PASSWD }, ++ { "passwd", PASSWD }, ++ { "account", ACCOUNT }, ++ { "machine", MACH }, ++ { "macdef", MACDEF }, ++ { NULL, 0 } ++}; ++ ++ ++static int ++token() ++{ ++ char *cp; ++ int c; ++ struct toktab *t; ++ ++ if (feof(cfile)) ++ return (0); ++ while ((c = getc(cfile)) != EOF && ++ (c == '\n' || c == '\t' || c == ' ' || c == ',')) ++ continue; ++ if (c == EOF) ++ return (0); ++ cp = tokval; ++ if (c == '"') { ++ while ((c = getc(cfile)) != EOF && c != '"') { ++ if (c == '\\') ++ c = getc(cfile); ++ *cp++ = c; ++ } ++ } else { ++ *cp++ = c; ++ while ((c = getc(cfile)) != EOF ++ && c != '\n' && c != '\t' && c != ' ' && c != ',') { ++ if (c == '\\') ++ c = getc(cfile); ++ *cp++ = c; ++ } ++ } ++ *cp = 0; ++ if (tokval[0] == 0) ++ return (0); ++ for (t = toktab; t->tokstr; t++) ++ if (!strcmp(t->tokstr, tokval)) ++ return (t->tval); ++ return (ID); ++} ++ ++int ++rkuserpass(host, aname, apass, aacct) ++ char *host, **aname, **apass, **aacct; ++{ ++ char *hdir, buf[FTP_BUFSIZ], *tmp; ++ char myname[MAXHOSTNAMELEN + 1], *mydomain; ++ int t, i, c, usedefault = 0; ++ struct stat stb; ++ ++ hdir = getenv("HOME"); ++ if (hdir == NULL) ++ hdir = "."; ++ (void) sprintf(buf, "%s/.netrc", hdir); ++ cfile = fopen(buf, "r"); ++ if (cfile == NULL) { ++ if (errno != ENOENT) ++ perror(buf); ++ return(0); ++ } ++ if (gethostname(myname, sizeof(myname)) < 0) ++ myname[0] = '\0'; ++ if ((mydomain = strchr(myname, '.')) == NULL) ++ mydomain = ""; ++next: ++ while ((t = token())) switch(t) { ++ ++ case DEFAULT: ++ usedefault = 1; ++ /* FALL THROUGH */ ++ ++ case MACH: ++ if (!usedefault) { ++ if (token() != ID) ++ continue; ++ /* ++ * Allow match either for user's input host name ++ * or official hostname. Also allow match of ++ * incompletely-specified host in local domain. ++ */ ++ if (strcasecmp(host, tokval) == 0) ++ goto match; ++ if (strcasecmp(hostname, tokval) == 0) ++ goto match; ++ if ((tmp = strchr(hostname, '.')) != NULL && ++ strcasecmp(tmp, mydomain) == 0 && ++ strncasecmp(hostname, tokval, ++ (unsigned) (tmp-hostname)) == 0 && ++ tokval[tmp - hostname] == '\0') ++ goto match; ++ if ((tmp = strchr(host, '.')) != NULL && ++ strcasecmp(tmp, mydomain) == 0 && ++ strncasecmp(host, tokval, ++ (unsigned ) (tmp - host)) == 0 && ++ tokval[tmp - host] == '\0') ++ goto match; ++ continue; ++ } ++ match: ++ while ((t = token()) && t != MACH && t != DEFAULT) switch(t) { ++ ++ case LOGIN: ++ if (token()) { ++ if (*aname == 0) { ++ *aname = malloc((unsigned) strlen(tokval) + 1); ++ (void) strcpy(*aname, tokval); ++ } else { ++ if (strcmp(*aname, tokval)) ++ goto next; ++ } ++ } ++ break; ++ case PASSWD: ++ if (strcmp(*aname, "anonymous") && ++ fstat(fileno(cfile), &stb) >= 0 && ++ (stb.st_mode & 077) != 0) { ++ fprintf(stderr, "Error - .netrc file not correct mode.\n"); ++ fprintf(stderr, "Remove password or correct mode.\n"); ++ goto bad; ++ } ++ if (token() && *apass == 0) { ++ *apass = malloc((unsigned) strlen(tokval) + 1); ++ (void) strcpy(*apass, tokval); ++ } ++ break; ++ case ACCOUNT: ++ if (fstat(fileno(cfile), &stb) >= 0 ++ && (stb.st_mode & 077) != 0) { ++ fprintf(stderr, "Error - .netrc file not correct mode.\n"); ++ fprintf(stderr, "Remove account or correct mode.\n"); ++ goto bad; ++ } ++ if (token() && *aacct == 0) { ++ *aacct = malloc((unsigned) strlen(tokval) + 1); ++ (void) strcpy(*aacct, tokval); ++ } ++ break; ++ case MACDEF: ++ if (proxy) { ++ (void) fclose(cfile); ++ return(0); ++ } ++ while ((c = getc(cfile)) != EOF) ++ if (c != ' ' && c != '\t') ++ break; ++ if (c == EOF || c == '\n') { ++ printf("Missing macdef name argument.\n"); ++ goto bad; ++ } ++ if (macnum == 16) { ++ printf("Limit of 16 macros have already been defined\n"); ++ goto bad; ++ } ++ tmp = macros[macnum].mac_name; ++ *tmp++ = c; ++ for (i=0; i < 8 && (c=getc(cfile)) != EOF && ++ !isspace(c); ++i) { ++ *tmp++ = c; ++ } ++ if (c == EOF) { ++ printf("Macro definition missing null line terminator.\n"); ++ goto bad; ++ } ++ *tmp = '\0'; ++ if (c != '\n') { ++ while ((c=getc(cfile)) != EOF && c != '\n'); ++ } ++ if (c == EOF) { ++ printf("Macro definition missing null line terminator.\n"); ++ goto bad; ++ } ++ if (macnum == 0) { ++ macros[macnum].mac_start = macbuf; ++ } ++ else { ++ macros[macnum].mac_start = macros[macnum-1].mac_end + 1; ++ } ++ tmp = macros[macnum].mac_start; ++ while (tmp != macbuf + 4096) { ++ if ((c=getc(cfile)) == EOF) { ++ printf("Macro definition missing null line terminator.\n"); ++ goto bad; ++ } ++ *tmp = c; ++ if (*tmp == '\n') { ++ if (*(tmp-1) == '\0') { ++ macros[macnum++].mac_end = tmp - 1; ++ break; ++ } ++ *tmp = '\0'; ++ } ++ tmp++; ++ } ++ if (tmp == macbuf + 4096) { ++ printf("4K macro buffer exceeded\n"); ++ goto bad; ++ } ++ break; ++ default: ++ fprintf(stderr, "Unknown .netrc keyword %s\n", tokval); ++ break; ++ } ++ goto done; ++ } ++done: ++ (void) fclose(cfile); ++ return(0); ++bad: ++ (void) fclose(cfile); ++ return(-1); ++} +diff -urN src.old//appl/gssftp/ftp/ruserpass.c src//appl/gssftp/ftp/ruserpass.c +--- src.old//appl/gssftp/ftp/ruserpass.c 2001-10-10 04:18:22.000000000 +0100 ++++ src//appl/gssftp/ftp/ruserpass.c 1970-01-01 01:00:00.000000000 +0100 +@@ -1,296 +0,0 @@ +-/* +- * Copyright (c) 1985 Regents of the University of California. +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. +- * 2. Redistributions in binary form must reproduce the above copyright +- * 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 University of +- * California, Berkeley and its contributors. +- * 4. Neither the name of the University nor the names of its contributors +- * may be used to endorse or promote products derived from this software +- * without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +- * SUCH DAMAGE. +- */ +- +-#ifndef lint +-static char sccsid[] = "@(#)ruserpass.c 5.3 (Berkeley) 3/1/91"; +-#endif /* not lint */ +- +-#include <sys/types.h> +-#include <stdio.h> +-#include <string.h> +-#ifdef HAVE_STDLIB_H +-#include <stdlib.h> +-#endif +-#ifdef HAVE_UNISTD_H +-#include <unistd.h> +-#endif +-#include <ctype.h> +-#include <sys/stat.h> +-#include <errno.h> +-#include "ftp_var.h" +- +-#ifdef _WIN32 +-#include <win-mac.h> +-#endif +- +-#ifndef MAXHOSTNAMELEN +-#define MAXHOSTNAMELEN 64 +-#endif +- +-static int token (void); +-static FILE *cfile; +- +-#define DEFAULT 1 +-#define LOGIN 2 +-#define PASSWD 3 +-#define ACCOUNT 4 +-#define MACDEF 5 +-#define ID 10 +-#define MACH 11 +- +-static char tokval[100]; +- +-static struct toktab { +- char *tokstr; +- int tval; +-} toktab[]= { +- { "default", DEFAULT }, +- { "login", LOGIN }, +- { "password", PASSWD }, +- { "passwd", PASSWD }, +- { "account", ACCOUNT }, +- { "machine", MACH }, +- { "macdef", MACDEF }, +- { NULL, 0 } +-}; +- +- +-static int +-token() +-{ +- char *cp; +- int c; +- struct toktab *t; +- +- if (feof(cfile)) +- return (0); +- while ((c = getc(cfile)) != EOF && +- (c == '\n' || c == '\t' || c == ' ' || c == ',')) +- continue; +- if (c == EOF) +- return (0); +- cp = tokval; +- if (c == '"') { +- while ((c = getc(cfile)) != EOF && c != '"') { +- if (c == '\\') +- c = getc(cfile); +- *cp++ = c; +- } +- } else { +- *cp++ = c; +- while ((c = getc(cfile)) != EOF +- && c != '\n' && c != '\t' && c != ' ' && c != ',') { +- if (c == '\\') +- c = getc(cfile); +- *cp++ = c; +- } +- } +- *cp = 0; +- if (tokval[0] = |
