Re: [voidlinux/xbps] xbps-uchroot and xbps-uunshare usability
improvements (#207)
ebfe commented on this pull request.
> cmd = argv[1];
cmdargs = argv + 1;
/* Never allow chrootdir == / */
if (strcmp(chrootdir, "/") == 0)
die("/ is not allowed to be used as chrootdir");
+ /* Make chrootdir absolute */
+ if (chrootdir[0] != '/') {
use realpath(3)?
> @@ -157,14 +157,22 @@ main(int argc, char **argv)
if (argc < 2)
usage(argv0);
- chrootdir = argv[0];
+ chrootdir = argv[-1];
huh?