The branch, master has been updated
       via  01fbe3eeb23 lib: Add a safeguard for misconfigured directory 
permissions
       via  152f4938fda lib: Remove an #include "includes.h"
      from  33762753f03 lib/util: Fix CID 1414760 - Resource leak

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 01fbe3eeb23ecaf8b117c8744ddb6d3f1c14da85
Author: Volker Lendecke <[email protected]>
Date:   Fri Sep 26 13:56:37 2025 +0200

    lib: Add a safeguard for misconfigured directory permissions
    
    An installation I've seen had the path to the msg.lock directory set
    up such that only root could access it. We're calling
    serverid_exists() as non-root, so this is a pretty bad error. Log this
    as an error in syslog by default and assume this PID still exists.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Mon Sep 29 08:14:22 UTC 2025 on atb-devel-224

commit 152f4938fda16314c278253973fb23f2a4f31f1e
Author: Volker Lendecke <[email protected]>
Date:   Fri Sep 26 13:52:14 2025 +0200

    lib: Remove an #include "includes.h"
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

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

Summary of changes:
 source3/lib/serverid.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 70739c79d2f..84eb719c3ec 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -17,10 +17,13 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "includes.h"
+#include "replace.h"
+#include "lib/util/samba_util.h"
 #include "lib/util/server_id.h"
+#include "lib/util/debug.h"
+#include "source3/lib/util_procid.h"
+#include "source3/param/param_proto.h"
 #include "serverid.h"
-#include "lib/param/param.h"
 #include "ctdbd_conn.h"
 #include "lib/messages_ctdb.h"
 #include "lib/messaging/messages_dgm.h"
@@ -41,6 +44,12 @@ static bool serverid_exists_local(const struct server_id *id)
 
        ret = messaging_dgm_get_unique(id->pid, &unique);
        if (ret != 0) {
+               if (ret == EACCES) {
+                       DBG_ERR("Access denied on msg.lock file for PID %jd, "
+                               "assuming process still exists\n",
+                               (intmax_t)id->pid);
+                       return true;
+               }
                return false;
        }
 


-- 
Samba Shared Repository

Reply via email to