smbldap-usershow prints dates in non-human-readable form
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
smbldap-tools (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: smbldap-tools
Several values in smbldap-usershow are dates, but not shown as dates. I don't know if there is a more portable way to tell, but in any case the following patch at least converts the known list of attributes below to human-readable dates.
(note: this patch depends on the patch from #141084 to apply correctly)
smbldap-usershow appears to be the only built in tool which uses the read_user function..
--- smbldap-
+++ smbldap-
@@ -777,11 +777,21 @@
foreach my $attr ($entry-
my @vals = $entry-
foreach my $val (@vals) {
}
- $lines.= $attr.": ".join(',', @vals)."\n";
+ if ( $attr eq "shadowLastChange" or $attr eq "shadowExpire" or
+ $attr eq "sambaPwdLastSet" or $attr eq "sambaPwdCanChange" or
+ $attr eq "sambaPwdMustCh
+ $attr eq "sambaKickoffTime") {
+ my ($sec,$
+ $year += 1900;
+ $mon += 1;
+ $lines.= $attr.": $mon/$mday/
+ } else {
+ $lines.= $attr.": ".join(',', @vals)."\n";
+ }
}
}
chomp $lines;
if ($lines eq '') {
return undef;
Is this symptom still reproducible in 8.10 RC or later?