s4:dsdb: Move cldap netlogon functions into samdb/ldb_modules
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Tue, 5 Nov 2013 19:39:56 +0000 (20:39 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 11 Nov 2013 22:00:54 +0000 (23:00 +0100)
As netlogon is handled by the samdb now,
the corresponding functions should live there as well.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
source4/cldap_server/cldap_server.h
source4/cldap_server/wscript_build
source4/dsdb/samdb/ldb_modules/netlogon.c [moved from source4/cldap_server/netlogon.c with 99% similarity]
source4/dsdb/samdb/ldb_modules/util.h
source4/dsdb/samdb/ldb_modules/wscript_build
source4/dsdb/samdb/ldb_modules/wscript_build_server
source4/nbt_server/dgram/netlogon.c
source4/nbt_server/wscript_build
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/wscript_build

index 995ceed3a22f3bdecea76f79b295049f0c7804ae..07252846f6fe258ca281bcfa7e8dcaba3bb0123f 100644 (file)
@@ -32,30 +32,4 @@ struct cldapd_server {
 
 struct ldap_SearchRequest;
 
-/* used by netlogon DCE/RPC server */
-NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
-                                         TALLOC_CTX *mem_ctx,
-                                         const char *domain,
-                                         const char *netbios_domain,
-                                         struct dom_sid *domain_sid,
-                                         const char *domain_guid,
-                                         const char *user,
-                                         uint32_t acct_control,
-                                         const char *src_address,
-                                         uint32_t version,
-                                         struct loadparm_context *lp_ctx,
-                                         struct netlogon_samlogon_response *netlogon,
-                                        bool fill_on_blank_request);
-
-NTSTATUS parse_netlogon_request(struct ldb_parse_tree *tree,
-                               struct loadparm_context *lp_ctx,
-                               TALLOC_CTX *mem_ctx,
-                               const char **domain,
-                               const char **host,
-                               const char **user,
-                               const char **domain_guid,
-                               struct dom_sid **domain_sid,
-                               int *acct_control,
-                               int *version);
-
 #include "cldap_server/proto.h"
index 6ffdb4a6bd59b58453119b4e198083b5e6526d0c..928b91b124913718cefebc94e551b7d37f1a51fe 100644 (file)
@@ -10,7 +10,7 @@ bld.SAMBA_MODULE('service_cldap',
 
 
 bld.SAMBA_SUBSYSTEM('CLDAPD',
-       source='netlogon.c rootdse.c',
+       source='rootdse.c',
        autoproto='proto.h',
        deps='cli_cldap ldbsamba'
        )
similarity index 99%
rename from source4/cldap_server/netlogon.c
rename to source4/dsdb/samdb/ldb_modules/netlogon.c
index 231bd169e9a4648c9d97520a6908d008056dcac8..a381da833cf65488fb8e27a810375b5b1eca9f7b 100644 (file)
 #include <ldb_errors.h>
 #include "lib/events/events.h"
 #include "smbd/service_task.h"
-#include "cldap_server/cldap_server.h"
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "libcli/ldap/ldap_ndr.h"
 #include "libcli/security/security.h"
 #include "dsdb/samdb/samdb.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 #include "auth/auth.h"
 #include "ldb_wrap.h"
 #include "system/network.h"
index c21304213a89449fb460c2cb4566947aa81c8d72..e40730557a326710c81ebe885a47d867e1746f5f 100644 (file)
@@ -25,10 +25,12 @@ struct dsdb_attribute;
 struct dsdb_fsmo_extended_op;
 struct security_descriptor;
 struct dom_sid;
+struct netlogon_samlogon_response;
 
 #include "librpc/gen_ndr/misc.h"
 #include "dsdb/samdb/ldb_modules/util_proto.h"
 #include "dsdb/common/util.h"
+#include "../libcli/netlogon/netlogon.h"
 
 /* extend the dsdb_request_add_controls() flags for module
    specific functions */
index 7e45c600fb250645f69a6cad4f683524ac45cccc..0df5fe03fff65fc9664b74f6eb7ce9c66f97cf40 100755 (executable)
@@ -7,7 +7,7 @@ bld.SAMBA_LIBRARY('dsdb-module',
        grouping_library=True)
 
 bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPERS',
-       source='util.c acl_util.c schema_util.c',
+       source='util.c acl_util.c schema_util.c netlogon.c',
        autoproto='util_proto.h',
        deps='ldb ndr samdb-common samba-security'
        )
index 7ad1d3b87d5e59e6c777a9c44f56d1f01d3f19c3..41eb0f34e1638e17eee8dd677e48d0cff81d3705 100755 (executable)
@@ -106,7 +106,7 @@ bld.SAMBA_MODULE('ldb_rootdse',
        init_function='ldb_rootdse_module_init',
        module_init_name='ldb_init_module',
        internal_module=False,
-       deps='talloc samdb MESSAGING samba-security DSDB_MODULE_HELPERS RPC_NDR_IRPC CLDAPD'
+       deps='talloc samdb MESSAGING samba-security DSDB_MODULE_HELPERS RPC_NDR_IRPC'
        )
 
 
index 3f0fa542feaad2217d1959c3f9aeaf692f4171a7..0e5294cb94c42c13ef38d70885303998c75a7a39 100644 (file)
@@ -28,7 +28,7 @@
 #include "auth/auth.h"
 #include "param/param.h"
 #include "smbd/service_task.h"
-#include "cldap_server/cldap_server.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 #include "libcli/security/security.h"
 #include "nbt_server/dgram/proto.h"
 
index 665ccd46c2e8ab98748e0bb2d704fb858c081238..9d0c24a14e2046e60432d9b193ba0212f30f975f 100644 (file)
@@ -30,7 +30,7 @@ bld.SAMBA_SUBSYSTEM('NBTD_WINS',
 bld.SAMBA_SUBSYSTEM('NBTD_DGRAM',
        source='dgram/request.c dgram/netlogon.c dgram/browse.c',
        autoproto='dgram/proto.h',
-       deps='LIBCLI_DGRAM CLDAPD',
+       deps='LIBCLI_DGRAM DSDB_MODULE_HELPERS',
        enabled=bld.AD_DC_BUILD_IS_ENABLED()
        )
 
index de8f0e5ac0a3c23359c0aa13aa29a64ed160afe4..7329930163ab013bf8a929309e9b8d53890347c9 100644 (file)
@@ -33,7 +33,7 @@
 #include "lib/messaging/irpc.h"
 #include "librpc/gen_ndr/ndr_irpc_c.h"
 #include "../libcli/ldap/ldap_ndr.h"
-#include "cldap_server/cldap_server.h"
+#include "dsdb/samdb/ldb_modules/util.h"
 #include "lib/tsocket/tsocket.h"
 #include "librpc/gen_ndr/ndr_netlogon.h"
 #include "librpc/gen_ndr/ndr_irpc.h"
index cc8efdb1b58a9445e3747f6caa1fd7504a20ecdd..2907f008c7179720ce5ce6ecabef63e839513a4e 100755 (executable)
@@ -96,7 +96,7 @@ bld.SAMBA_MODULE('dcerpc_netlogon',
        source='netlogon/dcerpc_netlogon.c',
        subsystem='dcerpc_server',
        init_function='dcerpc_server_netlogon_init',
-       deps='DCERPC_COMMON RPC_NDR_IRPC COMMON_SCHANNEL ndr-standard auth4_sam samba-hostconfig CLDAPD'
+       deps='DCERPC_COMMON RPC_NDR_IRPC COMMON_SCHANNEL ndr-standard auth4_sam samba-hostconfig DSDB_MODULE_HELPERS'
        )