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