localsocket

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package localsocket provides same-user Unix-domain HTTP transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, path string) (net.Conn, error)

DialContext connects only after both pathname custody and peer UID are verified. Peer credentials come from the kernel, not application bytes.

func Listen

func Listen(path string) (net.Listener, error)

Listen creates a 0600 Unix socket and rejects clients whose kernel-reported effective UID differs from the server's. Only a verified, refused stale socket is removed; a live socket or any other existing filesystem object is refused.

func ValidatePath

func ValidatePath(path string) error

ValidatePath requires an absolute canonical socket path inside an existing, euid-owned 0700 directory. Every ancestor must also prevent another local user from replacing the directory entry, including through symbolic links.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL