2 ms·
Big caution here. Do NOT use this style of code to invoke ip tools. This was the cause of a huge number of security vulnerabilities on Android in the first few
by mmastrac 7y ago
Big caution here. Do NOT use this style of code to invoke ip tools. This was the cause of a huge number of security vulnerabilities on Android in the first few years. Even if you're hardcoding interfaces to start, it's likely someone else will drive by later on and replace one of the args with %s.
> system("ip link add veth0 type veth peer name veth1");
Always, always, always use exec*() APIs.
- alexchamberlain 7y agoAre there not better C APIs to call that `ip` et al are wrapping?