File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
system-reinstall-bootc/src Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11use crate :: { prompt, users:: get_all_users_keys} ;
22use anyhow:: { ensure, Context , Result } ;
3- use openssh_keys:: PublicKey ;
43
54const NO_SSH_PROMPT : & str = "None of the users on this system found have authorized SSH keys, \
65 if your image doesn't use cloud-init or other means to set up users, \
@@ -92,9 +91,14 @@ pub(crate) fn get_ssh_keys(temp_key_file_path: &str) -> Result<()> {
9291 let keys = selected_users
9392 . into_iter ( )
9493 . flat_map ( |user| & user. authorized_keys )
95- . collect :: < Vec < & PublicKey > > ( )
96- . into_iter ( )
97- . map ( |key| key. to_key_format ( ) + "\n " )
94+ . map ( |key| {
95+ let mut key_copy = key. clone ( ) ;
96+
97+ // These options could contain a command which will
98+ // cause the new bootc system to be inaccessible.
99+ key_copy. options = None ;
100+ key_copy. to_key_format ( ) + "\n "
101+ } )
98102 . collect :: < String > ( ) ;
99103
100104 tracing:: trace!( "keys: {:?}" , keys) ;
You can’t perform that action at this time.
0 commit comments