All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Edenfield <kutulu@kutulu.org>
To: Chris PeBenito <pebenito@gentoo.org>
Cc: SELinux Mailing List <selinux@tycho.nsa.gov>
Subject: Re: [refpolicy patch, second try] samba policy updates
Date: Tue, 29 Jul 2008 13:38:24 -0400	[thread overview]
Message-ID: <488F5590.6060908@kutulu.org> (raw)
In-Reply-To: <1217342823.4934.42.camel@defiant.pebenito.net>

Chris PeBenito wrote:
> On Mon, 2008-07-28 at 12:00 -0400, Mike Edenfield wrote:
>> +tunable_policy(`samba_create_home_dirs',`
>> +	ifdef(`distro_redhat', `
>> +		refpolicywarn(`Use of samba_create_home_dirs is discouraged.  Please use pam_oddjob_mkhomedir instead.')
>> +	', `
>> +		unprivuser_create_home_dirs(smbd_t)
>> +		allow smbd_t self:capability chown;
>> +	')
>> +')
> 
> I don't think this has the effect that you're trying to get.  The ifdef
> is resolved during build time, and the tunable is resolved at runtime.
> So the warning message won't do any good for most redhat users (and it
> leaves them with a noop samba_create_home_dirs tunable).

I wasn't sure if that would work; I know Dan has expressed a preference 
for RH users to use oddjob for this, but I didn't know if there was any 
way to enforce that.  I certainly didn't want it to silently do nothing. 
  Is there a correct place to document this preference?

>> +interface(`unprivuser_create_home_dirs',`
>> +       unprivuser_home_filetrans_home_dir($1)
>> +       unprivuser_manage_home_dirs($1)
>> +')
> 
> "Create" just means directory create, but you have the full manage
> permission set, in addition to a filetrans.

I think I did go a bit overboard with the manage permissions.  I'd 
copied these from the oddjob's policy, but I notice that oddjobs also 
permits deleting home directories, which probably isn't needed here.

The filetrans is needed, though, because without it, the created home 
directories were getting labeled home_root_t instead of user_home_dir_t. 
  It also needs to copy the template files in and label them correctly, 
like the user_home_ssh_t on .ssh, etc.  I'll narrow this down.


--
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-07-29 17:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 16:00 [refpolicy patch, second try] samba policy updates Mike Edenfield
2008-07-29 14:47 ` Chris PeBenito
2008-07-29 17:38   ` Mike Edenfield [this message]
2008-07-29 19:54     ` Chris PeBenito
2008-07-29 21:22       ` Mike Edenfield
2008-07-31 12:56         ` Christopher J. PeBenito
2008-07-31 16:27           ` Mike Edenfield
2008-07-31 18:06             ` Christopher J. PeBenito
2008-07-31 18:24               ` Mike Edenfield

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=488F5590.6060908@kutulu.org \
    --to=kutulu@kutulu.org \
    --cc=pebenito@gentoo.org \
    --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.