-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: urcd action: commit revision: path_from: revision_from: 29e6d89d304edf2fca49766d40f6222a379fbaa9: path_to: revision_to:
commit 29e6d89d304edf2fca49766d40f6222a379fbaa9 Author: root <root@d3v11.ano> Date: Tue Jan 1 07:57:39 2013 +0000 [urcd] less diff --git a/src/urcd.pyx b/src/urcd.pyx
--- a/src/urcd.pyx +++ b/src/urcd.pyx @@ -27,20 +27,21 @@ signal.signal(1 ,sock_close) signal.signal(2 ,sock_close) signal.signal(15,sock_close) -rd = sys.stdin.fileno() -if os.access('stdin',os.X_OK): +rd = 0 +if os.access('stdin',1): p = subprocess.Popen(['./stdin'],stdout=subprocess.PIPE) rd = p.stdout.fileno() del p -wr = sys.stdout.fileno() -if os.access('stdout',os.X_OK): +wr = 1 +if os.access('stdout',1): p = subprocess.Popen(['./stdout'],stdin=subprocess.PIPE) wr = p.stdin.fileno() del p os.chdir(sys.argv[1]) os.chroot(os.getcwd()) +root = os.getcwd() sock=socket.socket(1,2) sock_close(0,0) @@ -124,7 +125,7 @@ while 1: channels.remove(dst) continue - for path in os.listdir(os.getcwd()): + for path in os.listdir(root): try: if path != user: sock.sendto(':'+nick+'!'+user+'@'+serv+' '+cmd+' '+dst+' :'+msg+'\n',path) @@ -195,7 +196,7 @@ while 1: os.write(wr,':'+serv+' 341 '+nick+' '+dst+' '+msg+'\n') - for path in os.listdir(os.getcwd()): + for path in os.listdir(root): try: if path != user: sock.sendto(':'+nick+'!'+user+'@'+serv+' INVITE '+dst+' :'+msg+'\n',path) diff --git a/src/urcrecv.pyx b/src/urcrecv.pyx
--- a/src/urcrecv.pyx +++ b/src/urcrecv.pyx @@ -5,6 +5,7 @@ import os os.chdir(sys.argv[1]) os.chroot(os.getcwd()) +root = os.getcwd() sock=socket.socket(1,2) sock.setblocking(0) @@ -20,7 +21,7 @@ while 1: if byte == '\n': break - for path in os.listdir(os.getcwd()): + for path in os.listdir(root): try: sock.sendto(buffer,path) except: diff --git a/src/urcstream.pyx b/src/urcstream.pyx
--- a/src/urcstream.pyx +++ b/src/urcstream.pyx @@ -26,6 +26,7 @@ signal.signal(15,sock_close) os.chdir(sys.argv[1]) os.chroot(os.getcwd()) +root = os.getcwd() sock=socket.socket(1,2) sock_close(0,0) @@ -59,7 +60,7 @@ while 1: buffer+=byte if byte == '\n': break - for path in os.listdir(os.getcwd()): + for path in os.listdir(root): try: if path != user: sock.sendto(buffer,path)
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 15:23:06 2024