Skip to content
  • Íñigo Huguet's avatar
    all: fix secret flags for challenge-response · 02cbebaf
    Íñigo Huguet authored
    Add NM_SETTING_SECRET_FLAG_NOT_SAVED to challenge response. This solves
    2 problems:
    1. The response was saved to the NM profile and some agents tried to
       reuse it, which is wrong because it changes each time. This flag
       prevents that.
    2. Nmcli and other clients using nm-secret-agent-simple (if there are
       any) ignore any request for secrets that don't have either
       NM_SETTING_SECRET_FLAG_NOT_SAVED nor
       NM_SETTING_SECRET_FLAG_AGENT_OWNED.
       For challenge-response, it mustn't be agent owned because, as
       already said, it changes each time so agents with storing
       capabilities neither have to store it.
    
    The flag is added both when importing an .ovpn file and when using the
    editor.
    02cbebaf