summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/utils/status.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 28a79d60185..f4b5f4e2c3d 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -43,6 +43,7 @@
#include "smbd/smbd.h"
#include "librpc/gen_ndr/notify.h"
#include "lib/conn_tdb.h"
+#include "serverid.h"
#define SMB_MAXPIDS 2048
static uid_t Ucrit_uid = 0; /* added by OH */
@@ -132,6 +133,11 @@ static void print_share_mode(const struct share_mode_entry *e,
}
count++;
+ if (do_checks && !serverid_exists(&e->pid)) {
+ /* the process for this entry does not exist any more */
+ return;
+ }
+
if (Ucrit_checkPid(e->pid)) {
d_printf("%-11s ",procid_str_static(&e->pid));
d_printf("%-9u ", (unsigned int)e->uid);