How do I create a directory in C that will follow selinux file context rules?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to create a directory in a C binary.
 
I am currently doing something similar to this:
 
 
status = mkdir("/home/cnd/mod1", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
 
But when the directory is created it ends up with the wrong SELinux context. It inherits it's parent's context and 
not the one defined in file context.
 
Is there a C call that can be used that understands how to correctly create and label SElinux directories?
--
selinux mailing list
selinux@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/selinux

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux