RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 736037 - system-config-user calculates wrong expiry date
Summary: system-config-user calculates wrong expiry date
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: system-config-users
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Nils Philippsen
QA Contact: David Spurek
URL:
Whiteboard:
Depends On: 735933
Blocks: 1889334
TreeView+ depends on / blocked
 
Reported: 2011-09-06 13:31 UTC by Nils Philippsen
Modified: 2020-10-19 12:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 735933
: 1889334 (view as bug list)
Environment:
Last Closed: 2012-10-18 11:44:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1387 0 normal SHIPPED_LIVE system-config-users bug fix update 2012-10-18 15:42:44 UTC

Description Nils Philippsen 2011-09-06 13:31:42 UTC
+++ This bug was initially created as a clone of Bug #735933 +++

+++ This bug was initially created as a clone of Bug #447710 +++

Description of problem:

system-config-user calculates the wrong expire date.
When the expire date is set to 0 it shows the 01-02-1970, but not the
01-01-1970. All other dates are one day later!

Version-Release number of selected component (if applicable):
system-config-users-1.2.110-1

How reproducible:
100%

Steps to Reproduce:
1. Start system-config-user, set the expire date to 1970-01-01
2. Look into /etc/shadow -> correct 0
3. Load the user with system-config-user again and hav a look to the expire
date: 1970-01-02

  
Actual results:
One day later

Expected results:
same date

Additional info:

--- Additional comment from nphilipp on 2011-09-06 07:15:41 EDT ---

This actually only applies to expiration dates before 1970-01-01 UTC.

--- Additional comment from nphilipp on 2011-09-06 07:18:02 EDT ---

fixed in git:

commit 57ba7b55d6d6606792ec2bf444fe62958ff15b0c
Author:     Nils Philippsen <nils>
AuthorDate: Tue Sep 6 13:16:08 2011 +0200

    correctly calculate expiration dates before the epoch (#735933)

Comment 7 David Spurek 2012-09-05 07:32:16 UTC
Hi, I am not able to reproduce this bug as you describe it.

When I set the expire date to 1970-01-01, in /etc/shadow is 1, Load the user with system-config-user again and have a look to the expire
date: 1970-01-01

But when I set expire date to 1969-01-01 and load the user with system-config-user again and have a look to the expire
date: 1969-01-02

Depend bug on timezone setup?

Comment 8 Nils Philippsen 2012-09-05 08:10:18 UTC
(In reply to comment #7)
> Hi, I am not able to reproduce this bug as you describe it.
> 
> When I set the expire date to 1970-01-01, in /etc/shadow is 1, Load the user
> with system-config-user again and have a look to the expire
> date: 1970-01-01
> 
> But when I set expire date to 1969-01-01 and load the user with
> system-config-user again and have a look to the expire
> date: 1969-01-02
> 
> Depend bug on timezone setup?

Yes, if you're looking at the time span around begin of epoch (1970-01-01 0:00 UTC) the bug depends on the time zone. For the bug to manifest, the time/date set must be before begin of epoch -- so setting it to 1970-01-01 will only exhibit the bug if the time zone is before UTC (e.g. Central European Time). If you set the expiration date to 1969-01-01, it will be before 1970-01-01 0:00 UTC regardless of the time zone set, therefore you see the bug in this case.

Comment 11 errata-xmlrpc 2012-10-18 11:44:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1387.html


Note You need to log in before you can comment on or make changes to this bug.