s3-rpc_server: Rename client -> remote_client and server -> local_server
[amitay/samba.git] / source3 / services / svc_winreg_glue.c
index dc367c2c41d9b4bd787517fff63284609adfcf04..7d7871d888466180944651039b71886eb50c25df 100644 (file)
@@ -77,7 +77,7 @@ struct security_descriptor* svcctl_gen_service_sd(TALLOC_CTX *mem_ctx)
 
 struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
                                               struct messaging_context *msg_ctx,
-                                              const struct auth_serversupplied_info *session_info,
+                                              const struct auth_session_info *session_info,
                                               const char *name)
 {
        struct dcerpc_binding_handle *h = NULL;
@@ -127,7 +127,7 @@ struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
                          "%s\n", nt_errstr(status)));
                return NULL;
        }
-       if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
+       if (W_ERROR_EQUAL(result, WERR_FILE_NOT_FOUND)) {
                goto fallback_to_default_sd;
        } else if (!W_ERROR_IS_OK(result)) {
                DEBUG(2, ("svcctl_get_secdesc: error getting value 'Security': "
@@ -147,13 +147,14 @@ done:
 }
 
 bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
-                       const struct auth_serversupplied_info *session_info,
+                       const struct auth_session_info *session_info,
                        const char *name,
                        struct security_descriptor *sd)
 {
        struct dcerpc_binding_handle *h = NULL;
        uint32_t access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
-       struct policy_handle hive_hnd, key_hnd;
+       struct policy_handle hive_hnd;
+       struct policy_handle key_hnd = { 0, };
        char *key = NULL;
        bool ok = false;
        TALLOC_CTX *tmp_ctx;
@@ -202,7 +203,7 @@ bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
 
                wkey.name = talloc_asprintf(tmp_ctx, "%s\\Security", key);
                if (wkey.name == NULL) {
-                       result = WERR_NOMEM;
+                       result = WERR_NOT_ENOUGH_MEMORY;
                        goto done;
                }
 
@@ -258,7 +259,7 @@ done:
 
 const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
                                    struct messaging_context *msg_ctx,
-                                   const struct auth_serversupplied_info *session_info,
+                                   const struct auth_session_info *session_info,
                                    const char *key_name,
                                    const char *value_name)
 {
@@ -320,7 +321,7 @@ done:
 
 const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
                                   struct messaging_context *msg_ctx,
-                                  const struct auth_serversupplied_info *session_info,
+                                  const struct auth_session_info *session_info,
                                   const char *name)
 {
        const char *display_name = NULL;
@@ -343,7 +344,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *mem_ctx,
 
 const char *svcctl_lookup_description(TALLOC_CTX *mem_ctx,
                                      struct messaging_context *msg_ctx,
-                                     const struct auth_serversupplied_info *session_info,
+                                     const struct auth_session_info *session_info,
                                      const char *name)
 {
        const char *description = NULL;