fix check uid, gid values (#1309)
This commit is contained in:
parent
b66366c28c
commit
e35efc5b2d
1 changed files with 2 additions and 2 deletions
|
@ -425,14 +425,14 @@ func getProcessAtr(username string, groupname string) (*syscall.SysProcAttr, err
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if uid < 0 && uid > math.MaxInt32 {
|
||||
if uid < 0 || uid > math.MaxInt32 {
|
||||
return nil, fmt.Errorf("out of bound uid")
|
||||
}
|
||||
gid, err := strconv.ParseInt(g.Gid, 10, 32)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if gid < 0 && gid > math.MaxInt32 {
|
||||
if gid < 0 || gid > math.MaxInt32 {
|
||||
return nil, fmt.Errorf("out of bound gid")
|
||||
}
|
||||
return &syscall.SysProcAttr{
|
||||
|
|
Loading…
Reference in a new issue