procmail
[Top] [All Lists]

Re: Binary will not run from rc filter

2007-09-19 13:14:44
At 15:04 2007-09-19 -0400, steve verlander wrote:

LOG=uid=0(root) gid=0(root) 
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) 
context=root:system_r:procmail_t:s0-s0:c0.c1023"
procmail: Executing "/home/app/bin/scripts/filter_app"
/home/app/bin/scripts/filter_app: /home/app/bin/scripts/filter_app: cannot 
execute binary file
procmail: Non-zero exitcode (126) from "/home/app/bin/scripts/filter_app"

What is the exitcode is what when you execute the app from the shell?  Why 
is it nonzero?

The w and W flags relate to the program exit code.  Normally, procmail 
doesn't care, but by using these flags, you're saying _care_ about the exit 
code.

When I run procmail -m as root with the rc file I get this:

context=root:system_r:unconfined_t:SystemLow-SystemHigh"

The context differs.  Note "unconfined_t" versus "procmail_t".  Are you 
running SELinux?  I suggest you check out the policy files on the system.

procmail: Executing "/home/app/bin/scripts/filter_app"

and it works.

It would seem that the shellscript isn't returning a nonzero exit 
code.  The app itself may or may not be running successfully, but the shell 
script isn't telling procmail that it failed.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>