snprintf (filename, len, "%s/checksum", cachedir);
(void) mkdir (cachedir, 0755);
snprintf (filename, len, "%s/checksum", cachedir);
(void) mkdir (cachedir, 0755);
/* See if the cache directory exists and passes some simple checks
* to make sure it has not been tampered with.
/* See if the cache directory exists and passes some simple checks
* to make sure it has not been tampered with.
perrorf (g, "link: %s %s", filename, *kernel);
goto error;
}
perrorf (g, "link: %s %s", filename, *kernel);
goto error;
}
snprintf (filename, len, "%s/initrd", cachedir);
(void) unlink (*initrd);
if (link (filename, *initrd) == -1) {
perrorf (g, "link: %s %s", filename, *initrd);
goto error;
}
snprintf (filename, len, "%s/initrd", cachedir);
(void) unlink (*initrd);
if (link (filename, *initrd) == -1) {
perrorf (g, "link: %s %s", filename, *initrd);
goto error;
}
snprintf (filename, len, "%s/root", cachedir);
(void) unlink (*appliance);
if (link (filename, *appliance) == -1) {
perrorf (g, "link: %s %s", filename, *appliance);
goto error;
}
snprintf (filename, len, "%s/root", cachedir);
(void) unlink (*appliance);
if (link (filename, *appliance) == -1) {
perrorf (g, "link: %s %s", filename, *appliance);
goto error;
}