chiark / gitweb /
Classify processes from sessions into cgroups
[elogind.git] / src / shared / fileio-label.c
index 5fd69e05805c40f734e098246ed332b59b721851..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 "util.h"
 #include "selinux-util.h"
-#include "label.h"
 #include "fileio-label.h"
 
 int write_string_file_atomic_label(const char *fn, const char *line) {
@@ -35,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();