mirror of
https://github.com/lwch/natpass
synced 2025-10-22 12:09:23 +08:00
修正32位系统下的整数溢出问题
This commit is contained in:
@@ -14,8 +14,8 @@ func BuildDir(dir, u string) {
|
||||
if len(u) > 0 {
|
||||
us, err := user.Lookup(u)
|
||||
runtime.Assert(err)
|
||||
uid, _ := strconv.ParseInt(us.Uid, 10, 64)
|
||||
gid, _ := strconv.ParseInt(us.Gid, 10, 64)
|
||||
uid, _ := strconv.ParseInt(us.Uid, 10, 32)
|
||||
gid, _ := strconv.ParseInt(us.Gid, 10, 32)
|
||||
runtime.Assert(os.Chown(dir, int(uid), int(gid)))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user