Commit ac208caf authored by Dan Williams's avatar Dan Williams

libnm-util: add NM_SETTING_SECRET_FLAG_NOT_REQUIRED

Not all connections will require every secret, and sometimes we
can't automatically figure out whether we need the secret.  For
vpnc sometimes the group password isn't used, and sometimes PPP
providers require a username but don't want a password, etc.
parent ad56cfa9
......@@ -24,7 +24,8 @@
#define NM_SETTING_SECRET_FLAGS_ALL \
(NM_SETTING_SECRET_FLAG_NONE | \
NM_SETTING_SECRET_FLAG_AGENT_OWNED | \
NM_SETTING_SECRET_FLAG_NOT_SAVED)
NM_SETTING_SECRET_FLAG_NOT_SAVED | \
NM_SETTING_SECRET_FLAG_NOT_REQUIRED)
#endif /* NM_SETTING_PRIVATE_H */
......@@ -92,6 +92,10 @@ GQuark nm_setting_error_quark (void);
* asked to retrieve it
* @NM_SETTING_SECRET_FLAG_NOT_SAVED: this secret should not be saved, but
* should be requested from the user each time it is needed
* @NM_SETTING_SECRET_FLAG_NOT_REQUIRED: in situations where it cannot be
* automatically determined that the secret is required (some VPNs and PPP
* providers dont require all secrets) this flag indicates that the specific
* secret is not required
*
* These flags indicate specific behavior related to handling of a secret. Each
* secret has a corresponding set of these flags which indicate how the secret
......@@ -101,7 +105,8 @@ GQuark nm_setting_error_quark (void);
typedef enum {
NM_SETTING_SECRET_FLAG_NONE = 0x00000000,
NM_SETTING_SECRET_FLAG_AGENT_OWNED = 0x00000001,
NM_SETTING_SECRET_FLAG_NOT_SAVED = 0x00000002
NM_SETTING_SECRET_FLAG_NOT_SAVED = 0x00000002,
NM_SETTING_SECRET_FLAG_NOT_REQUIRED = 0x00000004
/* NOTE: if adding flags, update nm-setting-private.h as well */
} NMSettingSecretFlags;
......
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