From 3294ccbb6d2ce26da5b6b9b512dfc1184a153d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 7 Jan 2011 12:01:42 +0100 Subject: [PATCH] netlogon: move netlogon helpers to ../libcli/netlogon. Guenther --- libcli/cldap/cldap.h | 2 +- libcli/nbt/wscript_build | 12 ------------ libcli/{ => netlogon}/ndr_netlogon.c | 2 +- libcli/{ => netlogon}/ndr_netlogon_proto.h | 0 libcli/{ => netlogon}/netlogon.c | 2 +- libcli/{ => netlogon}/netlogon.h | 4 ++-- libcli/{ => netlogon}/netlogon_proto.h | 0 libcli/netlogon/wscript_build | 11 +++++++++++ librpc/idl/nbt.idl | 2 +- source3/libads/cldap.h | 2 +- source3/libsmb/clidgram.h | 2 +- source3/libsmb/namequery.c | 2 +- source3/nmbd/nmbd_processlogon.c | 2 +- source3/wscript_build | 11 +++-------- source4/libcli/dgram/libdgram.h | 2 +- source4/libcli/finddc.h | 2 +- source4/wscript_build | 1 + 17 files changed, 27 insertions(+), 32 deletions(-) rename libcli/{ => netlogon}/ndr_netlogon.c (99%) rename libcli/{ => netlogon}/ndr_netlogon_proto.h (100%) rename libcli/{ => netlogon}/netlogon.c (99%) rename libcli/{ => netlogon}/netlogon.h (94%) rename libcli/{ => netlogon}/netlogon_proto.h (100%) create mode 100644 libcli/netlogon/wscript_build diff --git a/libcli/cldap/cldap.h b/libcli/cldap/cldap.h index d05e5b99368..d1197481fb5 100644 --- a/libcli/cldap/cldap.h +++ b/libcli/cldap/cldap.h @@ -19,7 +19,7 @@ along with this program. If not, see . */ -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" struct ldap_message; struct tsocket_address; diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build index 9cae6e01955..7229d12e2ed 100644 --- a/libcli/nbt/wscript_build +++ b/libcli/nbt/wscript_build @@ -21,18 +21,6 @@ bld.SAMBA_BINARY('nmblookup', ) -bld.SAMBA_SUBSYSTEM('LIBCLI_NDR_NETLOGON', - source='../ndr_netlogon.c', - public_deps='ndr NDR_SECURITY' - ) - - -bld.SAMBA_SUBSYSTEM('LIBCLI_NETLOGON', - source='../netlogon.c', - public_deps='samba-util LIBCLI_NDR_NETLOGON' - ) - - bld.SAMBA_PYTHON('python_netbios', source='pynbt.c', public_deps='cli-nbt DYNCONFIG samba-hostconfig', diff --git a/libcli/ndr_netlogon.c b/libcli/netlogon/ndr_netlogon.c similarity index 99% rename from libcli/ndr_netlogon.c rename to libcli/netlogon/ndr_netlogon.c index d15154d2c98..7d6aa974b0c 100644 --- a/libcli/ndr_netlogon.c +++ b/libcli/netlogon/ndr_netlogon.c @@ -22,7 +22,7 @@ /* parser auto-generated by pidl, then hand-modified by abartlet */ #include "includes.h" -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" /* Manually modified to handle the dom_sid being optional based on if it is present or all zero */ enum ndr_err_code ndr_push_NETLOGON_SAM_LOGON_REQUEST(struct ndr_push *ndr, int ndr_flags, const struct NETLOGON_SAM_LOGON_REQUEST *r) diff --git a/libcli/ndr_netlogon_proto.h b/libcli/netlogon/ndr_netlogon_proto.h similarity index 100% rename from libcli/ndr_netlogon_proto.h rename to libcli/netlogon/ndr_netlogon_proto.h diff --git a/libcli/netlogon.c b/libcli/netlogon/netlogon.c similarity index 99% rename from libcli/netlogon.c rename to libcli/netlogon/netlogon.c index ceb1c85c56b..d82a2013b8f 100644 --- a/libcli/netlogon.c +++ b/libcli/netlogon/netlogon.c @@ -20,7 +20,7 @@ */ #include "includes.h" -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx, struct netlogon_samlogon_response *response) diff --git a/libcli/netlogon.h b/libcli/netlogon/netlogon.h similarity index 94% rename from libcli/netlogon.h rename to libcli/netlogon/netlogon.h index 3e626ed40dc..9bf346af26d 100644 --- a/libcli/netlogon.h +++ b/libcli/netlogon/netlogon.h @@ -50,6 +50,6 @@ struct nbt_netlogon_response } data; }; -#include "../libcli/netlogon_proto.h" -#include "../libcli/ndr_netlogon_proto.h" +#include "../libcli/netlogon/netlogon_proto.h" +#include "../libcli/netlogon/ndr_netlogon_proto.h" #endif /* __CLDAP_SERVER_PROTO_H__ */ diff --git a/libcli/netlogon_proto.h b/libcli/netlogon/netlogon_proto.h similarity index 100% rename from libcli/netlogon_proto.h rename to libcli/netlogon/netlogon_proto.h diff --git a/libcli/netlogon/wscript_build b/libcli/netlogon/wscript_build new file mode 100644 index 00000000000..6c5e57ba67a --- /dev/null +++ b/libcli/netlogon/wscript_build @@ -0,0 +1,11 @@ +#!/usr/bin/env python + +bld.SAMBA_SUBSYSTEM('LIBCLI_NDR_NETLOGON', + source='ndr_netlogon.c', + public_deps='ndr NDR_SECURITY' + ) + +bld.SAMBA_SUBSYSTEM('LIBCLI_NETLOGON', + source='netlogon.c', + public_deps='samba-util LIBCLI_NDR_NETLOGON' + ) diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl index 246dfeb7c4d..cbfa9666701 100644 --- a/librpc/idl/nbt.idl +++ b/librpc/idl/nbt.idl @@ -10,7 +10,7 @@ import "misc.idl", "security.idl", "svcctl.idl", "samr.idl"; [ - helper("../libcli/netlogon.h", "../libcli/nbt/libnbt.h"), + helper("../libcli/netlogon/netlogon.h", "../libcli/nbt/libnbt.h"), helpstring("NBT messages"), uuid("6def41b6-86e4-4c32-997c-ed33af7bcd8e") ] diff --git a/source3/libads/cldap.h b/source3/libads/cldap.h index afe4b35b5d9..e2d05ce7313 100644 --- a/source3/libads/cldap.h +++ b/source3/libads/cldap.h @@ -1,4 +1,4 @@ -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" /* The following definitions come from libads/cldap.c */ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx, diff --git a/source3/libsmb/clidgram.h b/source3/libsmb/clidgram.h index 640a590248b..01a8a6a4049 100644 --- a/source3/libsmb/clidgram.h +++ b/source3/libsmb/clidgram.h @@ -1,4 +1,4 @@ -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" /* The following definitions come from libsmb/clidgram.c */ diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index e7dd22ad108..64452d53a2a 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -21,7 +21,7 @@ #include "includes.h" #include "libads/sitename_cache.h" #include "libads/dns.h" -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" #include "librpc/gen_ndr/messaging.h" #include "lib/async_req/async_sock.h" diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index d21ad3d4b20..79768176647 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -24,7 +24,7 @@ */ #include "includes.h" -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" #include "../libcli/cldap/cldap.h" #include "../lib/tsocket/tsocket.h" #include "../libcli/security/security.h" diff --git a/source3/wscript_build b/source3/wscript_build index 6b21540e5b6..9905b88589f 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -147,8 +147,6 @@ LIBADS_PRINTER_SRC = '''libads/ldap_printer.c''' SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c passdb/machine_sid.c''' -LIBNBT_SRC = '''../libcli/netlogon.c''' - LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c libads/dns.c libads/sitename_cache.c''' @@ -993,8 +991,8 @@ bld.SAMBA_SUBSYSTEM('LIBNMB', vars=locals()) bld.SAMBA_SUBSYSTEM('LIBNBT', - source=LIBNBT_SRC, - deps='NDR_SVCCTL NDR_NBT NDR_NBT_BUF LIBCLI_NDR_NETLOGON', + source='', + deps='NDR_SVCCTL NDR_NBT NDR_NBT_BUF LIBCLI_NETLOGON LIBCLI_NDR_NETLOGON', vars=locals()) bld.SAMBA_SUBSYSTEM('SERVICES', @@ -1081,10 +1079,6 @@ bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF', deps='talloc', autoproto='nbtname.h') -bld.SAMBA_SUBSYSTEM('LIBCLI_NDR_NETLOGON', - source='../libcli/ndr_netlogon.c', - public_deps='ndr NDR_SECURITY') - bld.SAMBA_SUBSYSTEM('RPCCLI_WINREG', source='../librpc/gen_ndr/cli_winreg.c', public_deps='RPC_NDR_WINREG') @@ -1468,6 +1462,7 @@ bld.RECURSE('../libcli/auth') bld.RECURSE('../libcli/drsuapi') bld.RECURSE('../libcli/ldap') bld.RECURSE('../libcli/named_pipe_auth') +bld.RECURSE('../libcli/netlogon') bld.RECURSE('../libcli/samsync') bld.RECURSE('../libcli/security') bld.RECURSE('../libcli/smb') diff --git a/source4/libcli/dgram/libdgram.h b/source4/libcli/dgram/libdgram.h index a5d1b94e3aa..280c27d41d1 100644 --- a/source4/libcli/dgram/libdgram.h +++ b/source4/libcli/dgram/libdgram.h @@ -19,7 +19,7 @@ along with this program. If not, see . */ -#include "../libcli/netlogon.h" +#include "../libcli/netlogon/netlogon.h" /* a datagram name request diff --git a/source4/libcli/finddc.h b/source4/libcli/finddc.h index 9ff17236c08..3836d127026 100644 --- a/source4/libcli/finddc.h +++ b/source4/libcli/finddc.h @@ -21,7 +21,7 @@ #include "lib/messaging/messaging.h" #include "libcli/libcli.h" -#include "libcli/netlogon.h" +#include "libcli/netlogon/netlogon.h" struct finddcs { struct { diff --git a/source4/wscript_build b/source4/wscript_build index 9566d10d941..daf2bce03d8 100644 --- a/source4/wscript_build +++ b/source4/wscript_build @@ -85,6 +85,7 @@ bld.RECURSE('../lib/async_req') bld.RECURSE('../libcli/security') bld.RECURSE('../libcli/ldap') bld.RECURSE('../libcli/nbt') +bld.RECURSE('../libcli/netlogon') bld.RECURSE('../libcli/auth') bld.RECURSE('../libcli/drsuapi') bld.RECURSE('../libcli/echo')