Communicate with stdin/stdout

50 views
Skip to first unread message

Leo

unread,
Apr 1, 2025, 10:13:27 AM4/1/25
to grpc.io
Hi folks,

I am working on a WebDAV daemon (WebDAV server) written in Python which runs filesystem-related functions as the authenticated user than root or nobody.

The approach I tried to fulfill this attribute is implementing a so-called filesystem-helper which is a RPC server implements filesystem related functions. (e.g. open, read, write, close, mkdir, etc)

The daemon act as a RPC client and spawn filesystem helpers on successful user authentication by invoking subprocess.Popen(). The helper invokes os.setuid() & os.setgid() immediately after spawn.

Thus the helper is now running as the authenticated user and accepting requests from the deamon.

My question is, (TCP/UDP) sockets are used by RPC implementations between their client-server communication conventionally, if gRPC is being used in this scenario, is it possible for the server (filesystem helper, child process) and client (daemon, parent process) communicate on stdin/stdout?

Thanks,
Leo
Reply all
Reply to author
Forward
Message has been deleted
0 new messages