From d6777a66c0dbd0c356059644b57070d4587d83ea Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Thu, 23 Aug 2018 09:29:56 +1200 Subject: [PATCH] source4 smbd: Make the service_details structure constant. Make the service_details structure a static const. Signed-off-by: Gary Lockyer --- source4/cldap_server/cldap_server.c | 2 +- source4/dns_server/dns_server.c | 2 +- source4/dsdb/dns/dns_update.c | 2 +- source4/dsdb/kcc/kcc_service.c | 2 +- source4/dsdb/repl/drepl_service.c | 2 +- source4/echo_server/echo_server.c | 2 +- source4/kdc/kdc-heimdal.c | 2 +- source4/kdc/kdc-service-mit.c | 2 +- source4/ldap_server/ldap_server.c | 2 +- source4/nbt_server/nbt_server.c | 2 +- source4/ntp_signd/ntp_signd.c | 2 +- source4/rpc_server/service_rpc.c | 2 +- source4/smb_server/service_smb.c | 2 +- source4/smbd/service.c | 2 +- source4/web_server/web_server.c | 2 +- source4/winbind/winbindd.c | 2 +- source4/wrepl_server/wrepl_server.c | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c index d93ac0b35b3..65d983f7295 100644 --- a/source4/cldap_server/cldap_server.c +++ b/source4/cldap_server/cldap_server.c @@ -248,7 +248,7 @@ static void cldapd_task_init(struct task_server *task) */ NTSTATUS server_service_cldapd_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 9db11330e50..c7c1cdde038 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -923,7 +923,7 @@ static void dns_task_init(struct task_server *task) NTSTATUS server_service_dns_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true, }; diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c index de873376201..08e7eb2224a 100644 --- a/source4/dsdb/dns/dns_update.c +++ b/source4/dsdb/dns/dns_update.c @@ -712,7 +712,7 @@ static void dnsupdate_task_init(struct task_server *task) */ NTSTATUS server_service_dnsupdate_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true, }; diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c index 76423780dc8..e1bbae2abc1 100644 --- a/source4/dsdb/kcc/kcc_service.c +++ b/source4/dsdb/kcc/kcc_service.c @@ -352,7 +352,7 @@ static void kccsrv_task_init(struct task_server *task) */ NTSTATUS server_service_kcc_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index 10772d47439..9789e784a13 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -533,7 +533,7 @@ static void dreplsrv_task_init(struct task_server *task) */ NTSTATUS server_service_drepl_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true, }; diff --git a/source4/echo_server/echo_server.c b/source4/echo_server/echo_server.c index 90f8616ca11..657180f760c 100644 --- a/source4/echo_server/echo_server.c +++ b/source4/echo_server/echo_server.c @@ -324,7 +324,7 @@ static void echo_task_init(struct task_server *task) */ NTSTATUS server_service_echo_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/kdc/kdc-heimdal.c b/source4/kdc/kdc-heimdal.c index 83ace269d5d..8f09c41d74d 100644 --- a/source4/kdc/kdc-heimdal.c +++ b/source4/kdc/kdc-heimdal.c @@ -465,7 +465,7 @@ static void kdc_task_init(struct task_server *task) /* called at smbd startup - register ourselves as a server service */ NTSTATUS server_service_kdc_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, /* * Need to prevent pre-forking on kdc. diff --git a/source4/kdc/kdc-service-mit.c b/source4/kdc/kdc-service-mit.c index 1d28fc4e6eb..5d111ee82d2 100644 --- a/source4/kdc/kdc-service-mit.c +++ b/source4/kdc/kdc-service-mit.c @@ -352,7 +352,7 @@ NTSTATUS server_service_mitkdc_init(TALLOC_CTX *mem_ctx); NTSTATUS server_service_mitkdc_init(TALLOC_CTX *mem_ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, /* * Need to prevent pre-forking on kdc. diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index b5251e3623e..5b1db0c109a 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -1278,7 +1278,7 @@ failed: NTSTATUS server_service_ldap_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = false, .inhibit_pre_fork = false }; diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c index 6bdf9b45374..84cd507fe13 100644 --- a/source4/nbt_server/nbt_server.c +++ b/source4/nbt_server/nbt_server.c @@ -105,7 +105,7 @@ static void nbtd_task_init(struct task_server *task) */ NTSTATUS server_service_nbtd_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c index 508adcf7b36..a392929c78b 100644 --- a/source4/ntp_signd/ntp_signd.c +++ b/source4/ntp_signd/ntp_signd.c @@ -549,7 +549,7 @@ static void ntp_signd_task_init(struct task_server *task) /* called at smbd startup - register ourselves as a server service */ NTSTATUS server_service_ntp_signd_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c index eb75184a05f..f7d1a9f3c7d 100644 --- a/source4/rpc_server/service_rpc.c +++ b/source4/rpc_server/service_rpc.c @@ -142,7 +142,7 @@ failed: NTSTATUS server_service_rpc_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { /* * This is a SNOWFLAKE, but sadly one that we * will have to keep for now. The RPC server diff --git a/source4/smb_server/service_smb.c b/source4/smb_server/service_smb.c index 3f0f009ce3b..bea7eb9285b 100644 --- a/source4/smb_server/service_smb.c +++ b/source4/smb_server/service_smb.c @@ -94,7 +94,7 @@ failed: /* called at smbd startup - register ourselves as a server service */ NTSTATUS server_service_smb_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/smbd/service.c b/source4/smbd/service.c index e7808727a23..0874fce20fc 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -40,7 +40,7 @@ static struct registered_server { NTSTATUS register_server_service(TALLOC_CTX *ctx, const char *name, void (*task_init) (struct task_server *), - struct service_details *details) + const struct service_details *details) { struct registered_server *srv; srv = talloc(ctx, struct registered_server); diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c index 9c4da2c23c9..d72524c8873 100644 --- a/source4/web_server/web_server.c +++ b/source4/web_server/web_server.c @@ -371,7 +371,7 @@ failed: /* called at smbd startup - register ourselves as a server service */ NTSTATUS server_service_web_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true }; diff --git a/source4/winbind/winbindd.c b/source4/winbind/winbindd.c index 7fb0836b6a5..e422e623b84 100644 --- a/source4/winbind/winbindd.c +++ b/source4/winbind/winbindd.c @@ -89,7 +89,7 @@ NTSTATUS server_service_winbindd_init(TALLOC_CTX *); NTSTATUS server_service_winbindd_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true, }; diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index bd2ae2660a0..269fac0670d 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -508,7 +508,7 @@ static void wreplsrv_task_init(struct task_server *task) */ NTSTATUS server_service_wrepl_init(TALLOC_CTX *ctx) { - struct service_details details = { + static const struct service_details details = { .inhibit_fork_on_accept = true, .inhibit_pre_fork = true };