Blame SOURCES/autofs-5.1.3-fix-open-calls-not-using-open_xxxx-calls.patch

603f99
autofs-5.1.3 - fix open calls not using open_xxxx() calls
603f99
603f99
From: Ian Kent <raven@themaw.net>
603f99
603f99
Fix a couple of remaining open descriptor calls to use the autofs
603f99
open_xxxx() calls.
603f99
603f99
Signed-off-by: Ian Kent <raven@themaw.net>
603f99
---
603f99
 CHANGELOG          |    1 +
603f99
 daemon/automount.c |    2 +-
603f99
 lib/mounts.c       |    2 +-
603f99
 3 files changed, 3 insertions(+), 2 deletions(-)
603f99
603f99
--- autofs-5.0.7.orig/CHANGELOG
603f99
+++ autofs-5.0.7/CHANGELOG
603f99
@@ -286,6 +286,7 @@
603f99
 - fix strerror_r() parameter declaration in do program_mount().
603f99
 - fix incorrect check in validate_program_options().
603f99
 - update configure to check for pipe2(2).
603f99
+- fix open calls not using open_xxxx() calls.
603f99
 
603f99
 25/07/2012 autofs-5.0.7
603f99
 =======================
603f99
--- autofs-5.0.7.orig/daemon/automount.c
603f99
+++ autofs-5.0.7/daemon/automount.c
603f99
@@ -981,7 +981,7 @@ static int set_log_priority(const char *
603f99
 	 * Specify O_NONBLOCK so that the open will fail if there is no
603f99
 	 * daemon reading from the other side of the FIFO.
603f99
 	 */
603f99
-	fd = open(fifo_name, O_WRONLY|O_NONBLOCK);
603f99
+	fd = open_fd(fifo_name, O_WRONLY|O_NONBLOCK);
603f99
 	if (fd < 0) {
603f99
 		fprintf(stderr, "%s: open of %s failed with %s\n",
603f99
 			__FUNCTION__, fifo_name, strerror(errno));
603f99
--- autofs-5.0.7.orig/lib/mounts.c
603f99
+++ autofs-5.0.7/lib/mounts.c
603f99
@@ -222,7 +222,7 @@ int check_nfs_mount_version(struct nfs_m
603f99
 	char *s_ver;
603f99
 	int cancel_state;
603f99
 
603f99
-	if (pipe(pipefd))
603f99
+	if (open_pipe(pipefd))
603f99
 		return -1;
603f99
 
603f99
 	pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancel_state);