Displaying 3 results from an estimated 3 matches for "selinux_config".
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...will relabel at boot instead.'\n"
- "fi\n";
- int len = strlen (root);
-
- if (root[len - 1] == '/')
+ int len = strlen (path);
+ if (path[len - 1] == '/')
--len;
+ return len;
+}
+
+int
+do_selinux_relabel (const char *root)
+{
+ CLEANUP_FREE char *selinux_config = NULL;
+ CLEANUP_FREE char *policy = NULL;
+ CLEANUP_FREE char *sys_rootpath = NULL;
+ CLEANUP_FREE char *sys_filecontextpath = NULL;
+ CLEANUP_FREE char *sys_autorelabelpath = NULL;
+ CLEANUP_FREE char *err = NULL;
+ CLEANUP_FREE char *out = NULL;
+ int r;
+ int len;
+ const size_t MAX_A...
2014 May 27
3
Re: [PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...ion
> 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_autorelabel;
> > + }
> > +
> > + r = read_selinux_p...
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