From 369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Dec 2000 01:02:11 +0000 Subject: Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy. (This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14) --- source3/utils/smbcontrol.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/utils/smbcontrol.c') diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 991d1d77d2..87d00eecbd 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -118,10 +118,17 @@ send a message to a named destination static BOOL send_message(char *dest, int msg_type, void *buf, int len, BOOL duplicates) { pid_t pid; + TDB_CONTEXT *the_tdb; + + the_tdb = tdb_open(lock_path("connections.tdb"), 0, 0, O_RDONLY, 0); + if (!the_tdb) { + fprintf(stderr,"Failed to open connections database in send_message.\n"); + return False; + } /* "smbd" is the only broadcast operation */ if (strequal(dest,"smbd")) { - return message_send_all(msg_type, buf, len, duplicates); + return message_send_all(the_tdb,msg_type, buf, len, duplicates); } else if (strequal(dest,"nmbd")) { pid = pidfile_pid(dest); if (pid == 0) { -- cgit