mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
export ID env variable
This commit is contained in:
@@ -66,6 +66,9 @@ const char* script;
|
|||||||
char local[64];
|
char local[64];
|
||||||
char remote[64];
|
char remote[64];
|
||||||
|
|
||||||
|
snprintf(real, sizeof(real), "%u", (unsigned)proc->pid);
|
||||||
|
setenv("ID", real, 1);
|
||||||
|
|
||||||
if (proc->ipv4 == NULL && proc->ipv6 == NULL) {
|
if (proc->ipv4 == NULL && proc->ipv6 == NULL) {
|
||||||
mslog(s, proc, LOG_DEBUG, "no IP configured; script failed");
|
mslog(s, proc, LOG_DEBUG, "no IP configured; script failed");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
+2
-2
@@ -201,8 +201,8 @@ cookie-validity = 172800
|
|||||||
# Parameters are passed on the environment.
|
# Parameters are passed on the environment.
|
||||||
# REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client),
|
# REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client),
|
||||||
# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
|
# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP
|
||||||
# in the P-t-P connection), IP_REMOTE (the VPN IP of the client). REASON
|
# in the P-t-P connection), IP_REMOTE (the VPN IP of the client),
|
||||||
# may be "connect" or "disconnect".
|
# ID (a unique numeric ID); REASON may be "connect" or "disconnect".
|
||||||
#connect-script = /usr/bin/myscript
|
#connect-script = /usr/bin/myscript
|
||||||
#disconnect-script = /usr/bin/myscript
|
#disconnect-script = /usr/bin/myscript
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user