<div>Hiya, I tried to replicate as much of it as I could on my home pc and hit a few problems I hadn't initially thought about with selinux (it's pretty much my first experience with it, so I may be barking up the wrong tree as some of the scripts aren't mine). I can't replicate to be 100% sure, but the problems extremely similar.
</div>
<div> </div>
<div>Basically to test, I used sudo (as quite a few of our scripts do) with permissive on. If a shell isn't specified in a script, test.sh is just something like echo "hello" with no #!/bin/bash at first (naturally sudoers file set up).
</div>
<div> </div>
<div>sudo -H -u ian ./test.sh this will return with "sesh: Error execing ./test.sh: Exec format error</div>
<div> </div>
<div>If I add #!/bin/bash to the start it will be fine.</div>
<div> </div>
<div>I'm assuming here, the problem is with sudo using sesh and interaction with selinux. I had assumed permissive on was purely logging only and no difference in execution other than that. I'm also assuming this is by design, and not a bug (as the problem likely wouldn't be there with better designed scripts).
</div>
<div> </div>
<div>Naturally some problems can be got around easily by just adding the shell, but there's a few where not so simple (original problem was with cron), so was looking for a quicker fix to temp get them working by turning permissive off.
</div>
<div> </div>
<div>Thanks, Ian</div>
<div> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 10/3/06, <b class="gmail_sendername">Karanbir Singh</b> <<a href="mailto:mail-lists@karan.org">mail-lists@karan.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ian mu wrote:<br>> Hiya all,<br>><br>> After some problems the other day, I've tracked down a problem I've been
<br>> having fairly definitely to selinux being on in permissive mode.<br>> sestatus shows it enabled and permissive.<br><br>how did you track the problem down to being a SELinux in permissive mode ?<br><br>and no, afaik, you cant move from permissive to disabled, since selinux
<br>code comes down from kernelspace.<br><br>--<br>Karanbir Singh : <a href="http://www.karan.org/">http://www.karan.org/</a> : 2522219@icq<br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">
CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a><br></blockquote></div><br>