mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-30 11:53:30 +00:00
Bump golang.org/x/net from 0.24.0 to 0.36.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.36.0. - [Commits](https://github.com/golang/net/compare/v0.24.0...v0.36.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Alex Ellis
parent
57163e27cf
commit
6dcdab832d
87
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
87
vendor/golang.org/x/sys/unix/syscall_solaris.go
generated
vendored
@ -1102,3 +1102,90 @@ func (s *Strioctl) SetInt(i int) {
|
||||
func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
|
||||
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
|
||||
}
|
||||
|
||||
// Ucred Helpers
|
||||
// See ucred(3c) and getpeerucred(3c)
|
||||
|
||||
//sys getpeerucred(fd uintptr, ucred *uintptr) (err error)
|
||||
//sys ucredFree(ucred uintptr) = ucred_free
|
||||
//sys ucredGet(pid int) (ucred uintptr, err error) = ucred_get
|
||||
//sys ucredGeteuid(ucred uintptr) (uid int) = ucred_geteuid
|
||||
//sys ucredGetegid(ucred uintptr) (gid int) = ucred_getegid
|
||||
//sys ucredGetruid(ucred uintptr) (uid int) = ucred_getruid
|
||||
//sys ucredGetrgid(ucred uintptr) (gid int) = ucred_getrgid
|
||||
//sys ucredGetsuid(ucred uintptr) (uid int) = ucred_getsuid
|
||||
//sys ucredGetsgid(ucred uintptr) (gid int) = ucred_getsgid
|
||||
//sys ucredGetpid(ucred uintptr) (pid int) = ucred_getpid
|
||||
|
||||
// Ucred is an opaque struct that holds user credentials.
|
||||
type Ucred struct {
|
||||
ucred uintptr
|
||||
}
|
||||
|
||||
// We need to ensure that ucredFree is called on the underlying ucred
|
||||
// when the Ucred is garbage collected.
|
||||
func ucredFinalizer(u *Ucred) {
|
||||
ucredFree(u.ucred)
|
||||
}
|
||||
|
||||
func GetPeerUcred(fd uintptr) (*Ucred, error) {
|
||||
var ucred uintptr
|
||||
err := getpeerucred(fd, &ucred)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := &Ucred{
|
||||
ucred: ucred,
|
||||
}
|
||||
// set the finalizer on the result so that the ucred will be freed
|
||||
runtime.SetFinalizer(result, ucredFinalizer)
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func UcredGet(pid int) (*Ucred, error) {
|
||||
ucred, err := ucredGet(pid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := &Ucred{
|
||||
ucred: ucred,
|
||||
}
|
||||
// set the finalizer on the result so that the ucred will be freed
|
||||
runtime.SetFinalizer(result, ucredFinalizer)
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (u *Ucred) Geteuid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGeteuid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getruid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetruid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getsuid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetsuid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getegid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetegid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getrgid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetrgid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getsgid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetsgid(u.ucred)
|
||||
}
|
||||
|
||||
func (u *Ucred) Getpid() int {
|
||||
defer runtime.KeepAlive(u)
|
||||
return ucredGetpid(u.ucred)
|
||||
}
|
||||
|
Reference in New Issue
Block a user