@@ -71,42 +71,42 @@ pub async fn provision_keytab(krb5_config_path: &Path, req: &Request) -> Result<
71
71
let req_str = serde_json:: to_vec ( & req) . context ( SerializeRequestSnafu ) ?;
72
72
73
73
let mut child = Command :: new ( "stackable-krb5-provision-keytab" )
74
- // make sure the process is killed if we error out of this fn somewhere due to
74
+ // make sure the process is killed if we error out of this fn somewhere due to
75
75
// an error when writing to stdin or getting stdout
76
76
. kill_on_drop ( true )
77
77
. env ( "KRB5_CONFIG" , krb5_config_path)
78
78
// ldap3 uses the default client keytab to authenticate to the LDAP server
79
79
. env ( "KRB5_CLIENT_KTNAME" , & req. admin_keytab_path )
80
- // avoid leaking credentials between secret volumes/secretclasses by only storing the
81
- // TGT that is obtained for the operation in the memory of the short lives process
80
+ // avoid leaking credentials between secret volumes/secretclasses by only storing the
81
+ // TGT that is obtained for the operation in the memory of the short lives process
82
82
// spawned by `Command::new` above - this way it'll be wiped from memory once this exits
83
- // With any shared or persistent ticket cache this might stick around and potentially be
83
+ // With any shared or persistent ticket cache this might stick around and potentially be
84
84
// reused by later runs
85
85
. env ( "KRB5CCNAME" , "MEMORY:" )
86
86
. stdin ( Stdio :: piped ( ) )
87
87
. stdout ( Stdio :: piped ( ) )
88
88
. spawn ( )
89
89
. context ( SpawnProvisionerSnafu ) ?;
90
-
90
+
91
91
// Get a `ChildStdin` object for the spawned process and write the serialized request
92
- // for a Principal into it in order for the child process to deserialize it and
92
+ // for a Principal into it in order for the child process to deserialize it and
93
93
// process the request
94
94
let mut stdin = child. stdin . take ( ) . unwrap ( ) ;
95
95
stdin. write_all ( & req_str) . await . context ( WriteRequestSnafu ) ?;
96
96
stdin. flush ( ) . await . context ( WriteRequestSnafu ) ?;
97
97
drop ( stdin) ;
98
-
98
+
99
99
// Wait for the process to finish and capture output
100
100
// This will always return Ok(...) regardless of exit code or output of the child process
101
- // Failure here means that something went wrong with connecting to the process or obtaining
101
+ // Failure here means that something went wrong with connecting to the process or obtaining
102
102
// exit code or output
103
103
let output = child
104
104
. wait_with_output ( )
105
105
. await
106
106
. context ( WaitProvisionerSnafu ) ?;
107
107
108
108
// Check for success of the operation by deserializing stdout of the process to a `Response`
109
- // struct - since `Response` is an empty struct with no fields this effectively means that
109
+ // struct - since `Response` is an empty struct with no fields this effectively means that
110
110
// any output will fail to deserialize and cause an `Error::RunProvisioner` to be propagated
111
111
// with the output of the child process
112
112
serde_json:: from_slice :: < Result < Response , String > > ( & output. stdout )
0 commit comments