All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stefan Schulze Frielinghaus <stefan@seekline.net>
Cc: selinux@tycho.nsa.gov
Subject: Re: prelink, cron-job and SELinux compliance
Date: Mon, 17 Mar 2008 14:37:28 -0400	[thread overview]
Message-ID: <47DEBA68.8070105@redhat.com> (raw)
In-Reply-To: <1205667915.2932.9.camel@vogon>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan Schulze Frielinghaus wrote:
> On Mon, 2008-03-10 at 09:00 -0400, Daniel J Walsh wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Stefan Schulze Frielinghaus wrote:
>>> In RHEL/CentOS 5.1 a cron job (/etc/cron.daily/prelink) runs prelink.
>>> The cron job itself removes a file (/etc/prelink.cache) if necessary and
>>> updates the database. This does not work with the strict SELinux policy.
>>>
>>> To solve this I patched the prelink application to
>>> use /var/cache/prelink/prelink.cache instead of /etc/prelink.cache
>>> This would make it more easier to write SELinux policies. But know my
>>> actual question is how to modify the cron job to work properly? All cron
>>> jobs on my system are labeled as bin_t. This would mean that
>>> system_crond_t needs write/create etc. permissions
>>> on /var/cache/prelink. Thats not really nice and I would prefer to
>>> create a domain like cron_script_prelink_t for /etc/cron.daily/prelink
>>> which gets all the rights to manage /var/cache/prelink.
>>>
>>> What are your ideas to handle cron scripts properly?
>>>
>>>
>>> --
>>> This message was distributed to subscribers of the selinux mailing list.
>>> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
>>> the words "unsubscribe selinux" without quotes as the message.
>> Does labeling the directory cron_var_run_t make it work?
>>
>> Please open a bug report on prelink to put the cache file in this new
>> directory.
> 
> The relabel did not solve the problem (AVCs are attached).
> 
> #============= prelink_t ==============
> allow prelink_t crond_var_run_t:dir { remove_name add_name };
> allow prelink_t crond_var_run_t:file { write rename create setattr };
> 
> #============= system_crond_t ==============
> allow system_crond_t crond_var_run_t:dir { write remove_name add_name };
> allow system_crond_t self:process setfscreate;
> 
> Should we create a special type for this purpose (like already
> mentioned: cron_script_prelink_t and label the
> file /etc/cron.daily/prelink)?
> 
> I opened a bug: https://bugzilla.redhat.com/show_bug.cgi?id=437684
> 
> cheers
> Stefan
> 
> PS: Sorry for responding so late but I did not have a Internet
> connection during last week.
> 
I think  you would need to label the individual scrips and setup proper
transitions to make this work correctly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkfeumgACgkQrlYvE4MpobPtowCfU3DiAWPpFwb3ZbpLUOjpZxH3
ZhcAoKFxYqs2rzi+Mzor87SY8QeRhQmp
=D2qQ
-----END PGP SIGNATURE-----

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

      reply	other threads:[~2008-03-17 18:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 10:01 prelink, cron-job and SELinux compliance Stefan Schulze Frielinghaus
2008-03-10 13:00 ` Daniel J Walsh
2008-03-16 11:45   ` Stefan Schulze Frielinghaus
2008-03-17 18:37     ` Daniel J Walsh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47DEBA68.8070105@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=stefan@seekline.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.