diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-05-03 13:46:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:29 -0500 |
commit | eb3b5f28d4686802070a770ef29bb71dd4d82d54 (patch) | |
tree | fca42c3d2816bbcd6bc221ae28d9373144b63d53 /source4/gtk/tools/gwsam.c | |
parent | 46727924a0ca1c255311121e8f0e2ecf7a66db1a (diff) | |
download | samba-eb3b5f28d4686802070a770ef29bb71dd4d82d54.tar.gz samba-eb3b5f28d4686802070a770ef29bb71dd4d82d54.tar.bz2 samba-eb3b5f28d4686802070a770ef29bb71dd4d82d54.zip |
r6600: Rework of the GTK credentials system; the credentials information is
now in a seperate (optional) dialog rather then in the binding dialog; also
supports specifying anonymous connections (which we didn't before).
(This used to be commit 8671e1a1fa8ef416c1819f811653eff190d3074a)
Diffstat (limited to 'source4/gtk/tools/gwsam.c')
-rw-r--r-- | source4/gtk/tools/gwsam.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c index 71765424d7..f712d43ba1 100644 --- a/source4/gtk/tools/gwsam.c +++ b/source4/gtk/tools/gwsam.c @@ -113,10 +113,11 @@ static void connect_sam(void) GtkRpcBindingDialog *d; NTSTATUS status; struct samr_Connect r; + struct cli_credentials *cred; TALLOC_CTX *mem_ctx; gint result; - d = GTK_RPC_BINDING_DIALOG(gtk_rpc_binding_dialog_new(FALSE, NULL)); + d = GTK_RPC_BINDING_DIALOG(gtk_rpc_binding_dialog_new(NULL)); result = gtk_dialog_run(GTK_DIALOG(d)); switch(result) { case GTK_RESPONSE_ACCEPT: @@ -127,12 +128,14 @@ static void connect_sam(void) } mem_ctx = talloc_init("gwsam_connect"); + cred = cli_credentials_init(mem_ctx); + cli_credentials_guess(cred); + cli_credentials_set_gtk_callbacks(cred); + /* If connected, get list of jobs */ status = dcerpc_pipe_connect_b(mem_ctx, &sam_pipe, gtk_rpc_binding_dialog_get_binding(d, mem_ctx), - DCERPC_SAMR_UUID, DCERPC_SAMR_VERSION, - gtk_rpc_binding_dialog_get_credentials(d) - ); + DCERPC_SAMR_UUID, DCERPC_SAMR_VERSION, cred ); if(!NT_STATUS_IS_OK(status)) { gtk_show_ntstatus(mainwin, "While connecting to SAMR interface", status); |