From cda320f04313750bb813c902a11823ff92852f05 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 7 Aug 2014 14:40:03 -0500 Subject: [PATCH] wbemprox: Stub __SystemSecurity::SetSD. --- dlls/wbemprox/builtin.c | 6 +++++- dlls/wbemprox/security.c | 35 ++++++++++++++++++++++++++++++++ dlls/wbemprox/wbemprox_private.h | 2 ++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 2a431f2f720..abc0b3e0039 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -496,6 +496,7 @@ static const struct column col_stdregprov[] = static const struct column col_systemsecurity[] = { { method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, + { method_setsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }, }; static const struct column col_videocontroller[] = { @@ -807,6 +808,7 @@ struct record_stdregprov struct record_systemsecurity { class_method *getsd; + class_method *setsd; }; struct record_videocontroller { @@ -857,6 +859,8 @@ static const struct record_param data_param[] = { class_stdregprovW, method_getstringvalueW, -1, param_valueW, CIM_STRING }, { class_systemsecurityW, method_getsdW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, { class_systemsecurityW, method_getsdW, -1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY }, + { class_systemsecurityW, method_setsdW, 1, param_sdW, CIM_UINT8|CIM_FLAG_ARRAY }, + { class_systemsecurityW, method_setsdW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, }; #define FLAVOR_ID (WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE | WBEM_FLAVOR_NOT_OVERRIDABLE |\ @@ -881,7 +885,7 @@ static const struct record_stdregprov data_stdregprov[] = }; static const struct record_systemsecurity data_systemsecurity[] = { - { security_get_sd } + { security_get_sd, security_set_sd } }; /* check if row matches condition and update status */ diff --git a/dlls/wbemprox/security.c b/dlls/wbemprox/security.c index b2e29be5df1..0ff6c0bff94 100644 --- a/dlls/wbemprox/security.c +++ b/dlls/wbemprox/security.c @@ -180,3 +180,38 @@ HRESULT security_get_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClass return hr; } + + +HRESULT security_set_sd( IWbemClassObject *obj, IWbemClassObject *in, IWbemClassObject **out ) +{ + VARIANT retval; + IWbemClassObject *sig, *out_params = NULL; + HRESULT hr; + + FIXME("stub\n"); + + hr = create_signature( class_systemsecurityW, method_setsdW, PARAM_OUT, &sig ); + + if (SUCCEEDED(hr)) + { + hr = IWbemClassObject_SpawnInstance( sig, 0, &out_params ); + + IWbemClassObject_Release( sig ); + } + + if (SUCCEEDED(hr)) + { + set_variant( VT_UI4, S_OK, NULL, &retval ); + hr = IWbemClassObject_Put( out_params, param_returnvalueW, 0, &retval, CIM_UINT32 ); + + if (SUCCEEDED(hr) && out) + { + *out = out_params; + IWbemClassObject_AddRef( out_params ); + } + + IWbemClassObject_Release( out_params ); + } + + return hr; +} diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h index c6a5e905867..daf8611f1f8 100644 --- a/dlls/wbemprox/wbemprox_private.h +++ b/dlls/wbemprox/wbemprox_private.h @@ -225,6 +225,7 @@ HRESULT service_resume_service(IWbemClassObject *, IWbemClassObject *, IWbemClas HRESULT service_start_service(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT service_stop_service(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; HRESULT security_get_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; +HRESULT security_set_sd(IWbemClassObject *, IWbemClassObject *, IWbemClassObject **) DECLSPEC_HIDDEN; static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static inline void *heap_alloc( size_t len ) @@ -271,6 +272,7 @@ static const WCHAR method_getsdW[] = {'G','e','t','S','D',0}; static const WCHAR method_getstringvalueW[] = {'G','e','t','S','t','r','i','n','g','V','a','l','u','e',0}; static const WCHAR method_pauseserviceW[] = {'P','a','u','s','e','S','e','r','v','i','c','e',0}; static const WCHAR method_resumeserviceW[] = {'R','e','s','u','m','e','S','e','r','v','i','c','e',0}; +static const WCHAR method_setsdW[] = {'S','e','t','S','D',0}; static const WCHAR method_startserviceW[] = {'S','t','a','r','t','S','e','r','v','i','c','e',0}; static const WCHAR method_stopserviceW[] = {'S','t','o','p','S','e','r','v','i','c','e',0};