s3: Fix the clustering build
authorVolker Lendecke <vl@samba.org>
Sat, 17 Dec 2011 16:04:09 +0000 (17:04 +0100)
committerVolker Lendecke <vlendec@samba.org>
Sat, 17 Dec 2011 17:41:39 +0000 (18:41 +0100)
ctdb_private.h already defines set_close_on_exec.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Dec 17 18:41:39 CET 2011 on sn-devel-104

lib/util/blocking.c
lib/util/genrand.c
lib/util/samba_util.h
source4/lib/socket/socket_ip.c
source4/lib/socket/socket_unix.c
source4/smbd/pidfile.c

index 9dede7aa0dd63779f630c2e211f625ceb95f0cf2..157804a5be52731633e7b48223ed801557b23a54 100644 (file)
@@ -62,7 +62,7 @@ _PUBLIC_ int set_blocking(int fd, bool set)
 }
 
 
-_PUBLIC_ bool set_close_on_exec(int fd)
+_PUBLIC_ bool smb_set_close_on_exec(int fd)
 {
 #ifdef FD_CLOEXEC
        int val;
index b8d3c78fa11be4311e76948bc9090596afa14366..57884ef791fb6a14ba02abd44fc260da9e81a20b 100644 (file)
@@ -173,7 +173,7 @@ static int do_reseed(bool use_fd, int fd)
                if (fd == -1) {
                        fd = open( "/dev/urandom", O_RDONLY,0);
                        if (fd != -1) {
-                               set_close_on_exec(fd);
+                               smb_set_close_on_exec(fd);
                        }
                }
                if (fd != -1
@@ -236,7 +236,7 @@ _PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
                        if (urand_fd == -1) {
                                urand_fd = open( "/dev/urandom", O_RDONLY,0);
                                if (urand_fd != -1) {
-                                       set_close_on_exec(urand_fd);
+                                       smb_set_close_on_exec(urand_fd);
                                }
                        }
                        if(urand_fd != -1 && (read(urand_fd, out, len) == len)) {
@@ -276,7 +276,7 @@ _PUBLIC_ void generate_secret_buffer(uint8_t *out, int len)
        if (urand_fd == -1) {
                urand_fd = open( "/dev/urandom", O_RDONLY,0);
                if (urand_fd != -1) {
-                       set_close_on_exec(urand_fd);
+                       smb_set_close_on_exec(urand_fd);
                }
        }
        if(urand_fd != -1 && (read(urand_fd, out, len) == len)) {
index 3b5169d74466d48e0553e3e0eb9b21c1e7d99b14..95bf7fd7430df96201b2bb4b61bb56b3e44d9bb2 100644 (file)
@@ -670,7 +670,7 @@ _PUBLIC_ int set_blocking(int fd, bool set);
 /**
    set close on exec on a file descriptor if available
  **/
-_PUBLIC_ bool set_close_on_exec(int fd);
+_PUBLIC_ bool smb_set_close_on_exec(int fd);
 
 /**
  Sleep for a specified number of milliseconds.
index d2d57798d4c39bdc246baafcf82230a6ab6fd4e1..d531053add354befe633a1a06935b6fbc471bd10 100644 (file)
@@ -50,7 +50,7 @@ static NTSTATUS ipv4_init(struct socket_context *sock)
                return map_nt_error_from_unix_common(errno);
        }
 
-       set_close_on_exec(sock->fd);
+       smb_set_close_on_exec(sock->fd);
 
        sock->backend_name = "ipv4";
        sock->family = AF_INET;
@@ -612,7 +612,7 @@ static NTSTATUS ipv6_init(struct socket_context *sock)
                return map_nt_error_from_unix_common(errno);
        }
 
-       set_close_on_exec(sock->fd);
+       smb_set_close_on_exec(sock->fd);
 
        sock->backend_name = "ipv6";
        sock->family = AF_INET6;
index ab9b06df1b9bfee90b8042b3020e430f95822100..2909ecca8fde32ba8095d284ba3ead62fda151b1 100644 (file)
@@ -59,7 +59,7 @@ static NTSTATUS unixdom_init(struct socket_context *sock)
 
        sock->backend_name = "unix";
 
-       set_close_on_exec(sock->fd);
+       smb_set_close_on_exec(sock->fd);
 
        return NT_STATUS_OK;
 }
@@ -200,7 +200,7 @@ static NTSTATUS unixdom_accept(struct socket_context *sock,
                }
        }
 
-       set_close_on_exec(new_fd);
+       smb_set_close_on_exec(new_fd);
 
        (*new_sock) = talloc(NULL, struct socket_context);
        if (!(*new_sock)) {
index 85a6322ff70123b0bca1c77cc7e95f81d0640013..b7d1c27cd0f0a99fcff0bf0925f42903c970e15e 100644 (file)
@@ -107,7 +107,7 @@ void pidfile_create(const char *piddir, const char *name)
                exit(1);
        }
 
-       set_close_on_exec(fd);
+       smb_set_close_on_exec(fd);
 
        if (fcntl_lock(fd,F_SETLK,0,1,F_WRLCK)==false) {
                DEBUG(0,("ERROR: %s : fcntl lock of file %s failed. Error was %s\n",