#include "includes.h"
#include "system/filesys.h"
#include "popt_common.h"
-#include "librpc/gen_ndr/messaging.h"
#include "librpc/gen_ndr/spoolss.h"
#include "nt_printing.h"
#include "printing/notify.h"
+#include "libsmb/nmblib.h"
+#include "messages.h"
+#include "util_tdb.h"
#if HAVE_LIBUNWIND_H
#include <libunwind.h>
if (procid_to_pid(&pid) != 0)
return NT_STATUS_IS_OK(
messaging_send_buf(msg_ctx, pid, msg_type,
- (uint8 *)buf, len));
+ (const uint8 *)buf, len));
ret = message_send_all(msg_ctx, msg_type, buf, len, &n_sent);
DEBUG(10,("smbcontrol/send_message: broadcast message to "
{
char *pidstr;
- pidstr = procid_str(talloc_tos(), &pid);
+ pidstr = server_id_str(talloc_tos(), &pid);
printf("PID %s: %.*s", pidstr, (int)data->length,
(const char *)data->data);
TALLOC_FREE(pidstr);
}
if (strcmp(argv[1], "flush") == 0) {
- msg_type = MSG_IDMAP_FLUSH;
+ msg_type = ID_CACHE_FLUSH;
}
else if (strcmp(argv[1], "delete") == 0) {
- msg_type = MSG_IDMAP_DELETE;
+ msg_type = ID_CACHE_DELETE;
}
else if (strcmp(argv[1], "kill") == 0) {
- msg_type = MSG_IDMAP_KILL;
+ msg_type = ID_CACHE_KILL;
}
else if (strcmp(argv[1], "help") == 0) {
fprintf(stdout, "%s", usage);
struct server_id pid,
DATA_BLOB *data)
{
- char *src_string = procid_str(NULL, &pid);
+ char *src_string = server_id_str(NULL, &pid);
printf("PONG from pid %s\n", src_string);
TALLOC_FREE(src_string);
num_replies++;
notify_printer_byname(messaging_event_context(msg_ctx),
msg_ctx, argv[2], attribute,
- CONST_DISCARD(char *, argv[4]));
+ discard_const_p(char, argv[4]));
goto send;
}
struct server_id pid,
DATA_BLOB *data)
{
- char *src_string = procid_str(NULL, &pid);
+ char *src_string = server_id_str(NULL, &pid);
printf("Winbindd cache is %svalid. (answer from pid %s)\n",
(*(data->data) == 0 ? "" : "NOT "), src_string);
TALLOC_FREE(src_string);
strupper_m(unix_name);
push_ascii(n->name, unix_name, sizeof(n->name), STR_TERMINATE);
n->name_type = (unsigned int)type & 0xFF;
- push_ascii(n->scope, global_scope(), 64, STR_TERMINATE);
+ push_ascii(n->scope, lp_netbios_scope(), 64, STR_TERMINATE);
}
static bool do_nodestatus(struct messaging_context *msg_ctx,
if (argc <= 1)
usage(pc);
- lp_load(get_dyn_CONFIGFILE(),False,False,False,True);
+ lp_load_global(get_dyn_CONFIGFILE());
/* Need to invert sense of return code -- samba
* routines mostly return True==1 for success, but