This works around the limitation of requiring root as the user. This has been reported to the community as NTP bug 2422 "Allow ntpd to be started as non-root if appropriate POSIX capabilities are set" which although reported as Linux specific, is being used to track the Solaris issue as well. This particular solution is not being passed to the community as a solution because it is specific to Solaris and to our specific use of SMF and is not really suitable as a general solution. --- ntpd/ntpd.c.orig +++ ntpd/ntpd.c @@ -922,17 +922,19 @@ /* MPE lacks the concept of root */ # if defined(HAVE_GETUID) && !defined(MPE) - uid = getuid(); - if (uid && !HAVE_OPT( SAVECONFIGQUIT ) + if (!getenv("SMF_FMRI")) { + uid = getuid(); + if (uid && !HAVE_OPT( SAVECONFIGQUIT ) # if defined(HAVE_TRUSTEDBSD_MAC) - /* We can run as non-root if the mac_ntpd policy is enabled. */ - && mac_is_present("ntpd") != 1 + /* We can run as non-root if the mac_ntpd policy is enabled. */ + && mac_is_present("ntpd") != 1 # endif - ) { - msyslog_term = TRUE; - msyslog(LOG_ERR, - "must be run as root, not uid %ld", (long)uid); - exit(1); + ) { + msyslog_term = TRUE; + msyslog(LOG_ERR, + "must be run as root, not uid %ld", (long)uid); + exit(1); + } } # endif