From: kutulu@kutulu.org (Mike Edenfield) Date: Mon, 17 Aug 2009 11:01:24 -0400 Subject: [refpolicy] Basic policy for KDE and Konqueror In-Reply-To: <200908171640.49651.Nicky726@gmail.com> References: <200908121440.21006.Nicky726@gmail.com> <1250103483.19221.31.camel@notebook2.grift.internal> <200908171640.49651.Nicky726@gmail.com> Message-ID: <4A8970C4.3080600@kutulu.org> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 8/17/2009 10:40 AM, Nicky726 wrote: > Hello, > > Dominick Grift wrote: >> kde.fc >> remove the file context specification for objects in /tmp and links to >> objects in /tmp. /tmp is a filesystem for temporary objects. file >> context specifications are to ensure that objects stay labeled properly. >> >> http://domg444.blogspot.com/2007/11/why-files-with-incompatible-types-in.html > > I understand that file context specification for /tmp are are wrong. How should > I solve the problem of dividing KDE /tmp stuff from users for yet unconfined KDE > applications, so that I don't have to allow confined KDE apps to read whole > user_tmp_t? Files in /tmp are handled at runtime by type transitions. The applications create the tmp files with the correct context. You'll need to set up TE rules for KDE's files /tmp, you just don't need to define them in the fc file. You should have something like this in your TE rules (note that I haven't actually looked at your policy yet so you might already have this covered.. if so, that's all you need): type kde_tmp_t; files_tmp_file(kde_tmp_t) manage_dirs_pattern(kde_t, kde_tmp_t, kde_tmp_t) manage_files_pattern(kde_t, kde_tmp_t, kde_tmp_t) files_tmp_filetrans(kde_t, kde_tmp_t, { file dir }) --Mike