From: Günther Deschner Date: Thu, 14 Feb 2008 12:31:55 +0000 (+0100) Subject: Remove unused marshalling for LSA_LOOKUP_PRIV_VALUE. X-Git-Tag: release-3-2-0pre2~37^2~195 X-Git-Url: http://git.samba.org/samba.git/?p=gd%2Fsamba%2F.git;a=commitdiff_plain;h=8125d8557fb4b27873f8eabc6ad1019491d18cce Remove unused marshalling for LSA_LOOKUP_PRIV_VALUE. Guenther --- diff --git a/source/include/rpc_lsa.h b/source/include/rpc_lsa.h index 0e61b7b2d94..4e6a1e16cc4 100644 --- a/source/include/rpc_lsa.h +++ b/source/include/rpc_lsa.h @@ -500,16 +500,6 @@ typedef struct { UNISTR2 unistring; } LSA_STRING; -typedef struct { - POLICY_HND pol; /* policy handle */ - LSA_STRING privname; -} LSA_Q_LOOKUP_PRIV_VALUE; - -typedef struct { - LUID luid; - NTSTATUS status; -} LSA_R_LOOKUP_PRIV_VALUE; - typedef struct lsa_q_addprivs { POLICY_HND pol; /* policy handle */ diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c index c5ad98c3ada..9d9a131a1ab 100644 --- a/source/rpc_client/cli_lsarpc.c +++ b/source/rpc_client/cli_lsarpc.c @@ -452,46 +452,6 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, return result; } -/** Get a privilege value given its name */ - -NTSTATUS rpccli_lsa_lookup_priv_value(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, const char *name, LUID *luid) -{ - prs_struct qbuf, rbuf; - LSA_Q_LOOKUP_PRIV_VALUE q; - LSA_R_LOOKUP_PRIV_VALUE r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Marshall data and send request */ - - init_lsa_q_lookup_priv_value(&q, pol, name); - - CLI_DO_RPC( cli, mem_ctx, PI_LSARPC, LSA_LOOKUPPRIVVALUE, - q, r, - qbuf, rbuf, - lsa_io_q_lookup_priv_value, - lsa_io_r_lookup_priv_value, - NT_STATUS_UNSUCCESSFUL); - - result = r.status; - - if (!NT_STATUS_IS_OK(result)) { - goto done; - } - - /* Return output parameters */ - - (*luid).low=r.luid.low; - (*luid).high=r.luid.high; - - done: - - return result; -} - /* Enumerate account rights This is similar to enum_privileges but takes a SID directly, avoiding the open_account call. */ diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c index 2230c9147f9..602021146f5 100644 --- a/source/rpc_parse/parse_lsa.c +++ b/source/rpc_parse/parse_lsa.c @@ -1276,73 +1276,6 @@ static bool lsa_io_privilege_set(const char *desc, PRIVILEGE_SET *out, prs_struc return True; } -void init_lsa_string( LSA_STRING *uni, const char *string ) -{ - init_unistr2(&uni->unistring, string, UNI_FLAGS_NONE); - init_uni_hdr(&uni->hdr, &uni->unistring); -} - -void init_lsa_q_lookup_priv_value(LSA_Q_LOOKUP_PRIV_VALUE *q_u, POLICY_HND *hnd, const char *name) -{ - memcpy(&q_u->pol, hnd, sizeof(q_u->pol)); - init_lsa_string( &q_u->privname, name ); -} - -bool smb_io_lsa_string( const char *desc, LSA_STRING *string, prs_struct *ps, int depth ) -{ - prs_debug(ps, depth, desc, "smb_io_lsa_string"); - depth++; - - if(!smb_io_unihdr ("hdr", &string->hdr, ps, depth)) - return False; - if(!smb_io_unistr2("unistring", &string->unistring, string->hdr.buffer, ps, depth)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes an LSA_Q_LOOKUP_PRIV_VALUE structure. -********************************************************************/ - -bool lsa_io_q_lookup_priv_value(const char *desc, LSA_Q_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_q_lookup_priv_value"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!smb_io_pol_hnd("pol", &out->pol, ps, depth)) - return False; - if(!smb_io_lsa_string("privname", &out->privname, ps, depth)) - return False; - - return True; -} - -/******************************************************************* - Reads or writes an LSA_R_LOOKUP_PRIV_VALUE structure. -********************************************************************/ - -bool lsa_io_r_lookup_priv_value(const char *desc, LSA_R_LOOKUP_PRIV_VALUE *out, prs_struct *ps, int depth) -{ - prs_debug(ps, depth, desc, "lsa_io_r_lookup_priv_value"); - depth++; - - if(!prs_align(ps)) - return False; - - if(!lsa_io_luid("luid", &out->luid, ps, depth)) - return False; - - if(!prs_ntstatus("status", ps, depth, &out->status)) - return False; - - return True; -} - - /******************************************************************* Reads or writes an LSA_Q_ADDPRIVS structure. ********************************************************************/