s4-smbtorture: fix expected driver date REG_SZ string.
authorGünther Deschner <gd@samba.org>
Tue, 21 Dec 2010 16:00:33 +0000 (17:00 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 22 Dec 2010 12:33:17 +0000 (13:33 +0100)
This resolves the "WARNING!: ../torture/rpc/spoolss.c:4688: str was 01/01/1601,
expected 01/01/1970: "DriverDate" - driver_date mismatch" warnings.

Guenther

source4/torture/rpc/spoolss.c

index 6608aedf542d5decbeeebaffb143b3ca4d03dcf9..401dc57fab47ddef42f0d2ada9c0c732061051eb 100644 (file)
@@ -4592,6 +4592,11 @@ static const char *driver_winreg_date(TALLOC_CTX *mem_ctx, NTTIME nt)
 {
        time_t t;
        struct tm *tm;
+
+       if (nt == 0) {
+               return talloc_strdup(mem_ctx, "01/01/1601");
+       }
+
        t = nt_time_to_unix(nt);
        tm = localtime(&t);