Skip to content

[Question] Could client and server communicate on pipes (stdin/stdout) instead of sockets? #574

@leo9800

Description

@leo9800

The scenario was a daemon (run as root) is handling inbound WebDAV requests and authenticate users with PAM, upon successful authentications, the filesystem-related functions/syscalls should be invoke as the user authed by PAM, not root.

I am trying to implement an RPC server as filesystem helper, which features filesystem related 'procedures' like open, close, read, write, mkdir, etc, and the main daemon act as RPC client.

On successful user login, the daemon (RPC client) spawn a filesystem helper (RPC server) with subprocess.Popen(), and the filesystem helper invokes os.setuid() & os.setgid() immediately after spawn, to invoke those function as the authenticated user.

The issue is, if RPyC is my RPC implementation, is it possible to operate it on PIPE (i.e. standard input/output, stdin/stdout) instead of TCP socket?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions