Automatic mounting of USB drives...

David Zeuthen david at fubar.dk
Thu Oct 28 21:25:44 UTC 2004


On Thu, 2004-10-28 at 23:02 +0200, Kyrre Ness Sjobak wrote:
> It makes me wonder... What if i label the partitions the same as another
> mountpoint? Could this create a security hole, somehow? (such as
> labeling a partition `rm -rf /` - would that do a "mkdir `rm -rf /` or
> could anything so ugly be done?
> 

No, we use mkdir(2), not mkdir(1). We also massage the mountpoint so it
only contains digits [0-9], ascii letters [A-Za-z], '-' and '_'
characters. Notably it wont contain any whitespace.

Cheers,
David





More information about the test mailing list