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