From a33d0797585b5cdd304ac1eb6966b9c7c799bab6 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 22 Jan 2008 16:38:00 +0100 Subject: [PATCH] Get Samba version or capability information from Windows 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. --- source/smbd/trans2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 8b999cd8f54..fb845220cd7 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -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)); -- 2.11.4.GIT