3 ms·
The real danger is in the habit, not this specific code snippet. Two-parameter open includes the ability to open to and from arbitrary shell commands. I can and
by jerf 16y ago
The real danger is in the habit, not this specific code snippet. Two-parameter open includes the ability to open to and from arbitrary shell commands. I can and have used this to escalate to root out of "nobody" with the combination of a bad two-parameter open and an excessively permissive sudoers file. It's better to just say never use two-parameter open; there's no reason to do it.