1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

32 Commits

Author SHA1 Message Date
Günther Deschner
cd82d4ba56 s3: add perfcount idl and generated files.
Guenther
2009-10-01 12:19:43 +02:00
Günther Deschner
2c11b73391 s3-registry: use push_reg_sz().
Guenther
2009-09-30 00:29:49 +02:00
Günther Deschner
d759f9961a s3-spoolss: move SYSTEMTIME parsing to a more generic place, as suggested.
Guenther
2009-03-17 18:39:23 +01:00
Volker Lendecke
b222de4eb3 Remove a pointless NULL check 2009-02-14 22:01:03 +01:00
Volker Lendecke
4e34c0ceca Fix some nonempty blank lines 2009-02-14 22:01:03 +01:00
Jelmer Vernooij
2d89b52be8 Use separate make variables for libutil and libcrypto. 2008-10-18 14:28:40 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
1e696c2845 Fix Coverity ID 506
(This used to be commit c9add4d59a)
2008-03-21 11:48:09 +01:00
Günther Deschner
b05ffb5065 Fix _reg_perfcount_get_instance_info()
Guenther
(This used to be commit 20c1ba23f2)
2007-11-30 02:16:46 +01:00
Jeremy Allison
80c2446321 Remove pstrings from nsswitch/ and registry/
Jeremy.
(This used to be commit 331c0d6216)
2007-11-26 17:24:56 -08:00
Gerald (Jerry) Carter
88ee61625a Patch 2 of 3 from Debian Samba packagers:
The point is doing the following associations:

- non discardable state data (all TDB files that may need to be backed
  up) go to statedir
- shared data (codepage stuff) go to codepagedir

The patch *does not change* the default location for these
directories. So, there is no behaviour change when applying it.

The main change is for samba developers who have to think when dealing
with files that previously pertained to libdir whether they:
- go in statedir
- go in codepagedir
- stay in libdir
(This used to be commit d6cdbfd875)
2007-11-01 15:53:44 -04: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
Günther Deschner
6334c7cc5f r25417: Use DBGC_REGISTRY class.
Guenther
(This used to be commit 43ca04918a)
2007-10-10 12:31:04 -05:00
Volker Lendecke
ff0947fbed r24949: Remove some static buffers
(This used to be commit df648d47ff)
2007-10-10 12:30:29 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -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
Stefan Metzmacher
bc2b6436d0 r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users

metze
(This used to be commit 3a28443079)
2007-10-10 12:19:00 -05:00
Stefan Metzmacher
c2f09ee288 r21979: make use of string_tdb_data()
to avoid creating the TDB_DATA struct from strings "by hand"

note: we can't use the tdb_*_bystring functions here, as the key isn't
null-terminated here...

metze
(This used to be commit 29b42ea89c)
2007-10-10 12:18:55 -05:00
Herb Lewis
e59e787b48 r20269: merge -r20264:20267 from SAMBA_3_0_24
more no previous prototype warnings
(This used to be commit 41be182f78)
2007-10-10 12:16:38 -05:00
Volker Lendecke
213bc9d440 r19913: Fix a const warning
(This used to be commit a660993d14)
2007-10-10 12:16:08 -05:00
Volker Lendecke
fb904d2299 r19858: Fix a memleak, add a const
(This used to be commit ed4dc40512)
2007-10-10 12:16:03 -05:00
Volker Lendecke
969a7faa7c r19853: Update a link
(This used to be commit ce44158dde)
2007-10-10 12:16:02 -05:00
Volker Lendecke
02eea79624 r17333: Some C++ warnings
(This used to be commit be9aaffdac)
2007-10-10 11:38:26 -05:00
Jeremy Allison
68e4fc8066 r16650: Fix bug #3890 reported by jason@ncac.gwu.edu.
Jeremy.
(This used to be commit 590b58cb50)
2007-10-10 11:19:06 -05:00
Jeremy Allison
7d6856240b r16636: Fix bug #3884 reported by jason@ncac.gwu.edu
Jeremy.
(This used to be commit 7580eb947c)
2007-10-10 11:19:05 -05:00
Volker Lendecke
3c34f6085a r16409: Fix Klocwork ID's.
1177

In reg_perfcount.c: 1200 1202 1203 1204
In regfio.c: 1243 1245 1246 1247 1251

Jerry, the reg_perfcount and regfio.c ones, can you take a look please? This
is really your code, and I'm not sure I did the right thing to return an
error.

smbcacls.c: 1377
srv_eventlog_nt.c: 1415 1416 1417
srv_lsa_nt.c: 1420 1421
srv_netlog_nt.c: 1429
srv_samr_nt: 1458 1459 1460

Volker

Volker
(This used to be commit d6547d12b1)
2007-10-10 11:18:52 -05:00
Volker Lendecke
30832e95dc r15104: Implement Samba4's tdb_name().
Volker
(This used to be commit d52002c1c9)
2007-10-10 11:16:23 -05:00
Jeremy Allison
2615b079f0 r13978: Here is why it's essential to use SAFE_FREE instead of free.
If we use free(data.dptr) and then the subsequent tdb_open
fails in _reg_perfcount_get_counter_data() then data.dptr
is left as a non-zero pointer that has been freed. This would
cause it to be reused later on. Coverity bug #162.
Jeremy.
(This used to be commit 053efc2098)
2007-10-10 11:11:02 -05:00
Jeremy Allison
894358a8f3 r13915: Fixed a very interesting class of realloc() bugs found by Coverity.
realloc can return NULL in one of two cases - (1) the realloc failed,
(2) realloc succeeded but the new size requested was zero, in which
case this is identical to a free() call.

The error paths dealing with these two cases should be different,
but mostly weren't. Secondly the standard idiom for dealing with
realloc when you know the new size is non-zero is the following :

 tmp = realloc(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

However, there were *many* *many* places in Samba where we were
using the old (broken) idiom of :

 p = realloc(p, size)
 if (!p) {
    return error;
 }

which will leak the memory pointed to by p on realloc fail.

This commit (hopefully) fixes all these cases by moving to
a standard idiom of :

 p = SMB_REALLOC(p, size)
 if (!p) {
    return error;
 }

Where if the realloc returns null due to the realloc failing
or size == 0 we *guarentee* that the storage pointed to by p
has been freed. This allows me to remove a lot of code that
was dealing with the standard (more verbose) method that required
a tmp pointer. This is almost always what you want. When a
realloc fails you never usually want the old memory, you
want to free it and get into your error processing asap.

For the 11 remaining cases where we really do need to keep the
old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR,
which can be used as follows :

 tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size);
 if (!tmp) {
    SAFE_FREE(p);
    return error;
 } else {
    p = tmp;
 }

SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the
pointer p, even on size == 0 or realloc fail. All this is
done by a hidden extra argument to Realloc(), BOOL free_old_on_error
which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR
macros (and their array counterparts).

It remains to be seen what this will do to our Coverity bug count :-).

Jeremy.
(This used to be commit 1d710d06a2)
2007-10-10 11:10:59 -05:00
Gerald Carter
77460a9075 r11579: syncing up perf counter code cfrom trunk
(This used to be commit 59c00924b6)
2007-10-10 11:05:21 -05:00
Jeremy Allison
8d7c886671 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
(This used to be commit d720867a78)
2007-10-10 11:05:02 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d7)
2007-10-10 11:04:48 -05:00