@@ -57,6 +57,26 @@ AC_CHECK_HEADERS([unistd.h], ,[AC_MSG_ERROR([Required headers missing; compilati
57
57
AC_CHECK_FUNCS ( [ setresuid] )
58
58
AC_CHECK_FUNCS ( [ gettimeofday] )
59
59
60
+ AC_MSG_CHECKING ( [ user/group to drop privs to] )
61
+
62
+ AC_ARG_WITH ( [ unpriv-user] ,
63
+ [ AS_HELP_STRING ( [ --with-unpriv-user=<user>] ,
64
+ [ User to drop privs to @<:@ default: nobody@:>@ ] ) ] )
65
+ AS_CASE ( [ $with_unpriv_user] ,
66
+ [ ""|yes|no] , [ UNPRIV_USER="nobody"] ,
67
+ [ *] , [ UNPRIV_USER=$with_unpriv_user] )
68
+ AC_DEFINE_UNQUOTED ( [ UNPRIV_USER] , [ "${UNPRIV_USER}"] , [ Unprivileged user] )
69
+
70
+ AC_ARG_WITH ( [ unpriv-group] ,
71
+ [ AS_HELP_STRING ( [ --with-unpriv-group=<group>] ,
72
+ [ Group to drop privs to @<:@ default: nogroup@:>@ ] ) ] )
73
+ AS_CASE ( [ $with_unpriv_group] ,
74
+ [ ""|yes|no] , [ UNPRIV_GROUP="nogroup"] ,
75
+ [ *] , [ UNPRIV_GROUP=$with_unpriv_group] )
76
+ AC_DEFINE_UNQUOTED ( [ UNPRIV_GROUP] , [ "${UNPRIV_GROUP}"] , [ Unprivileged group] )
77
+
78
+ AC_MSG_RESULT ( ${UNPRIV_USER}:${UNPRIV_GROUP} )
79
+
60
80
dnl Check for clock_gettime. Some systems put it into -lc, while
61
81
dnl others use -lrt. Try the first and fallback to the latter.
62
82
RT_LIB=
0 commit comments