diff options
author | Christof Schmitt <cs@samba.org> | 2018-04-24 13:53:41 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-05-07 09:56:11 +0200 |
commit | 7cfaf7000180c9308b18b1944dd41971f805bff1 (patch) | |
tree | 018a56e121ad0aeb3d911376a2f8a14cf6c912ed /source3 | |
parent | 2fcd26a31b0f0fd3778cadc31b497f3c4e132bbd (diff) | |
download | samba-7cfaf7000180c9308b18b1944dd41971f805bff1.tar.gz |
rpc_server: Fix NetSessEnum with stale sessions
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13407
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 25 22:49:07 CEST 2018 on sn-devel-144
(cherry picked from commit a6fade4e10760284ef56abf45d3fa70038091cbe)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/session.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c index 4ddb856930d..8b4c6609304 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); |