lib: Move sys_rw* to lib/util
authorVolker Lendecke <vl@samba.org>
Mon, 12 Oct 2015 13:57:34 +0000 (15:57 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 12 Oct 2015 23:23:07 +0000 (01:23 +0200)
genrand.c will require it soon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
34 files changed:
lib/util/sys_rw.c [moved from source3/lib/sys_rw.c with 99% similarity]
lib/util/sys_rw.h [moved from source3/lib/sys_rw.h with 100% similarity]
lib/util/sys_rw_data.c [moved from source3/lib/sys_rw_data.c with 97% similarity]
lib/util/sys_rw_data.h [moved from source3/lib/sys_rw_data.h with 100% similarity]
lib/util/wscript_build
source3/lib/ctdbd_conn.c
source3/lib/recvfile.c
source3/lib/util.c
source3/lib/util_file.c
source3/lib/util_sock.c
source3/lib/util_transfer_file.c
source3/libsmb/unexpected.c
source3/modules/vfs_aio_fork.c
source3/modules/vfs_aio_linux.c
source3/modules/vfs_aio_posix.c
source3/modules/vfs_cacheprime.c
source3/modules/vfs_default.c
source3/modules/vfs_fruit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_preopen.c
source3/modules/vfs_smb_traffic_analyzer.c
source3/nmbd/asyncdns.c
source3/printing/print_cups.c
source3/printing/printing.c
source3/rpc_server/samr/srv_samr_chgpasswd.c
source3/smbd/notify_inotify.c
source3/smbd/process.c
source3/smbd/reply.c
source3/smbd/scavenger.c
source3/smbd/smb2_read.c
source3/torture/torture.c
source3/utils/smbfilter.c
source3/winbindd/winbindd_dual.c
source3/wscript_build

similarity index 99%
rename from source3/lib/sys_rw.c
rename to lib/util/sys_rw.c
index 6d8f149f1ce7f383444b2396fb65ef86cdd7f43c..f625066ebccea780c43e4d9466e63998a7254eb9 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "replace.h"
 #include "system/filesys.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 /*******************************************************************
 A read wrapper that will deal with EINTR/EWOULDBLOCK
similarity index 100%
rename from source3/lib/sys_rw.h
rename to lib/util/sys_rw.h
similarity index 97%
rename from source3/lib/sys_rw_data.c
rename to lib/util/sys_rw_data.c
index e3f934de6a1f8de90537c9a5da42502d9d8d26a4..de71716291c9336e964ba79e4c808a4e7025390b 100644 (file)
@@ -22,8 +22,8 @@
 
 #include "replace.h"
 #include "system/filesys.h"
-#include "lib/sys_rw_data.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw_data.h"
+#include "lib/util/sys_rw.h"
 #include "lib/util/iov_buf.h"
 
 /****************************************************************************
index e3bf073dd29db71aefc98cf74524e03337a932ae..2b4868583f5d755c8493b0619d3b2b1da2f5cb57 100755 (executable)
@@ -181,3 +181,9 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY:
                       source='iov_buf.c',
                       local_include=False,
                       private_library=True)
+
+    bld.SAMBA3_LIBRARY('sys_rw',
+                       source='sys_rw.c sys_rw_data.c',
+                       deps='replace iov_buf',
+                       local_include=False,
+                       private_library=True)
index 9e598ac4d0b5e0123d1cb71510d9a5cc1b0c5d21..c7c63560848816e3d3d34369519f4dc09c8b65ba 100644 (file)
@@ -23,7 +23,7 @@
 #include "serverid.h"
 #include "ctdbd_conn.h"
 #include "system/select.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 #include "lib/util/iov_buf.h"
 
 #include "messages.h"
index 403d5e892e8f5782c3d5f5d67e959af63f4bada5..e1eb241d7bd8ce168443882d3cc7cad145cb6590 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "includes.h"
 #include "system/filesys.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 /* Do this on our own in TRANSFER_BUF_SIZE chunks.
  * It's safe to make direct syscalls to lseek/write here
index 2ac4dbddf643fd8dd2c81bc4ea81241c2d67e336..f6335756a4fff3b7116042fb35e321715c75443e 100644 (file)
@@ -30,8 +30,8 @@
 #include "messages.h"
 #include "libcli/security/security.h"
 #include "serverid.h"
-#include "lib/sys_rw.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw.h"
+#include "lib/util/sys_rw_data.h"
 #include "lib/util/util_process.h"
 
 #ifdef HAVE_SYS_PRCTL_H
index a603f018870822e27e2dc2bb801bcdacf45d94ba..5584d91d9f0b7d9f668e374006bd76f6474e0df6 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 /**
  Load from a pipe into memory.
index cb57f84a1f3b1336bafe900af7b08ccdebb58290..2939b4f188088f20fd76ef5173dcc450d28f2034 100644 (file)
@@ -28,8 +28,8 @@
 #include "../lib/util/tevent_unix.h"
 #include "../lib/util/tevent_ntstatus.h"
 #include "../lib/tsocket/tsocket.h"
-#include "lib/sys_rw.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw.h"
+#include "lib/util/sys_rw_data.h"
 
 const char *client_addr(int fd, char *addr, size_t addrlen)
 {
index 91f4f6f7f2e43d482134e4fa8ef927d3a153ddd5..56539066eb1fc23e475227adebbddf69e7f41a47 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <includes.h>
 #include "transfer_file.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 /****************************************************************************
  Transfer some data between two fd's.
index 013d798dd03c341fb025024650733751f2310e38..27d21b61f00e4fb1f0169edea72639eddd255e1f 100644 (file)
@@ -22,7 +22,7 @@
 #include "../lib/util/tevent_ntstatus.h"
 #include "lib/tsocket/tsocket.h"
 #include "libsmb/nmblib.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 static const char *nmbd_socket_dir(void)
 {
index 5b398b2e9e106b853a0364949d8786bc5538541f..7fca3d1a6ec7724090c2db6b4165dbe0db83aeaa 100644 (file)
@@ -26,8 +26,8 @@
 #include "smbd/globals.h"
 #include "lib/async_req/async_sock.h"
 #include "lib/util/tevent_unix.h"
-#include "lib/sys_rw.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw.h"
+#include "lib/util/sys_rw_data.h"
 #include "lib/msghdr.h"
 
 #if !defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL) && !defined(HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS)
index db5f075bac8b753281ed6cf68ad39b1e5fc1550d..74ebb3c62f78575b871051697658ae8d22f96ebe 100644 (file)
@@ -24,7 +24,7 @@
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
 #include "lib/util/tevent_unix.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 #include <sys/eventfd.h>
 #include <libaio.h>
 
index ef5f706727228300be18990654e8a998609daa4c..bca69b4d441a3dc6f27be98a63244f369eaba4d7 100644 (file)
@@ -24,7 +24,7 @@
 #include "smbd/smbd.h"
 #include "smbd/globals.h"
 #include "lib/util/tevent_unix.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 #include <aio.h>
 
 /* The signal we'll use to signify aio done. */
index e90e09a17faa63405e5cec9363f6a17b55746b2e..cb8b3280582c81688c90661bdc1ac6f2fa3f47f4 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "includes.h"
 #include "smbd/smbd.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 /* Cache priming module.
  *
index 9ea630a25ae08883fc7d923272334422ae758295..bbe8cca97a9e42572fd35abd1ebeb8dbd7fa4c37 100644 (file)
@@ -32,7 +32,7 @@
 #include "lib/util/tevent_unix.h"
 #include "lib/asys/asys.h"
 #include "lib/util/tevent_ntstatus.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
index 8393366857c7c9b203462179d81de54b911758a6..25a86c15314fc120bf7aa909cf8c4fefe72581f4 100644 (file)
@@ -29,7 +29,7 @@
 #include "messages.h"
 #include "libcli/security/security.h"
 #include "../libcli/smb/smb2_create_ctx.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 #include "lib/util/tevent_ntstatus.h"
 
 /*
index a66887dbae3d68d5144253e9ea8b0861e26185e1..cf8066eee101d078560f9115712c90098e734187 100644 (file)
@@ -43,7 +43,7 @@
 #include "lib/util/tevent_unix.h"
 #include "lib/tevent/tevent_internal.h"
 #include "smbd/globals.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 #define DEFAULT_VOLFILE_SERVER "localhost"
 
index c83d3124cc0eb70a06286259bcf4d1418855f0d7..b67aad86b5575490e4431bc0bc8e72bb57a69700 100644 (file)
@@ -21,7 +21,7 @@
 #include "includes.h"
 #include "system/filesys.h"
 #include "smbd/smbd.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 struct preopen_state;
 
index 0208cdeba4c7fcd734d087703d102b97634eb18b..f5c39ad6d7ce096346cba9410f3241605f902999 100644 (file)
@@ -29,7 +29,7 @@
 #include "../librpc/gen_ndr/ndr_netlogon.h"
 #include "auth.h"
 #include "../lib/tsocket/tsocket.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 /* abstraction for the send_over_network function */
 enum sock_type {INTERNET_SOCKET = 0, UNIX_DOMAIN_SOCKET};
index 66e3674c63a695f7ec69691858fae55433e17d09..b4532fa4840a2ee3e75d04fd8c0843203c1e3a6b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "includes.h"
 #include "nmbd/nmbd.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 /***************************************************************************
   Add a DNS result to the name cache.
index 110711c40c2db5fed30fd6a24c8094f85985f2e4..756d67a896e120be913c892c0697182f3db575f8 100644 (file)
@@ -26,7 +26,7 @@
 #include "printing.h"
 #include "printing/pcap.h"
 #include "librpc/gen_ndr/ndr_printcap.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 #ifdef HAVE_CUPS
 #include <cups/cups.h>
index 4a2ffd17ca720c78aa0534d5b35324669198bbd4..e7e6c6dbf71039f7ecc762739ebd63a28e0a5881 100644 (file)
@@ -36,7 +36,7 @@
 #include "messages.h"
 #include "util_tdb.h"
 #include "lib/param/loadparm.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 extern struct current_user current_user;
 extern userdom_struct current_user_info;
index ad710bbb895a4437da1f951a110621348cd2015a..bfb7af6051b1034e102315778bf29f8ec2c175de 100644 (file)
@@ -54,7 +54,7 @@
 #include "rpc_server/samr/srv_samr_util.h"
 #include "passdb.h"
 #include "auth.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 #ifndef ALLOW_CHANGE_PASSWORD
 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))
index 8f4712404f4a51513affd7ae165365ce783576d7..78fb654cf8d3fadb2bf2b16ff5379645da232510 100644 (file)
@@ -24,7 +24,7 @@
 #include "includes.h"
 #include "../librpc/gen_ndr/notify.h"
 #include "smbd/smbd.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 #include <sys/inotify.h>
 
index b491b3138393cde72f9da72408b6933e3ed9bbbc..c99c75ebe871b8b5b13033ccc98f2905cfd2150c 100644 (file)
@@ -39,7 +39,7 @@
 #include "../libcli/security/dom_sid.h"
 #include "../libcli/security/security_token.h"
 #include "lib/id_cache.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 #include "serverid.h"
 #include "system/threads.h"
 
index b1b91e1d025d6eaad86c5097e345c7464809a3c3..bebb789dfe76b0b6a0dcada2af68154a75ba5729 100644 (file)
@@ -43,7 +43,7 @@
 #include "../lib/tsocket/tsocket.h"
 #include "lib/tevent_wait.h"
 #include "libcli/smb/smb_signing.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 /****************************************************************************
  Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext
index baf71d8b93ec79b4946d4eef71904e0e462fb955..ea0a894f2b17abf4de99b35f65b35c4019a8764f 100644 (file)
@@ -26,7 +26,7 @@
 #include "smbd/scavenger.h"
 #include "locking/proto.h"
 #include "lib/util/util_process.h"
-#include "lib/sys_rw.h"
+#include "lib/util/sys_rw.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_SCAVENGER
index 03cd54b1f920fd9b9192779d55f866bf697d64ab..89527f387485485d318f183499dab462d56fc50f 100644 (file)
@@ -26,7 +26,7 @@
 #include "libcli/security/security.h"
 #include "../lib/util/tevent_ntstatus.h"
 #include "rpc_server/srv_pipe_hnd.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
                                              struct tevent_context *ev,
index 914caf8e7ddde005a5d72f3595afa434c7304ffd..21d2dd25500a8042984a9477cee378b33b4c620f 100644 (file)
@@ -41,7 +41,7 @@
 #include "util_tdb.h"
 #include "../libcli/smb/read_smb.h"
 #include "../libcli/smb/smbXcli_base.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 extern char *optarg;
 extern int optind;
index 9b871beda8e017a4fdd91f10487e24a04f8a15a9..906844877f28c1c244ec5029481c00140e46f2f8 100644 (file)
@@ -22,7 +22,7 @@
 #include "system/select.h"
 #include "../lib/util/select.h"
 #include "libsmb/nmblib.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw_data.h"
 
 #define SECURITY_MASK 0
 #define SECURITY_SET  0
index 213462ec1086ee4c76c796e56b4060e73e5643a9..17a89a7fd49e834f56be5abe88e290f20cb3fb0b 100644 (file)
@@ -38,8 +38,8 @@
 #include "messages.h"
 #include "../lib/util/tevent_unix.h"
 #include "lib/param/loadparm.h"
-#include "lib/sys_rw.h"
-#include "lib/sys_rw_data.h"
+#include "lib/util/sys_rw.h"
+#include "lib/util/sys_rw_data.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index b08ac3e5600e2d890667341189c23551cfd256ff..be0b7e67d57445a2c2535c4b8d06923d62e0be83 100755 (executable)
@@ -247,11 +247,6 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
                      source='libads/kerberos.c libads/ads_status.c',
                      public_deps='krb5samba k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
 
-bld.SAMBA3_LIBRARY('sys_rw',
-                   source='lib/sys_rw.c lib/sys_rw_data.c',
-                   deps='replace iov_buf',
-                   private_library=True)
-
 bld.SAMBA3_SUBSYSTEM('samba3util',
                    source='''lib/system.c
                    lib/sendfile.c