capabilities: Move global capabilities_t instance to libstrongswan
This commit is contained in:
@@ -89,6 +89,7 @@ void library_deinit()
|
||||
this->public.creds->destroy(this->public.creds);
|
||||
this->public.encoding->destroy(this->public.encoding);
|
||||
this->public.crypto->destroy(this->public.crypto);
|
||||
this->public.caps->destroy(this->public.caps);
|
||||
this->public.proposal->destroy(this->public.proposal);
|
||||
this->public.fetcher->destroy(this->public.fetcher);
|
||||
this->public.resolver->destroy(this->public.resolver);
|
||||
@@ -255,6 +256,7 @@ bool library_init(char *settings)
|
||||
this->public.settings = settings_create(settings);
|
||||
this->public.hosts = host_resolver_create();
|
||||
this->public.proposal = proposal_keywords_create();
|
||||
this->public.caps = capabilities_create();
|
||||
this->public.crypto = crypto_factory_create();
|
||||
this->public.creds = credential_factory_create();
|
||||
this->public.credmgr = credential_manager_create();
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
#include "credentials/credential_manager.h"
|
||||
#include "credentials/cred_encoding.h"
|
||||
#include "utils/chunk.h"
|
||||
#include "utils/capabilities.h"
|
||||
#include "utils/integrity_checker.h"
|
||||
#include "utils/leak_detective.h"
|
||||
#include "utils/settings.h"
|
||||
@@ -140,6 +141,11 @@ struct library_t {
|
||||
*/
|
||||
proposal_keywords_t *proposal;
|
||||
|
||||
/**
|
||||
* POSIX capability dropping
|
||||
*/
|
||||
capabilities_t *caps;
|
||||
|
||||
/**
|
||||
* crypto algorithm registry and factory
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef CAPABILITIES_H_
|
||||
#define CAPABILITIES_H_
|
||||
|
||||
typedef struct capabilities_t capabilities_t;
|
||||
|
||||
#include <library.h>
|
||||
#ifdef HAVE_SYS_CAPABILITY_H
|
||||
# include <sys/capability.h>
|
||||
@@ -30,8 +32,6 @@
|
||||
# include <linux/capability.h>
|
||||
#endif
|
||||
|
||||
typedef struct capabilities_t capabilities_t;
|
||||
|
||||
/**
|
||||
* POSIX capability dropping abstraction layer.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user