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:
TreeView+ depends on / blocked
 
Reported: 2011-09-06 13:31 UTC by Nils Philippsen
Modified: 2015-03-02 05:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 735933
Environment:
Last Closed: 2012-10-18 11:44:22 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1387 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@redhat.com on 2011-09-06 07:15:41 EDT ---

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

--- Additional comment from nphilipp@redhat.com on 2011-09-06 07:18:02 EDT ---

fixed in git:

commit 57ba7b55d6d6606792ec2bf444fe62958ff15b0c
Author:     Nils Philippsen <nils@redhat.com>
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.