lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.11-18-g2862447

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.11-18-g2862447



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  2862447125783a2430862eb6eaa5f4510f57b13f (commit)
      from  15f67be789342e8ef124c00d2202c0cde66900af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=2862447125783a2430862eb6eaa5f4510f57b13f

commit 2862447125783a2430862eb6eaa5f4510f57b13f
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sun Nov 14 17:30:19 2021 +0100

    Fix running pynslcd without uid option
    
    Fixes 65695aa

diff --git a/pynslcd/mypidfile.py b/pynslcd/mypidfile.py
index 42935e2..d36a8af 100644
--- a/pynslcd/mypidfile.py
+++ b/pynslcd/mypidfile.py
@@ -1,7 +1,7 @@
 
 # mypidfile.py - functions for properly locking a PIDFile
 #
-# Copyright (C) 2010-2019 Arthur de Jong
+# Copyright (C) 2010-2021 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -40,8 +40,9 @@ class MyPIDLockFile(object):
         piddir = os.path.dirname(self.path)
         if not os.path.isdir(piddir):
             os.mkdir(piddir)
-            u, gid = cfg.get_usergid()
-            os.chown(piddir, u.u.pw_uid, gid)
+            if cfg.uid is not None:
+                u, gid = cfg.get_usergid()
+                os.chown(piddir, u.u.pw_uid, gid)
         fd = os.open(self.path, os.O_RDWR | os.O_CREAT, 0o644)
         try:
             fcntl.lockf(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)

-----------------------------------------------------------------------

Summary of changes:
 pynslcd/mypidfile.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
nss-pam-ldapd