# python 3 only
import socket
+import subprocess
+
+def _geteuid(pid):
+ def _shuffle_fd3():
+ dup(1,3)
+ dup(2,1)
+ sp = subprocess.Popen(preexec_fn = _suffle_fd3,
+ stdin = subprocess.DEVNULL, stdout = subprocess.PIPE,
+ close_fds = False,
+ args = ['gdb', '-p', pid, '-batch', '-ex'
+ 'python import os; os.fdopen(30,"w").write("%d\n" % '
+ +'gdb.parse_and_eval("(uid_t)geteuid()"))'])
+ (output, dummy) = sp.communicate()
+
+2009
def fish(pid, fds):
# -> list of fds in our process
+ sockname = '/run/user/' +
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
def deliver(pid, fds, path):