From e6b77b3fbd3b3c526180dfea1eb8a34de63efb95 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Mon, 17 Sep 2018 04:34:20 +0300 Subject: Drop privileges only if current user is root --- src/utils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/utils.nim b/src/utils.nim index 379dfea..748e1e8 100644 --- a/src/utils.nim +++ b/src/utils.nim @@ -246,7 +246,7 @@ let initialUser* = try: none(string) let uid = uidString.get.parseInt - if uid == 0: none(User) else: some(getUser(uid)) + if uid == 0 or currentUser.uid != 0: none(User) else: some(getUser(uid)) except: none(User) -- cgit v1.2.3-70-g09d2