X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fcallscgi.c;h=85cc50aa034eac3a89d6921b423dc8f1793a6e53;hb=107aa2ef0fb1cc1b79d5ad832af02a2ee29a5cf8;hp=af84a9aaccb1aace1f5c1cb0b43f1481c18676e2;hpb=425eccf6ca68d64c65649b34074470e524749f69;p=ashd.git diff --git a/src/callscgi.c b/src/callscgi.c index af84a9a..85cc50a 100644 --- a/src/callscgi.c +++ b/src/callscgi.c @@ -195,7 +195,7 @@ static void startlisten(void) close(i); execvp(*progspec, progspec); flog(LOG_ERR, "callscgi: %s: %s", *progspec, strerror(errno)); - exit(127); + _exit(127); } close(fd); } @@ -213,13 +213,13 @@ static void startnolisten(void) close(i); if((fd = open("/dev/null", O_RDONLY)) < 0) { flog(LOG_ERR, "/dev/null: %s", strerror(errno)); - exit(127); + _exit(127); } dup2(fd, 0); close(fd); execvp(*progspec, progspec); flog(LOG_ERR, "callscgi: %s: %s", *progspec, strerror(errno)); - exit(127); + _exit(127); } } @@ -428,6 +428,8 @@ static void mkcgienv(struct hthead *req, struct charbuf *dst) bufaddenv(dst, "SERVER_NAME", "%s", h); if((h = getheader(req, "X-Ash-Server-Port")) != NULL) bufaddenv(dst, "SERVER_PORT", "%s", h); + if((h = getheader(req, "X-Ash-Remote-User")) != NULL) + bufaddenv(dst, "REMOTE_USER", "%s", h); if(((h = getheader(req, "X-Ash-Protocol")) != NULL) && !strcmp(h, "https")) bufaddenv(dst, "HTTPS", "on"); if((h = getheader(req, "X-Ash-Address")) != NULL)