isunbejo / exaproxy

Automatically exported from code.google.com/p/exaproxy
Other
0 stars 1 forks source link

maybe error in daemon.py #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run exaproxy with option to drop privilege to user nobody (default)
2. look at ps aux output
3. privileged are not dropped even launching from root

What is the expected output? What do you see instead?
user owning process should be nobody

What version of the product are you using? On what operating system?
latest version from mercurial on debian wheezy with python 2.6

Please provide any additional information below.
Problem is in file daemon.py line 45:
uid = os.getpid()

think line should be:
uid = os.getuid()

Then you must invert the dropping of privilege of uid and gid:
first you must drop gid and then uid; now after you drop uid you are unable to 
drop privilege for gid (you are now user nobody) and program exit.

Bye, Mello.

Original issue reported on code.google.com by mell...@gmail.com on 20 Jun 2012 at 8:12

GoogleCodeExporter commented 9 years ago
Perfectly well spotted ! This bug was present in exabgp where the code was 
copied from. Both project have been fixed.

Original comment by thomas.mangin on 25 Jun 2012 at 7:20