Ver Fonte

Fixed: socks fails on 1-character username or password

z3APA3A há 7 anos atrás
pai
commit
572a5b3c34
3 ficheiros alterados com 6 adições e 2 exclusões
  1. 4 0
      Makefile.Linux
  2. 1 1
      scripts/3proxy.cfg.chroot
  3. 1 1
      src/sockgetchar.c

+ 4 - 0
Makefile.Linux

@@ -142,6 +142,10 @@ install: install-bin install-chroot-dir install-etc install-log install-man inst
 	@echo ""
 	@echo 3proxy installed.
 	@echo use
+	@echo "  "service 3proxy start
+	@echo to start proxy
+	@echo "  "service 3proxy stop
+	@echo to stop proxy
 	@echo "  "$(INSTALL_CFG_DEST)/add3proxyuser.sh
 	@echo to add users
 	@echo ""

+ 1 - 1
scripts/3proxy.cfg.chroot

@@ -2,4 +2,4 @@
 daemon
 pidfile /var/run/3proxy/3proxy.pid
 chroot /usr/local/3proxy proxy proxy
-include /conf/3proxy.cfg
+include /conf/3proxy.cfg

+ 1 - 1
src/sockgetchar.c

@@ -156,7 +156,7 @@ int sockgetcharsrv(struct clientparam * param, int timeosec, int timeousec){
 int sockgetlinebuf(struct clientparam * param, DIRECTION which, unsigned char * buf, int bufsize, int delim, int to){
  int c;
  int i=0;
- if(bufsize<2) return 0;
+ if(bufsize < 1) return 0;
  c = (which)?sockgetcharsrv(param, to, 0):sockgetcharcli(param, to, 0);
  if (c == EOF) {
 	return 0;