File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,21 @@ func chuser(user string) error {
4949
5050 if g != nil {
5151 gid , _ := strconv .ParseUint (g .Gid , 10 , 32 )
52- err := syscall .Setgid (int (gid ))
52+ err := syscall .Setgid (int (uint32 ( gid ) ))
5353 if err != nil {
5454 return fmt .Errorf ("failed to setgid %d: %v" , gid , err )
5555 }
5656 } else if u != nil {
5757 gid , _ := strconv .ParseUint (u .Gid , 10 , 32 )
58- err := syscall .Setgid (int (gid ))
58+ err := syscall .Setgid (int (uint32 ( gid ) ))
5959 if err != nil {
6060 return fmt .Errorf ("failed to setgid %d: %v" , gid , err )
6161 }
6262 }
6363
6464 if u != nil {
6565 uid , _ := strconv .ParseUint (u .Uid , 10 , 32 )
66- err := syscall .Setuid (int (uid ))
66+ err := syscall .Setuid (int (uint32 ( uid ) ))
6767 if err != nil {
6868 return fmt .Errorf ("failed to setuid %d: %v" , uid , err )
6969 }
You can’t perform that action at this time.
0 commit comments