confd: set fallback shell to /bin/false

This further locks down confd to fall back to /bin/false as login shell
in case of internal errors.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-08-22 13:32:47 +02:00
committed by Tobias Waldekranz
parent 1e74f17a66
commit 96a2418d19
2 changed files with 4 additions and 10 deletions
-6
View File
@@ -13,12 +13,6 @@ CONFD_LICENSE_FILES = LICENSE
CONFD_DEPENDENCIES = augeas jansson libite sysrepo
CONFD_AUTORECONF = YES
ifeq ($(BR2_SYSTEM_BIN_SH_BASH),y)
CONFD_CONF_OPTS += --with-login-shell=/bin/bash
else
CONFD_CONF_OPTS += --with-login-shell=/bin/sh
endif
define CONFD_INSTALL_EXTRA
cp $(CONFD_PKGDIR)/sysrepo.conf $(FINIT_D)/available/
ln -sf ../available/sysrepo.conf $(FINIT_D)/enabled/sysrepo.conf
+4 -4
View File
@@ -22,13 +22,13 @@ AC_REPLACE_FUNCS(asprintf)
# Check feature flags
AC_ARG_WITH(login-shell,
AS_HELP_STRING([--with-login-shell=shell], [Login shell for new users, default: /bin/sh]),
AS_HELP_STRING([--with-login-shell=shell], [Login shell for new users, default: /bin/false]),
[login_shell=$withval], [login_shell=yes])
AS_IF([test "x$with_login_shell" != "xno"], [
AS_IF([test "x$login_shell" = "xyes"], [login_shell=/bin/sh])
AC_DEFINE_UNQUOTED(LOGIN_SHELL, "$login_shell", [Default: /bin/sh])],[
AC_DEFINE_UNQUOTED(LOGIN_SHELL, "/bin/sh")])
AS_IF([test "x$login_shell" = "xyes"], [login_shell=/bin/false])
AC_DEFINE_UNQUOTED(LOGIN_SHELL, "$login_shell", [Default: /bin/false])],[
AC_DEFINE_UNQUOTED(LOGIN_SHELL, "/bin/false")])
# Check for pkg-config first, warn if it's not installed
PKG_PROG_PKG_CONFIG