From d46b0f532f1a5c9845dd902a9bd5a3c9c51cb8bd Mon Sep 17 00:00:00 2001 From: Joel Rebello Date: Fri, 2 Jun 2017 17:28:47 +0200 Subject: [PATCH] fix undefined var 'user' when a user, group is defined in diamond.conf, we end up with the below error, ERROR: Failed to set UID/GID. global name 'user' is not defined --- bin/diamond | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/diamond b/bin/diamond index f59e7d41f..9d683ce83 100755 --- a/bin/diamond +++ b/bin/diamond @@ -201,6 +201,7 @@ def main(): try: if gid != -1 and uid != -1: # Manually set the groups since they aren't set by default + user = pwd.getpwuid(uid).pw_name # Python 2.7+ if hasattr(os, 'initgroups'):