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 {
|
func ChangeToNoPermission() error {
|
||||||
_ = exec.Command("useradd", "-M", "-N", "packets").Run()
|
|
||||||
|
|
||||||
uid, err := GetPacketsUID()
|
uid, err := GetPacketsUID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return syscall.Setresuid(0, uid, 0)
|
return syscall.Setresuid(0, uid, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user