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

Fix password expiration related shadow attributes #2141

Closed
389-ds-bot opened this issue Sep 13, 2020 · 11 comments
Closed

Fix password expiration related shadow attributes #2141

389-ds-bot opened this issue Sep 13, 2020 · 11 comments
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/49082


Shadow attributes (in /etc/shadow and in LDAP) are typically unset when no policy is in place. 389-ds will incorrectly return values (possibly set to 0) when there is no policy.

Only auto-fill shadow attributes when a password policy is available. These are empty when no policy is in place.

Don't auto-fill expiration related shadow attributes if passwords never expire.

@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 13, 2020
@389-ds-bot 389-ds-bot added this to the 1.3.5.14 milestone Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from gordonmessmer at 2017-01-06 22:30:18

attachment
389-shadow-expiration.patch

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-01-08 08:22:18

Hi, Sorry for misunderstanding your issue on the mailing list.

I know we use "long long" in the code here, but try to use PRUint64 or PRInt64. We should avoid this old and confusing syntax, and new code should use the modern types.

Can you give us the example steps you took to test and assert the new patches functionality so that we can create a python test case to prevent regressions?

@389-ds-bot
Copy link
Author

Comment from gordonmessmer at 2017-01-08 09:15:02

No testing has been done as of yet. These patches are merely suggestions. In this case, that shadowMin, shadowMax, and shadowWarning should only be auto-filled if the equivalent settings have a value on the directory server, and that shadowMax and shadowWarning should only be set if password expiration is enabled.

@389-ds-bot
Copy link
Author

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-01-12 05:17:53

git patch file (master) -- CI test; adjusting the test case
0003-Ticket-49082-Adjusted-the-CI-test-case-to-the-fix.patch

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-01-12 05:23:05

Hello, Gordon.

Could you please review the attached patch 0002-Ticket-49082-Fix-password-expiration-related-shadow-.patch​?

I slightly modified your original patch not to update unless "shadowval" was retrieved. Thanks.

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-01-12 05:28:20

Hi William,
Replying to [comment:1 Firstyear]:

I know we use "long long" in the code here, but try to use PRUint64 or PRInt64. We should avoid this old and confusing syntax, and new code should use the modern types.

I did not change "long long shadowval", which is supposed to have the same type as pwpolicy->pw_minage, pwpolicy->pw_maxage, etc. (unless we cast or change the type of pwpolicy->pw_...). If we want to do that, I think we'd better do that in a new ticket.

Can you give us the example steps you took to test and assert the new patches functionality so that we can create a python test case to prevent regressions?

I updated ticket548_test.py to adjust the new behaviour.

Thanks!

@389-ds-bot
Copy link
Author

Comment from gordonmessmer at 2017-01-12 05:48:53

Looks good to me.

@389-ds-bot
Copy link
Author

Comment from firstyear (@Firstyear) at 2017-01-12 05:50:02

Thanks Gordon for clarifying our misunderstanding of this attribute :)

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-01-12 06:03:42

Reviewed by Gordon and William (Thanks!!)

Pushed to master:
9835e2b..5a6a5a1 master -> master
commit 5bcd966
commit 5a6a5a1

Pushed to 389-ds-base-1.3.5:
238d3c7..b9e565d 389-ds-base-1.3.5 -> 389-ds-base-1.3.5
commit faae0fa
commit b9e565d

@389-ds-bot
Copy link
Author

Comment from gordonmessmer at 2017-02-11 23:03:01

Metadata Update from @gordonmessmer:

  • Issue assigned to nhosoi
  • Issue set to the milestone: 1.3.5.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant