Get Samba version or capability information from Windows
Corinna Vinschen
corinna at vinschen.de
Tue Jan 22 15:38:00 GMT 2008
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.
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 8b999cd..fb84522 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));
More information about the samba-technical
mailing list