summaryrefslogtreecommitdiff
path: root/source3/utils/smbcontrol.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-15 01:02:11 +0000
committerJeremy Allison <jra@samba.org>2000-12-15 01:02:11 +0000
commit369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4 (patch)
treee4237cf9927822e2b49faea870dd13012e5a5cb5 /source3/utils/smbcontrol.c
parent1fc3e43f9b9b431e8499d2ebd7f557b9bf2ff14c (diff)
downloadsamba-369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4.tar.gz
samba-369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4.tar.bz2
samba-369f5fd1d7a6e6298bc3cbe01e3aaed0106f6cf4.zip
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)
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r--source3/utils/smbcontrol.c9
1 files changed, 8 insertions, 1 deletions
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) {