Bug 8671 - Bad values in time displayed in rpcclient
Summary: Bad values in time displayed in rpcclient
Status: NEW
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-19 19:13 UTC by rmillet
Modified: 2011-12-19 19:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rmillet 2011-12-19 19:13:11 UTC
The time is not displayed correctly when using time_display() (lib/time.c)

For example:
$> rpcclient -A ~/Desktop/Win/creds/2k8 -I 192.168.42.1 W2K8-DC -c 'querydominfo 1; querydominfo 12'
Minimum password length:                      3
Password uniqueness (remember x passwords):         11
password_properties: 0x00000001
             DOMAIN_PASSWORD_COMPLEX
password expire in:            4294942441 days, 4294967293 hours, 4294967282 minutes, 4294967288 seconds
Min password age (allow changing in x days):       4294942441 days, 4294967293 hours, 4294967282 minutes, 4294967288 seconds
Bad password lockout duration:               4294942441 days, 4294967293 hours, 4294967282 minutes, 4294967288 seconds
Reset Lockout after:                         4294942441 days, 4294967293 hours, 4294967282 minutes, 4294967288 seconds
Lockout after bad attempts:                  0



But I should have:
$> rpcclient -A ~/Desktop/Win/creds/2k8 -I 192.168.42.1 W2K8-DC -c 'querydominfo 1; querydominfo 12'
Minimum password length:            3
Password uniqueness (remember x passwords):    11
password_properties: 0x00000001
             DOMAIN_PASSWORD_COMPLEX
password expire in:            42 days, 0 hours, 0 minutes, 0 seconds
Min password age (allow changing in x days):     1 days, 0 hours, 0 minutes, 0 seconds
Bad password lockout duration:               0 days, 0 hours, 30 minutes, 0 seconds
Reset Lockout after:                         0 days, 0 hours, 30 minutes, 0 seconds
Lockout after bad attempts:                  0


This bug may come from function display_time in lib/time.c as NTTIME contains the values transmitted over the network (eg: "-864000000000" for 1 day).