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 <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 29 08:14:22 UTC 2025 on atb-devel-224
#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"
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;
}