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 1
1
use crate :: { prompt, users:: get_all_users_keys} ;
2
2
use anyhow:: { ensure, Context , Result } ;
3
- use openssh_keys:: PublicKey ;
4
3
5
4
const NO_SSH_PROMPT : & str = "None of the users on this system found have authorized SSH keys, \
6
5
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<()> {
92
91
let keys = selected_users
93
92
. into_iter ( )
94
93
. 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
+ } )
98
102
. collect :: < String > ( ) ;
99
103
100
104
tracing:: trace!( "keys: {:?}" , keys) ;
You can’t perform that action at this time.
0 commit comments