1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

29 Commits

Author SHA1 Message Date
Volker Lendecke
0baae61e42 lib: Give lib/util/util_file.c its own header file
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2024-04-16 23:51:45 +00:00
Günther Deschner
b0d21f44e5 werror: replace WERR_GENERAL_FAILURE with WERR_GEN_FAILURE in source4/lib/registry/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:21 +02:00
Günther Deschner
70807a4267 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source4/lib/registry/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Noel Power
60b2298a73 s4:lib:registry: fix 'Conditional jump or move' valgrind error.
smbtorture local.registry.diff.dotreg.test_diff_apply produces the following
valgrind trace

==18367== Conditional jump or move depends on uninitialised value(s)
==18367==    at 0xA02ED96: reg_dotreg_diff_load (patchfile_dotreg.c:252)
==18367==    by 0xA031C6C: reg_diff_load (patchfile.c:375)
==18367==    by 0xA0323AB: reg_diff_apply (patchfile.c:542)
==18367==    by 0x15F116: test_diff_apply (diff.c:72)
==18367==    by 0x955460C: wrap_test_with_simple_test (torture.c:731)
==18367==    by 0x955366F: internal_torture_run_test (torture.c:442)
==18367==    by 0x9553A4B: torture_run_test_restricted (torture.c:542)
==18367==    by 0x260074: run_matching (smbtorture.c:110)
==18367==    by 0x25FF36: run_matching (smbtorture.c:95)
==18367==    by 0x25FF36: run_matching (smbtorture.c:95)
==18367==    by 0x25FF36: run_matching (smbtorture.c:95)
==18367==    by 0x260195: torture_run_named_tests (smbtorture.c:143)
==18367==

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-04-25 10:35:14 +02:00
Volker Lendecke
a99a5a34a5 Fix the developer O3 build
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed Feb 25 16:32:29 CET 2015 on sn-devel-104
2015-02-25 16:32:29 +01:00
Jeremy Allison
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Jelmer Vernooij
8cec67fe61 registry: Make a two more functions static. 2010-10-04 13:52:09 +02:00
Matthias Dieter Wallnöfer
fba8e326f8 s4:patchfile_dotreg.c - use "size_t" when counting characters in DATA_BLOBs
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct  3 16:03:41 UTC 2010 on sn-devel-104
2010-10-03 16:03:41 +00:00
Wilco Baan Hofman
e2eae17961 Make sure REG_SZ is properly written to a .reg file (not as hex(1)), fix trailing comma REG_BINARY.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
Wilco Baan Hofman
6e881dd86a Fix patchfile_dotreg to write proper .reg files: 'hex(1..B):', 'dword:', etc
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
Wilco Baan Hofman
bc2098c459 Do not include the closing doublequote in .reg files.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
1ed896407f Make sure we write the value stored in value, not line (doublequoted).
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
927e4db090 Fix .reg file format parsing.
* multiline data
 * doublequoted value name
 * handle windows format CRLF

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Matthias Dieter Wallnöfer
dc17292f1a s4:registry - add more "W_ERROR_HAVE_NO_MEMORY" invocations (on talloc'ed stuff) 2010-03-22 22:31:05 +01:00
Matthias Dieter Wallnöfer
93472b41de s4:registry - "patchfile_dotreg.c" - fix a memory leak
Here we allocate memory on the "NULL" context through "reg_val_data_string" on
each call of "set_value". So when we have written out the allocated data on the
specified file descriptor we should immediately free this memory! Otherwise we
may end up with a big memory consumption on big registry databases.
2010-03-22 12:26:39 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Wilco Baan Hofman
0b8d2b3cb7 Fixed the patchfile tests and tidy up the patchfile backends.
(This used to be commit 6e9b1e35a2)
2008-04-15 11:52:33 +02:00
Wilco Baan Hofman
212644b5a1 Attempt to fix the patchfile_preg backend for big endian machines.
Update some functions to properly state what is not supported (yet).
Registry .reg uses UCS-2, not UTF-16.
(This used to be commit 664a035dd9)
2008-04-14 12:48:25 +02:00
Jelmer Vernooij
5be50a222f Merge patchfile.h into registry.h
(This used to be commit 7b434df67a)
2008-04-02 13:58:05 +02:00
Andrew Kroeger
8f8c56bfbc Convert some more files to GPLv3.
(This used to be commit ebe5e83994)
2008-03-28 01:08:49 -05:00
Jelmer Vernooij
3101cb888d Remove uses of global_loadparm.
(This used to be commit a16c9a2129)
2008-02-25 12:51:55 +01:00
Jelmer Vernooij
48307b54f9 Remove more uses of global_loadparm.
(This used to be commit 3430cc6097)
2008-02-21 16:01:19 +01:00
Günther Deschner
cc8f4eb3cd r25544: Cleanup some more indents in lib/registry.
Guenther
(This used to be commit 0d9826dc54)
2007-10-10 15:07:51 -05:00
Jelmer Vernooij
959915a8cb r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
(This used to be commit 0bcb21ed74)
2007-10-10 15:05:28 -05:00
Jelmer Vernooij
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa)
2007-10-10 15:05:26 -05:00
Jelmer Vernooij
349cc1e14b r24704: Fix bug in the registry patch code.. all the more proves this code needs tests.
(This used to be commit aa98d21957)
2007-10-10 15:02:51 -05:00
Jelmer Vernooij
b409d4120f r24667: Finally merge the registry improvements that Wilco Baan Hofman and I have
been working on for at least half a year now. Contains the following
improvements:

 * proper layering (finally!) for the registry library. Distinction is
   now made between 'real' backends (local, remote, wine, etc) and
   the low-level hive backends (regf, creg, ldb, ...) that are only used
   by the local registry backend
 * tests for all important hive and registry operations
 * re-enable RPC-WINREG tests (still needs more work though, as
							   some return values aren't checked yet)
 * write support for REGF files
 * dir backend now supports setting/reading values, creating keys
 * support for storing security descriptors
 * remove CREG backend as it was incomplete, didn't match the data model
   and wasn't used at all anyway
 * support for parsing ADM files as used by the policy editor (see lib/policy)
 * support for parsing PREG files (format used by .POL files)
 * new streaming interface for registry diffs (improves speed and memory usage
	for regdiff/regpatch significantly)

   ... and fixes a large number of bugs in the registry code
(This used to be commit 7a1eec6358)
2007-10-10 15:02:34 -05:00