Commit da57fc2
committed
Fix regression in writing authorized principals
Commit ac6d38e introduced a regression
in writing of the authorized_principals file, resulting in an empty file.
The function `regeneratePrincipalsKeys` in
`services/asymkey/ssh_key_authorized_principals.go` calls the function
`WriteAuthorizedStringForValidKey` for a PublicKey of type
KeyTypePrincipal, and ssh.ParseAuthorizedKey would always fail.
This commit adds additional logic to this function to restore the
previous behaviour when writing the principals file.
Fixes: 36212
Signed-off-by: Peter Verraedt <peter.verraedt@kuleuven.be>1 parent 8f672ce commit da57fc2
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 83 | + | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
| |||
0 commit comments