User-agent: Mozilla Thunderbird 0.8 (Windows/20040913)
Bernd Juraschek wrote:
Now I've switched to getting the time using ntpd. But I wonder why the ntp
daemon can set the time. This program is also using stime() and runs as
user ntp on my gentoo system.
Just an idea how they may have done it:
Ntpd starts as root, and probably does a fork before switching to ntp
user. That way most parts (esp network) can run as user ntp, and
privileged stuff like setting the system clock can be done by the root
parent process. Communication between these two processes can be easily
handled by a pipe or simillar.