Skip to content

x/net/unix: support credentials on unix sockets #1101

Closed
@rminnich

Description

@rminnich
It would be useful to have these three functions:
func (c *UnixConn) Pid (pid int, err os.Error)

func (c *UnixConn) Uid (uid int, err os.Error)

func (c *UnixConn) Gid (gid int, err os.Error)

or even this:
func (c *UnixConn) PeerCred (pid, uid, gid int, err os.Error)

These are returned by SO_PEERCRED. This info is used just often enough
that these functions would come in
very handy.

I would submit a patch but my lawyers are still working on the CLA.

Thanks

ron

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions