summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-03-30 00:45:26 +0000
committerJeremy Allison <jra@samba.org>2002-03-30 00:45:26 +0000
commit846670fa0e280b32e70d14048c75d9af70a61225 (patch)
treebc7e328622bdc2a539a2dc27d05f703f5c51ae01 /source3/rpc_server
parent0f9de3f1176752977acc0afa0aff281554a460fd (diff)
downloadsamba-846670fa0e280b32e70d14048c75d9af70a61225.tar.gz
samba-846670fa0e280b32e70d14048c75d9af70a61225.tar.bz2
samba-846670fa0e280b32e70d14048c75d9af70a61225.zip
Hack to share pipe handles between lsa and samr pipes as NT4.x usrmgr
insists on re-using an lsa handle opened on a pipe then closed - this keeps them around so long as a samr pipe is also open. Jeremy. (This used to be commit f029bd348c8c16a8774c3fb4f7f1d76470c7688f)
Diffstat (limited to 'source3/rpc_server')
-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",