All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maria Iano <maria@iano.org>
To: Russell Coker <russell@coker.com.au>
Cc: Erich Schubert <erich@debian.org>, selinux@tycho.nsa.gov
Subject: Re: correct way to set context in perl?
Date: Fri, 19 May 2006 10:31:27 -0400	[thread overview]
Message-ID: <20060519103127.A26098@iano.org> (raw)
In-Reply-To: <200605192357.39325.russell@coker.com.au>; from russell@coker.com.au on Fri, May 19, 2006 at 11:57:35PM +1000

I agree. Nobody actually needs to deal with the individual files anyway - it's all done by scripts through a web interface. It was just a convenience for me to have the groups of domains all separate. I've decided to move all the zones into the more traditional structure of having all masters under a master directory and all slaves under a slave directory. This will mean that the scripts automatically create the files with the correct types. It will make a directory listing slower but that's not a big deal.

So for now I don't need to know the best approach to have a perl script set the security context of a file. I would guess that I will need to do it at some point in the future - if not for this application then for something else. I would really appreciate if someone could help me understand the best approach for this. Is it best to design and code to avoid having to do it (as in this case where I redesigned the directory structure)? If so, I'd like to know why.

Thanks,
Maria
 
On Fri, May 19, at 11:57%P so wrote Russell Coker (russell@coker.com.au):

> On Friday 19 May 2006 07:12, Maria Iano <maria@iano.org> wrote:
> > Thanks for your response. The master and slave directories are separate.
> > The zones are divided into over a hundred different groups (and growing).
> > Individual users have access to edit zones in some groups and not others.
> > Each group has its own directory. Under each group's directory are the
> > master and slave directories. As new groups are created (by the perl
> > scripts), new directories need to be created (as well as new files) and I
> > need to be able to give them the correct security contexts, and there will
> > be two different types under each group directory.
> 
> Why would each group require a separate slave directory?
> 
> The only reason why a user might need direct access to the slave directory is 
> to read files (for converting a slave into a master) and to unlink files 
> (after removing them from the BIND configuration).
> 
> Given that DNS data is essentially public allowing all groups to read each 
> other's data is not going to do any harm.  Also as the data is regenerated as 
> needed and always kept fresh the unlink problem can be solved by a cron job 
> that runs once per month and deletes old slave files.
> 
> -- 
> http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
> http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
> http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
> http://www.coker.com.au/~russell/  My home page

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18 20:06 correct way to set context in perl? Maria Iano
2006-05-18 20:47 ` Erich Schubert
2006-05-18 21:12   ` Maria Iano
2006-05-18 22:47     ` Erich Schubert
2006-05-19 13:57     ` Russell Coker
2006-05-19 14:31       ` Maria Iano [this message]
2006-05-19 15:33         ` Maria Iano
2006-05-19 15:44           ` Stephen Smalley
2006-05-19 17:04             ` Maria Iano
2006-05-20 12:13         ` Russell Coker
2006-05-22 14:46           ` Maria Iano

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=20060519103127.A26098@iano.org \
    --to=maria@iano.org \
    --cc=erich@debian.org \
    --cc=russell@coker.com.au \
    --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.