r21296: remove the session specific encryption from the attributes
[metze/samba/wip.git] / source4 / gtk / tools / gregedit.c
index fdbf5357ea412a167990f7eddbcf7894d2476acf..cf03eebec845da0e40f816eebc1e764bbb559b70 100644 (file)
@@ -21,8 +21,9 @@
 
 #include "includes.h"
 #include "lib/registry/registry.h"
-#include "lib/registry/reg_backend_rpc.h"
 #include "gtk/common/gtk-smb.h"
+#include "lib/events/events.h"
+#include "lib/registry/reg_backend_rpc.h"
 #include "auth/credentials/credentials.h"
 
 static GtkTreeStore *store_keys;
@@ -348,7 +349,7 @@ static void on_open_file_activate (GtkMenuItem *menuitem, gpointer user_data)
        switch(result) {
        case GTK_RESPONSE_OK:
                filename = strdup(gtk_file_selection_get_filename(GTK_FILE_SELECTION(openfilewin)));
-               error = reg_open_hive(NULL, user_data, filename, NULL, &root);
+               error = reg_open_hive(NULL, user_data, filename, NULL, NULL, &root);
                if(!W_ERROR_IS_OK(error)) {
                        gtk_show_werror(mainwin, "Error while opening hive", error);
                        break;
@@ -370,7 +371,7 @@ static void on_open_file_activate (GtkMenuItem *menuitem, gpointer user_data)
 static void on_open_gconf_activate(GtkMenuItem *menuitem, gpointer user_data)
 {
        struct registry_key *root;
-       WERROR error = reg_open_hive(NULL, "gconf", NULL, NULL, &root);
+       WERROR error = reg_open_hive(NULL, "gconf", NULL, NULL, NULL, &root);
        if(!W_ERROR_IS_OK(error)) {
                gtk_show_werror(mainwin, "Error while opening GConf", error);
                return;
@@ -384,7 +385,7 @@ static void on_open_gconf_activate(GtkMenuItem *menuitem, gpointer user_data)
 
 static void on_open_local_activate(GtkMenuItem *menuitem, gpointer user_data)
 {
-       WERROR error = reg_open_local(&registry);
+       WERROR error = reg_open_local(NULL, &registry, NULL, NULL);
        if(!W_ERROR_IS_OK(error)) {
                gtk_show_werror(mainwin, "Error while opening local registry", error);
                return;
@@ -411,6 +412,7 @@ static void on_open_remote_activate(GtkMenuItem *menuitem, gpointer user_data)
        cli_credentials_set_gtk_callbacks(creds);
 
        error = reg_open_remote(&registry, 
+                               NULL,
                                creds,
                                gtk_rpc_binding_dialog_get_binding_string(GTK_RPC_BINDING_DIALOG(rpcwin), mem_ctx),
                                NULL);
@@ -435,7 +437,7 @@ static void on_open_remote_activate(GtkMenuItem *menuitem, gpointer user_data)
 static void on_save_as_activate(GtkMenuItem *menuitem, gpointer user_data)
 {
        gint result;
-       WERROR error;
+       WERROR error = WERR_OK;
        GtkWidget *savefilewin = create_savefilewin();
        result = gtk_dialog_run(GTK_DIALOG(savefilewin));
        switch(result) {
@@ -951,7 +953,7 @@ static GtkWidget* create_savefilewin (void)
 
 static int gregedit_load_defaults(void)
 {
-       WERROR error = reg_open_local(&registry);
+       WERROR error = reg_open_local(NULL, &registry, NULL, NULL);
        if(!W_ERROR_IS_OK(error)) {
                gtk_show_werror(mainwin, "Error while loading local registry", error);
                return -1;
@@ -965,13 +967,13 @@ int main(int argc, char *argv[])
 {
        int ret;
 
-       registry_init();
-
        lp_load();
        setup_logging(argv[0], DEBUG_STDERR);
 
        mem_ctx = talloc_init("gregedit");
 
+       registry_init();
+
        gtk_init(&argc, &argv);
        mainwin = create_mainwindow();
        gtk_widget_show_all(mainwin);