NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/53553: gpt biosboot forcibly prepends /usr/mdec to any other paht



The following reply was made to PR bin/53553; it has been noted by GNATS.

From: John Nemeth <jnemeth%cue.bc.ca@localhost>
To: gnats-bugs%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/53553: gpt biosboot forcibly prepends /usr/mdec to any other paht
Date: Sat, 25 Aug 2018 17:41:18 -0700

 On Aug 25, 10:20pm, eric%cirr.com@localhost wrote:
 }
 } >Number:         53553
 } >Category:       bin
 } >Synopsis:       gpt biosboot forcibly prepends /usr/mdec to any other paht
 } >Description:
 } 	Attempting to use a gpt(8) biosboot subcommand with a file
 } 	in any location other than /usr/mdec gets /usr/mdec forcibly
 } 	prepended to the path.
 
      The code is:
 
         if (bootpath == NULL)
                 bp = strdup(DEFAULT_BOOTDIR "/" DEFAULT_BOOTCODE);
         else if (*bootpath == '/')
                 bp = strdup(bootpath);
         else {
                 if (asprintf(&bp, "%s/%s", DEFAULT_BOOTDIR, bootpath) < 0)
                         bp = NULL;
         }
 
 It would be easy enough to change the second part to see if the
 path starts with "." which is a common way of stopping the prepending
 of a default path.  I'm undecided if it should check for "/" anywhere
 in the path.  However, if that's what people think is best, I'm
 willing to make either change.  I checked the installboot source
 to see what it does, and it just uses the path as given.  I think
 adding a default path makes it somewhat more convenient to use.
 
 }-- End of excerpt from eric%cirr.com@localhost
 


Home | Main Index | Thread Index | Old Index