MCPcopy
hub / github.com/opencontainers/runc / SetLinuxPersonality

Function SetLinuxPersonality

libcontainer/system/linux.go:156–162  ·  view source on GitHub ↗

SetLinuxPersonality sets the Linux execution personality. For more information see the personality syscall documentation. checkout getLinuxPersonalityFromStr() from libcontainer/specconv/spec_linux.go for type conversion.

(personality int)

Source from the content-addressed store, hash-verified

154// SetLinuxPersonality sets the Linux execution personality. For more information see the personality syscall documentation.
155// checkout getLinuxPersonalityFromStr() from libcontainer/specconv/spec_linux.go for type conversion.
156func SetLinuxPersonality(personality int) error {
157 _, _, errno := unix.Syscall(unix.SYS_PERSONALITY, uintptr(personality), 0, 0)
158 if errno != 0 {
159 return &os.SyscallError{Syscall: "set_personality", Err: errno}
160 }
161 return nil
162}
163
164// GetPtyPeer is a wrapper for ioctl(TIOCGPTPEER).
165func GetPtyPeer(ptyFd uintptr, unsafePeerPath string, flags int) (*os.File, error) {

Callers 1

setupPersonalityFunction · 0.92

Calls 1

SyscallMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…