Get Samba version or capability information from Windows
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 22 Jan 2008 15:38:00 +0000 (16:38 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 22 Jan 2008 15:45:25 +0000 (16:45 +0100)
On Jan 22 13:31, Volker Lendecke wrote:
> On Tue, Jan 22, 2008 at 11:33:17AM +0100, Corinna Vinschen wrote:
> > Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
> > samba_version_string to 28 bytes.  New patch below.
>
> Ok, pushed with some modifications. You might want to review
> that.

Reviewed and tested.  Looks good, thank you!

Below you'll find a tiny patch to add the git commit date.  It seems
I simply missed its existence in version.h :(  Tested on Windows XP.

Thanks,
Corinna

* source/smbd/trans2.c (samba_extended_info_version): Fill out
samba_gitcommitdate member with GIT commit timestamp.
(This used to be commit a33d0797585b5cdd304ac1eb6966b9c7c799bab6)

source3/smbd/trans2.c

index 8b999cd8f54f0991450c00d198b139cdba3147e8..fb845220cd761b054ec216c57e452a3ef573e64b 100644 (file)
@@ -2481,7 +2481,9 @@ static void samba_extended_info_version(struct smb_extended_info *extended_info)
        extended_info->samba_subversion |= (SAMBA_VERSION_VENDOR_PATCH & 0xffff);
 #endif
        /* FIXME: samba_gitcommitdate should contain the git commit date. */
-       unix_to_nt_time(&extended_info->samba_gitcommitdate, time(NULL));
+#ifdef SAMBA_VERSION_GIT_COMMIT_TIME
+       unix_to_nt_time(&extended_info->samba_gitcommitdate, SAMBA_VERSION_GIT_COMMIT_TIME);
+#endif
 
        memset(extended_info->samba_version_string, 0,
               sizeof(extended_info->samba_version_string));