I have a Python server that does not work as root, which stands for the application that I am developing. However, there are some application features that require access to RAW sockets, which means root privileges.
Obviously, I donβt want to start the main server as root, so my solution is to create a daemon process or a command line script that runs as root, providing secure access to the specified functions.
However, I want to disable the stdin / stdout connection and use an RPC interaction style such as Pyro . But this provides an RPC interface to everyone who has network access to the machine, while I know that a process that calls RPC methods will be a different process on the same machine.
Is there any standard method for processing interprocess procedures that can be used in a similar one (only for the local machine)? I suppose the server is doing something like this:
And the process running as root exposing the method:
Is this possible?
source share