From f2bb83c088ab7345180974e1e6c0fa6eebf38231 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 19 Jul 2011 00:41:23 -0500 Subject: [PATCH] Add default to policy prompt and fix harmless bug in edit_policy() --- kadmin/util.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kadmin/util.c b/kadmin/util.c index 8a411dc6b..2c94dcb35 100644 --- a/kadmin/util.c +++ b/kadmin/util.c @@ -188,8 +188,7 @@ edit_policy (const char *prompt, char **policy, int *mask, int bit) return 0; buf[0] = '\0'; - if (*policy) - strlcpy(buf, *policy, sizeof (buf)); + strlcpy(buf, "default", sizeof (buf)); for (;;) { if(get_response("Policy", buf, resp, sizeof(resp)) != 0) return 1; @@ -198,8 +197,6 @@ edit_policy (const char *prompt, char **policy, int *mask, int bit) if (parse_policy (resp, policy, mask, bit) == 0) break; } - if (*policy) - strlcpy(buf, *policy, sizeof (buf)); return 0; } -- 2.11.4.GIT