On Tuesday 06 April 2010 15:25:54 Martin Schuster wrote:
> On 04/06/10 04:36, Michelle Konzack wrote:
> >> and it is set SUID as described in "man 7 localmailfilter":
> >>   -rwsrwsr-x 1 1000 1000 541  3. Apr 08:37 tdtools-courier-filter
> > Seting this to UID/GID 0 does not work too.
>
> setuid doesn't work for scripts (i.e. programs that get started
> using the interpreter specified in the #!-line).

Hi Michelle, or something like (needs fine tuning)...

#include <unistd.h>
int main (int argc, char *argv[])
{
  setuid(geteuid());
  execl("/bin/sh","sh","/path/to/script.sh",argv[1],argv[2],NULL);
  return 0;
}

--markc

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to