s4-modules: get rid of the remaining static prototypes for modules
[nivanova/samba-autobuild/.git] / source4 / auth / gensec / gensec.c
index 7220d0e836d15791076b528b91c1f06305fedb74..0cb0d3d476183178d4d2150824b7bb437687d084 100644 (file)
@@ -521,19 +521,9 @@ static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
                return NT_STATUS_INTERNAL_ERROR;
        }
 
-       (*gensec_security) = talloc(mem_ctx, struct gensec_security);
+       (*gensec_security) = talloc_zero(mem_ctx, struct gensec_security);
        NT_STATUS_HAVE_NO_MEMORY(*gensec_security);
 
-       (*gensec_security)->ops = NULL;
-       (*gensec_security)->local_addr = NULL;
-       (*gensec_security)->remote_addr = NULL;
-       (*gensec_security)->private_data = NULL;
-
-       ZERO_STRUCT((*gensec_security)->target);
-
-       (*gensec_security)->subcontext = false;
-       (*gensec_security)->want_features = 0;
-
        (*gensec_security)->event_ctx = ev;
        SMB_ASSERT(settings->lp_ctx != NULL);
        (*gensec_security)->settings = talloc_reference(*gensec_security, settings);
@@ -554,7 +544,7 @@ _PUBLIC_ NTSTATUS gensec_subcontext_start(TALLOC_CTX *mem_ctx,
                                 struct gensec_security *parent, 
                                 struct gensec_security **gensec_security)
 {
-       (*gensec_security) = talloc(mem_ctx, struct gensec_security);
+       (*gensec_security) = talloc_zero(mem_ctx, struct gensec_security);
        NT_STATUS_HAVE_NO_MEMORY(*gensec_security);
 
        (**gensec_security) = *parent;
@@ -1410,13 +1400,8 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
 _PUBLIC_ NTSTATUS gensec_init(struct loadparm_context *lp_ctx)
 {
        static bool initialized = false;
-       extern NTSTATUS gensec_sasl_init(void);
-       extern NTSTATUS gensec_krb5_init(void);
-       extern NTSTATUS gensec_schannel_init(void);
-       extern NTSTATUS gensec_spnego_init(void);
-       extern NTSTATUS gensec_gssapi_init(void);
-       extern NTSTATUS gensec_ntlmssp_init(void);
-
+#define _MODULE_PROTO(init) extern NTSTATUS init(void);
+       STATIC_gensec_MODULES_PROTO;
        init_module_fn static_init[] = { STATIC_gensec_MODULES };
        init_module_fn *shared_init;