Identification of processes is hard. Even if you identify which
program was execed (eg. via /proc/<pid>/exe), that doesn't help
you. For example, if I set LD_PRELOAD or LD_LIBRARY_PATH to cause the
program to link with a library that I control, then I have complete
control over what code gets run. Alternatively, I can control the
process by attaching to it with ptrace.
If you're going to stick with something approximating unix, then you
can prevent tampering by making the program privileged (eg. by making
the program setuid). Having done that, you're in a much better
position to enforce policy. You can use netfilter to firewall out
connections to port 25 from your users, and to enable the privileged
user (ie. the uid used by your MTA during remote deliveries) to make
>2. A config file which contains connection rules for processes.
>Currently, there are only two fields in a connection rule: <cmd path>
>and <ip mask> e.g.
> # <cmdpath> <mask>
> /home/stao/test1 192.168.2.2
> /usr/bin/ftp 255.255.255.255
>where test1 can connect any port on local host 192.168.2.2 and ftp can
>connect to ports of any ip address.
Access control based on program filenames in unix is in the class of
problems where you "don't start from here." The mechanisms used by
unix for access control are almost entirely based on uids and gids,
and you are much better off working within this constraint. If you
don't, you may end up with code that's very hard to check for
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/