summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-08-28 21:20:36 +0200
committerThomas Haller <thaller@redhat.com>2018-09-04 07:38:30 +0200
commitb232508707e7bca57edd926e13cd2d211afe3df5 (patch)
tree4c89e0aab6d461f90079b5c3e9b11c07d67e85cb /libnm
parent74815fd8e023c2a3713129fe906b83c856248adf (diff)
downloadNetworkManager-b232508707e7bca57edd926e13cd2d211afe3df5.tar.gz
shared: add nm-secret-utils.h helper
We already had nm_free_secret() to clear the secret out of a NUL terminated string. That works well for secrets which are strings, it can be used with a cleanup attribute (nm_auto_free_secret) and as a cleanup function for a GBytes. However, it does not work for secrets which are binary. For those, we must also track the length of the allocated data and clear it. Add two new structs NMSecretPtr and NMSecretBuf to help with that.
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-vpn-service-plugin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnm/nm-vpn-service-plugin.c b/libnm/nm-vpn-service-plugin.c
index 29c666c796..2213824edb 100644
--- a/libnm/nm-vpn-service-plugin.c
+++ b/libnm/nm-vpn-service-plugin.c
@@ -27,6 +27,7 @@
#include <signal.h>
#include <stdlib.h>
+#include "nm-utils/nm-secret-utils.h"
#include "nm-enum-types.h"
#include "nm-utils.h"
#include "nm-connection.h"