Skip to content
  • Dan Williams's avatar
    settings: preserve agent secrets the right way · 2b2404bb
    Dan Williams authored
    What we want to do here is keep separate caches of system and
    agent secrets.  For system secrets, we cache them because NM
    periodically clears secrets using nm_connection_clear_secrets() to
    ensure they don't stay around in memory, and that transient secrets
    get requested again when they are needed.  For agent secrets, we
    only want them during activation, but a connection read from disk
    will not include agent secrets becuase by definition they aren't
    stored in system settings along with the connection.  Thus we need
    to keep the agent/transient secrets somewhere for the duration of
    the activation to ensure they don't get deleted.
    
    This removes the copy-back hack in update_auth_cb() which copied
    agent/transient secrets back into the connection over top of the
    transient secrets that had been copied back in
    nm_settings_connection_replace_settings().  No reason to copy
    them twice if we keep an agent/transient secrets hash and do
    the right thing with it.
    2b2404bb