diff options
author | Günther Deschner <gd@samba.org> | 2007-06-27 11:42:17 +0000 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2007-06-27 11:42:17 +0000 |
commit | 8b359aac158cf23d26b74e986cf097848d712f0d (patch) | |
tree | d1b7389f8635b90ccc64d04c3a635102331a984f | |
parent | e32360bc26e1cbd226b58d52d17b80ad7285d294 (diff) | |
download | samba-8b359aac158cf23d26b74e986cf097848d712f0d.tar.gz samba-8b359aac158cf23d26b74e986cf097848d712f0d.tar.xz samba-8b359aac158cf23d26b74e986cf097848d712f0d.zip |
r23627: Allow to pass down the lookup-level to rpccli_lsa_lookup_names().
Guenther
-rw-r--r-- | source/libsmb/libsmbclient.c | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_rpc.c | 2 | ||||
-rw-r--r-- | source/python/py_lsa.c | 2 | ||||
-rw-r--r-- | source/rpc_client/cli_lsarpc.c | 3 | ||||
-rw-r--r-- | source/rpc_parse/parse_lsa.c | 5 | ||||
-rw-r--r-- | source/rpcclient/cmd_lsarpc.c | 4 | ||||
-rw-r--r-- | source/utils/net_rpc.c | 2 | ||||
-rw-r--r-- | source/utils/net_rpc_rights.c | 2 | ||||
-rw-r--r-- | source/utils/net_util.c | 2 | ||||
-rw-r--r-- | source/utils/netlookup.c | 4 | ||||
-rw-r--r-- | source/utils/smbcacls.c | 2 | ||||
-rw-r--r-- | source/utils/smbcquotas.c | 2 |
12 files changed, 17 insertions, 15 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 75e54a3087e..47c552d3c98 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -3859,7 +3859,7 @@ convert_string_to_sid(struct cli_state *ipc_cli, } if (!NT_STATUS_IS_OK(rpccli_lsa_lookup_names(pipe_hnd, ipc_cli->mem_ctx, - pol, 1, &str, NULL, &sids, + pol, 1, &str, NULL, 1, &sids, &types))) { result = False; goto done; diff --git a/source/nsswitch/winbindd_rpc.c b/source/nsswitch/winbindd_rpc.c index 03aa42012e4..7899d62fea9 100644 --- a/source/nsswitch/winbindd_rpc.c +++ b/source/nsswitch/winbindd_rpc.c @@ -290,7 +290,7 @@ NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain, return result; result = rpccli_lsa_lookup_names(cli, mem_ctx, &lsa_policy, 1, - (const char**) &full_name, NULL, &sids, &types); + (const char**) &full_name, NULL, 1, &sids, &types); if (!NT_STATUS_IS_OK(result)) return result; diff --git a/source/python/py_lsa.c b/source/python/py_lsa.c index 39abc60e25e..74047000314 100644 --- a/source/python/py_lsa.c +++ b/source/python/py_lsa.c @@ -187,7 +187,7 @@ static PyObject *lsa_lookup_names(PyObject *self, PyObject *args) ntstatus = rpccli_lsa_lookup_names( hnd->cli, mem_ctx, &hnd->pol, num_names, names, - NULL, &sids, &name_types); + NULL, 1, &sids, &name_types); if (!NT_STATUS_IS_OK(ntstatus) && NT_STATUS_V(ntstatus) != 0x107) { PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus)); diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c index ee5fed5b980..f4c0cb44c82 100644 --- a/source/rpc_client/cli_lsarpc.c +++ b/source/rpc_client/cli_lsarpc.c @@ -446,6 +446,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, POLICY_HND *pol, int num_names, const char **names, const char ***dom_names, + int level, DOM_SID **sids, uint32 **types) { @@ -462,7 +463,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, ZERO_STRUCT(ref); r.dom_ref = &ref; - init_q_lookup_names(mem_ctx, &q, pol, num_names, names); + init_q_lookup_names(mem_ctx, &q, pol, num_names, names, level); CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_LOOKUPNAMES, q, r, diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c index 17ddd0efa52..c5cb9732682 100644 --- a/source/rpc_parse/parse_lsa.c +++ b/source/rpc_parse/parse_lsa.c @@ -1567,7 +1567,8 @@ makes a structure. ********************************************************************/ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, - POLICY_HND *hnd, int num_names, const char **names) + POLICY_HND *hnd, int num_names, const char **names, + int level) { unsigned int i; @@ -1578,7 +1579,7 @@ void init_q_lookup_names(TALLOC_CTX *mem_ctx, LSA_Q_LOOKUP_NAMES *q_l, q_l->pol = *hnd; q_l->num_entries = num_names; q_l->num_entries2 = num_names; - q_l->lookup_level = 1; + q_l->lookup_level = level; if (num_names) { if ((q_l->uni_name = TALLOC_ZERO_ARRAY(mem_ctx, UNISTR2, num_names)) == NULL) { diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 96642ed65b7..e3fe57e127f 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -47,7 +47,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, 1, &name, NULL, &sids, &sid_types); + result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, 1, &name, NULL, 1, &sids, &sid_types); if (!NT_STATUS_IS_OK(result)) goto done; @@ -239,7 +239,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct rpc_pipe_client *cli, goto done; result = rpccli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, - (const char**)(argv + 1), NULL, &sids, &types); + (const char**)(argv + 1), NULL, 1, &sids, &types); if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != NT_STATUS_V(STATUS_SOME_UNMAPPED)) diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index f8000801329..ce8720844ed 100644 --- a/source/utils/net_rpc.c +++ b/source/utils/net_rpc.c @@ -2030,7 +2030,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli, } result = rpccli_lsa_lookup_names(pipe_hnd, mem_ctx, &lsa_pol, 1, - &name, NULL, &sids, &types); + &name, NULL, 1, &sids, &types); if (NT_STATUS_IS_OK(result)) { sid_copy(sid, &sids[0]); diff --git a/source/utils/net_rpc_rights.c b/source/utils/net_rpc_rights.c index 5c999e4cb0e..4189f20658a 100644 --- a/source/utils/net_rpc_rights.c +++ b/source/utils/net_rpc_rights.c @@ -76,7 +76,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *pipe_hnd, return result; result = rpccli_lsa_lookup_names(pipe_hnd, mem_ctx, &pol, 1, &name, - NULL, &sids, &sid_types); + NULL, 1, &sids, &sid_types); if ( NT_STATUS_IS_OK(result) ) sid_copy( sid, &sids[0] ); diff --git a/source/utils/net_util.c b/source/utils/net_util.c index db6420d6b77..be12b0f8661 100644 --- a/source/utils/net_util.c +++ b/source/utils/net_util.c @@ -59,7 +59,7 @@ NTSTATUS net_rpc_lookup_name(TALLOC_CTX *mem_ctx, struct cli_state *cli, } result = rpccli_lsa_lookup_names(lsa_pipe, mem_ctx, &pol, 1, - &name, &dom_names, &sids, &types); + &name, &dom_names, 1, &sids, &types); if (!NT_STATUS_IS_OK(result)) { /* This can happen easily, don't log an error */ diff --git a/source/utils/netlookup.c b/source/utils/netlookup.c index 33b6c4bb257..82e1b8af801 100644 --- a/source/utils/netlookup.c +++ b/source/utils/netlookup.c @@ -206,8 +206,8 @@ NTSTATUS net_lookup_sid_from_name(TALLOC_CTX *ctx, const char *full_name, DOM_SI &csp->pol, 1, &full_name, - NULL, &sids, - &types); + NULL, 1, + &sids, &types); if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c index 5717df2dfaf..4a742510900 100644 --- a/source/utils/smbcacls.c +++ b/source/utils/smbcacls.c @@ -145,7 +145,7 @@ static BOOL StringToSid(DOM_SID *sid, const char *str) if (!cacls_open_policy_hnd() || !NT_STATUS_IS_OK(rpccli_lsa_lookup_names(global_pipe_hnd, global_hack_cli->mem_ctx, - &pol, 1, &str, NULL, &sids, + &pol, 1, &str, NULL, 1, &sids, &types))) { result = False; goto done; diff --git a/source/utils/smbcquotas.c b/source/utils/smbcquotas.c index ae2e6a5956f..bf05441c21e 100644 --- a/source/utils/smbcquotas.c +++ b/source/utils/smbcquotas.c @@ -116,7 +116,7 @@ static BOOL StringToSid(DOM_SID *sid, const char *str) if (!cli_open_policy_hnd() || !NT_STATUS_IS_OK(rpccli_lsa_lookup_names(global_pipe_hnd, cli_ipc->mem_ctx, - &pol, 1, &str, NULL, &sids, + &pol, 1, &str, NULL, 1, &sids, &types))) { result = False; goto done; |