removing the second and useless exec.Command of useradd
This commit is contained in:
@@ -415,11 +415,9 @@ func GetPacketsUID() (int, error) {
|
||||
}
|
||||
|
||||
func ChangeToNoPermission() error {
|
||||
_ = exec.Command("useradd", "-M", "-N", "packets").Run()
|
||||
|
||||
uid, err := GetPacketsUID()
|
||||
if err != nil {
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return syscall.Setresuid(0, uid, 0)
|
||||
|
||||
Reference in New Issue
Block a user