1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Jelmer Vernooij
41ebc6fe73 Reorder defines for version for consistency with Samba 4.
(This used to be commit fe36d83508)
2008-09-12 12:38:54 +02:00
Andreas Schneider
2a8ebdca53 Simplify samba_version_string.
This adds a new macro for a vender version function which will be returned
by the samba_version_string() function if defined.

Signed-off-by: Andreas Schneider <anschneider@suse.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit 8b9301fbc7)
2008-07-17 14:16:19 +02:00
Volker Lendecke
d4d962f691 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
(This used to be commit 1f0eaaa591)
2008-01-22 13:00:22 +01:00
Volker Lendecke
1d99598ca3 Avoid use of uninitialized memory
(This used to be commit 85123aacdb)
2008-01-22 12:46:51 +01:00
Corinna Vinschen
559603ad69 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
(This used to be commit 28aa1c199d)
2008-01-22 12:39:47 +01:00
Volker Lendecke
07e07f696a Use SAFE_FREE instead of free
(This used to be commit 9996473290)
2008-01-19 19:31:02 +01:00
Corinna Vinschen
a0bd9d97a3 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.
(This used to be commit 373a23d48f)
2008-01-19 19:30:16 +01:00
Volker Lendecke
dd4e99c9d7 Remove a static fstring
(This used to be commit a9c62c57db)
2007-12-16 14:02:26 +01:00
Gerald (Jerry) Carter
69c6f16e31 Correct VERSION and version.c to use SAMBA_VERSION_VENDOR_PATCH
which is used by mkversion.sh.
(This used to be commit a62c7f9350)
2007-10-21 12:32:06 -05:00
Jeremy Allison
30191d1a57 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.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Jeremy Allison
48cd61d30e Fix warning messages for unused variables.
Jeremy.
(This used to be commit 406737cd9a)
2007-10-15 15:52:30 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Gerald Carter
8724ea7ef5 r13231: apparently strncat() is converted to strcat() on RH7.3 and similar systems. Fix the build on those boxes
(This used to be commit 0b8ed8136b)
2007-10-10 11:06:19 -05:00
Gerald Carter
19907887fc r13093: adding vendor patch level string as announced on samba-technical ml
(This used to be commit d40f06018b)
2007-10-10 11:06:13 -05:00
Gerald Carter
8bfe26b62d metze's autogenerate patch for version.h
(This used to be commit ae452e51b0)
2003-08-20 17:13:38 +00:00