The replaced keywords were put into brackets.

This commit is contained in:
Nikos Mavrogiannopoulos
2014-05-23 11:19:42 +02:00
parent 92565e1f5d
commit 57d848d228
3 changed files with 10 additions and 10 deletions

View File

@@ -297,10 +297,10 @@ route = 192.168.5.0/255.255.255.0
#route-add-cmd = "ip route add %R dev %D"
#route-del-cmd = "ip route delete %R dev %D"
# This option allows to forward a proxy. The special strings '%U'
# and '%G', if present will be replaced by the username and group name.
# This option allows to forward a proxy. The special strings '%{U}'
# and '%{G}', if present will be replaced by the username and group name.
#proxy-url = http://example.com/
#proxy-url = http://example.com/%U/%G/hello
#proxy-url = http://example.com/%{U}/%{G}/hello
#
# The following options are for (experimental) AnyConnect client

View File

@@ -392,10 +392,10 @@ route = 192.168.5.0/255.255.255.0
#route-add-cmd = "ip route add %R dev %D"
#route-del-cmd = "ip route delete %R dev %D"
# This option allows to forward a proxy. The special keywords '%U'
# and '%G', if present will be replaced by the username and group name.
# This option allows to forward a proxy. The special keywords '%{U}'
# and '%{G}', if present will be replaced by the username and group name.
#proxy-url = http://example.com/
#proxy-url = http://example.com/%U/
#proxy-url = http://example.com/%{U}/
#
# The following options are for (experimental) AnyConnect client
@@ -424,8 +424,8 @@ route = 192.168.5.0/255.255.255.0
# authentication and prior to VPN tunnel establishment. You shouldn't
# need to use this option normally; if you do and you think that
# this may help others, please send your settings and reason to
# the openconnect mailing list. The special keywords '%U'
# and '%G', if present will be replaced by the username and group name.
# the openconnect mailing list. The special keywords '%{U}'
# and '%{G}', if present will be replaced by the username and group name.
#custom-header = "X-My-Header: hi there"
@end example

View File

@@ -1311,13 +1311,13 @@ char *replace_vals(worker_st *ws, const char *txt)
if (ret < 0)
return NULL;
ret = str_replace_str(&str, "%U", ws->username);
ret = str_replace_str(&str, "%{U}", ws->username);
if (ret < 0) {
str_clear(&str);
return NULL;
}
ret = str_replace_str(&str, "%G", ws->groupname);
ret = str_replace_str(&str, "%{G}", ws->groupname);
if (ret < 0) {
str_clear(&str);
return NULL;