NTSTATUS trick for NTTIME?

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Mar 4 13:33:35 MST 2011


Hi!

In the past we've had quite a few bugs where we mixed up
unix time_t and NTTIME, both of which are integral types.

What about the following:

#if defined(HAVE_IMMEDIATE_STRUCTURES)
typedef struct {uint64_t v;} nt_time_t;
#define nt_time(x) ((nt_time) { x })
#define nt_time_v(x) ((x).v)
#else
typedef uint64_t nt_time_t;
#define nt_time(x) (x)
#define nt_time_v(x) (x)
#endif

This would potentially involve a LOT of code, that's why I'm
asking here.

The reason why I'm bringing this up now is that I want to
convert the s3 passdb interface to use NTTIME, and I want to
automatically catch all places where this matters.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen


More information about the samba-technical mailing list