diff --git a/selftest/knownfail b/selftest/knownfail index 44bdbd873ccc..a2aeed2690dd 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -343,4 +343,3 @@ # Disabling NTLM means you can't use samr to change the password ^samba.tests.ntlmdisabled.python\(ktest\).ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\) ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) -^samba3.blackbox.rpcclient_netsessenum.count2\(ad_member\) diff --git a/source3/smbd/session.c b/source3/smbd/session.c index 4ddb856930d0..8b4c66093044 100644 --- a/source3/smbd/session.c +++ b/source3/smbd/session.c @@ -139,6 +139,10 @@ static int gather_sessioninfo(const char *key, struct sessionid *session, return 0; } + if (!process_exists(session->pid)) { + return 0; + } + sesslist->sessions = talloc_realloc( sesslist->mem_ctx, sesslist->sessions, struct sessionid, sesslist->count+1);