Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: Add a per-repository authorization hook.
[gitweb.git]
/
daemon.c
diff --git
a/daemon.c
b/daemon.c
index 3e5582d28921af22357f2d6068ef55f847bd016a..b9ba44c582b3b6cfac0f150f7f8901d60b48bbb3 100644
(file)
--- a/
daemon.c
+++ b/
daemon.c
@@
-537,6
+537,10
@@
static int execute(struct sockaddr *addr)
#endif
}
loginfo("Connection from %s:%d", addrbuf, port);
+ setenv("REMOTE_ADDR", addrbuf, 1);
+ }
+ else {
+ unsetenv("REMOTE_ADDR");
}
alarm(init_timeout ? init_timeout : timeout);