All of lore.kernel.org
 help / color / mirror / Atom feed
From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 5/5] Support at service
Date: Wed, 14 Nov 2012 20:31:13 +0100	[thread overview]
Message-ID: <20121114193113.GB4196@siphos.be> (raw)
In-Reply-To: <1352920712.3654.23.camel@d30.localdomain>

On Wed, Nov 14, 2012 at 08:18:32PM +0100, Dominick Grift wrote:
> May this is gentoo specific, on my f17 system this location does not
> even exist
> 
> Are you sure that it works as you expect it? 

It seems to yes, I'm using it often the last few days to test out job
invocation from system cron, without having to edit my crontabs over and
over gain:

echo "layman -S" | at now+1min

Easy as pie to test stuff.

> Also the patch has stuff that seems unrelated. For example:
> 
> > -read_files_pattern(crond_t, user_cron_spool_t, user_cron_spool_t)
> > +manage_files_pattern(crond_t, user_cron_spool_t, user_cron_spool_t)
> 
> Why did you change that?

Well, there are two parts of the at-stuff: one is the atjobs, the other is
atspool. In atjobs (labeled user_cron_spool_t) the scripts are placed that
are to be executed. These scripts, once executed, add in lock files inside
the atjobs location (hence the manage_files_pattern for crond_t).

> Also why does the following only apply for cron admin role and admin
> crontab? Do you know why the fsetid for admin_crontab_t is needed?:
> 
> > +allow admin_crontab_t self:capability fsetid;


It might also be for non-admin cron stuff, I'm currently only testing with
admin. I believe it is needed while writing the scripts in the atjob
location.

testsys ~ # echo ls | at now+1min
warning: commands will be executed using /bin/sh
job 21 at Wed Nov 14 20:31:00 2012
testsys ~ # cat /var/log/avc.log 
Nov 14 20:30:16 testsys kernel: [ 1746.093723] type=1400
audit(1352921416.791:31): avc:  granted  { fsetid } for  pid=3573 comm="at"
capability=4  scontext=root:sysadm_r:admin_crontab_t
tcontext=root:sysadm_r:admin_crontab_t tclass=capability
Nov 14 20:30:16 testsys kernel: [ 1746.093734] type=1400
audit(1352921416.791:32): avc:  granted  { fsetid } for  pid=3573 comm="at"
capability=4  scontext=root:sysadm_r:admin_crontab_t
tcontext=root:sysadm_r:admin_crontab_t tclass=capability

Wkr,
	Sven Vermeulen

  reply	other threads:[~2012-11-14 19:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 16:50 [refpolicy] [PATCH 0/5] Small batch of updates for contrib Sven Vermeulen
2012-11-10 16:50 ` [refpolicy] [PATCH 1/5] Introducing cron_manage_log_files interface Sven Vermeulen
2012-11-14 18:09   ` Dominick Grift
2012-11-10 16:50 ` [refpolicy] [PATCH 2/5] Portage fetch domain needs to access certificates Sven Vermeulen
2012-11-14 18:08   ` Dominick Grift
2012-11-10 16:50 ` [refpolicy] [PATCH 3/5] Introduce dontaudits for leaked fd and unix stream sockets Sven Vermeulen
2012-11-14 18:06   ` Dominick Grift
2012-11-14 19:20     ` Sven Vermeulen
2012-11-14 19:37       ` Dominick Grift
2012-11-14 20:18         ` Sven Vermeulen
2012-11-14 20:31           ` Dominick Grift
2012-11-10 16:50 ` [refpolicy] [PATCH 4/5] Dontaudit attempts by system_mail_t to use leaked fd or " Sven Vermeulen
2012-11-14 18:05   ` Dominick Grift
2012-11-10 16:50 ` [refpolicy] [PATCH 5/5] Support at service Sven Vermeulen
2012-11-14 18:03   ` Dominick Grift
2012-11-14 19:03     ` Sven Vermeulen
2012-11-14 19:18       ` Dominick Grift
2012-11-14 19:31         ` Sven Vermeulen [this message]
2012-11-14 19:39           ` Dominick Grift

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=20121114193113.GB4196@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --cc=refpolicy@oss.tresys.com \
    /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.