Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: sudo defaults rule #7254

Closed
wants to merge 3 commits into from
Closed

Tests: sudo defaults rule #7254

wants to merge 3 commits into from

Conversation

shridhargadekar
Copy link
Contributor

A sudo rule with specifically 'defaults' as cn is being tested. The addition option '!authenticate' has been added.
The man 5 sudoers.ldap says:

Sudo first looks for the ‘cn=defaults’ entry in the SUDOers container. If found, the multi-valued sudoOption attribute is parsed in the same manner as a global Defaults line in /etc/sudoers. In the
following example, the SSH_AUTH_SOCK variable will be preserved in the environment for all users.

       dn: cn=defaults,ou=SUDOers,dc=my-domain,dc=com
       objectClass: top
       objectClass: sudoRole
       cn: defaults
       description: Default sudoOption's go here
       sudoOption: env_keep+=SSH_AUTH_SOCK

liswang89 and others added 3 commits March 4, 2024 20:54
Test change
A sudo rule defaults (special condition) is tested here. The rule
with 'defaults' cn is added and additional option of '!authenticate'
2. Command is successful
:customerscenario: False
"""
u = provider.user("user-1").add()

Check notice

Code scanning / CodeQL

Unused local variable Note test

Variable u is not used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants