On Tue, Oct 1, 2013 at 4:42 PM, Lennart Poettering <[email protected]> wrote: > On Tue, 01.10.13 16:11, Auke Kok ([email protected]) wrote: > >> index 1434dea..d7b8dce 100644 >> --- a/src/core/smack-setup.c >> +++ b/src/core/smack-setup.c >> @@ -36,6 +36,7 @@ >> #include "macro.h" >> #include "smack-setup.h" >> #include "util.h" >> +#include "fileio.h" >> #include "log.h" >> #include "label.h" >> >> @@ -138,6 +139,12 @@ int smack_setup(void) { >> return 0; >> } >> >> +#ifdef SMACK_RUN_LABEL >> + if (write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL)) >> + log_warning("Failed to set SMACK label \"%s\" on self: %s", >> + SMACK_RUN_LABEL, strerror(abs(r))); >> +#endif > > Looks got in principle, but error handling is borked. You need to assign > r first before you print it. Also, write_string_file returns negative > errno, so you should just strerror(-r) instead of strerror(abs(r)).
derp prize. Apologies. Will fix. Auke _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
