summaryrefslogtreecommitdiff
path: root/plugins/sudoers/cvtsudoers_ldif.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sudoers/cvtsudoers_ldif.c')
-rw-r--r--plugins/sudoers/cvtsudoers_ldif.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/sudoers/cvtsudoers_ldif.c b/plugins/sudoers/cvtsudoers_ldif.c
index 91acfcd86..9be75e504 100644
--- a/plugins/sudoers/cvtsudoers_ldif.c
+++ b/plugins/sudoers/cvtsudoers_ldif.c
@@ -219,7 +219,7 @@ format_cmnd(struct sudo_command *c, bool negated)
int len;
debug_decl(format_cmnd, SUDOERS_DEBUG_UTIL);
- cmnd = c->cmnd ? c->cmnd : "ALL";
+ cmnd = c->cmnd ? c->cmnd : (char *)"ALL";
bufsiz = negated + strlen(cmnd) + 1;
if (c->args != NULL)
bufsiz += 1 + strlen(c->args);
@@ -461,15 +461,15 @@ print_cmndspec_ldif(FILE *fp, struct sudoers_parse_tree *parse_tree,
#endif /* HAVE_SELINUX */
#ifdef HAVE_APPARMOR
- /* Print AppArmor profile */
- if (cs->apparmor_profile != NULL) {
- if (asprintf(&attr_val, "apparmor_profile=%s", cs->apparmor_profile) == -1) {
- sudo_fatalx(U_("%s: %s"), __func__,
- U_("unable to allocate memory"));
- }
- print_attribute_ldif(fp, "sudoOption", attr_val);
- free(attr_val);
+ /* Print AppArmor profile */
+ if (cs->apparmor_profile != NULL) {
+ if (asprintf(&attr_val, "apparmor_profile=%s", cs->apparmor_profile) == -1) {
+ sudo_fatalx(U_("%s: %s"), __func__,
+ U_("unable to allocate memory"));
}
+ print_attribute_ldif(fp, "sudoOption", attr_val);
+ free(attr_val);
+ }
#endif /* HAVE_APPARMOR */
#ifdef HAVE_PRIV_SET