Function

NM-1.0NMvpn_editor_plugin_load_from_fileSince 1.2

  • Load the shared library plugin_name and create a new NM.VpnEditorPlugin instance via the NMVpnEditorPluginFactory function.

    If plugin_name is not an absolute path name, it assumes the file is in the plugin directory of NetworkManager. In any case, the call will do certain checks on the file before passing it to dlopen. A consequence for that is, that you cannot omit the ".so" suffix as you could for nm_vpn_editor_plugin_load().

    Parameters

    • plugin_name: string

      The path or name of the shared library to load. The path must either be an absolute filename to an existing file. Alternatively, it can be the name (without path) of a library in the plugin directory of NetworkManager.

    • check_service: string

      if not-null, check that the loaded plugin advertises the given service.

    • check_owner: number

      if non-negative, check whether the file is owned by UID check_owner or by root. In this case also check that the file is not writable by anybody else.

    • check_file: UtilsCheckFilePredicate

      optional callback to validate the file prior to loading the shared library.

    Returns NM.VpnEditorPlugin

    a new plugin instance or null on error.

    1.2