Skip to content

Commit 8e280c1

Browse files
committed
attempt to hijack
1 parent a003cf1 commit 8e280c1

File tree

3 files changed

+96
-3
lines changed

3 files changed

+96
-3
lines changed

.github/workflows/devel.yml

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
if [[ "${{ matrix.type }}" == "tarball" ]]; then
5050
cp binary_rootfs /usr/lib/live/build/binary_rootfs
5151
fi
52+
cp lb_chroot_devpts /usr/lib/live/build/lb_chroot_devpts
5253
5354
- name: Make scripts executable
5455
run: chmod -R +x build.sh etc/auto/config etc/terraform.conf etc/

etc/config/hooks/live/099-install-custom-apps.chroot

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ sudo chown "rhino-live" -cR "/home/rhino-live"
1818
sudo chown "rhino-live" -cR "/var/cache/pacstall"
1919
git config --global --add safe.directory '*'
2020

21-
sudo sysctl -w kernel.unprivileged_userns_clone=1
22-
#HOME=/home/rhino-live runuser -l rhino-live -c 'pacstall -U oklopfer:rhinobwrap'
21+
HOME=/home/rhino-live runuser -l rhino-live -c 'pacstall -U oklopfer:rhinobwrap'
2322
#Pacstall installs
2423
HOME=/home/rhino-live runuser -l rhino-live -c 'if [ $(dpkg --print-architecture) = arm64 ]; then FIREFOX="firefox-arm64-deb"; else FIREFOX="firefox-bin"; fi; SUDO_USER=rhino-live PACSTALL_DOWNLOADER=quiet-wget pacstall -PI nala-deb ${FIREFOX} vscodium-deb celeste-bin linux-kernel-stable rhino-core quintom-cursor-theme-git timeshift fake-ubuntu-advantage-tools-deb'
2524
HOME=/home/rhino-live runuser -l rhino-live -c 'SUDO_USER=rhino-live PACSTALL_DOWNLOADER=quiet-wget pacstall -PI rhino-setup-bin'
26-
#HOME=/home/rhino-live runuser -l rhino-live -c 'pacstall -U pacstall:master'
25+
HOME=/home/rhino-live runuser -l rhino-live -c 'pacstall -U pacstall:master'
2726

2827
#Hack: arm64 firefox no snap
2928
if [ $(dpkg --print-architecture) = arm64 ]; then

lb_chroot_devpts

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#!/bin/sh
2+
3+
## live-build(7) - System Build Scripts
4+
## Copyright (C) 2006-2012 Daniel Baumann <[email protected]>
5+
##
6+
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7+
## This is free software, and you are welcome to redistribute it
8+
## under certain conditions; see COPYING for details.
9+
10+
11+
set -e
12+
13+
# Including common functions
14+
( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15+
16+
# Setting static variables
17+
DESCRIPTION="$(Echo 'mount /dev/pts')"
18+
HELP=""
19+
USAGE="${PROGRAM} {install|remove} [--force]"
20+
21+
Arguments "${@}"
22+
23+
# Ensure that a system is built as root
24+
lb testroot
25+
26+
# Reading configuration files
27+
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
28+
Set_defaults
29+
30+
# Requiring stage file
31+
Require_stagefile .build/config .build/bootstrap
32+
33+
case "${1}" in
34+
install)
35+
Echo_message "Begin mounting /dev/pts..."
36+
37+
# Checking stage file
38+
Check_stagefile .build/chroot_devpts
39+
40+
# Checking lock file
41+
Check_lockfile .lock
42+
43+
# Creating lock file
44+
Create_lockfile .lock
45+
46+
if [ "${LB_USE_FAKEROOT}" != "true" ]
47+
then
48+
# Creating mountpoint
49+
mkdir -p chroot/dev/pts
50+
51+
# Mounting /dev/pts
52+
${LB_ROOT_COMMAND} mount --bind chroot chroot || true
53+
${LB_ROOT_COMMAND} mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
54+
fi
55+
56+
# Creating stage file
57+
Create_stagefile .build/chroot_devpts
58+
;;
59+
60+
remove)
61+
Echo_message "Begin unmounting /dev/pts..."
62+
63+
# Checking lock file
64+
Check_lockfile .lock
65+
66+
# Creating lock file
67+
Create_lockfile .lock
68+
69+
# Unmounting /dev/pts
70+
if [ "${LB_USE_FAKEROOT}" != "true" ]
71+
then
72+
if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
73+
then
74+
${LB_ROOT_COMMAND} umount chroot/dev/pts
75+
else
76+
${LB_ROOT_COMMAND} umount -f chroot/dev/pts > /dev/null 2>&1 || true
77+
fi
78+
if grep -qs "$(pwd)/chroot" /proc/mounts || Find_files chroot/*
79+
then
80+
${LB_ROOT_COMMAND} umount chroot/
81+
else
82+
${LB_ROOT_COMMAND} umount -f chroot/ > /dev/null 2>&1 || true
83+
fi
84+
fi
85+
86+
# Removing stage file
87+
rm -f .build/chroot_devpts
88+
;;
89+
90+
*)
91+
Usage
92+
;;
93+
esac

0 commit comments

Comments
 (0)