search for: length_without_training_slash

Displaying 3 results from an estimated 3 matches for "length_without_training_slash".

2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...ine + sizeof (SELINUXTYPE), r - sizeof (SELINUXTYPE) - 1); + if (*policy == NULL) { + int errno_save = 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 '...
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 27
3
Re: [PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...e this hunk. Or > call g#set_selinux false unconditionally to make your intention > explicit? > > (Same for the customize_main.ml hunk) Yes, that together its comment above is done to make that setting explicit, so it is not changed in the future creating issues. > > + len = length_without_training_slash (root); > > + > > + if (asprintf (&selinux_config, "%s%.*s/etc/selinux/config", > > + sysroot, len, root) == -1) { > > + if (verbose) > > + fprintf (stderr, "asprintf/selinux_config failed\n"); > > + goto do_auto...