[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] cp: -Z: fix a logic error due to incorrect braces in mkfifo
From: |
Pádraig Brady |
Subject: |
[PATCH 8/9] cp: -Z: fix a logic error due to incorrect braces in mkfifo |
Date: |
Wed, 28 Nov 2012 01:43:18 +0000 |
src/mkfifo.c (main): Call mkfifo() for all args rather than the last.
---
src/mkfifo.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 9e80a20..a392459 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -137,13 +137,15 @@ main (int argc, char **argv)
}
for (; optind < argc; ++optind)
- if (set_security_context)
- defaultcon (argv[optind], S_IFIFO);
- if (mkfifo (argv[optind], newmode) != 0)
- {
- error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
- exit_status = EXIT_FAILURE;
- }
+ {
+ if (set_security_context)
+ defaultcon (argv[optind], S_IFIFO);
+ if (mkfifo (argv[optind], newmode) != 0)
+ {
+ error (0, errno, _("cannot create fifo %s"), quote (argv[optind]));
+ exit_status = EXIT_FAILURE;
+ }
+ }
exit (exit_status);
}
--
1.7.6.4
- Re: Make mv work better with SELinux., Daniel J Walsh, 2012/11/08
- Re: Make mv work better with SELinux., Pádraig Brady, 2012/11/08
- Re: Make mv work better with SELinux., Pádraig Brady, 2012/11/27
- [PATCH 4/9] cp: -Z: s/fprintf/error/, Pádraig Brady, 2012/11/27
- [PATCH 6/9] cp: -Z: add selinux.c to POTFILES.in, Pádraig Brady, 2012/11/27
- [PATCH 3/9] cp: -Z: spelling fixes, Pádraig Brady, 2012/11/27
- [PATCH 7/9] cp: -Z: remove redundant includes from selinux.[ch], Pádraig Brady, 2012/11/27
- [PATCH 5/9] cp: -Z: wrap/clarify/isolate --help messages, Pádraig Brady, 2012/11/27
- [PATCH 2/9] cp: -Z: formatting cleanups, Pádraig Brady, 2012/11/27
- [PATCH 8/9] cp: -Z: fix a logic error due to incorrect braces in mkfifo,
Pádraig Brady <=
- [PATCH 1/9] cp: -Z: adjust utils to run restorecon with -Z, Pádraig Brady, 2012/11/27
- [PATCH 9/9] cp: -Z: adjust an existing selinux test to the new scheme, Pádraig Brady, 2012/11/27
- [PATCH] cp: -Z: fix memory leak edge case, Pádraig Brady, 2012/11/28
- Re: Make mv work better with SELinux., Jim Meyering, 2012/11/29