s3: Remove a bunch of calls to procid_self()
[samba.git] / source3 / utils / smbcontrol.c
index 0a3a94a1df0489dcddb7a3f2a226e136e0e66742..747c35ceba44b6f3e54f512a68b570b1dbbb88f3 100644 (file)
@@ -197,13 +197,13 @@ static bool do_idmap(struct messaging_context *msg_ctx,
        }
 
        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);
@@ -954,10 +954,10 @@ static bool do_winbind_online(struct messaging_context *msg_ctx,
        /* Remove the entry in the winbindd_cache tdb to tell a later
           starting winbindd that we're online. */
 
-       tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
+       tdb = tdb_open_log(state_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
        if (!tdb) {
                fprintf(stderr, "Cannot open the tdb %s for writing.\n",
-                       cache_path("winbindd_cache.tdb"));
+                       state_path("winbindd_cache.tdb"));
                return False;
        }
 
@@ -984,14 +984,14 @@ static bool do_winbind_offline(struct messaging_context *msg_ctx,
           starting winbindd that we're offline. We may actually create
           it here... */
 
-       tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
+       tdb = tdb_open_log(state_path("winbindd_cache.tdb"),
                                WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE,
                                TDB_DEFAULT|TDB_INCOMPATIBLE_HASH /* TDB_CLEAR_IF_FIRST */,
                                O_RDWR|O_CREAT, 0600);
 
        if (!tdb) {
                fprintf(stderr, "Cannot open the tdb %s for writing.\n",
-                       cache_path("winbindd_cache.tdb"));
+                       state_path("winbindd_cache.tdb"));
                return False;
        }
 
@@ -1202,7 +1202,7 @@ static void my_make_nmb_name( struct nmb_name *n, const char *name, int type)
        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,
@@ -1471,14 +1471,14 @@ int main(int argc, const char **argv)
        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
          * shell needs 0. */ 
 
        if (!(evt_ctx = tevent_context_init(NULL)) ||
-           !(msg_ctx = messaging_init(NULL, procid_self(), evt_ctx))) {
+           !(msg_ctx = messaging_init(NULL, evt_ctx))) {
                fprintf(stderr, "could not init messaging context\n");
                TALLOC_FREE(frame);
                exit(1);