@@ -73,11 +73,14 @@
const bufSize = 1024
buf := make([]byte, bufSize)
if lookupByName {
- rv := libc_getpwnam_r(syscall.StringBytePtr(username),
+ p := syscall.StringBytePtr(username)
+ syscall.Entersyscall()
+ rv := libc_getpwnam_r(p,
&pwd,
&buf[0],
bufSize,
&result)
+ syscall.Exitsyscall()
if rv != 0 {
return nil, fmt.Errorf("user: lookup username %s: %s", username, syscall.GetErrno())
}
@@ -85,11 +88,13 @@
return nil, UnknownUserError(username)
}
} else {
+ syscall.Entersyscall()
rv := libc_getpwuid_r(syscall.Uid_t(uid),
&pwd,
&buf[0],
bufSize,
&result)
+ syscall.Exitsyscall()
if rv != 0 {
return nil, fmt.Errorf("user: lookup userid %d: %s", uid, syscall.GetErrno())
}