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 objectClass: posixAccount 100 userPassword: ${testPassword} 101 homeDirectory: /home/${testUser} 102 uidNumber: 1234 103 gidNumber: 1234 104 cn: ""
··· 99 objectClass: posixAccount 100 userPassword: ${testPassword} 101 homeDirectory: /home/${testUser} 102 + loginShell: /run/current-system/sw/bin/bash 103 uidNumber: 1234 104 gidNumber: 1234 105 cn: ""
+6 -5
pkgs/by-name/sh/shadow/package.nix
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 - runtimeShell, 6 nixosTests, 7 autoreconfHook, 8 bison, ··· 49 "man" 50 ]; 51 52 - RUNTIME_SHELL = runtimeShell; 53 - 54 nativeBuildInputs = [ 55 autoreconfHook 56 bison ··· 74 ./keep-path.patch 75 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 76 ./respect-xml-catalog-files-var.patch 77 - ./runtime-shell.patch 78 ./fix-install-with-tcb.patch 79 ]; 80 81 - # The nix daemon often forbids even creating set[ug]id files. 82 postPatch = '' 83 sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am 84 ''; 85 86 # `AC_FUNC_SETPGRP' is not cross-compilation capable.
··· 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 nixosTests, 6 autoreconfHook, 7 bison, ··· 48 "man" 49 ]; 50 51 nativeBuildInputs = [ 52 autoreconfHook 53 bison ··· 71 ./keep-path.patch 72 # Obtain XML resources from XML catalog (patch adapted from gtk-doc) 73 ./respect-xml-catalog-files-var.patch 74 ./fix-install-with-tcb.patch 75 ]; 76 77 postPatch = '' 78 + # The nix daemon often forbids even creating set[ug]id files 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 85 ''; 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])
···