All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: mysql policy
@ 2002-10-30  9:35 Tom
  0 siblings, 0 replies; 12+ messages in thread
From: Tom @ 2002-10-30  9:35 UTC (permalink / raw)
  To: selinux

What is the best-practice on labelling script files? Should they be
treated with more care than binaries?

I'm asking because I have largely tossed Russell's mysqld domain and
started a new one from scratch, not because Russell's was in any way
bad but because doing so allows me to better understand what is
happening and what permissions it needs.
This way I found out that the wrapper (safe_mysqld) that the init
script uses to start mysqld requires some more and other permissions
than the daemon itself, so I'm thinking about putting it into a
different domain so that the daemon, once running, doesn't have all
those unneeded priviledges.

safe_mysqld is a shell script. I can't see a problem with that from the
pure "hacking" perspective (modifying a shell script is not that much
easier than modifying a binary), but maybe its reliance on /bin/sh
makes it a different game?


-- 
PGP/GPG key: http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <tom@lemuria.org>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
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.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* mysql policy
@ 2002-10-28 10:01 Tom
  2002-10-28 12:24 ` Russell Coker
  0 siblings, 1 reply; 12+ messages in thread
From: Tom @ 2002-10-28 10:01 UTC (permalink / raw)
  To: selinux

I have a few questions about the mysql policy:

For me, starting it up via "run_init /etc/init.d/mysql start" doesn't
work. There's a lot of messages like these:

Oct 28 12:47:23 nsa2 kernel: avc:  denied  { write } for  pid=1376 exe=/usr/bin/tee path=/lib/mysql dev=03:04 ino=3014657 scontext=system_u:system_r:initrc_t tcontext=system_u:object_r:mysqld_db_t tclass=dir
Oct 28 12:47:24 nsa2 kernel: avc:  denied  { read } for  pid=1377 exe=/usr/bin/mysqladmin path=/etc/mysql/my.cnf dev=03:01 ino=32610 scontext=system_u:system_r:initrc_t tcontext=system_u:object_r:etc_mysqld_t tclass=file

Piped into newrules, it all boils down to:

allow initrc_t etc_mysqld_t:file { read };
allow initrc_t mysqld_db_t:dir { write };


Which tells me that run_init doesn't change context when it calls
mysqladmin, which is part of the "safe_mysql" script.


Is this on purpose or a mistake? If it's on purpose, what is the
workaround I'm missing to get mysql to start?


-- 
PGP/GPG key: http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <tom@lemuria.org>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-10-30 14:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-30  9:35 mysql policy Tom
  -- strict thread matches above, loose matches on Subject: below --
2002-10-28 10:01 Tom
2002-10-28 12:24 ` Russell Coker
2002-10-28 12:58   ` Tom
2002-10-28 13:47     ` Russell Coker
2002-10-28 14:05       ` Tom
2002-10-28 15:12         ` Tom
2002-10-29 19:16           ` Stephen Smalley
2002-10-29 19:49             ` Tom
2002-10-29 20:07               ` Stephen Smalley
2002-10-30  6:51                 ` Tom
2002-10-30 14:32             ` Tom

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.