All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: SE-Linux <selinux@tycho.nsa.gov>, 193644@bugs.debian.org
Subject: Re: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193644 (cron upstream patch)
Date: Wed, 19 May 2004 14:02:39 +0000	[thread overview]
Message-ID: <20040519140239.GF4221@lkcl.net> (raw)
In-Reply-To: <1084973453.30873.76.camel@moss-spartans.epoch.ncsc.mil>

On Wed, May 19, 2004 at 09:30:53AM -0400, Stephen Smalley wrote:

> > i take it that this is a more "informative" string
> > than "*system*" but it is equally as non-username-ish
> > as "*system*" is.
> 
> It conveys to the SELinux code that we want a security context
> appropriate for system cron jobs transparently, as system_u is already
> the SELinux user identity for system processes.  And it doesn't hurt
> anything, as neither "*system*" nor "system_u" should exist in
> /etc/passwd.
 
  then the maintainer of debian crond needs to be authoritatively
  informed of this, as it will help reassure him that no damage is
  done by the change.

  in other words, what you are saying is that by putting system_u
  there instead, on the basis that no one is expected to add a
  user named "system_u" on a non-SELinux system, the change from
  "*system*" to "system_u" will have zero impact on a system
  that does not have an SELinux kernel.



> > the "fake" name created therefore contains information useful
> > to SELinux users whilst at the same time maintaining compatibility
> > with the purpose behind "*system*".
> > 
> > the original patch accidentally changed the behaviour of cron because
> > of the detection strcmp("*system",..) further on.
> 
> The SELinux patch for cron changes all instances of "*system*" to
> SYSUSERNAME, at least in Fedora.  I don't know about the Debian port of
> the patch.  Please sync with the Fedora patch before merging, see
> http://www.nsa.gov/selinux/patches/vixie-cron-selinux.patch.gz.
 

 okay.

 in the debian version of cron (3.0, at line 136 of database.c, the
 second argument to process_crontab is fname, which is a concatenation
 of "*system*" and some other information.

 this concatenation will of course make the strcmp against "*system*",
 at line 245, FAIL in the case where the 2nd arg to process_crontab
 is "*system*someotherinformation"

 this MAY just be a bug in the debian version of cron: i cannot tell
 because i do not know enough about it.


 however, i note with interest that the Fedora patch you mention above
 is against a vixie-cron where the 2nd argument to process_crontab
 is "*system" in BOTH calls to process_crontab, at lines 94 and 136
 of database.c.

 i can only point out the discrepancy between the Fedora vixie-cron
 and the Debian 3.0 cron (based on vixie-cron): i cannot make an informed
 statement about what is right.


 however, in the instance where the Fedora vixie cron happens to be
 correct, then the SELinux cron patch is fixing a bug.

 in the instance where the debian maintained version of cron 3.0
 is correct, then there is a bug in vixie cron which is being
 re-introduced by the Debian/SElinux cron patch.

 ... which is it?

 l.


--
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:[~2004-05-19 14:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19  9:14 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193644 (cron upstream patch) Luke Kenneth Casson Leighton
2004-05-19 13:30 ` Stephen Smalley
2004-05-19 14:02   ` Luke Kenneth Casson Leighton [this message]
2004-05-19 18:11     ` Bug#193644: " Steve Greenland
2004-05-19 20:00       ` Russell Coker
2004-05-20  6:14         ` Luke Kenneth Casson Leighton
2004-05-19 20:00       ` Luke Kenneth Casson Leighton
2004-05-19 21:02         ` Russell Coker
2004-05-19 21:54         ` Steve Greenland
2004-05-20  6:06           ` Luke Kenneth Casson Leighton
2004-05-20 12:06             ` Stephen Smalley
2004-05-20 12:23               ` Luke Kenneth Casson Leighton
2004-05-20 11:57           ` Stephen Smalley
2004-05-20 14:22             ` Luke Kenneth Casson Leighton
2004-05-20 15:48               ` Steve Greenland
2004-05-20 17:44                 ` Russell Coker
2004-05-20 18:55                 ` Luke Kenneth Casson Leighton

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=20040519140239.GF4221@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=193644@bugs.debian.org \
    --cc=sds@epoch.ncsc.mil \
    --cc=selinux@tycho.nsa.gov \
    /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.