lib: Give lib/util/util_file.c its own header file
authorVolker Lendecke <vl@samba.org>
Wed, 10 Apr 2024 11:02:39 +0000 (13:02 +0200)
committerMartin Schwenke <martins@samba.org>
Tue, 16 Apr 2024 23:51:45 +0000 (23:51 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
55 files changed:
auth/credentials/credentials.c
ctdb/common/ctdb_util.c
ctdb/server/ctdb_takeover.c
ctdb/tests/src/fake_ctdbd.c
ctdb/tools/ctdb.c
lib/fuzzing/afl-fuzz-main.c
lib/util/samba_util.h
lib/util/tests/file.c
lib/util/util_file.c
lib/util/util_file.h [new file with mode: 0644]
libcli/nbt/lmhosts.c
libcli/netlogon/netlogon.c
libgpo/gpo_ini.c
librpc/rpc/dcerpc_pkt_auth.c
librpc/rpc/dcerpc_util.c
librpc/tools/ndrdump.c
librpc/wsp/wsp_util.c
source3/auth/user_util.c
source3/client/clitar.c
source3/lib/dumpcore.c
source3/lib/util_file.c
source3/libgpo/gpext/registry.c
source3/modules/vfs_fruit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_shell_snap.c
source3/nmbd/nmbd_synclists.c
source3/nmbd/nmbd_winsserver.c
source3/param/loadparm.c
source3/passdb/machine_sid.c
source3/printing/nt_printing_os2.c
source3/printing/print_generic.c
source3/printing/print_standard.c
source3/rpc_server/rpc_host.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/smbd/smb1_lanman.c
source3/torture/torture.c
source3/utils/net_ads.c
source3/utils/net_eventlog.c
source3/utils/net_offlinejoin.c
source3/utils/net_usershare.c
source3/utils/smbcacls.c
source4/lib/registry/patchfile_dotreg.c
source4/lib/registry/regf.c
source4/lib/tls/tls_tstream.c
source4/lib/tls/tlscert.c
source4/libcli/dgram/browse.c
source4/libcli/dgram/netlogon.c
source4/librpc/rpc/dcerpc.c
source4/torture/auth/pac.c
source4/torture/basic/misc.c
source4/torture/drs/rpc/dssync.c
source4/torture/gentest.c
source4/torture/locktest.c
source4/torture/smbtorture.c
source4/torture/util_smb.c

index 20ab858e67bc7e6b925e9d1e5beed4c754e57d89..6a590483e9993dbb73d22be97b2159efdfe345fc 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_internal.h"
index 3ca1f772ebac507cadf82cfdd10d6cab83ee4439..ebf0203871faffed086066c36bce62eb1f9f991e 100644 (file)
@@ -21,6 +21,7 @@
 #include "system/network.h"
 #include "system/filesys.h"
 #include "system/wait.h"
+#include "lib/util/util_file.h"
 
 #include <tdb.h>
 
index 79445ec489971f9577c59b409d008bb72e8d227f..0f7ac756497e4b3a907f1e0e7eb84b1ccecaa3ff 100644 (file)
@@ -30,6 +30,7 @@
 #include "lib/util/dlinklist.h"
 #include "lib/util/debug.h"
 #include "lib/util/samba_util.h"
+#include "lib/util/util_file.h"
 #include "lib/util/sys_rw.h"
 #include "lib/util/util_process.h"
 
index a569b0686c3479ffa7ca04f0ea0321d2f92bce4f..1b44f1de688d469d037994d3a85f7e448fc04be3 100644 (file)
@@ -31,6 +31,7 @@
 #include "lib/util/tevent_unix.h"
 #include "lib/util/debug.h"
 #include "lib/util/samba_util.h"
+#include "lib/util/util_file.h"
 #include "lib/async_req/async_sock.h"
 
 #include "protocol/protocol.h"
index 3c4bb7ef45d090f6989cc32b9ee30773bf99be79..1e438d9c1c0642c7d84cd0d0eb2992a84416d4ad 100644 (file)
@@ -33,6 +33,7 @@
 #include "version.h"
 #include "lib/util/debug.h"
 #include "lib/util/samba_util.h"
+#include "lib/util/util_file.h"
 #include "lib/util/sys_rw.h"
 #include "lib/util/smb_strtox.h"
 
index e0a1d264fc4f9bfcc79a9afb215803bcb5903d24..7de30b7b66039e5fd9ce0360a988c8482aa25ba8 100644 (file)
@@ -20,7 +20,7 @@
 */
 
 #include "includes.h"
-#include "lib/util/samba_util.h"
+#include "lib/util/util_file.h"
 #include "fuzzing.h"
 
 int main(int argc, char *argv[]) {
index e672b4b00b21f3f581d3248b42e0649f92a0289c..81e6b6f9c39edbe6ec4ef4097965e73c0d710ddf 100644 (file)
@@ -366,61 +366,6 @@ const char **str_list_make_v3_const(TALLOC_CTX *mem_ctx,
                                    const char *string,
                                    const char *sep);
 
-/* The following definitions come from lib/util/util_file.c  */
-
-
-/**
- * Read one line (data until next newline or eof) and allocate it
- */
-_PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint);
-
-char *fgets_slash(TALLOC_CTX *mem_ctx, char *s2, size_t maxlen, FILE *f);
-
-/**
-load a file into memory from a fd.
-**/
-_PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
-
-
-char **file_lines_parse(const char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx);
-
-/**
-load a file into memory
-**/
-_PUBLIC_ char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
-
-/**
-load a file into memory and return an array of pointers to lines in the file
-must be freed with talloc_free().
-**/
-_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
-
-/**
-load a fd into memory and return an array of pointers to lines in the file
-must be freed with talloc_free(). If convert is true calls unix_to_dos on
-the list.
-**/
-_PUBLIC_ char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
-
-_PUBLIC_ bool file_save_mode(const char *fname, const void *packet,
-                            size_t length, mode_t mode);
-/**
-  save a lump of data into a file. Mostly used for debugging
-*/
-_PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length);
-_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
-_PUBLIC_ int fdprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
-
-/*
-  compare two files, return true if the two files have the same content
- */
-bool file_compare(const char *path1, const char *path2);
-
-/*
-  load from a pipe into memory.
- */
-char *file_ploadv(char * const argl[], size_t *size);
-
 /* The following definitions come from lib/util/util.c  */
 
 
index 3501c7e135feef79e3bd160265b92ae51159d4b1..a6d1929fb51c0e9f3273fe209e8a46ae219f9aad 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "torture/torture.h"
 #include "torture/local/proto.h"
index 0e54dffcbf28a8f49925b220317b84ac478f3c4f..221d5a49fdb85d9579a2252fc5646dd9690fc163 100644 (file)
@@ -24,6 +24,7 @@
 #include "system/filesys.h"
 #include <talloc.h>
 #include "lib/util/samba_util.h"
+#include "lib/util/util_file.h"
 #include "lib/util/sys_popen.h"
 #include "lib/util/sys_rw.h"
 #include "lib/util/debug.h"
diff --git a/lib/util/util_file.h b/lib/util/util_file.h
new file mode 100644 (file)
index 0000000..fa8c599
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * SMB parameters and setup
+ * Copyright (C) Andrew Tridgell 1992-1998 Modified by Jeremy Allison 1995.
+ *
+ * Added afdgets() Jelmer Vernooij 2005
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __LIB_UTIL_UTIL_FILE_H__
+#define __LIB_UTIL_UTIL_FILE_H__
+
+#include "replace.h"
+#include <talloc.h>
+
+/**
+ * Read one line (data until next newline or eof) and allocate it
+ */
+_PUBLIC_ char *afdgets(int fd, TALLOC_CTX *mem_ctx, size_t hint);
+
+char *fgets_slash(TALLOC_CTX *mem_ctx, char *s2, size_t maxlen, FILE *f);
+
+/**
+load a file into memory from a fd.
+**/
+_PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
+
+/**
+load a file into memory
+**/
+_PUBLIC_ char *file_load(const char *fname, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
+
+/**
+load a file into memory and return an array of pointers to lines in the file
+must be freed with talloc_free().
+**/
+_PUBLIC_ char **file_lines_load(const char *fname, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
+
+/**
+load a fd into memory and return an array of pointers to lines in the file
+must be freed with talloc_free(). If convert is true calls unix_to_dos on
+the list.
+**/
+_PUBLIC_ char **fd_lines_load(int fd, int *numlines, size_t maxsize, TALLOC_CTX *mem_ctx);
+
+char **file_lines_parse(const char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx);
+
+_PUBLIC_ bool file_save_mode(const char *fname, const void *packet,
+                            size_t length, mode_t mode);
+
+/**
+  save a lump of data into a file. Mostly used for debugging
+*/
+_PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length);
+_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
+_PUBLIC_ int fdprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
+
+/*
+  compare two files, return true if the two files have the same content
+ */
+bool file_compare(const char *path1, const char *path2);
+
+/*
+  load from a pipe into memory.
+ */
+char *file_ploadv(char * const argl[], size_t *size);
+
+#endif
index dd06e70c071e2ba37f0d83275cadd06b38620f6c..ef7229b99bf05836929d2e813e5ee2275bf7f18f 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/util/util_net.h"
 #include "system/filesys.h"
 #include "system/network.h"
index 15e808743d1fc5df6ce075c6927324724e6851a7..417991ada79fff3e99b0f67ba243595fdb664080 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "../libcli/netlogon/netlogon.h"
 
 NTSTATUS push_netlogon_samlogon_response(DATA_BLOB *data, TALLOC_CTX *mem_ctx,
index 66f743e52a0b522e7278e40ec1de9666c0e89d22..6926d3de74ac1d89de5a3ae4fb0e86a9086990f7 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "gpo.h"
 #include "gpo_ini.h"
 #include "system/filesys.h"
index 5eb9c445ab25d785b20ee0efa7d01c00403dc8c7..d7f7510c80715f803e5da37fcc58f35ac6224b6a 100644 (file)
@@ -22,6 +22,7 @@
 #include "replace.h"
 #include "system/network.h"
 #include <tevent.h>
+#include "lib/util/util_file.h"
 #include "lib/util/talloc_stack.h"
 #include "lib/util/debug.h"
 #include "lib/util/byteorder.h"
index e6f7fa634a92749e2ef61c993140efd3df918c26..66b38a4acf2a1ecf27d09b72b01b38c9694ebcf3 100644 (file)
@@ -23,6 +23,7 @@
 #include "system/network.h"
 #include <tevent.h>
 #include "lib/tsocket/tsocket.h"
+#include "lib/util/util_file.h"
 #include "lib/util/tevent_ntstatus.h"
 #include "librpc/rpc/dcerpc.h"
 #include "librpc/rpc/dcerpc_util.h"
index f706510f4de5e8649f58d385415f781f1ae1d686..5a45f0a5d1d536f90ec7703631e8cd30c9849e76 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "system/locale.h"
 #include "librpc/ndr/libndr.h"
index fae6e0b2fe33b5088c737c8bae27a28cc3a5b518..d07338b1b5abb218be164874c622d1c599f0ee1c 100644 (file)
@@ -19,6 +19,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "librpc/wsp/wsp_util.h"
 #include "librpc/gen_ndr/wsp.h"
 #include "librpc/gen_ndr/ndr_wsp.h"
index cd97d62af4bc2db76ebb56ef757b2d03e635959e..133993aac69c5ad0fe1f875468082467d22a9704 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "auth.h"
 #include "lib/gencache.h"
index 14b98111b750bfa95c0ef6276227a8fde7977bf5..7e54b7bc2e8d5ac85cfd1afeb1048ab9cf5b483b 100644 (file)
@@ -71,6 +71,7 @@
 #include "client/client_proto.h"
 #include "client/clitar_proto.h"
 #include "libsmb/libsmb.h"
+#include "lib/util/util_file.h"
 
 #ifdef HAVE_LIBARCHIVE
 
index 0c9120689df9397fe503fa7ce3679a9f8c2b9f6c..3ed6b8965cefd61cc21fcc34bf55a7fef2473ad1 100644 (file)
@@ -26,6 +26,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 
 #ifdef HAVE_SYS_SYSCTL_H
index ba96eeee36575b10ee84490a2248190778301bb2..5d6afc3c0b12d399d190f454589966d9f96830b0 100644 (file)
@@ -18,7 +18,8 @@
  */
 
 #include "replace.h"
-#include "lib/util_file.h"
+#include "lib/util/util_file.h"
+#include "source3/lib/util_file.h"
 #include "lib/util/debug.h"
 #include "lib/util/samba_util.h"
 #include "lib/util/sys_rw.h"
index ffa1d020fb6fa93e5525e5eed7b6fc91277fbac9..d04262c4c8437e3418d69c6af1a7efa1c49a2fda 100644 (file)
@@ -24,6 +24,7 @@
 #include "registry.h"
 #include "../librpc/gen_ndr/ndr_preg.h"
 #include "libgpo/gpext/gpext.h"
+#include "lib/util/util_file.h"
 
 #define GP_EXT_NAME "registry"
 
index 4ab0f46a4e62f01d216182507b62435b43fe86fe..b63fff7f95d218b6f441692e4a18aff3031790b5 100644 (file)
@@ -30,6 +30,7 @@
 #include "../libcli/smb/smb2_create_ctx.h"
 #include "lib/util/tevent_ntstatus.h"
 #include "lib/util/tevent_unix.h"
+#include "lib/util/util_file.h"
 #include "offload_token.h"
 #include "string_replace.h"
 #include "hash_inode.h"
index 235329f090d5e4c925b71fe6c53ef11bd8410f40..00b4cdd4698da6f06f4f751fbd1fd1a1c2016795 100644 (file)
@@ -41,6 +41,7 @@
 #include <glusterfs/api/glfs.h>
 #include "lib/util/dlinklist.h"
 #include "lib/util/tevent_unix.h"
+#include "lib/util/util_file.h"
 #include "smbd/globals.h"
 #include "lib/util/sys_rw.h"
 #include "smbprofile.h"
index d1b7b8c1fd1d30f831befe65467b115cc4ed89e8..df2ea2aa541dd0897d63fd6f3c5ae1c1d278850f 100644 (file)
@@ -21,6 +21,7 @@
 #include "include/ntioctl.h"
 #include "system/filesys.h"
 #include "smbd/smbd.h"
+#include "lib/util/util_file.h"
 
 /*
  * Check whether a path can be shadow copied. Return the base volume, allowing
index 0f5c42f6a793c6557f3773e4123eec7162ed7bd3..f94e41c9af4cea5dba101d1cbee66bea7b585ac9 100644 (file)
@@ -33,6 +33,7 @@
 #include "libsmb/clirap.h"
 #include "../libcli/smb/smbXcli_base.h"
 #include "lib/util/string_wrappers.h"
+#include "lib/util/util_file.h"
 #include "source3/lib/substitute.h"
 
 struct sync_record {
index ecae447619591772e740ac7c00e58751db5c96b7..4d4f19fef8bed8da76f45e78f09b51fdc70e5a22 100644 (file)
@@ -24,6 +24,7 @@
 #include "system/filesys.h"
 #include "nmbd/nmbd.h"
 #include "util_tdb.h"
+#include "lib/util/util_file.h"
 
 #define WINS_LIST "wins.dat"
 #define WINS_VERSION 1
index a67fc8cf51ed14084a399e7c7264d794412ba8bc..414d19d7439799c0e8a3246e7356b008baa9d825 100644 (file)
@@ -55,6 +55,7 @@
 
 #define LOADPARM_SUBSTITUTION_INTERNALS 1
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "util_tdb.h"
 #include "lib/param/loadparm.h"
index fa420d8edfed1cc666cf631ead2d74f5e1d985b5..16ef6ce266cff1c5ca5f0afafca561f9003e77c4 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "passdb/machine_sid.h"
 #include "secrets.h"
 #include "dbwrap/dbwrap.h"
index 82b8248203190d4ba1077724bce3c55421313a41..0e1d3e47fd0795a0a790c28d223b1730f5121651 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "printing/nt_printing_os2.h"
 
 /****************************************************************************
index 8798a4cf34a3de30411d5107ef6051a63f6b59cf..a8bf9aff972527fb6337c6c139ffde5df68b4efe 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "printing.h"
 #include "smbd/proto.h"
 #include "source3/lib/substitute.h"
index 7cbdac7b2572f9d2aa4a6f33579ee168ecd6d1c9..4a37a4e7ec620fd332ccf392929a0314e39eb2dc 100644 (file)
@@ -55,6 +55,7 @@
 
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "printing/pcap.h"
 
index 1e891b4faaa386e7805b08c0f457de3c94a9bba7..7c5785f3a3bbe58b375a6a2b10224853839eb0ad 100644 (file)
@@ -54,6 +54,7 @@
 #include "lib/util/debug.h"
 #include "lib/util/server_id.h"
 #include "lib/util/util_tdb.h"
+#include "lib/util/util_file.h"
 #include "lib/tdb_wrap/tdb_wrap.h"
 #include "lib/async_req/async_sock.h"
 #include "librpc/rpc/dcerpc_util.h"
index 16b8b41f87c0cc1b51f11a391607015cb0587a33..5b75df823b6cdfdc61595a404d7012afa468502d 100644 (file)
@@ -28,6 +28,7 @@
    up, all the errors returned are DOS errors, not NT status codes. */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "libsmb/namequery.h"
 #include "ntdomain.h"
 #include "nt_printing.h"
index 846d6f3b9007f2fbee7d12dcd74997e109d7946b..8bcddcbb8c2e0d5f5dc7e2da1497eaace604cbb2 100644 (file)
@@ -26,6 +26,7 @@
    */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
 #include "source3/smbd/smbXsrv_session.h"
index 86a6e928e14c4b93449e6ef3c598cb62c951234c..f036e0311e21e11f9139de688a2785bf5fd0c1c7 100644 (file)
@@ -48,6 +48,7 @@
 #include "lib/gencache.h"
 #include "lib/util/sys_rw.h"
 #include "lib/util/asn1.h"
+#include "lib/util/util_file.h"
 #include "lib/param/param.h"
 #include "auth/gensec/gensec.h"
 #include "lib/util/string_wrappers.h"
index 43fa0261ad9b65539fb8fe51edfecc357997611d..d1a0b93469fbf11198dd3c63d5f7a3bf2b4ee96c 100644 (file)
@@ -42,6 +42,7 @@
 #include "utils/net_dns.h"
 #include "auth/kerberos/pac_utils.h"
 #include "lib/util/string_wrappers.h"
+#include "lib/util/util_file.h"
 
 #ifdef HAVE_JANSSON
 #include <jansson.h>
index 24dbab97cab27629fe6441fcb013164fd177efac..932b341f84bacb471e105e835498b6714d2fe826 100644 (file)
@@ -22,6 +22,7 @@
 #include "includes.h"
 #include "utils/net.h"
 #include "lib/eventlog/eventlog.h"
+#include "lib/util/util_file.h"
 
 /**
  * Dump an *evt win32 eventlog file
index 3ec5c97adcaefc2d783bd66a900a637a8b75ed5c..a12817c3fc11f75dac368bcac6091fb472482f45 100644 (file)
@@ -24,6 +24,7 @@
 #include "libcli/registry/util_reg.h"
 #include "libcli/security/dom_sid.h"
 #include "lib/cmdline/cmdline.h"
+#include "lib/util/util_file.h"
 
 int net_offlinejoin_usage(struct net_context *c, int argc, const char **argv)
 {
index e5826eeecf16e4f0915473e8c0defd16129b349e..745888224348bf422db16c588c88b947f1567e88 100644 (file)
@@ -24,6 +24,7 @@
 #include "utils/net.h"
 #include "../libcli/security/security.h"
 #include "lib/util/string_wrappers.h"
+#include "lib/util/util_file.h"
 
 struct {
        const char *us_errstr;
index 0c1d2b38c9357f9bd6a3728e46f7ceb4aa9c79da..708e03a120a96e6bead45115a07273f955354d71 100644 (file)
@@ -34,6 +34,7 @@
 #include "../librpc/gen_ndr/ndr_lsa_c.h"
 #include "util_sd.h"
 #include "lib/param/param.h"
+#include "lib/util/util_file.h"
 
 static char DIRSEP_CHAR = '\\';
 
index 5fb342b65b540b068b48488a4c1f87db81e4e495..632622354f4b504ec274b4b414a3dc36dfe0190e 100644 (file)
@@ -26,6 +26,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/registry/registry.h"
 #include "system/filesys.h"
 
index d0fc2a98d302be8d8ab6d2b7d53600a6fe045078..18734ae6f60852cb6e707762854107ccb74da19a 100644 (file)
@@ -18,6 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "system/time.h"
 #include "lib/registry/tdr_regf.h"
@@ -2218,7 +2219,8 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
 
        pull = tdr_pull_init(regf);
 
-       pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, 0, regf);
+       pull->data.data = (uint8_t*)
+               fd_load(regf->fd, &pull->data.length, 0, regf);
 
        if (pull->data.data == NULL) {
                DEBUG(0, ("Error reading data from file: %s\n", location));
index 5e0c56b01020e52f947d31c822b4c0ac65d93a12..41fd6cce5e3587e3c9570c801e3be301a21cb17c 100644 (file)
@@ -21,6 +21,7 @@
 #include "system/network.h"
 #include "system/filesys.h"
 #include "system/time.h"
+#include "lib/util/util_file.h"
 #include "../util/tevent_unix.h"
 #include "../lib/tsocket/tsocket.h"
 #include "../lib/tsocket/tsocket_internal.h"
index 36482e3aaaf2285ad1f304d8db2cb8ac01b7112f..69a4189dedf06c66e2663c3aeaab32c4e2c20466 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/tls/tls.h"
 
 #include <gnutls/gnutls.h>
index 437b6e13e8648adc5fc53515d221ac6624e6f7d8..39892bb05c91597f91361a0adffac338514405cd 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "libcli/dgram/libdgram.h"
 #include "lib/socket/socket.h"
 #include "libcli/resolve/resolve.h"
index 1124a3318ba28520c5abf026c20ef6a2bc398d40..bda0398568489d39f6013c7733ccc8f6d00dd8d7 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "libcli/dgram/libdgram.h"
 #include "lib/socket/socket.h"
 #include "libcli/resolve/resolve.h"
index 802759c72b2022bee6782755c533433de3a3e52f..58f00b7f9d2c24335b9dea627d17b83812861944 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/filesys.h"
 #include "../lib/util/dlinklist.h"
 #include "lib/events/events.h"
index 8ba8ed43c37cdefeb9f17afa28392b9e062cac73..0c96e82559cca95d3a741fd5a7bd432b960e326b 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "system/kerberos.h"
 #include "auth/auth.h"
 #include "auth/kerberos/kerberos.h"
index 60af5612d1e5bf2cc136de4732cad007631a3cd1..4f2d74c41a823749b418f49c8912e7b5cfb3c336 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"
 #include "system/time.h"
index 64d04980bc756beaa554ea281e28f5bdd287c52d..689ebd4faa405d60b6aa541886120c112fe29b5b 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/cmdline/cmdline.h"
 #include "librpc/gen_ndr/ndr_drsuapi_c.h"
 #include "librpc/gen_ndr/ndr_drsblobs.h"
index a832c597379d57474a80728efe602cbdc180c72b..22b94ccc944e4fc0241071c73f7aeaccfaeceed7 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/cmdline/cmdline.h"
 #include "lib/events/events.h"
 #include "system/time.h"
index 11701a975bb20aadbb089eb449f7e87613a63ab8..b720261e565ee2bfa38813394283f190b0014175 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/cmdline/cmdline.h"
 #include "lib/events/events.h"
 #include "system/filesys.h"
index d9e90eab40dce57e7433f3b178ae8324c79dac17..ad1280be7d818c7c6da0b9a882958de7f3a06116 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/cmdline/cmdline.h"
 #include "system/time.h"
 #include "system/wait.h"
index 6924164e2a48699bce0725e5a31bc5e5cee36ef1..3bad0b0ed40752e3aabf52524765510a9ce20b81 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "lib/util/util_file.h"
 #include "lib/cmdline/cmdline.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/raw/raw_proto.h"