summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 0e06a04177..84c3c5a959 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -28,6 +28,16 @@
#endif
/****************************************************************************
+ Hack as handles need to be persisant over lsa pipe closes so long as a samr
+ pipe is open. JRA.
+****************************************************************************/
+
+static BOOL is_samr_lsa_pipe(const char *pipe_name)
+{
+ return (strstr(pipe_name, "samr") || strstr(pipe_name, "lsa"));
+}
+
+/****************************************************************************
Initialise a policy handle list on a pipe. Handle list is shared between all
pipes of the same name.
****************************************************************************/
@@ -38,7 +48,8 @@ BOOL init_pipe_handle_list(pipes_struct *p, char *pipe_name)
struct handle_list *hl = NULL;
for (plist = get_first_internal_pipe(); plist; plist = get_next_internal_pipe(plist)) {
- if (strequal( plist->name, pipe_name)) {
+ if (strequal( plist->name, pipe_name) ||
+ (is_samr_lsa_pipe(plist->name) && is_samr_lsa_pipe(pipe_name))) {
if (!plist->pipe_handles) {
pstring msg;
slprintf(msg, sizeof(msg)-1, "init_pipe_handles: NULL pipe_handle pointer in pipe %s",