Displaying 2 results from an estimated 2 matches for "cmd_fmt".
2014 May 24
9
SELinux relabel API
[
I realized that we were discussing adding this feature, in various
private email, IRC, and this long bugzilla thread:
https://bugzilla.redhat.com/show_bug.cgi?id=1060423
That's not how we should do things. Let's discuss it on the
mailing list.
]
One thing that virt-customize/virt-sysprep/virt-builder have to do is
relabel SELinux guests.
What we do at the moment
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...= errno;
+ fclose (f);
+ errno = errno_save;
+ return -1;
+ }
+ trim (*policy);
+ break;
+ }
+ }
+
+ fclose (f);
+
+ return 0;
+}
+
+static int
+length_without_training_slash (const char *path)
{
- CLEANUP_FREE char *cmd = NULL, *out = NULL;
- const char cmd_fmt[] =
- "if load_policy && fixfiles restore; then\n"
- " rm -f %.*s/.autorelabel\n"
- "else\n"
- " touch %.*s/.autorelabel\n"
- " echo 'SELinux relabelling failed, will relabel at boot instead.'\n"
- "fi\n&quo...