1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-24 04:23:53 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Volker Lendecke
1f0eaaa591 Move samba_extended_info_version to smbd/trans2.c
This is right now only used there, and in version.c it gave linker errors
because some binaries (e.g. smbmnt) don't link in time.o
2008-01-22 13:00:22 +01:00
Volker Lendecke
85123aacdb Avoid use of uninitialized memory 2008-01-22 12:46:51 +01:00
Corinna Vinschen
28aa1c199d Get Samba version or capability information from Windows
On Jan 21 16:18, Danilo Almeida wrote:
> Corina wrote:
>
> > +	time_t samba_gitcommitdate;
>
> And:
>
> > +   SIVAL(pdata,28,extended_info.samba_gitcommitdate);
> > +   memcpy(pdata+32,extended_info.samba_version_string,32);
>
> Note that you are dropping bits on a system w/64-bit time_t, and that this has the 2038 problem.

Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
samba_version_string to 28 bytes.  New patch below.

Thanks,
Corinna
2008-01-22 12:39:47 +01:00
Volker Lendecke
9996473290 Use SAFE_FREE instead of free 2008-01-19 19:31:02 +01:00
Corinna Vinschen
373a23d48f Tiny memory leak in lib/version.c
Hi,

while implementing the extra_info version stuff, it occured to me that
samba_version_string() potentially allocates memory which is unused but
never free'd.

If SAMBA_VERSION_VENDOR_PATCH is defined, a second call to asprintf
takes place.  The result is stored in tmp_version.  Afterwards,
samba_version is set to tmp_version without free'ing samba_version
first.  Looks like a simple free(samba_version) is missing.  Patch
against 3.2-test below.

Ok, this only happens once over the lifetime of the application, so it's
no big deal, but I though it doesn't hurt to mention it.

Corinna

	* lib/version.c (samba_version_string): Free samba_version
	before setting to tmp_version.
2008-01-19 19:30:16 +01:00
Volker Lendecke
a9c62c57db Remove a static fstring 2007-12-16 14:02:26 +01:00
Gerald (Jerry) Carter
a62c7f9350 Correct VERSION and version.c to use SAMBA_VERSION_VENDOR_PATCH
which is used by mkversion.sh.
2007-10-21 12:32:06 -05:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Jeremy Allison
406737cd9a Fix warning messages for unused variables.
Jeremy.
2007-10-15 15:52:30 -07:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Gerald Carter
0b8ed8136b r13231: apparently strncat() is converted to strcat() on RH7.3 and similar systems. Fix the build on those boxes 2007-10-10 11:06:19 -05:00
Gerald Carter
d40f06018b r13093: adding vendor patch level string as announced on samba-technical ml 2007-10-10 11:06:13 -05:00
Gerald Carter
ae452e51b0 metze's autogenerate patch for version.h -