Sim, é getfilecon(3) em libselinux :
char * context;
int easize = getfilecon("/path/to/your/file", &context);
Se o tamanho retornado não for negativo, context conterá o contexto do arquivo.
Existe uma maneira em C de obter o contexto SELinux de um arquivo?
Sim, é getfilecon(3) em libselinux :
char * context;
int easize = getfilecon("/path/to/your/file", &context);
Se o tamanho retornado não for negativo, context conterá o contexto do arquivo.