Skip to content

Use syscall instead of subprocess #117

Open
@kunaltyagi

Description

@kunaltyagi

Currently, vpn-slice requires running as root because it has a subprocess call:

  • replace_route which calls ip route replace

Running scripts with root access (even open source) is a sytem risk. By performing a syscall, we give the option to the users to:

  • escalate to root (via sudo or otherwise)
  • set capability at a coarse/fine level, eg: setcap cap_net_admin+ep $(which vpn-slice)

The need for writing in /etc/hosts can be eliminated by assigning it a custom group and using sg

Proposal:
Use SIOCADDRT and SIOCDELRT for the ioctl calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnot-a-bugNot a bug with vpn-slice (although maybe highlighting an issue in other software)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions