selinux and file security contexts

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

 



Can someone enlighten me about the way rpm handles packaging of files
with selinux security context.

First of all rpm seems to be able to include the selinux security
context of files as seen here ( on a Fedora Core 3 machine )

#  rpm -q --queryformat "[%{FSCONTEXTS} %{FILENAMES}\n]" cups-libs
system_u:object_r:shlib_t /usr/lib/libcups.so.2
system_u:object_r:shlib_t /usr/lib/libcupsimage.so.2

But I can't find any information about how to specify it in the 
%files section. Normal file permission are easy to specify. You just
add the %attr, as seen here, 

%files
%attr(644,root,root) /etc/myfile

It would be nice to have something similar for selinux security
contexts.

Maybe the selinux security contexts will be taken from what the
installed files in $RPM_BUILD_ROOT are having?  

Or is the file
/etc/selinux/targeted/contexts/files/file_contexts
on the building host, in some way involved in this?

cheers,
Erik Sjölund



_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux