From bb1394a8383be01359a24d906f2d93053c2171b5 Mon Sep 17 00:00:00 2001 From: Joel Scheuner Date: Mon, 23 Oct 2023 17:04:39 +0200 Subject: [PATCH] Skip dropping privileges for root user (#26) --- cmd/localstack/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/localstack/main.go b/cmd/localstack/main.go index b519965..67a2bd4 100644 --- a/cmd/localstack/main.go +++ b/cmd/localstack/main.go @@ -145,7 +145,7 @@ func main() { bootstrap, handler := getBootstrap(os.Args) // Switch to non-root user and drop root privileges - if IsRootUser() && lsOpts.User != "" { + if IsRootUser() && lsOpts.User != "" && lsOpts.User != "root" { uid := 993 gid := 990 AddUser(lsOpts.User, uid, gid)