The Samba-Bugzilla – Attachment 1765 Details for
Bug 3567
cli_nt_session_open removed, but not all references to it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Is this right?
3567-something-like-this.patch (text/plain), 9.05 KB, created by
Daniel Jarboe
on 2006-03-01 10:22:37 UTC
(
hide
)
Description:
Is this right?
Filename:
MIME Type:
Creator:
Daniel Jarboe
Created:
2006-03-01 10:22:37 UTC
Size:
9.05 KB
patch
obsolete
>diff -u -r samba-3.0.21c-SLES9~/source/libsmb/libsmbclient.c samba-3.0.21c-SLES9/source/libsmb/libsmbclient.c >--- samba-3.0.21c-SLES9~/source/libsmb/libsmbclient.c 2006-02-28 13:59:42.000000000 -0500 >+++ samba-3.0.21c-SLES9/source/libsmb/libsmbclient.c 2006-03-01 09:02:48.000000000 -0500 >@@ -939,7 +939,7 @@ > PI_LSARPC, > &nt_status); > if (!pipe_hnd) { >- DEBUG(1, ("cli_nt_session_open fail!\n")); >+ DEBUG(1, ("cli_rpc_pipe_open_noauth fail!\n")); > errno = ENOTSUP; > cli_shutdown(&ipc_srv->cli); > free(ipc_srv); >diff -u -r samba-3.0.21c-SLES9~/source/python/py_common.c samba-3.0.21c-SLES9/source/python/py_common.c >--- samba-3.0.21c-SLES9~/source/python/py_common.c 2006-02-28 13:59:42.000000000 -0500 >+++ samba-3.0.21c-SLES9/source/python/py_common.c 2006-03-01 09:08:20.000000000 -0500 >@@ -230,7 +230,7 @@ > return NULL; > } > >- if (!cli_nt_session_open(cli, pipe_idx)) { >+ if (!cli_rpc_pipe_open_noauth(cli, pipe_idx, &result)) { > cli_shutdown(cli); > asprintf(errstr, "error opening pipe index %d", pipe_idx); > return NULL; >diff -u -r samba-3.0.21c-SLES9~/source/rpc_client/cli_lsarpc.c samba-3.0.21c-SLES9/source/rpc_client/cli_lsarpc.c >--- samba-3.0.21c-SLES9~/source/rpc_client/cli_lsarpc.c 2006-02-28 13:59:42.000000000 -0500 >+++ samba-3.0.21c-SLES9/source/rpc_client/cli_lsarpc.c 2006-03-01 09:33:58.000000000 -0500 >@@ -1134,6 +1134,7 @@ > struct cli_state cli; > NTSTATUS result; > POLICY_HND lsa_pol; >+ struct rpc_pipe_client *lsa_pipe; > BOOL ret = False; > > ZERO_STRUCT(cli); >@@ -1197,19 +1198,20 @@ > > /* Fetch domain sid */ > >- if (!cli_nt_session_open(&cli, PI_LSARPC)) { >+ lsa_pipe = cli_rpc_pipe_open_noauth(&cli, PI_LSARPC, &result); >+ if (!lsa_pipe) { > DEBUG(0, ("fetch_domain_sid: Error connecting to SAM pipe\n")); > goto done; > } > >- result = cli_lsa_open_policy(&cli, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol); >+ result = rpccli_lsa_open_policy(lsa_pipe, cli.mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, &lsa_pol); > if (!NT_STATUS_IS_OK(result)) { > DEBUG(0, ("fetch_domain_sid: Error opening lsa policy handle. %s\n", > nt_errstr(result) )); > goto done; > } > >- result = cli_lsa_query_info_policy(&cli, cli.mem_ctx, &lsa_pol, 5, domain, psid); >+ result = rpccli_lsa_query_info_policy(lsa_pipe, cli.mem_ctx, &lsa_pol, 5, domain, psid); > if (!NT_STATUS_IS_OK(result)) { > DEBUG(0, ("fetch_domain_sid: Error querying lsa policy handle. %s\n", > nt_errstr(result) )); >diff -u -r samba-3.0.21c-SLES9~/source/rpcclient/cmd_reg.c samba-3.0.21c-SLES9/source/rpcclient/cmd_reg.c >--- samba-3.0.21c-SLES9~/source/rpcclient/cmd_reg.c 2005-04-18 12:38:14.000000000 -0400 >+++ samba-3.0.21c-SLES9/source/rpcclient/cmd_reg.c 2006-03-01 09:51:12.518116596 -0500 >@@ -54,6 +54,8 @@ > BOOL res2 = True; > int i; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND key_pol; > fstring full_keyname; > fstring key_name; >@@ -94,7 +96,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (lsa_pipe=cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, full_keyname, key_name, >@@ -204,8 +206,8 @@ > } > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res1 && res2) > { >@@ -225,6 +227,8 @@ > BOOL res = True; > BOOL res1 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND key_pol; > fstring full_keyname; > fstring key_name; >@@ -253,7 +257,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, full_keyname, key_name, >@@ -304,8 +308,8 @@ > } > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res1) > { >@@ -326,6 +330,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND parent_pol; > fstring full_keyname; > fstring keyname; >@@ -416,7 +422,7 @@ > dump_data(10, (char *)value.buffer, value.buf_len); > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, keyname, parent_name, >@@ -449,8 +455,8 @@ > /* close the registry handles */ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > { >@@ -472,6 +478,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND parent_pol; > fstring full_keyname; > fstring keyname; >@@ -495,7 +503,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, keyname, parent_name, >@@ -524,8 +532,8 @@ > /* close the registry handles */ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > { >@@ -547,6 +555,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND parent_pol; > fstring full_keyname; > fstring parent_name; >@@ -570,7 +580,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, parent_name, key_name, >@@ -603,7 +613,7 @@ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > > /* close the session */ >- cli_nt_session_close(smb_cli); >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > { >@@ -625,6 +635,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND parent_pol; > POLICY_HND key_pol; > fstring full_keyname; >@@ -659,7 +671,7 @@ > sam_access.mask = SEC_RIGHTS_READ; > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, parent_key, parent_name, >@@ -695,8 +707,8 @@ > /* close the registry handles */ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > { >@@ -718,6 +730,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND key_pol; > fstring full_keyname; > fstring key_name; >@@ -738,7 +752,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, full_keyname, key_name, >@@ -790,8 +804,8 @@ > /* close the registry handles */ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > { >@@ -813,6 +827,8 @@ > BOOL res3 = True; > BOOL res4 = True; > >+ struct rpc_pipe_client *lsa_pipe = NULL; >+ NTSTATUS perr; > POLICY_HND key_pol; > fstring full_keyname; > fstring key_name; >@@ -833,7 +849,7 @@ > } > > /* open WINREG session. */ >- res = res ? cli_nt_session_open(smb_cli, PI_WINREG) : False; >+ res = res ? (cli_rpc_pipe_open_noauth(smb_cli, PI_WINREG, &perr)!=NULL) : False; > > /* open registry receive a policy handle */ > res = res ? do_reg_connect(smb_cli, full_keyname, key_name, >@@ -882,8 +898,8 @@ > /* close the registry handles */ > res = res ? do_reg_close(smb_cli, &info->dom.reg_pol_connect) : False; > >- /* close the session */ >- cli_nt_session_close(smb_cli); >+ /* close the open named pipe */ >+ cli_rpc_pipe_close(lsa_pipe); > > if (res && res3 && res4) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3567
:
1765
|
1773