summaryrefslogtreecommitdiff
path: root/net/sendfile
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-09-02 15:19:40 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-09-02 15:19:40 +0000
commit534dcbc8a6bdf7d9c836c5f76ac082bf05bc4151 (patch)
tree45b217dec810786b6beb245289882a6cca6a4799 /net/sendfile
parentUpdate to version 2.4.2 (diff)
Add a patch to work around the problem where users beside root
couldn't receive any files. PR: ports/30111 Submitted by: Stefan `Sec` Zehl <sec@42.org> (MAINTAINER)
Notes
Notes: svn path=/head/; revision=47321
Diffstat (limited to 'net/sendfile')
-rw-r--r--net/sendfile/Makefile1
-rw-r--r--net/sendfile/files/patch-ad32
2 files changed, 33 insertions, 0 deletions
diff --git a/net/sendfile/Makefile b/net/sendfile/Makefile
index 3ae0804ae858..0b761973e308 100644
--- a/net/sendfile/Makefile
+++ b/net/sendfile/Makefile
@@ -7,6 +7,7 @@
PORTNAME= sendfile
PORTVERSION= 2.1a
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.belwue.de/pub/unix/sendfile/current/
DISTFILES= sendfile-20010216.tar.gz
diff --git a/net/sendfile/files/patch-ad b/net/sendfile/files/patch-ad
new file mode 100644
index 000000000000..3cbb33144599
--- /dev/null
+++ b/net/sendfile/files/patch-ad
@@ -0,0 +1,32 @@
+--- src/sendfiled.c.org Tue Feb 6 00:42:53 2001
++++ src/sendfiled.c Sun Aug 26 21:21:18 2001
+@@ -10,6 +10,7 @@
+ * Chris Foote (chris@senet.com.au)
+ * Daniel Kobras <kobras@lists.tat.physik.uni-tuebingen.de>
+ * Colin Phipps <cph@cph.demon.co.uk>
++ * Stefan `Sec` Zehl <sec@42.org>
+ *
+ * History:
+ *
+@@ -138,6 +139,7 @@
+ * 2001-01-17 Framstag mail2user() now runs in a subprocess
+ * 2001-02-02 Framstag fixed openlog() bug
+ * 2001-02-06 Framstag added timeout on waiting response from client
++ * 2001-08-26 sec workaround for sete[ug]id on FreeBSD
+ *
+ *
+ * The sendfile-daemon of the sendfile package.
+@@ -4000,11 +4002,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));