s3-rpc_server: Added a svcctl shutdown function.
authorAndreas Schneider <asn@samba.org>
Tue, 1 Feb 2011 10:49:33 +0000 (11:49 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 7 Feb 2011 11:32:01 +0000 (12:32 +0100)
Signed-off-by: Günther Deschner <gd@samba.org>
source3/include/proto.h
source3/rpc_server/srv_svcctl_nt.c
source3/services/svc_winreg_glue.c

index 4094df776956fe1c8bfcf87be878d56c3ba91bbe..ddb5c5e68b71a7845dbf85374717b831ab8be2e8 100644 (file)
@@ -4372,6 +4372,7 @@ char *valid_share_pathname(TALLOC_CTX *ctx, const char *dos_pathname);
 /* The following definitions come from rpc_server/srv_svcctl_nt.c  */
 
 bool init_service_op_table( void );
+bool shutdown_service_op_table(void);
 
 /* The following definitions come from rpcclient/cmd_dfs.c  */
 
index cc6cf84eb62b9a2909d587ec4fedb1f0a9e3c1f5..e8e55ca981ffc92f44587c32d29a9024e6988062 100644 (file)
@@ -106,6 +106,13 @@ bool init_service_op_table( void )
        return True;
 }
 
+bool shutdown_service_op_table(void)
+{
+       TALLOC_FREE(svcctl_ops);
+
+       return true;
+}
+
 /********************************************************************
 ********************************************************************/
 
index 2ab9914bccc53387dbade6e66fefe61810651142..2b35556caf198bcd61517e6532e352f682ee48ee 100644 (file)
@@ -106,12 +106,12 @@ struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
                                                &key_hnd,
                                                &result);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("svcctl_set_secdesc: Could not open %s - %s\n",
+               DEBUG(2, ("svcctl_set_secdesc: Could not open %s - %s\n",
                          key, nt_errstr(status)));
                return NULL;
        }
        if (!W_ERROR_IS_OK(result)) {
-               DEBUG(0, ("svcctl_set_secdesc: Could not open %s - %s\n",
+               DEBUG(2, ("svcctl_set_secdesc: Could not open %s - %s\n",
                          key, win_errstr(result)));
                return NULL;
        }
@@ -123,14 +123,14 @@ struct security_descriptor *svcctl_get_secdesc(TALLOC_CTX *mem_ctx,
                                        &sd,
                                        &result);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("svcctl_get_secdesc: error getting value 'Security': "
+               DEBUG(2, ("svcctl_get_secdesc: error getting value 'Security': "
                          "%s\n", nt_errstr(status)));
                return NULL;
        }
        if (W_ERROR_EQUAL(result, WERR_BADFILE)) {
                goto fallback_to_default_sd;
        } else if (!W_ERROR_IS_OK(result)) {
-               DEBUG(0, ("svcctl_get_secdesc: error getting value 'Security': "
+               DEBUG(2, ("svcctl_get_secdesc: error getting value 'Security': "
                          "%s\n", win_errstr(result)));
                return NULL;
        }
@@ -221,12 +221,12 @@ bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
                                                 &action,
                                                 &result);
                if (!NT_STATUS_IS_OK(status)) {
-                       DEBUG(0, ("svcctl_set_secdesc: Could not create key %s: %s\n",
+                       DEBUG(2, ("svcctl_set_secdesc: Could not create key %s: %s\n",
                                wkey.name, nt_errstr(status)));
                        goto done;
                }
                if (!W_ERROR_IS_OK(result)) {
-                       DEBUG(0, ("svcctl_set_secdesc: Could not create key %s: %s\n",
+                       DEBUG(2, ("svcctl_set_secdesc: Could not create key %s: %s\n",
                                wkey.name, win_errstr(result)));
                        goto done;
                }
@@ -293,12 +293,12 @@ const char *svcctl_get_string_value(TALLOC_CTX *mem_ctx,
                                                &key_hnd,
                                                &result);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("svcctl_get_string_value: Could not open %s - %s\n",
+               DEBUG(2, ("svcctl_get_string_value: Could not open %s - %s\n",
                          path, nt_errstr(status)));
                goto done;
        }
        if (!W_ERROR_IS_OK(result)) {
-               DEBUG(0, ("svcctl_get_string_value: Could not open %s - %s\n",
+               DEBUG(2, ("svcctl_get_string_value: Could not open %s - %s\n",
                          path, win_errstr(result)));
                goto done;
        }