shadow: use /bin/sh as default shell (#432117)

authored by Fabián Heredia Montiel and committed by GitHub 93ff3157 11167ac9

+7 -18
+1
nixos/tests/sssd-ldap.nix
··· 99 99 objectClass: posixAccount 100 100 userPassword: ${testPassword} 101 101 homeDirectory: /home/${testUser} 102 + loginShell: /run/current-system/sw/bin/bash 102 103 uidNumber: 1234 103 104 gidNumber: 1234 104 105 cn: ""
+6 -5
pkgs/by-name/sh/shadow/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - runtimeShell, 6 5 nixosTests, 7 6 autoreconfHook, 8 7 bison, ··· 49 48 "man" 50 49 ]; 51 50 52 - RUNTIME_SHELL = runtimeShell; 53 - 54 51 nativeBuildInputs = [ 55 52 autoreconfHook 56 53 bison ··· 74 71 ./keep-path.patch 75 72 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 76 73 ./respect-xml-catalog-files-var.patch 77 - ./runtime-shell.patch 78 74 ./fix-install-with-tcb.patch 79 75 ]; 80 76 81 - # The nix daemon often forbids even creating set[ug]id files. 82 77 postPatch = '' 78 + # The nix daemon often forbids even creating set[ug]id files 83 79 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am 80 + 81 + # The default shell is not defined at build time of the package. It is 82 + # decided at build time of the NixOS configration. Thus, don't decide this 83 + # here but just point to the location of the shell on the system. 84 + substituteInPlace configure.ac --replace-fail '$SHELL' /bin/sh 84 85 ''; 85 86 86 87 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
-13
pkgs/by-name/sh/shadow/runtime-shell.patch
··· 1 - diff --git a/configure.ac b/configure.ac 2 - index e4c6aaec..03883ad7 100644 3 - --- a/configure.ac 4 - +++ b/configure.ac 5 - @@ -682,7 +682,7 @@ if test "$enable_utmpx" = "yes"; then 6 - [Define if utmpx should be used]) 7 - fi 8 - 9 - -AC_DEFINE_UNQUOTED(SHELL, ["$SHELL"], [The default shell.]) 10 - +AC_DEFINE_UNQUOTED(SHELL, ["$RUNTIME_SHELL"], [The runtime shell.]) 11 - 12 - AM_GNU_GETTEXT_VERSION(0.16) 13 - AM_GNU_GETTEXT([external], [need-ngettext])