No corresponding cli subcommand - just use command-ron.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
ag.sshkeys_remove(acctid, index, id, auth)?;
MR::Fine
}
+ MC::SshReinstallKeys => {
+ let superuser = cs.superuser()
+ .ok_or(ME::SuperuserAuthorisationRequired)?;
+ let mut ag = AccountsGuard::lock();
+ ag.sshkeys_rewrite_authorized_keys(superuser)?;
+ MR::Fine
+ }
MC::LoadFakeRng(ents) => {
let superuser = cs.superuser()
SshAddKey { akl: sshkeys::AuthkeysLine },
SshDeleteKey { index: usize, id: sshkeys::Id },
ThisConnAuthBy, // -> Fine or SshKeySpec
+ SshReinstallKeys, // managment only
LoadFakeRng(Vec<String>),
}
}
// ABSENT
}
+
+ #[throws(ME)]
+ pub fn sshkeys_rewrite_authorized_keys(
+ &mut self,
+ _:Authorisation<authproofs::Global>
+ ) {
+ let accounts = self.get_mut();
+ let gl = &mut accounts.ssh_keys;
+ gl.rewrite_authorized_keys()?;
+ }
}
impl Global {