Skip to content

Commit

Permalink
rpc_server: Fix NetSessEnum with stale sessions
Browse files Browse the repository at this point in the history
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407

Signed-off-by: Christof Schmitt <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>

Autobuild-User(master): Jeremy Allison <[email protected]>
Autobuild-Date(master): Wed Apr 25 22:49:07 CEST 2018 on sn-devel-144
  • Loading branch information
chs authored and jrasamba committed Apr 25, 2018
1 parent e04846c commit a6fade4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion selftest/knownfail
Original file line number Diff line number Diff line change
Expand Up @@ -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\)
4 changes: 4 additions & 0 deletions source3/smbd/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a6fade4

Please sign in to comment.