git » mk-builders.git » commit 2b175a6

build64 pam.d

author Urja (ARMLFS builder)
2024-06-29 11:07:18 UTC
committer Urja (ARMLFS builder)
2024-06-29 11:07:18 UTC
parent 5b68656f9dcf63b26fb5aebbf5c4de628de7be39

build64 pam.d

bc64-pamd-su.diff +11 -0
make-build64.sh +11 -4

diff --git a/bc64-pamd-su.diff b/bc64-pamd-su.diff
new file mode 100644
index 0000000..187a04f
--- /dev/null
+++ b/bc64-pamd-su.diff
@@ -0,0 +1,11 @@
+--- /buildcore64-v2/etc/pam.d/su	2024-04-02 12:35:47.000000000 +0300
++++ /buildcore64/etc/pam.d/su	2024-05-04 12:11:09.274000000 +0300
+@@ -1,7 +1,7 @@
+ #%PAM-1.0
+ auth            sufficient      pam_rootok.so
+ # Uncomment the following line to implicitly trust users in the "wheel" group.
+-#auth           sufficient      pam_wheel.so trust use_uid
++auth           sufficient      pam_wheel.so trust use_uid
+ # Uncomment the following line to require a user to be in the "wheel" group.
+ #auth           required        pam_wheel.so use_uid
+ auth            required        pam_unix.so
diff --git a/make-build64.sh b/make-build64.sh
index d4aecd1..990dcf4 100755
--- a/make-build64.sh
+++ b/make-build64.sh
@@ -2,6 +2,7 @@
 set -e
 BSN=buildcore64-v2
 BS=/$BSN
+MK="$(pwd)"
 if [ -d $BS ]; then
 	echo "Will delete $BS, enter to continue"
 	read dummy
@@ -24,13 +25,19 @@ mkdir -p $BS/var/lib/pacman
 pacman --config build64-pacman.conf -Sy -b $BS/var/lib/pacman -r $BS
 pacman --config build64-pacman.conf -S --noconfirm  --noscriptlet -b $BS/var/lib/pacman -r $BS base
 
-# Pacman/makepkg configuration and cd into target
+# Pacman/makepkg configuration
+
+cp build64-pacman.conf $BS/etc/pacman.conf
+cp build64-initial.sh $BS/initial.sh
 
 # ARM32 clang & rustc helper scripts
 cp -a bc64-usr-a32 $BS/usr/a32
 
-cp build64-pacman.conf $BS/etc/pacman.conf
-cp build64-initial.sh $BS/initial.sh
+# etc/pam.d/su
+cd $BS/etc/pam.d
+patch -Np4 -i $MK/bc64-pamd-su.diff
+
+# cd to target
 cd $BS
 
 run_in_chroot() {
@@ -50,6 +57,6 @@ return 0
 }
 run_in_chroot initial.sh
 
-cd -
+cd "$MK"
 umount $BS
 echo Done.