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 bug in modules/system/user.py (FreeBSD) #37552

Merged
merged 1 commit into from
Apr 13, 2018
Merged

fix bug in modules/system/user.py (FreeBSD) #37552

merged 1 commit into from
Apr 13, 2018

Conversation

lr1980
Copy link
Contributor

@lr1980 lr1980 commented Mar 17, 2018

SUMMARY

for freebsd tool "pw" use date not days in "modify_user"

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

user

ADDITIONAL INFORMATION

When you modify a user and set a expire date that is in the past, the "-e" argument of the FreeBSD tool "pw" is set to "-1" because it calculates the day diff to now. This means the expire date of the user is set to "now - 1 second" => thats wrong. Here is the man page info:

  -e date       Set the account's expiration date.  Format of the date is
               either a UNIX time in decimal, or a date in `dd-mmm-yy[yy]'
               format, where dd is the day, mmm is the month, either in
               numeric or alphabetic format ('Jan', 'Feb', etc) and year
               is either a two or four digit year.  This option also
               accepts a relative date in the form `+n[mhdwoy]' where `n'
               is a decimal, octal (leading 0) or hexadecimal (leading 0x)
               digit followed by the number of Minutes, Hours, Days,
               Weeks, Months or Years from the current date at which the
               expiration date is to be set.

for freebsd tool "pw" use date not days in "modify_user"
@ansibot
Copy link
Contributor

ansibot commented Mar 17, 2018

cc @sfromm
click here for bot help

@ansibot ansibot added bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Mar 17, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Mar 19, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 27, 2018
@bcoca bcoca merged commit d512bed into ansible:devel Apr 13, 2018
@bcoca bcoca added this to To Do in 2.5.x blocker list via automation Apr 13, 2018
@nitzmahone nitzmahone moved this from To Do to Done in 2.5.x blocker list Apr 18, 2018
nitzmahone pushed a commit that referenced this pull request Apr 18, 2018
for freebsd tool "pw" use date not days in "modify_user"
(cherry picked from commit d512bed)
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
for freebsd tool "pw" use date not days in "modify_user"
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants