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

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