Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login: Do not dereference proot binds /bin and /etc #353

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Alexander Sosedkin <[email protected]>
Tobias Happ <[email protected]>
Bruno Bigras <[email protected]>
Evgeny Kurnevsky <[email protected]>
Zhong Jianxin <[email protected]>
4 changes: 2 additions & 2 deletions modules/environment/login/login.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ writeScript "login" ''

exec ${installationDir}/bin/proot-static \
-b ${installationDir}/nix:/nix \
-b ${installationDir}/bin:/bin \
-b ${installationDir}/etc:/etc \
-b ${installationDir}/bin:/bin! \
-b ${installationDir}/etc:/etc! \
-b ${installationDir}/tmp:/tmp \
-b ${installationDir}/usr:/usr \
-b ${installationDir}/dev/shm:/dev/shm \
Expand Down
4 changes: 2 additions & 2 deletions tests/emulator/test_channels_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def run(d):
('cd /data/data/com.termux.nix/files/home; '
'pwd; '
'id; '
'/data/data/com.termux.nix/files/usr/bin/login '
' nix-on-droid on-device-test')
'env PATH= /data/data/com.termux.nix/files/usr/bin/login '
' nix-on-droid on-device-test'),
]:
print(f'running {cmd} as {user} with capture:')
p = subprocess.Popen(['adb', 'shell', 'su', '0', 'su', user,
Expand Down
Loading