Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 3cf036c03c6a9885353ad0d35edd5b6be7f6dcd2 Mon Sep 17 00:00:00 2001
From: Brian Bennett <brian.bennett@joyent.com>
Date: Tue, 29 Oct 2019 17:16:05 -0700
Subject: [PATCH] illumos#11894 zonecfg export should quote strings
---
usr/src/cmd/zonecfg/zonecfg.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/usr/src/cmd/zonecfg/zonecfg.c b/usr/src/cmd/zonecfg/zonecfg.c
index 00fa901539..2a3667c62c 100644
--- a/usr/src/cmd/zonecfg/zonecfg.c
+++ b/usr/src/cmd/zonecfg/zonecfg.c
@@ -1891,14 +1891,10 @@ quoteit(char *instr)
static void
export_prop(FILE *of, int prop_num, char *prop_id)
{
- char *quote_str;
-
if (strlen(prop_id) == 0)
return;
- quote_str = quoteit(prop_id);
- (void) fprintf(of, "%s %s=%s\n", cmd_to_str(CMD_SET),
- pt_to_str(prop_num), quote_str);
- free(quote_str);
+ (void) fprintf(of, "%s %s=\"%s\"\n", cmd_to_str(CMD_SET),
+ pt_to_str(prop_num), prop_id);
}
void
--
2.21.0 (Apple Git-122)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.