File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,16 @@ impl SecurityHook {
9797 // Construct a shim input from the path.
9898 let input = ShimInput :: SecurityHookPath ( path) ;
9999
100+ // Convert the input to an owned data buffer.
101+ let input = match input. into_owned_data_buffer ( ) {
102+ Ok ( input) => input,
103+ // If an error occurs, log the error and return the not found status.
104+ Err ( error) => {
105+ warn ! ( "unable to read data to be authenticated: {}" , error) ;
106+ return Status :: NOT_FOUND ;
107+ }
108+ } ;
109+
100110 // Verify the input, if it fails, call the original hook.
101111 if !Self :: verify ( input) {
102112 // Acquire the global hook state to grab the original hook.
@@ -116,7 +126,7 @@ impl SecurityHook {
116126 Err ( error) => {
117127 warn ! (
118128 "unable to acquire global hook state lock to call original hook: {}" ,
119- error
129+ error,
120130 ) ;
121131 return Status :: LOAD_ERROR ;
122132 }
You can’t perform that action at this time.
0 commit comments