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

46 Commits

Author SHA1 Message Date
Volker Lendecke
eaec865148 simplify gencache_iterate a bit, fix nonempty blank lines 2009-01-19 00:05:56 +01:00
Volker Lendecke
cc78ea5d09 Revert "Return timed out entries from gencache_get if timeout param != NULL"
This reverts commit 2954b2be56.
(This used to be commit 77ab2fb306)
2008-07-11 17:53:25 +02:00
Volker Lendecke
d670d0a09b Revert "Remove gencache_[un]lock_entry"
This reverts commit 7a5a575ffe.
(This used to be commit 62e444dd50)
2008-07-11 17:53:25 +02:00
Volker Lendecke
352b5c1857 Remove gencache_[un]lock_entry
Günther agreed that it might be unnecessary in dsgetdcname_cache_store() :-)
(This used to be commit 7a5a575ffe)
2008-07-03 16:40:46 +02:00
Volker Lendecke
c4503f5658 Return timed out entries from gencache_get if timeout param != NULL
net cache get was the only one interested in the timeout. That single caller
can take care of the timeout itself then.

With this API change idmap_cache.c can be converted to gencache.
(This used to be commit 2954b2be56)
2008-07-03 15:59:19 +02:00
Günther Deschner
077f24e51e gencache: add some const.
Guenther
(This used to be commit ec9f8c4cf6)
2008-05-08 01:10:54 +02:00
Volker Lendecke
3176392878 Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0ae)
2008-02-25 16:09:26 +01:00
Volker Lendecke
3ba59d4616 don't store cache_readonly in gencache
tdb won't allow us to write anyway
(This used to be commit 069cd6d63a)
2007-12-28 17:09:57 +01: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
2af9637925 r24733: Add support for storing DATA_BLOBs in gencache.tdb (including torturetest).
Mimir, please have a look. DATA_BLOBs will now just show up as "DATA_BLOB"
values with "net cache list".

Guenther
(This used to be commit b8ad546d04)
2007-10-10 12:30:15 -05: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
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
8960af9558 r21976: make use of tdb_*_bystring() and string_term_tdb_data() in lib/
to avoid creating the TDB_DATA struct from strings "by hand"

metze
(This used to be commit c22b86595a)
2007-10-10 12:18:54 -05:00
Günther Deschner
1e86361080 r19415: oh la la, always compile before commit, I'm very sorry.
Guenther
(This used to be commit bdd2e0361c)
2007-10-10 12:15:33 -05:00
Günther Deschner
9034063617 r19414: gencache is getting really important now, make sure that lp_lockdir
always exists so that the gencache.tdb can get created there.

Guenther
(This used to be commit e5ed286125)
2007-10-10 12:15:33 -05:00
Jeremy Allison
b96aae779b r19054: Callers of gencache may not have the rights to
open read/write. Allow them to fallback to read-only.
Jeremy
(This used to be commit ec526e1b88)
2007-10-10 12:15:06 -05:00
Volker Lendecke
eab60e2bb1 r18312: Change gencache_get slightly: Delete expired keys, and only strdup the value
if a valid entry was found. The newer calls got the latter one wrong, change
the older calls.

Volker
(This used to be commit 554e68887b)
2007-10-10 11:51:19 -05:00
Volker Lendecke
cfefd8fd78 r18311: Simplify gencache_get by using strtol instead of sscanf
(This used to be commit f6497adac6)
2007-10-10 11:51:19 -05:00
Volker Lendecke
96c72e2f81 r18310: Add a little test for some gencache routines
Remove unused gencache_set_only
Use CONST_DISCARD instead of SMB_STRDUP

Volker
(This used to be commit 651e7e44e2)
2007-10-10 11:51:19 -05:00
Jeremy Allison
2abab7ee6d r17928: Implement the basic store for CLDAP sitename
support when looking up DC's. On every CLDAP
call store the returned client sitename (if
present, delete store if not) in gencache with
infinate timeout. On AD DNS DC lookup, try looking
for sitename DC's first, only try generic if
sitename DNS lookup failed.
I still haven't figured out yet how to ensure
we fetch the sitename with a CLDAP query before
doing the generic DC list lookup. This code is
difficult to understand. I'll do some experiments
and backtraces tomorrow to try and work out where
to force a CLDAP site query first.
Jeremy.
(This used to be commit ab3f0c5b1e)
2007-10-10 11:38:59 -05:00
Volker Lendecke
1cf1e648fe r17334: Some C++ warnings
(This used to be commit 8ae7ed1f3c)
2007-10-10 11:38:26 -05:00
Volker Lendecke
366a2d498d r16290: Fix Coverity bugs 298 and 298
(This used to be commit b96808bb62)
2007-10-10 11:17:31 -05:00
Jeremy Allison
835bfbb8ac r16267: Fix Klocwork #401, #402 - ensure format specifier
limited. Fix memleak in printing gencache contents.
Jeremy.
(This used to be commit 81731e1f68)
2007-10-10 11:17:28 -05:00
Volker Lendecke
e17302200c r15101: Little step towards getting Samba4 tdb into 3: tdb_lock_bystring does not
have the timeout argument in Samba4. Add a new routine
tdb_lock_bystring_with_timeout.

Volker
(This used to be commit b9c6e3f556)
2007-10-10 11:16:23 -05:00
Gerald Carter
855e02f164 r13310: first round of server affinity patches for winbindd & net ads join
(This used to be commit 6c3480f9ae)
2007-10-10 11:06:23 -05:00
Gerald Carter
aa363846d6 r12912: patch from Tony Mountifield <tony@softins.co.uk> for BUG 3327 (fix bad access to gencache.tdb after fork() in smbmount
(This used to be commit 68399ce04c)
2007-10-10 11:06:06 -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
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
(This used to be commit 620f2e608f)
2007-10-10 10:53:32 -05:00
Andrew Bartlett
b86830a7cd Always call the auto-init funciton - this avoids tdb segfaulting under
us if we failed to open it earlier.

Andrew Bartlett
(This used to be commit 379368b0be)
2004-01-05 04:15:55 +00:00
Tim Potter
5660c449ef Reformat debug.
(This used to be commit 3aab7a3bc7)
2003-09-08 01:28:48 +00:00
Volker Lendecke
f13e48e2ee Different fix for memleak just committed. This belongs into
tdb_search_list_free.

Volker
(This used to be commit 0f3822c8e7)
2003-07-01 13:04:50 +00:00
Volker Lendecke
b78dd91e68 Fix two memory leaks. tdb_search_keys allocates space for the key
strings.

Running 'net cache list' or secrets_get_trusted_domains through
valgrind gives a *huge* amount of invalid reads of one byte beyond the
indicated string length in libc's strncpy. Annoying...

Volker
(This used to be commit 0f8933ae77)
2003-07-01 12:40:52 +00:00
Volker Lendecke
2b0662b33a Fix a segfault found by metze & valgrind...
Don't overwrite past the end of a string.

Volker
(This used to be commit f036368efd)
2003-07-01 12:03:00 +00:00
Gerald Carter
db6ce132e3 * fix the trustdom_cache to work when winbindd is not running.
smbd will update the trustdom_cache periodically after locking
  the timestamp key
(This used to be commit 7bc4b65b91)
2003-07-01 03:49:41 +00:00
Tim Potter
564cd8cc2d Merge of doxygen updates from HEAD.
(This used to be commit 6d7baad38f)
2003-04-14 02:18:10 +00:00
Andrew Bartlett
79f3265893 (merge from HEAD) Valgrind found some memory leaks!
(This used to be commit 8315b9c311)
2003-03-22 23:32:50 +00:00
Andrew Bartlett
1f499a79f5 (merge from HEAD)
Small clenaup patches:
 - safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

 - connection.c - use safe_strcpy()
Andrew Bartlett
(This used to be commit c91e76bddb)
2003-03-22 13:47:42 +00:00
Tim Potter
aa1a248336 Merge cleanups of return values.
(This used to be commit bae354a20c)
2003-02-19 22:50:29 +00:00
Tim Potter
a68de8f42c Merge of nicer error message for gencache open error from HEAD.
(This used to be commit 23ca540005)
2003-02-12 01:20:56 +00:00
Gerald Carter
f911f03a7d sync with tpot's change to gencache_get() in HEAD
(This used to be commit 305f167db2)
2003-01-24 21:25:12 +00:00
Gerald Carter
7cc3cf9410 masking an assert error in Tim's wins server checking code; needs a proper fix after I talk to tpot
(This used to be commit 607bc0b4fc)
2003-01-24 21:20:31 +00:00
Andrew Bartlett
aff13f53af Merge from HEAD - whitespace :-)
(This used to be commit 5fc90b6cf4)
2003-01-04 09:08:47 +00:00
Andrew Bartlett
863e9ca2c6 Merge from HEAD - mimir's new gencache based namecache code.
Andrew Bartlett
(This used to be commit f79324f730)
2003-01-04 08:48:15 +00:00
Jeremy Allison
de474974ea Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 5d5762d178)
2002-11-23 02:52:36 +00:00
Andrew Tridgell
cdca2ad1c4 added gencache implementation from mimir - thanks!
(This used to be commit 05a202c287)
2002-09-11 14:07:21 +00:00