Commit e8333c66 authored by Beniamino Galvani's avatar Beniamino Galvani Committed by Lubomir Rintel

cli: complete 802.1x certificate file names

(cherry picked from commit ec4a12ec)
(cherry picked from commit 3d3fac55)
parent 4a150fa1
......@@ -2307,6 +2307,26 @@ _set_fcn_cert_8021x (ARGS_SET_FCN)
}
}
static const char *const*
_complete_fcn_cert_8021x (ARGS_COMPLETE_FCN)
{
const NMSetting8021xSchemeVtable *vtable;
vtable = &nm_setting_8021x_scheme_vtable[property_info->property_typ_data->subtype.cert_8021x.scheme_type];
if (vtable->is_secret) {
gs_free const char **strv = NULL;
strv = nm_utils_escaped_tokens_split (text, NM_ASCII_SPACES);
/* don't try to complete the password */
if (NM_PTRARRAY_LEN (strv) > 1)
return NULL;
}
NM_SET_OUT (out_complete_filename, TRUE);
return NULL;
}
static gconstpointer
_get_fcn_gobject_bytes (ARGS_GET_FCN)
{
......@@ -4466,6 +4486,7 @@ static const NMMetaPropertyType _pt_dcb = {
static const NMMetaPropertyType _pt_cert_8021x = {
.get_fcn = _get_fcn_cert_8021x,
.set_fcn = _set_fcn_cert_8021x,
.complete_fcn = _complete_fcn_cert_8021x,
};
static const NMMetaPropertyType _pt_ethtool = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment