#1173 Redesign purging of the sudo cache
Closed: Fixed None Opened 12 years ago by pbrezina.

DP downloads rules for the user, searching for the keyword ALL, username, #uid, %group, +* (all netgroups). Before it stores these rules into the sysdb, it purges the cache using the same filter.

This can cause problems in following situation:

  • we have users A and B
  • rule R will match for both users by their name or uid (there is no problem for the groups or netgroups)
  • the rule is stored in the sysdb
  • A is removed from R
  • A runs sudo which causes deletion of R
  • DP goes offline
  • B is unable to run sudo beacuse R is deleted

The purging algorithm should work like:
1. delete all rules containing netgroups (they will be all stored again anyway)
2. retrieve all rules that contains username/#uid/%group
3. remove ALL/username/#uid/%group from sudoUser attribute
4. delete rule if sudoUser attribute is empty


Fields changed

owner: somebody => pbrezina

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.8.0 (LTM)

Fields changed

status: new => assigned

Fields changed

patch: 0 => 1

Fields changed

rhbz: => 0

Fixed by f5d4b05

resolution: => fixed
status: assigned => closed

Metadata Update from @pbrezina:
- Issue assigned to pbrezina
- Issue set to the milestone: SSSD 1.8.0 (LTM)

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2215

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata