* Peter Stuge peter@stuge.se [070712 00:58]:
Sorry. Since we don't store directories in lar it should indeed mkdir -p implicitly. But I think a bit of sanity would be nice here since a lar could otherwise be used to overwrite arbitrary system files.
You compile LinuxBIOS as root?
I'll make a patch for mkdirp() that ensures the directory to be created is actually below the current directory (and also improve the return-to-cwd code in mkdir() a bit while at it) if there's interest. Would that be the right place to put it?
Rather check the path before mkdir()ing.
I am pretty sure the mkdir efforts can easily be tricked by a couple of symlinks in the path, so I wonder how much use there is in trying to make this "secure" since it never runs as root anyways, and in a very controlled environment.
Stefan