File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ fn sudo_process() -> Result<(), Error> {
101101 let user = CurrentUser :: resolve ( ) ?;
102102 let mut record_file =
103103 SessionRecordFile :: open_for_user ( & user, Duration :: seconds ( 0 ) ) ?;
104- record_file. disable ( scope, None ) ?;
104+ record_file. disable ( scope) ?;
105105 }
106106 Ok ( ( ) )
107107 }
Original file line number Diff line number Diff line change @@ -216,17 +216,12 @@ impl SessionRecordFile {
216216 Ok ( TouchResult :: NotFound )
217217 }
218218
219- /// Disable all records that match the given scope. If an auth user id is
220- /// given then only records with the given scope that are targeting that
221- /// specific user will be disabled.
222- pub fn disable ( & mut self , scope : RecordScope , auth_user : Option < & AuthUser > ) -> io:: Result < ( ) > {
219+ /// Disable all records that match the given scope.
220+ pub fn disable ( & mut self , scope : RecordScope ) -> io:: Result < ( ) > {
223221 let lock = FileLock :: exclusive ( & self . file , false ) ?;
224222 self . seek_to_first_record ( ) ?;
225223 while let Some ( record) = self . next_record ( ) ? {
226- let must_disable = auth_user
227- . map ( |tu| record. matches ( & scope, tu) )
228- . unwrap_or_else ( || record. scope == scope) ;
229- if must_disable {
224+ if record. scope == scope {
230225 self . file . seek ( io:: SeekFrom :: Current ( -SIZE_OF_BOOL ) ) ?;
231226 write_bool ( false , & mut self . file ) ?;
232227 }
You can’t perform that action at this time.
0 commit comments