Commit Graph

2 Commits (2b1e5867f082c1d5d02a0744b2e93dd828a49c24)

Author SHA1 Message Date
Selva Nair 9417991168 Use a list instead of array for connections list
Currently we use an array of connection pointers which needs
to be reallocated when space runs out. But, that happens from
the main thread while the status thread may be referring to those
pointers. Its very hard to fence against possible invalid memory
access. Instead, use a list so that connection pointer never
changes once created.

The connection list is no longer recreated from scratch even when
no connections are active. This means configs added while GUI is
running will always appear at the bottom of the root group listing
until the GUI is restarted.

TODO: This behaviour could be improved by scanning through the groups to
graft new configs at the right branch in the config-group tree.

v2: removed unused references to SetMenuStatusById()

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2023-01-19 14:08:15 -08:00
Selva Nair a500b9553e Implement Pre-Logon Access Provider for start before logon
- COM interfaces for ICredentialProvider and
  IConnectableCredentialProviderCredential combined
  with a trimmed down user-interface implemented as
  libopenvpn_plap.dll

- Connections autostarted by OpenVPNService are enumerated
  as possible PLAP connections. The user is expected to leave
  these in management hold so that "connect" will popup any
  required user dialogs.

To use:
 - Register the dll as a PLAP provider (see included .reg files)
 - The enumerated connections will show up as tiles in the PLAP
   screen of the login desktop (secure desktop).

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2022-10-17 11:05:44 -04:00