I wrote a little helper tool to feed rules into ipfw and start a dns-server. It does the same as this shell-script:
#!/bin/sh
# run the dns server
./nin_mdns_osx 127.0.0.1 &
ipfw add 27000 fwd 127.0.0.1,53 ip from any to any dst-port 53
ipfw add 27101 fwd 127.0.0.1,8081 tcp from any to any dst-port 80
This script works started with sudo (expected). My helpertool started with sudo works too (expected). When i make it root via "chmod u+s" and "chown root" the helper-tool tells me it is root (geteuid retuns 0) - but it fails preforming the ipfw-calls and the dns-server can't bin either (port 53 needs priviledged rights).
I am running Osx 10.6.8. Any Idea what's wrong?