chiark / gitweb /
Classify processes from sessions into cgroups
[elogind.git] / src / shared / fileio-label.c
index 294c9e6badd47b71568a5a173222211cd36fb829..f596f1d11fc6d54be479bfd8f13c35079c5cf857 100644 (file)
   You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
 
-#include "fileio-label.h"
-#include "label.h"
 #include "util.h"
+#include "selinux-util.h"
+#include "fileio-label.h"
 
 int write_string_file_atomic_label(const char *fn, const char *line) {
         int r;
@@ -34,7 +31,7 @@ int write_string_file_atomic_label(const char *fn, const char *line) {
         if (r < 0)
                 return r;
 
-        r = write_string_file_atomic(fn, line);
+        r = write_string_file(fn, line, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC);
 
         mac_selinux_create_file_clear();