From ab40a941a07d80326aaa051e3c94c88b800cbd7d Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 28 Oct 2015 13:02:31 +0000 Subject: all: replace most uses of quotearg_colon() with quote() Related to commit v8.24-61-g6796698 this provides more consistent quoting, as quotearg_colon() defaults to "literal" quoting by default, while quote() provides appropriate quoting for diagnostics by default. * gl/modules/randread: Depend on quote module rather than quotearg. * gl/lib/randread.c: Used quote() not quotearg_colon(). * src/: Likewise. * src/shred.c: Likewise. Also avoid unnecessary quoting introducing overhead when wiping names. * cfg.mk: Relax the matching expression to allow "qname" variables as used in shred.c to satisfy the check. * tests/: Adjust accordingly. --- src/runcon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/runcon.c') diff --git a/src/runcon.c b/src/runcon.c index ecb12985a..d5ec57958 100644 --- a/src/runcon.c +++ b/src/runcon.c @@ -49,7 +49,6 @@ #include "system.h" #include "error.h" #include "quote.h" -#include "quotearg.h" /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "runcon" @@ -231,7 +230,7 @@ main (int argc, char **argv) con = context_new (cur_context); if (!con) error (EXIT_FAILURE, errno, _("failed to create security context: %s"), - quotearg_colon (cur_context)); + quote (cur_context)); if (user && context_user_set (con, user)) error (EXIT_FAILURE, errno, _("failed to set new user: %s"), quote (user)); @@ -248,7 +247,7 @@ main (int argc, char **argv) if (security_check_context (context_str (con)) < 0) error (EXIT_FAILURE, errno, _("invalid context: %s"), - quotearg_colon (context_str (con))); + quote (context_str (con))); if (setexeccon (context_str (con)) != 0) error (EXIT_FAILURE, errno, _("unable to set security context %s"), -- cgit v1.2.3-54-g00ecf