All of lore.kernel.org
 help / color / mirror / Atom feed
* runcon problems
@ 2007-03-27  0:25 Yong Lee
  2007-04-03 14:52 ` Daniel J Walsh
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Lee @ 2007-03-27  0:25 UTC (permalink / raw)
  To: selinux


[-- Attachment #1.1: Type: text/plain, Size: 1835 bytes --]

Hi all,

 

I'm rather new to selinux and was hoping that someone could help me with a
problem I am having.  I'm running on redhat WS 4 2.6.9-42.  I'm trying to
get a php based web application to make a system call to do a java compile.
I was getting a bunch of avc issues trying to do this and rather than try to
change the selinux policy I was hoping to make use of the runcon command to
run a script which would do my java compile call.

 

So I have a script that looks something like this :

 

#!/bin/sh

 

exec /usr/bin/java -jar $2 $3 $4 $5

 

 

and I'm trying to call it using a system call from php :

 

/usr/bin/runcon /home/test/runjava a b c d

 

denied  { write } for  pid=727 comm="runcon" name="exec" dev=proc
ino=47644693 scontext=root:system_r:httpd_sys_script_t
tcontext=root:system_r:httpd_sys_script_t tclass=file

 

when I edit my targeted policy and recompile to allow the write on exec, I
get :

 

Mar 26 16:54:14 localhost kernel: audit(1174953254.268:1216): avc:  denied
{ setexec } for  pid=1097 comm="runcon"
scontext=root:system_r:httpd_sys_script_t
tcontext=root:system_r:httpd_sys_script_t tclass=process

 

I was going to add 

 

allow httpd_sys_script_t self:process setexec;

 

to the policy rules but I'm thinking that this may not be a good idea and
there must be a better way to get this done.  I'm hoping that some of u
gurus with a lot more experience in this area could help shed some light on
the best way of allowing my php script to successfully call the java binary
without making so many changes to the existing selinux policy.

 

thanks,

Yong.

 

 

Yong Lee

Developer

ylee@EQO.com

 <http://www.eqo.com/> 

direct:      +1.604.273.8173 x113

mobile:    +1.604.418.4470

fax:         +1.604.273.8172

web:        www.EQO.com <http://www.eqo.com/> 

EQO ID:   yonglee

 

 


[-- Attachment #1.2: Type: text/html, Size: 9840 bytes --]

[-- Attachment #2: image001.jpg --]
[-- Type: image/jpeg, Size: 1823 bytes --]

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

end of thread, other threads:[~2007-04-04 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27  0:25 runcon problems Yong Lee
2007-04-03 14:52 ` Daniel J Walsh
2007-04-04  0:38   ` Russell Coker

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.