mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
override the user's group prior to opening the group configuration file
That prevented opening group configuration for users that had their group in a certificate. Reported by Norbert Paschedag.
This commit is contained in:
@@ -197,6 +197,11 @@ struct cookie_entry_st *old;
|
||||
memcpy(proc->sid, cmsg->sid.data, cmsg->sid.len);
|
||||
proc->active_sid = 1;
|
||||
|
||||
/* override the group name in order to load the correct configuration in
|
||||
* case his group is specified in the certificate */
|
||||
if (cmsg->groupname)
|
||||
snprintf(proc->groupname, sizeof(proc->groupname), "%s", cmsg->groupname);
|
||||
|
||||
/* cookie is good so far, now read config (in order to know
|
||||
* whether roaming is allowed or not */
|
||||
memset(&proc->config, 0, sizeof(proc->config));
|
||||
@@ -271,9 +276,6 @@ struct cookie_entry_st *old;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cmsg->groupname)
|
||||
snprintf(proc->groupname, sizeof(proc->groupname), "%s", cmsg->groupname);
|
||||
|
||||
if (cmsg->hostname)
|
||||
snprintf(proc->hostname, sizeof(proc->hostname), "%s", cmsg->hostname);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user