summaryrefslogtreecommitdiff
path: root/package/portmap/portmap-4.0-rpc_user.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2010-11-02 16:30:43 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2010-11-04 23:02:04 +0100
commit2f152f6d6dd37b8cab87c482260a8465b86381d5 (patch)
treedac48316ce67aa4e29d722cf55c6254bd52b8bfe /package/portmap/portmap-4.0-rpc_user.patch
parent268ab3c94111e35264556b32df8e6f5c913291b0 (diff)
portmap: bump to version 6.0, convert to autotargets
[Peter: fix uninstall target] Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/portmap/portmap-4.0-rpc_user.patch')
-rw-r--r--package/portmap/portmap-4.0-rpc_user.patch59
1 files changed, 0 insertions, 59 deletions
diff --git a/package/portmap/portmap-4.0-rpc_user.patch b/package/portmap/portmap-4.0-rpc_user.patch
deleted file mode 100644
index 6ef0736d0..000000000
--- a/package/portmap/portmap-4.0-rpc_user.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff -urN portmap_4/daemon.c portmap_4.new/daemon.c
---- portmap_4/daemon.c Thu Aug 3 18:07:22 2000
-+++ portmap_4.new/daemon.c Fri Aug 4 08:45:25 2000
-@@ -35,6 +35,7 @@
- static char sccsid[] = "@(#)daemon.c 5.3 (Berkeley) 12/28/90";
- #endif /* LIBC_SCCS and not lint */
-
-+#include <stdlib.h>
- #include <sys/types.h>
- #include <fcntl.h>
- #include <unistd.h>
-diff -urN portmap_4/pmap_check.c portmap_4.new/pmap_check.c
---- portmap_4/pmap_check.c Thu Aug 3 18:07:22 2000
-+++ portmap_4.new/pmap_check.c Thu Aug 3 18:29:51 2000
-@@ -40,6 +40,8 @@
- #include <rpc/pmap_prot.h>
- #include <syslog.h>
- #include <netdb.h>
-+#include <pwd.h>
-+#include <sys/types.h>
- #include <sys/signal.h>
- #ifdef SYSV40
- #include <netinet/in.h>
-@@ -149,11 +151,32 @@
- /*
- * Give up root privileges so that we can never allocate a privileged
- * port when forwarding an rpc request.
-+ *
-+ * Fix 8/3/00 Philipp Knirsch: First lookup our rpc user. If we find it,
-+ * switch to that uid, otherwise simply resue the old bin user and print
-+ * out a warning in syslog.
- */
-- if (setuid(1) == -1) {
-- syslog(LOG_ERR, "setuid(1) failed: %m");
-- exit(1);
-+
-+ struct passwd *pwent;
-+
-+ pwent = getpwnam("rpc");
-+ if (pwent == NULL) {
-+ syslog(LOG_WARNING, "user rpc not found, reverting to user bin");
-+ if (setuid(1) == -1) {
-+ syslog(LOG_ERR, "setuid(1) failed: %m");
-+ exit(1);
-+ }
- }
-+ else {
-+ if (setuid(pwent->pw_uid) == -1) {
-+ syslog(LOG_WARNING, "setuid() to rpc user failed: %m");
-+ if (setuid(1) == -1) {
-+ syslog(LOG_ERR, "setuid(1) failed: %m");
-+ exit(1);
-+ }
-+ }
-+ }
-+
- (void) signal(SIGINT, toggle_verboselog);
- }
-