[LinuxBIOS] [PATCH][LAR] New LAR access functions

Peter Stuge peter at stuge.se
Thu Jul 12 00:58:41 CEST 2007

On Thu, Jul 12, 2007 at 12:49:20AM +0200, Peter Stuge wrote:
> > +	mkdirp((const char *) dirname(path), 0755);

> I don't think lar should mkdir -p implicitly. Just open() and
> perror() or print strerror(errno) in case of failure.

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.

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?


More information about the coreboot mailing list