my @envsave;
push @envsave, qw{REMOTE_ADDR QUERY_STRING REQUEST_METHOD REQUEST_URI
CONTENT_TYPE CONTENT_LENGTH GATEWAY_INTERFACE
- HTTP_COOKIE REMOTE_USER} if $config{cgi};
+ HTTP_COOKIE REMOTE_USER HTTPS} if $config{cgi};
my $envsave="";
foreach my $var (@envsave) {
$envsave.=<<"EOF"
#include <string.h>
extern char **environ;
-char *newenviron[$#envsave+5];
+char *newenviron[$#envsave+6];
int i=0;
addenv(char *var, char *val) {
$envsave
newenviron[i++]="HOME=$ENV{HOME}";
newenviron[i++]="WRAPPED_OPTIONS=$configstring";
+ asprintf(&s, "CALLER_UID=%i", getuid());
+ newenviron[i++]=s;
newenviron[i]=NULL;
environ=newenviron;