From: Jeff Dike <jdike@ka...> - 2002-02-16 00:15:03
> I made the command line to tunctl a little more usable.
You messed up the uid argument (-u in the getopt arglist, -p in the switch).
Interestingly, as a normal user (with /dev/net/tun permissions set
appropriately), it is possible (with '-u 0') to give a device to root. This
doesn't look like a security problem, because you can't do anything with it
before or after giving it away.
Getting rid of the error checking after strtol wasn't a very good idea.
Adding -t was a good idea. It makes it a lot easier to assign specific devices
to specific users from a config file.
I made the '-t' optional for '-d'. You need to specify a device to delete
anyway, so the device is a mandatory argument. It does have the disadvantage
that it makes things somewhat non-uniform. The 'tunctl -d tap0' also makes
it look like the device is attached to the '-d' rather than being independent.
'tunctl -d -t tap0' still works though.