Bug 158334 - WinSync Console: Handling of logonHours and accountExpires incorrect.
Summary: WinSync Console: Handling of logonHours and accountExpires incorrect.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: UI - Configuration
Version: 7.1
Hardware: All
OS: Linux
low
medium
Target Milestone: DS8.1
: ---
Assignee: Rich Megginson
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 249650 FDS1.2.0
TreeView+ depends on / blocked
 
Reported: 2005-05-20 16:53 UTC by Thomas E Lackey
Modified: 2015-01-04 23:18 UTC (History)
5 users (show)

Fixed In Version: 8.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-29 22:57:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
diffs (4.98 KB, patch)
2008-12-11 02:03 UTC, Rich Megginson
no flags Details | Diff
never expires (40.97 KB, image/jpeg)
2008-12-11 02:04 UTC, Rich Megginson
no flags Details
expires with date (41.91 KB, image/jpeg)
2008-12-11 02:04 UTC, Rich Megginson
no flags Details
ADUtil.java (2.50 KB, text/plain)
2008-12-11 02:08 UTC, Rich Megginson
no flags Details
fixed diffs (4.30 KB, patch)
2008-12-16 20:46 UTC, Rich Megginson
no flags Details | Diff
more fixed diffs (4.39 KB, patch)
2008-12-16 23:18 UTC, Rich Megginson
no flags Details | Diff
new ADUtil.java (2.69 KB, text/plain)
2008-12-16 23:18 UTC, Rich Megginson
no flags Details
cvs commit log (784 bytes, text/plain)
2008-12-16 23:32 UTC, Rich Megginson
no flags Details

Description Thomas E Lackey 2005-05-20 16:53:56 UTC
Description of problem:

The handling of the logonHours and accountExpires attributes by the console is
incorrect.  David took a look, and assuming I relay this accurately, the console
is basing its time calculations off time_t while AD and the NT4 sync service
expect dates referenced off FILETIME.

How reproducible:
Always.

Steps to Reproduce:
1. Configure WinSync
2. Create a user and adjust their logon hours and account expiration on the
Windows side.
3. Open the DS console and use the wizards to view the values.  They will be
incorrect.
4. Change the values in the DS console.
5. Open the users in the Windows side and view those values.  They will be now
be incorrect.
  
Actual results:
The times input using the console are not accurate.

Expected results:
The times should match.

Additional info:
This is a problem in the way the console calculates the value and not a problem
in the DS's handling of the attributes.

Comment 1 Rich Megginson 2005-05-20 17:57:55 UTC
FILETIME is in 100's of nanoseconds since 1/1/1601.

Comment 7 Rich Megginson 2008-12-11 02:03:57 UTC
Created attachment 326572 [details]
diffs

Comment 8 Rich Megginson 2008-12-11 02:04:31 UTC
Created attachment 326573 [details]
never expires

Comment 9 Rich Megginson 2008-12-11 02:04:54 UTC
Created attachment 326574 [details]
expires with date

Comment 10 Rich Megginson 2008-12-11 02:08:10 UTC
Created attachment 326575 [details]
ADUtil.java

Comment 11 Rich Megginson 2008-12-16 20:46:04 UTC
Created attachment 327161 [details]
fixed diffs

Comment 12 Rich Megginson 2008-12-16 23:18:15 UTC
Created attachment 327182 [details]
more fixed diffs

Comment 13 Rich Megginson 2008-12-16 23:18:45 UTC
Created attachment 327183 [details]
new ADUtil.java

Comment 14 Rich Megginson 2008-12-16 23:32:40 UTC
Created attachment 327184 [details]
cvs commit log

Reviewed by: nhosoi (Thanks!)
Files: new file ADUtil.java
Fix Description: Added code to convert from Windows FILETIME to Java
time.  Added special handling for the "Never Expires" value, which can
be the very large value or 0.  The console now displays "Never Expires"
or the actual human readable value for the time.
As far as Logon Hours, it's just really messed up.  I will open another
bug for that.
https://bugzilla.redhat.com/attachment.cgi?id=326573 - never expires
https://bugzilla.redhat.com/attachment.cgi?id=326574 - expires with date
Platforms tested: RHEL5
Flag Day: no
Doc impact: yes

Comment 15 Jenny Severance 2009-02-27 15:19:27 UTC
I'm not sure what was really fixed here.  Can you be more specific?  It still seems pretty screwed up.  Thanks Jenny

Comment 16 Rich Megginson 2009-02-27 17:02:59 UTC
(In reply to comment #15)
> I'm not sure what was really fixed here.  Can you be more specific?  It still
> seems pretty screwed up.  Thanks Jenny

Account Expires handling should be correct now.  Logon Hours is still messed up - there is another bug for that (for a later release, not for this one).  So I guess for this bug, just verify that Account Expires is handled correctly.

Comment 17 Jenny Severance 2009-03-12 14:31:38 UTC
Account Expires -
Fix Verified DS 8.1 RHEL5 - Windows Synchronization 1.1.0

Comment 18 Chandrasekar Kannan 2009-04-29 22:57:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html


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