mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
修正32位系统下的整数溢出问题
This commit is contained in:
+2
-2
@@ -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