github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/syscall/unix/user_darwin.go (about) 1 // Copyright 2022 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package unix 6 7 import ( 8 "github.com/shogo82148/std/syscall" 9 ) 10 11 func Getgrouplist(name *byte, gid uint32, gids *uint32, n *int32) error 12 13 const ( 14 SC_GETGR_R_SIZE_MAX = 0x46 15 SC_GETPW_R_SIZE_MAX = 0x47 16 ) 17 18 type Passwd struct { 19 Name *byte 20 Passwd *byte 21 Uid uint32 22 Gid uint32 23 Change int64 24 Class *byte 25 Gecos *byte 26 Dir *byte 27 Shell *byte 28 Expire int64 29 } 30 31 type Group struct { 32 Name *byte 33 Passwd *byte 34 Gid uint32 35 Mem **byte 36 } 37 38 func Getpwnam(name *byte, pwd *Passwd, buf *byte, size uintptr, result **Passwd) syscall.Errno 39 40 func Getpwuid(uid uint32, pwd *Passwd, buf *byte, size uintptr, result **Passwd) syscall.Errno 41 42 func Getgrnam(name *byte, grp *Group, buf *byte, size uintptr, result **Group) syscall.Errno 43 44 func Getgrgid(gid uint32, grp *Group, buf *byte, size uintptr, result **Group) syscall.Errno 45 46 func Sysconf(key int32) int64