[packages] srelay: add a patch to fix auth accepting any passwords (closes: #6781)
authorNicolas Thill <nico@openwrt.org>
Tue, 2 Mar 2010 17:22:22 +0000 (17:22 +0000)
committerNicolas Thill <nico@openwrt.org>
Tue, 2 Mar 2010 17:22:22 +0000 (17:22 +0000)
SVN-Revision: 19954

net/srelay/Makefile
net/srelay/patches/005-fix_auth_accept_any_password.patch [new file with mode: 0644]

index b33290d7a1072d73fc42f782b0704028c9015f08..5b6d41cb624163f72951bea25f5fadd580cb88ee 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=srelay
 PKG_VERSION:=0.4.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/socks-relay
diff --git a/net/srelay/patches/005-fix_auth_accept_any_password.patch b/net/srelay/patches/005-fix_auth_accept_any_password.patch
new file mode 100644 (file)
index 0000000..5be3376
--- /dev/null
@@ -0,0 +1,17 @@
+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);
+ }