diff options
Diffstat (limited to 'source4/gtk/common')
-rw-r--r-- | source4/gtk/common/gtk-smb.c | 19 | ||||
-rw-r--r-- | source4/gtk/common/gtk-smb.h | 4 |
2 files changed, 8 insertions, 15 deletions
diff --git a/source4/gtk/common/gtk-smb.c b/source4/gtk/common/gtk-smb.c index f42516c854..06bca9bf86 100644 --- a/source4/gtk/common/gtk-smb.c +++ b/source4/gtk/common/gtk-smb.c @@ -297,19 +297,14 @@ GtkWidget *gtk_rpc_binding_dialog_new (BOOL nocredentials, struct sam_pipe *sam_ return GTK_WIDGET(d); } -const char *gtk_rpc_binding_dialog_get_username(GtkRpcBindingDialog *d) +struct cli_credentials *gtk_rpc_binding_dialog_get_credentials(GtkRpcBindingDialog *d) { - return gtk_entry_get_text(GTK_ENTRY(d->entry_username)); -} - -const char *gtk_rpc_binding_dialog_get_userdomain(GtkRpcBindingDialog *d) -{ - return gtk_entry_get_text(GTK_ENTRY(d->entry_userdomain)); -} - -const char *gtk_rpc_binding_dialog_get_password(GtkRpcBindingDialog *d) -{ - return gtk_entry_get_text(GTK_ENTRY(d->entry_password)); + struct cli_credentials *ret = talloc(d->mem_ctx, struct cli_credentials); + cli_credentials_set_username(ret, gtk_entry_get_text(GTK_ENTRY(d->entry_username)), CRED_SPECIFIED); + cli_credentials_set_password(ret, gtk_entry_get_text(GTK_ENTRY(d->entry_password)), CRED_SPECIFIED); + cli_credentials_set_domain(ret, gtk_entry_get_text(GTK_ENTRY(d->entry_userdomain)), CRED_SPECIFIED); + + return ret; } const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d) diff --git a/source4/gtk/common/gtk-smb.h b/source4/gtk/common/gtk-smb.h index e85eb5be85..e78e8541f8 100644 --- a/source4/gtk/common/gtk-smb.h +++ b/source4/gtk/common/gtk-smb.h @@ -71,9 +71,7 @@ const char *gtk_select_host_dialog_get_host (GtkSelectHostDialog *d); GType gtk_select_host_dialog_get_type (void); void gtk_show_werror(GtkWidget *win, WERROR err); const char *gtk_rpc_binding_dialog_get_binding_string(GtkRpcBindingDialog *d, TALLOC_CTX *mem_ctx); -const char *gtk_rpc_binding_dialog_get_username(GtkRpcBindingDialog *d); -const char *gtk_rpc_binding_dialog_get_userdomain(GtkRpcBindingDialog *d); -const char *gtk_rpc_binding_dialog_get_password(GtkRpcBindingDialog *d); +struct cli_credentials *gtk_rpc_binding_dialog_get_credentials(GtkRpcBindingDialog *d); const char *gtk_rpc_binding_dialog_get_host(GtkRpcBindingDialog *d); GtkWidget *gtk_select_domain_dialog_new (struct dcerpc_pipe *sam_pipe); GType gtk_select_domain_dialog_get_type (void); |