package/nut: package/nut: specify --with-user/group when building NUT
commit: https://git.buildroot.net/buildroot/commit/?id=939ff67d15b7db28d67473b1503d1870578a83ca
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x
This commit fixes a problem where the NUT package couldn't be used as a NUT server due to the fact that the default group for nobody is "nogroup" and not "nobody" like the internal default of NUT. Thus, when starting a NUT server daemon the daemon starts with incorrect group permissions. This commit fixes this shortcoming by introducing a dedicated 'nut' user and 'nut' group to drop priviledges to it.
Signed-off-by Jens Maus <[email protected]>
Signed-off-by Yann E. MORIN <[email protected]>
(cherry picked from commit cd46e1b1439e854dc9e4c016795d6e5276e4c573)
Signed-off-by Peter Korsgaard <[email protected]>
--- package/nut/nut.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/nut/nut.mk +7 -1
@@ -24,7 +24,9 @@ NUT_POST_PATCH_HOOKS += NUT_FIX_CONFIGURE NUT_CONF_OPTS = \ --with-altpidpath=/var/run/upsd \ --with-dev \ - --without-doc + --without-doc \ + --with-user=nut \ + --with-group=nut NUT_CONF_ENV = \ ax_cv_check_cflags__Werror__Wno_unknown_warning_option=no \
@@ -34,6 +36,10 @@ NUT_CONF_ENV = \ ac_cv_func_strncasecmp=yes \ ax_cv__printf_string_null=yes +define NUT_USERS + nut -1 nut -1 * - - - NUT user +endef + ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),) NUT_CONF_OPTS += --with-drivers=auto else
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot