From b73ecb28a7ac5996e1a8c455d15f41f59d9d8765 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 5 Jan 2023 10:04:23 +0100 Subject: lib: Remove idtree from samba_util.h No need to recompile the world when only a few files need this. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- examples/fuse/clifuse.c | 1 + lib/util/samba_util.h | 3 --- lib/util/tests/idtree.c | 1 + libcli/cldap/cldap.c | 1 + libcli/nbt/nbtsocket.c | 1 + librpc/rpc/dcesrv_core.c | 1 + source3/auth/auth_samba4.c | 1 + source3/libsmb/cli_smb2_fnum.c | 1 + source3/rpc_server/rpc_server.c | 1 + source4/lib/messaging/messaging.c | 1 + source4/nbt_server/interfaces.c | 2 +- source4/ntvfs/posix/pvfs_search.c | 1 + source4/ntvfs/posix/vfs_posix.c | 1 + source4/rpc_server/dcerpc_server.c | 1 + source4/smb_server/handle.c | 2 +- source4/smb_server/session.c | 2 +- source4/smb_server/smb2/receive.c | 2 +- source4/smb_server/tcon.c | 1 + 18 files changed, 17 insertions(+), 7 deletions(-) diff --git a/examples/fuse/clifuse.c b/examples/fuse/clifuse.c index 2d9edad5f47..75cb72f7f87 100644 --- a/examples/fuse/clifuse.c +++ b/examples/fuse/clifuse.c @@ -31,6 +31,7 @@ #include "libcli/smb/smbXcli_base.h" #include "libcli/security/security.h" #include "clifuse.h" +#include "lib/util/idtree.h" struct mount_state { struct tevent_context *ev; diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index d8c8522616d..4eecfb8a583 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -589,9 +589,6 @@ int ms_fnmatch_protocol(const char *pattern, const char *string, int protocol, /** a generic fnmatch function - uses for non-CIFS pattern matching */ int gen_fnmatch(const char *pattern, const char *string); -#include "idtree.h" -#include "idtree_random.h" - #include "become_daemon.h" /** diff --git a/lib/util/tests/idtree.c b/lib/util/tests/idtree.c index f4f7b1130e2..d54ab2773ff 100644 --- a/lib/util/tests/idtree.c +++ b/lib/util/tests/idtree.c @@ -22,6 +22,7 @@ #include "includes.h" #include "torture/torture.h" #include "torture/local/proto.h" +#include "lib/util/idtree.h" static bool torture_local_idtree_simple(struct torture_context *tctx) { diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index 22a47705d65..6c2bf86c111 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -43,6 +43,7 @@ #include "../librpc/gen_ndr/ndr_nbt.h" #include "../lib/util/asn1.h" #include "../lib/util/tevent_ntstatus.h" +#include "lib/util/idtree_random.h" #undef strcasecmp diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c index 3e0dd493a91..47e73cf2e8d 100644 --- a/libcli/nbt/nbtsocket.c +++ b/libcli/nbt/nbtsocket.c @@ -27,6 +27,7 @@ #include "lib/socket/socket.h" #include "librpc/gen_ndr/ndr_nbt.h" #include "param/param.h" +#include "lib/util/idtree_random.h" #define NBT_MAX_REPLIES 1000 diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index 9fd71812905..d2870046248 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -34,6 +34,7 @@ #include "librpc/gen_ndr/ndr_dcerpc.h" #include "lib/util/tevent_ntstatus.h" #include "system/network.h" +#include "lib/util/idtree_random.h" /** * @file diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index 6c017ef4aa3..dec67a488d7 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -29,6 +29,7 @@ #include "auth/gensec/gensec.h" #include "auth/credentials/credentials.h" #include "lib/global_contexts.h" +#include "lib/util/idtree.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index 734c24531d9..5852f9177fd 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -43,6 +43,7 @@ #include "ntioctl.h" #include "librpc/gen_ndr/ndr_quota.h" #include "lib/util/string_wrappers.h" +#include "lib/util/idtree.h" struct smb2_hnd { uint64_t fid_persistent; diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 71be70bf79d..06fb6bb4472 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -33,6 +33,7 @@ #include "auth.h" #include "rpc_server/rpc_ncacn_np.h" #include "rpc_server/srv_pipe_hnd.h" +#include "lib/util/idtree_random.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 3a9dccc1d48..12054477210 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -40,6 +40,7 @@ #include "lib/messaging/messages_dgm_ref.h" #include "../source3/lib/messages_util.h" #include +#include "lib/util/idtree.h" /* change the message version with any incompatible changes in the protocol */ #define IMESSAGING_VERSION 1 diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c index 93e1497c2ae..b946a1dedf4 100644 --- a/source4/nbt_server/interfaces.c +++ b/source4/nbt_server/interfaces.c @@ -30,7 +30,7 @@ #include "lib/socket/netif.h" #include "param/param.h" #include "lib/util/util_net.h" - +#include "lib/util/idtree.h" /* receive an incoming request and dispatch it to the right place diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index f50319b5fad..f352a6a474a 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -26,6 +26,7 @@ #include "samba/service_stream.h" #include "lib/events/events.h" #include "../lib/util/dlinklist.h" +#include "lib/util/idtree.h" /* place a reasonable limit on old-style searches as clients tend to not send search close requests */ diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 9f131581762..cbee8d9738a 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -31,6 +31,7 @@ #include "libcli/security/security.h" #include "lib/events/events.h" #include "param/param.h" +#include "lib/util/idtree.h" /* setup config options for a posix share diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index 6ec6f832da2..13c0f7acb96 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -33,6 +33,7 @@ #include "samba/process_model.h" #include "lib/util/samba_modules.h" #include "lib/util/tevent_ntstatus.h" +#include "lib/util/idtree_random.h" /* take a reference to an existing association group diff --git a/source4/smb_server/handle.c b/source4/smb_server/handle.c index 931f77abc4b..0e715abebac 100644 --- a/source4/smb_server/handle.c +++ b/source4/smb_server/handle.c @@ -19,7 +19,7 @@ #include "includes.h" #include "smb_server/smb_server.h" - +#include "lib/util/idtree.h" /**************************************************************************** init the handle structures diff --git a/source4/smb_server/session.c b/source4/smb_server/session.c index a561b2e7fc4..2effa781e28 100644 --- a/source4/smb_server/session.c +++ b/source4/smb_server/session.c @@ -21,7 +21,7 @@ #include "includes.h" #include "smb_server/smb_server.h" - +#include "lib/util/idtree_random.h" /* * init the sessions structures diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c index c4109bfbc2f..2d0c377b13e 100644 --- a/source4/smb_server/smb2/receive.c +++ b/source4/smb_server/smb2/receive.c @@ -29,7 +29,7 @@ #include "ntvfs/ntvfs.h" #include "param/param.h" #include "auth/auth.h" - +#include "lib/util/idtree.h" /* fill in the bufinfo */ void smb2srv_setup_bufinfo(struct smb2srv_request *req) diff --git a/source4/smb_server/tcon.c b/source4/smb_server/tcon.c index 8186bba23ef..04dc7fe9d86 100644 --- a/source4/smb_server/tcon.c +++ b/source4/smb_server/tcon.c @@ -24,6 +24,7 @@ #include "samba/service_stream.h" #include "lib/tsocket/tsocket.h" #include "ntvfs/ntvfs.h" +#include "lib/util/idtree_random.h" /**************************************************************************** init the tcon structures -- cgit v1.2.1