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

[Backport][ipa-4-8] ipa user_add: do not check group if UPG is disabled #3743

Closed

Conversation

flo-renaud
Copy link
Contributor

This PR was opened automatically because PR #3739 was pushed to master and backport to ipa-4-8 is required.

The UPG plugin is used to create a user private group when a new
IPA user is created, with the same name as the user. When this plugin
is enabled, the user creation must ensure that no group exists with
the same name.

When the UPG plugin is disabled, or when the user is created with the
--noprivate option, there is no need to perform this check as the
private group will not get created.

Currently, the --noprivate option correctly skips the test, but a
disabled UPG plugin does not skip the test. The fix ensures that
UPG plugin status is checked.

Fixes: https://pagure.io/freeipa/issue/4972
Add a new XMLRPC test in test_user_plugin:
- disable the UPG plugin
- create a user without the --gid parameter
  as the default group for new users is not POSIX (ipausers), the
  command is expected to fail
- create a user with the --gid parameter
  The provided gid is used and command is expected to succeed
- create a user with the same name as an existing group
  As the UPG plugin is disabled, the user creation will not trigger
  the creation of a group with the same name, and command is
  expected to succeed
- re-enable the UPG plugin for other tests

Related to: https://pagure.io/freeipa/issue/4972
@flo-renaud flo-renaud added the ack Pull Request approved, can be merged label Sep 27, 2019
@flo-renaud
Copy link
Contributor Author

PR was ACKed automatically because this is backport of PR #3739. Wait for CI to finish before pushing. In case of questions or problems contact @flo-renaud who is author of the original PR.

@rcritten
Copy link
Contributor

rcritten commented Oct 1, 2019

ipa-4-8:

  • 624144d ipa user_add: do not check group if UPG is disabled
  • 482ee74 ipatests: add XMLRPC test for user-add when UPG plugin is disabled

@rcritten rcritten added the pushed Pull Request has already been pushed label Oct 1, 2019
@rcritten rcritten closed this Oct 1, 2019
@flo-renaud flo-renaud deleted the backport_pr3739_ipa-4-8 branch October 1, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants