Skip to content

Commit 5a9c0ec

Browse files
committed
fix(sshd): set PROOT_NO_SECCOMP=1 for sshd execution in PRoot-Distro
1 parent 9c16097 commit 5a9c0ec

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

machines/aarch64/android/common.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#!/bin/sh
3232
if ! pgrep -x "sshd" > /dev/null; then
3333
if command -v proot > /dev/null 2>&1; then
34-
nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
34+
PROOT_NO_SECCOMP=1 nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3535
else
3636
nohup ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3737
fi

machines/aarch64/android/smartphone/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in
2828
export PROMPT="%F{yellow}%n%f@%F{green}${hostName}%f:%F{blue}%~%f%# "
2929
if ! pgrep -x "sshd" > /dev/null; then
3030
if command -v proot > /dev/null 2>&1; then
31-
nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
31+
PROOT_NO_SECCOMP=1 nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3232
else
3333
nohup ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3434
fi
@@ -39,7 +39,7 @@ in
3939
export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${hostName}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
4040
if ! pgrep -x "sshd" > /dev/null; then
4141
if command -v proot > /dev/null 2>&1; then
42-
nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
42+
PROOT_NO_SECCOMP=1 nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
4343
else
4444
nohup ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
4545
fi

machines/aarch64/android/tablet/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ in
2828
export PROMPT="%F{yellow}%n%f@%F{green}${hostName}%f:%F{blue}%~%f%# "
2929
if ! pgrep -x "sshd" > /dev/null; then
3030
if command -v proot > /dev/null 2>&1; then
31-
nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
31+
PROOT_NO_SECCOMP=1 nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3232
else
3333
nohup ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
3434
fi
@@ -39,7 +39,7 @@ in
3939
export PS1="\[\033[01;33m\]\u\[\033[00m\]@\[\033[01;32m\]${hostName}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
4040
if ! pgrep -x "sshd" > /dev/null; then
4141
if command -v proot > /dev/null 2>&1; then
42-
nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
42+
PROOT_NO_SECCOMP=1 nohup proot -0 ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
4343
else
4444
nohup ${pkgs.openssh}/bin/sshd -f ${config.home.homeDirectory}/.ssh/sshd_config > /dev/null 2>&1 &
4545
fi

0 commit comments

Comments
 (0)