+ /* Setup the right paths */
+ ctx->realpath = ctx->path;
+
+ /* Uncompress to /tmp */
+ tmpfd = m_tempfd(tmppath, sizeof(tmppath), NONULL(MCore.tmpdir), NULL);
+ /* If we cannot open tempfile, that means the file already exists (!?)
+ * or we are following a symlink, which is bad and insecure.
+ */
+ if(tmpfd < 0) {
+ return -1;
+ }
+ close(tmpfd);
+
+ ctx->path = p_dupstr(tmppath, m_strlen(tmppath));