~mser/pkg.mser.at

d99c8fef9d10b7b32d49ae7c75216f3f89f830c9 — cryzed 2 years ago 18ff531
Use --session-command instead to start target process
2 files changed, 3 insertions(+), 3 deletions(-)

M packages/unshare-net/PKGBUILD
M packages/unshare-net/unshare-net
M packages/unshare-net/PKGBUILD => packages/unshare-net/PKGBUILD +2 -2
@@ 1,6 1,6 @@
# Maintainer: Michael Serajnik <m at mser dot at>
pkgname=unshare-net
pkgver=7
pkgver=8
pkgrel=1
pkgdesc="Selectively whitelist traffic to specified IPs and domains for target applications"
arch=("any")


@@ 8,7 8,7 @@ url="https://git.sr.ht/~mser/pkg.mser.at/tree/master/item/packages/unshare-net"
license=("AGPL3")
depends=("python")
source=("unshare-net")
sha512sums=('73d04dcf086a35a0c583d30e6fd1022e4b904af00f62b2efee7467cb6fb5752e7789cd1bf9f08b2ddb8e1228e2976ab575a0abce4a41e7d38528c6e1213c65ce')
sha512sums=('ec5ddabf897dee47304f2f418cefc095256cc89d5663773de4c0db91b02311b781bcd52c4d303d6e56c2b11b4ba751065b2340d1775398763deeff673aa67afc')

package() {
  install -D --mode 755 "${srcdir}/unshare-net" --target-directory "${pkgdir}/usr/bin"

M packages/unshare-net/unshare-net => packages/unshare-net/unshare-net +1 -1
@@ 179,7 179,7 @@ def run(arguments: argparse.Namespace, command: list[str]) -> ExitCode:
        iptables_insert_rule(identifier, rule, ipv6=True)
    iptables_insert_rule("OUTPUT", ("--jump", identifier), ipv6=True)

    su_command = "su", arguments.user, "--command", *command
    su_command = "su", arguments.user, "--session-command", *command
    stderr(shell_escape(su_command))
    process = subprocess.Popen(su_command)
    cgroup_add_process(identifier, process.pid, cgroup_mount_path)