Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getpwuid_r (0.32 sec)

  1. src/internal/syscall/unix/user_darwin.go

    		uintptr(unsafe.Pointer(buf)),
    		size,
    		uintptr(unsafe.Pointer(result)),
    		0)
    	return syscall.Errno(errno)
    }
    
    //go:cgo_import_dynamic libc_getpwuid_r getpwuid_r  "/usr/lib/libSystem.B.dylib"
    func libc_getpwuid_r_trampoline()
    
    func Getpwuid(uid uint32, pwd *Passwd, buf *byte, size uintptr, result **Passwd) syscall.Errno {
    	// Note: Returns an errno as its actual result, not in global errno.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 16:09:09 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  2. src/os/user/user.go

    resolving user and group ids to names, and listing supplementary group IDs.
    One is written in pure Go and parses /etc/passwd and /etc/group. The other
    is cgo-based and relies on the standard C library (libc) routines such as
    getpwuid_r, getgrnam_r, and getgrouplist.
    
    When cgo is available, and the required routines are implemented in libc
    for a particular platform, cgo-based (libc-backed) code is used.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. src/os/user/cgo_lookup_cgo.go

    #include <sys/types.h>
    #include <pwd.h>
    #include <grp.h>
    #include <stdlib.h>
    #include <string.h>
    
    static struct passwd mygetpwuid_r(int uid, char *buf, size_t buflen, int *found, int *perr) {
    	struct passwd pwd;
    	struct passwd *result;
    	memset (&pwd, 0, sizeof(pwd));
    	*perr = getpwuid_r(uid, &pwd, buf, buflen, &result);
    	*found = result != NULL;
    	return pwd;
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 16 17:45:51 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  4. src/os/user/cgo_lookup_unix.go

    	buf := make([]byte, kind.initialSize())
    	for {
    		errno := f(buf)
    		if errno == 0 {
    			return nil
    		} else if runtime.GOOS == "aix" && errno+1 == 0 {
    			// On AIX getpwuid_r appears to return -1,
    			// not ERANGE, on buffer overflow.
    		} else if errno != syscall.ERANGE {
    			return errno
    		}
    		newSize := len(buf) * 2
    		if !isSizeReasonable(int64(newSize)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:08:14 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. src/os/user/cgo_lookup_syscall.go

    	return pwd, result != nil, errno
    }
    
    func _C_getpwuid_r(uid _C_uid_t, buf *_C_char, size _C_size_t) (pwd _C_struct_passwd, found bool, errno syscall.Errno) {
    	var result *_C_struct_passwd
    	errno = unix.Getpwuid(uid, &pwd, buf, size, &result)
    	return pwd, result != nil, errno
    }
    
    func _C_getgrnam_r(name *_C_char, buf *_C_char, size _C_size_t) (grp _C_struct_group, found bool, errno syscall.Errno) {
    	var result *_C_struct_group
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 11 04:31:34 UTC 2022
    - 2.2K bytes
    - Viewed (0)
Back to top