[prev in list] [next in list] [prev in thread] [next in thread]
List: cgit
Subject: [PATCH 01/07] Enable retrieving REMOTE_USER environment variable
From: The Ranger <ranger () risk ! ee>
Date: 2015-11-27 20:46:43
Message-ID: 1448657203.043004.7275.nullmailer () cypher ! risk ! ee
[Download RAW message or body]
---
cgit.c | 1 +
cgit.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/cgit.c b/cgit.c
index 05e5d57..50f7abb 100644
--- a/cgit.c
+++ b/cgit.c
@@ -401,6 +401,7 @@ static void prepare_context(void)
ctx.env.server_port = getenv("SERVER_PORT");
ctx.env.http_cookie = getenv("HTTP_COOKIE");
ctx.env.http_referer = getenv("HTTP_REFERER");
+ ctx.env.remote_user = getenv("REMOTE_USER");
ctx.env.content_length = getenv("CONTENT_LENGTH") ? strtoul(getenv("CONTENT_LENGTH"), NULL, 10) : 0;
ctx.env.authenticated = 0;
ctx.page.mimetype = "text/html";
diff --git a/cgit.h b/cgit.h
index b7eccdd..b5eecb6 100644
--- a/cgit.h
+++ b/cgit.h
@@ -297,6 +297,7 @@ struct cgit_environment {
const char *server_port;
const char *http_cookie;
const char *http_referer;
+ const char *remote_user;
unsigned int content_length;
int authenticated;
};
--
2.1.4
_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic