changeset 5260:0d72eb2ed8af HEAD

Added %c variable which expands to "secured" with SSL/TLS/localhost.
author Timo Sirainen <tss@iki.fi>
date Sat, 10 Mar 2007 16:04:34 +0200
parents 228eacfb2647
children 70d972264186
files src/auth/auth-request.c src/auth/auth-request.h
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-request.c	Sat Mar 10 15:24:15 2007 +0200
+++ b/src/auth/auth-request.c	Sat Mar 10 16:04:34 2007 +0200
@@ -155,6 +155,8 @@
 		net_addr2ip(value, &request->local_ip);
 	else if (strcmp(key, "rip") == 0)
 		net_addr2ip(value, &request->remote_ip);
+	else if (strcmp(key, "secured") == 0)
+		request->secured = TRUE;
 	else
 		return FALSE;
 
@@ -1076,6 +1078,7 @@
 		{ 'w', NULL },
 		{ '!', NULL },
 		{ 'm', NULL },
+		{ 'c', NULL },
 		{ '\0', NULL }
 	};
 	struct var_expand_table *tab;
@@ -1112,6 +1115,7 @@
 	}
 	tab[10].value = auth_request->mech == NULL ? "" :
 		auth_request->mech->mech_name;
+	tab[11].value = auth_request->secured ? "secured" : "";
 	return tab;
 }
 
--- a/src/auth/auth-request.h	Sat Mar 10 15:24:15 2007 +0200
+++ b/src/auth/auth-request.h	Sat Mar 10 16:04:34 2007 +0200
@@ -85,6 +85,7 @@
 	unsigned int proxy:1;
 	unsigned int cert_username:1;
 	unsigned int userdb_lookup:1;
+	unsigned int secured:1;
 
 	/* ... mechanism specific data ... */
 };