head 1.3; access; symbols OPENPKG_E1_MP_HEAD:1.3 OPENPKG_E1_MP:1.3 OPENPKG_E1_MP_2_STABLE:1.2 OPENPKG_E1_FP:1.2 OPENPKG_2_STABLE_MP:1.3 OPENPKG_2_STABLE_20061018:1.2 OPENPKG_2_STABLE_20060622:1.2 OPENPKG_2_STABLE:1.2.0.4 OPENPKG_2_STABLE_BP:1.2 OPENPKG_2_5_RELEASE:1.2 OPENPKG_2_5_SOLID:1.2.0.2 OPENPKG_2_5_SOLID_BP:1.2 OPENPKG_CW_FP:1.1; locks; strict; comment @# @; 1.3 date 2006.10.30.10.46.35; author rse; state Exp; branches; next 1.2; commitid dHfeysKkTKhidHSr; 1.2 date 2005.06.13.18.29.12; author rse; state Exp; branches 1.2.4.1; next 1.1; 1.1 date 2005.03.19.19.25.30; author rse; state Exp; branches; next ; 1.2.4.1 date 2006.10.30.10.47.33; author rse; state Exp; branches; next ; commitid vbkqFq1sEBpEdHSr; desc @@ 1.3 log @fix Sendfile by upgrading to latest vendor version (yes, it has the same vendor version as the vendor symlinks releases to snapshots and sometimes even moves releases) @ text @Index: makeconfig --- makeconfig.orig 2005-06-10 09:21:48 +0200 +++ makeconfig 2006-10-30 11:31:20 +0100 @@@@ -74,8 +74,8 @@@@ LINK=${LINK:-$CC} cd develop -rm -f config.cache ./configure \ + --cache-file=./config.cache \ --libexecdir=$SERVERDIR \ --bindir=$BINDIR \ --mandir=$MANDIR \ @@@@ -99,7 +99,7 @@@@ *next*) SYSTEM=NEXT;; *convex*) SYSTEM=CONVEXOS;; *osf*) SYSTEM=OSF1;; - *bsd*) SYSTEM=BSD;; + *bsd*) SYSTEM=XBSD;; *darwin*) SYSTEM=DARWIN;; *) SYSTEM=UNKNOWN;; # *) SYSTEM=`uname -a | tr '[a-z]' '[A-Z]'` @@@@ -198,11 +198,11 @@@@ #define __EXTENSIONS__ #endif -#if defined(LINUX) || defined(BSD) +#if defined(LINUX) || defined(XBSD) #ifndef HAVE_STRERROR #define HAVE_STRERROR #endif - #ifndef _POSIX_SOURCE + #if !defined(_POSIX_SOURCE) && !defined(__FreeBSD__) #define _POSIX_SOURCE #endif #ifndef __USE_BSD Index: src/io.h --- src/io.h.orig 2005-06-06 23:14:16 +0200 +++ src/io.h 2006-10-30 11:29:20 +0100 @@@@ -34,6 +34,8 @@@@ #define O_LARGEFILE 0 #endif +#include + /* read n bytes from network socket */ int readn(int, char *, int); Index: src/sendfiled.c --- src/sendfiled.c.orig 2005-06-10 09:24:13 +0200 +++ src/sendfiled.c 2006-10-30 11:29:20 +0100 @@@@ -199,6 +199,10 @@@@ #include "address.h" /* address routines */ #include "lock.h" /* file locking */ +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif + #if defined(HAVE_GETOPT_H) #include #else @@@@ -233,7 +237,7 @@@@ #elif defined(HAVE_SYS_STATVFS_H) #include #define statfs statvfs -#elif defined(BSD) || defined(ULTRIX) +#elif defined(XBSD) || defined(ULTRIX) #include #include #else @@@@ -265,13 +269,13 @@@@ int statfs(char *, struct statfs *); #endif -#ifdef BSD +#ifdef XBSD #ifndef O_SYNC #define O_SYNC O_FSYNC #endif #endif -#if defined(HPUX) || defined(BSD) +#if defined(HPUX) || defined(XBSD) #define seteuid(a) setuid(a) #define setegid(a) setgid(a) #endif @@@@ -2581,7 +2585,7 @@@@ /* scan through utmp (currently logged in users) */ while (read(utmpfd,(char *)&uinfo,sizeof(uinfo))>0) { -#if defined(NEXT) || defined(BSD) || defined(ULTRIX) || defined(SOLARIS1) +#if defined(NEXT) || defined(XBSD) || defined(ULTRIX) || defined(SOLARIS1) strncpy(user,uinfo.ut_name,8); if (str_eq(recipient,user)) { @@@@ -4168,11 +4172,13 @@@@ * RETURN: nothing, but terminates program on error */ void setreugid() { + if (rgid != getegid()) if (rgid && setegid(rgid)<0) { printf("490 Internal error on setegid(%u): %s\r\n", (unsigned int)rgid,strerror(errno)); exit(1); } + if (ruid != geteuid()) if (ruid && seteuid(ruid)<0) { printf("490 Internal error on seteuid(%u): %s\r\n", (unsigned int)ruid,strerror(errno)); Index: src/spool.c --- src/spool.c.orig 2005-06-06 23:14:16 +0200 +++ src/spool.c 2006-10-30 11:29:20 +0100 @@@@ -64,6 +64,10 @@@@ #include "string.h" /* extended string functions */ #include "reply.h" /* the 3 digit reply codes with text messages */ +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif + /* * scanspool - scan through spool directory, build list-structures and Index: src/string.c --- src/string.c.orig 2005-06-06 23:14:16 +0200 +++ src/string.c 2006-10-30 11:29:20 +0100 @@@@ -358,7 +358,7 @@@@ * RETURN: string - string of the error number */ char *strerror(int errornumber) { -#if __GLIBC__ < 2 && !defined(BSD) +#if __GLIBC__ < 2 && !defined(XBSD) extern int sys_nerr; extern char *sys_errlist[]; #endif @ 1.2 log @upgrading package: sendfile 2.1a -> 2.1b @ text @d1 24 a24 13 Index: src/io.c --- src/io.c.orig 2005-06-01 00:30:14 +0200 +++ src/io.c 2005-06-13 20:27:59 +0200 @@@@ -46,6 +46,10 @@@@ #include "string.h" /* extended string functions */ #include "message.h" /* information, warning and error messages */ +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif + #ifdef NEXT #include a25 7 @@@@ -133,7 +137,7 @@@@ off_t fsize, /* original file size */ wtotal; /* total read bytes */ - blksize_t + size_t blksize; /* file system block size */ d27 10 a36 1 wtotal=0; d38 5 a42 5 --- src/io.h.orig 2002-08-04 17:11:33 +0200 +++ src/io.h 2005-06-13 20:23:00 +0200 @@@@ -15,6 +15,8 @@@@ * This file is covered by the GNU General Public License */ a45 1 d48 1 d50 3 a52 3 --- src/sendfiled.c.orig 2005-06-01 11:04:40 +0200 +++ src/sendfiled.c 2005-06-13 20:27:35 +0200 @@@@ -194,6 +194,10 @@@@ d63 35 a97 1 @@@@ -4042,11 +4046,13 @@@@ d112 2 a113 2 --- src/spool.c.orig 2005-05-31 17:46:57 +0200 +++ src/spool.c 2005-06-13 20:28:17 +0200 d125 12 @ 1.2.4.1 log @MFC: fix Sendfile by upgrading to latest vendor version (yes, it has the same vendor version as the vendor symlinks releases to snapshots and sometimes even moves releases) @ text @d1 13 a13 24 Index: makeconfig --- makeconfig.orig 2005-06-10 09:21:48 +0200 +++ makeconfig 2006-10-30 11:31:20 +0100 @@@@ -74,8 +74,8 @@@@ LINK=${LINK:-$CC} cd develop -rm -f config.cache ./configure \ + --cache-file=./config.cache \ --libexecdir=$SERVERDIR \ --bindir=$BINDIR \ --mandir=$MANDIR \ @@@@ -99,7 +99,7 @@@@ *next*) SYSTEM=NEXT;; *convex*) SYSTEM=CONVEXOS;; *osf*) SYSTEM=OSF1;; - *bsd*) SYSTEM=BSD;; + *bsd*) SYSTEM=XBSD;; *darwin*) SYSTEM=DARWIN;; *) SYSTEM=UNKNOWN;; # *) SYSTEM=`uname -a | tr '[a-z]' '[A-Z]'` @@@@ -198,11 +198,11 @@@@ #define __EXTENSIONS__ d15 7 d23 1 a23 10 -#if defined(LINUX) || defined(BSD) +#if defined(LINUX) || defined(XBSD) #ifndef HAVE_STRERROR #define HAVE_STRERROR #endif - #ifndef _POSIX_SOURCE + #if !defined(_POSIX_SOURCE) && !defined(__FreeBSD__) #define _POSIX_SOURCE #endif #ifndef __USE_BSD d25 5 a29 5 --- src/io.h.orig 2005-06-06 23:14:16 +0200 +++ src/io.h 2006-10-30 11:29:20 +0100 @@@@ -34,6 +34,8 @@@@ #define O_LARGEFILE 0 #endif d33 1 a35 1 d37 3 a39 3 --- src/sendfiled.c.orig 2005-06-10 09:24:13 +0200 +++ src/sendfiled.c 2006-10-30 11:29:20 +0100 @@@@ -199,6 +199,10 @@@@ d50 1 a50 35 @@@@ -233,7 +237,7 @@@@ #elif defined(HAVE_SYS_STATVFS_H) #include #define statfs statvfs -#elif defined(BSD) || defined(ULTRIX) +#elif defined(XBSD) || defined(ULTRIX) #include #include #else @@@@ -265,13 +269,13 @@@@ int statfs(char *, struct statfs *); #endif -#ifdef BSD +#ifdef XBSD #ifndef O_SYNC #define O_SYNC O_FSYNC #endif #endif -#if defined(HPUX) || defined(BSD) +#if defined(HPUX) || defined(XBSD) #define seteuid(a) setuid(a) #define setegid(a) setgid(a) #endif @@@@ -2581,7 +2585,7 @@@@ /* scan through utmp (currently logged in users) */ while (read(utmpfd,(char *)&uinfo,sizeof(uinfo))>0) { -#if defined(NEXT) || defined(BSD) || defined(ULTRIX) || defined(SOLARIS1) +#if defined(NEXT) || defined(XBSD) || defined(ULTRIX) || defined(SOLARIS1) strncpy(user,uinfo.ut_name,8); if (str_eq(recipient,user)) { @@@@ -4168,11 +4172,13 @@@@ d65 2 a66 2 --- src/spool.c.orig 2005-06-06 23:14:16 +0200 +++ src/spool.c 2006-10-30 11:29:20 +0100 a77 12 Index: src/string.c --- src/string.c.orig 2005-06-06 23:14:16 +0200 +++ src/string.c 2006-10-30 11:29:20 +0100 @@@@ -358,7 +358,7 @@@@ * RETURN: string - string of the error number */ char *strerror(int errornumber) { -#if __GLIBC__ < 2 && !defined(BSD) +#if __GLIBC__ < 2 && !defined(XBSD) extern int sys_nerr; extern char *sys_errlist[]; #endif @ 1.1 log @new package: sendfile 2.1a (Simple Asynchronous File Transfer (SAFT)) @ text @d1 26 a26 2 --- src/io.h.orig Mon Mar 5 23:38:04 2001 +++ src/io.h Mon Mar 5 23:38:04 2001 d36 15 a50 3 --- src/sendfiled.c.org Tue Feb 6 00:42:53 2001 +++ src/sendfiled.c Sun Aug 26 21:21:18 2001 @@@@ -4000,11 +4002,13 @@@@ d64 14 @