[packages] srelay: Update to v0.4.8b3 (#8150)
authoracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 3 Nov 2010 09:29:25 +0000 (09:29 +0000)
committeracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 3 Nov 2010 09:29:25 +0000 (09:29 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@23816 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/srelay/Makefile
net/srelay/patches/001-cross_compile.patch [deleted file]
net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch [deleted file]
net/srelay/patches/003-openlog.patch [deleted file]
net/srelay/patches/004-bindtodevice.patch [deleted file]
net/srelay/patches/005-fix_auth_accept_any_password.patch [deleted file]

index 5f41e7d..3f5e4b6 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=srelay
-PKG_VERSION:=0.4.6
-PKG_RELEASE:=3
+PKG_VERSION:=0.4.8b3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/socks-relay
-PKG_MD5SUM:=4a9f3298b38d8588f0ffde31b946a47f
+PKG_MD5SUM:=a6d9521594172710ffa308d6b5dbece4
 
 include $(INCLUDE_DIR)/package.mk
 
diff --git a/net/srelay/patches/001-cross_compile.patch b/net/srelay/patches/001-cross_compile.patch
deleted file mode 100644 (file)
index a20215e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: srelay-0.4.6/configure
-===================================================================
---- srelay-0.4.6.orig/configure        2008-02-28 13:21:29.000000000 +0100
-+++ srelay-0.4.6/configure     2008-02-28 13:21:30.000000000 +0100
-@@ -1394,8 +1394,8 @@
-       ;;
-   linux*)
--      case "$build_cpu" in
--        i*86)
-+      case "$host_cpu" in
-+        i*86|mips*|powerpc*|sparc*)
-           OS=LINUX
-           cat >>confdefs.h <<\_ACEOF
- #define LINUX 1
diff --git a/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch b/net/srelay/patches/002-linux_2.6.19_rtnetlink_changes.patch
deleted file mode 100644 (file)
index 6c99544..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: srelay-0.4.6/get-bind.c
-===================================================================
---- srelay-0.4.6.orig/get-bind.c       2008-02-28 13:21:29.000000000 +0100
-+++ srelay-0.4.6/get-bind.c    2008-02-28 13:21:30.000000000 +0100
-@@ -50,6 +50,18 @@
- #include <asm/types.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
-+#include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+# include <linux/if_addr.h>
-+#endif
-+#ifndef IFA_RTA
-+# define IFA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
-+# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
-+#endif
-+#ifndef IFLA_RTA
-+# define IFLA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
-+# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
-+#endif
- static int get_ifconf(int, struct addrinfo *);
- #endif /* defined(LINUX) */
diff --git a/net/srelay/patches/003-openlog.patch b/net/srelay/patches/003-openlog.patch
deleted file mode 100644 (file)
index dea3603..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: srelay-0.4.6/main.c
-===================================================================
---- srelay-0.4.6.orig/main.c   2008-02-28 13:21:29.000000000 +0100
-+++ srelay-0.4.6/main.c        2008-02-28 13:21:30.000000000 +0100
-@@ -33,6 +33,7 @@
- */
- #include <sys/stat.h>
-+#include <syslog.h>
- #include "srelay.h"
- /* prototypes */
-@@ -125,6 +126,8 @@
-   uid = getuid();
-+  openlog("srelay", LOG_PID, LOG_DAEMON);
-+
-   while((ch = getopt(ac, av, "a:c:i:m:o:p:u:frstbvh?")) != -1)
-     switch (ch) {
-     case 'a':
diff --git a/net/srelay/patches/004-bindtodevice.patch b/net/srelay/patches/004-bindtodevice.patch
deleted file mode 100644 (file)
index 5407829..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-Index: srelay-0.4.6/main.c
-===================================================================
---- srelay-0.4.6.orig/main.c   2008-02-28 13:21:30.000000000 +0100
-+++ srelay-0.4.6/main.c        2008-02-28 13:21:30.000000000 +0100
-@@ -44,6 +44,7 @@
- char *ident = "srelay";
- char *pidfile = PIDFILE;
- char *pwdfile = PWDFILE;
-+char *bindtodevice = NULL;
- pid_t master_pid;
- #if USE_THREAD
-@@ -75,6 +76,9 @@
-   fprintf(stderr, "options:\n"
-         "\t-c file\tconfig file\n"
-         "\t-i i/f\tlisten interface IP[:PORT]\n"
-+#ifdef SO_BINDTODEVICE
-+        "\t-J i/f\toutbound interface name\n"
-+#endif
-         "\t-m num\tmax child/thread\n"
-         "\t-o min\tidle timeout minutes\n"
-         "\t-p file\tpid file\n"
-@@ -128,7 +132,7 @@
-   openlog("srelay", LOG_PID, LOG_DAEMON);
--  while((ch = getopt(ac, av, "a:c:i:m:o:p:u:frstbvh?")) != -1)
-+  while((ch = getopt(ac, av, "a:c:i:J:m:o:p:u:frstbvh?")) != -1)
-     switch (ch) {
-     case 'a':
-       if (optarg != NULL) {
-@@ -183,6 +187,14 @@
-       }
-       break;
-+#ifdef SO_BINDTODEVICE
-+    case 'J':
-+      if (optarg != NULL) {
-+      bindtodevice = strdup(optarg);
-+      }
-+      break;
-+#endif
-+
-     case 'o':
-       if (optarg != NULL) {
-       idle_timeout = atol(optarg);
-Index: srelay-0.4.6/socks.c
-===================================================================
---- srelay-0.4.6.orig/socks.c  2008-02-28 13:21:29.000000000 +0100
-+++ srelay-0.4.6/socks.c       2008-02-28 13:21:30.000000000 +0100
-@@ -990,6 +990,24 @@
-   return(-1);
- }
-+#ifdef SO_BINDTODEVICE
-+#include <net/if.h>
-+static int do_bindtodevice(int cs, char *dev)
-+{
-+  int rc;
-+  struct ifreq interface;
-+  
-+  strncpy(interface.ifr_name, dev, IFNAMSIZ);
-+  setreuid(PROCUID, 0);
-+  rc = setsockopt(cs, SOL_SOCKET, SO_BINDTODEVICE,
-+                  (char *)&interface, sizeof(interface));
-+  setreuid(0, PROCUID);
-+  if (rc < 0)
-+    msg_out(crit, "setsockopt SO_BINDTODEVICE(%s) failed: %d", dev, errno);
-+  return(rc);
-+}
-+#endif
-+
- int socks_direct_conn(int ver, struct socks_req *req)
- {
-   int    cs, acs = 0;
-@@ -1037,6 +1055,14 @@
-         continue;
-       }
-+#ifdef SO_BINDTODEVICE
-+      if (bindtodevice && do_bindtodevice(cs, bindtodevice) < 0) {
-+        save_errno = errno;
-+        close(cs);
-+        continue;
-+      }
-+#endif
-+
-       if (connect(cs, res->ai_addr, res->ai_addrlen) < 0) {
-         /* connect fail */
-       save_errno = errno;
-@@ -1096,6 +1122,14 @@
-       return(-1);
-     }
-+#ifdef SO_BINDTODEVICE
-+    if (bindtodevice && do_bindtodevice(acs, bindtodevice) < 0) {
-+      GEN_ERR_REP(req->s, ver);
-+      close(acs);
-+      return(-1);
-+    }
-+#endif
-+
-     if (bind_sock(acs, req, &ba) != 0) {
-       GEN_ERR_REP(req->s, ver);
-       return(-1);
-@@ -1351,6 +1385,14 @@
-       continue;
-     }
-+#ifdef SO_BINDTODEVICE
-+    if (bindtodevice && do_bindtodevice(cs, bindtodevice) < 0) {
-+      save_errno = errno;
-+      close(cs);
-+      continue;
-+    }
-+#endif
-+
-     if (connect(cs, res->ai_addr, res->ai_addrlen) < 0) {
-       /* connect fail */
-       save_errno = errno;
-Index: srelay-0.4.6/srelay.h
-===================================================================
---- srelay-0.4.6.orig/srelay.h 2008-02-28 13:21:29.000000000 +0100
-+++ srelay-0.4.6/srelay.h      2008-02-28 13:21:30.000000000 +0100
-@@ -266,6 +266,7 @@
- extern char *ident;
- extern char *pidfile;
- extern char *pwdfile;
-+extern char *bindtodevice;
- extern int max_child;
- extern int cur_child;
- extern char method_tab[];
diff --git a/net/srelay/patches/005-fix_auth_accept_any_password.patch b/net/srelay/patches/005-fix_auth_accept_any_password.patch
deleted file mode 100644 (file)
index 5be3376..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Without this patch, authentication will accept any password!
-
---- a/auth-pwd.c
-+++ b/auth-pwd.c
-@@ -251,12 +251,9 @@ int checkpasswd(char *user, char *pass)
-   memset(spwd->sp_pwdp, 0, strlen(spwd->sp_pwdp));
- #endif
--#if defined(FREEBSD) || defined(SOLARIS)
-   if (matched) {
-     return(0);
-   } else {
-     return(-1);
-   }
--#endif
--  return(0);
- }