Matthias Dieter Wallnöfer
ed678a2234
s4:registry library - fix up "reg_ldb_set_value"
...
The previous logic was wrong since it tried to add empty data in some cases
which always ended in an error. This problem should be fixed with the new logic.
2010-03-06 19:59:04 +01:00
Matthias Dieter Wallnöfer
f5b86cdac5
s4:registry library - make "reg_ldb_pack/unpack_value" more robust
...
This to prevent segmentation faults, wrong server inputs ecc.
2010-03-06 19:58:57 +01:00
Matthias Dieter Wallnöfer
89ab6818e1
s4:libregistry - change counters to be "unsigned"
...
Also the s4 registry library has to have "unsigned" counters like the Windows
one.
2010-03-06 17:48:25 +01:00
Matthias Dieter Wallnöfer
91bf841c2e
s4:registry/regf.c - specify the context when freeing the "regf" variable
...
Otherwise we get a "talloc_free with references" warning.
2010-02-22 22:15:03 +01:00
Brad Hards
3eacc83b35
Spelling fixes for source4/lib/registry.
...
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:37 +01:00
Matthias Dieter Wallnöfer
e34637b2a6
s4:Remove "Py_RETURN_NONE" compatibility code
...
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Andrew Tridgell
5ab6a8d077
s4-registry: fixed byte order assumptions
...
the registry tests were broken on big-endian systems
2010-02-07 18:41:59 +11:00
Wilco Baan Hofman
8067bf629c
Fix unintentional free of the last value when adding a new value to a key.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-01-20 09:59:18 +13:00
Matthias Dieter Wallnöfer
1aed373b11
s4:lib/registry/util.c - Reintroduce "FIXME"s
...
Jelmer suggested to put them in again.
2009-12-30 12:39:55 +01:00
Matthias Dieter Wallnöfer
51bedf9395
lib/registry/util.c - Reorder the registry datatypes of the conversion functions
...
This is absolutely cosmetic and makes the code easier to comprehend.
2009-11-29 14:58:41 +01:00
Matthias Dieter Wallnöfer
df1d42fc1b
Revert "s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string"
...
This reverts commit 7d400715e9af2056690c03a1a2f45c7f343fa313.
"convert_string_talloc_convenience" does always add the NULL termination. Didn't
know that. Thanks Jelmer for pointing out!
2009-11-29 14:51:50 +01:00
Matthias Dieter Wallnöfer
7d400715e9
s4:registry/util - Don't include the trailing '\0' in the internal data format but add it on the back-conversion to a string
...
As far as I know the registry library saves all data (including) strings without
the null termination. So do it also here in a similar way.
2009-11-27 21:17:59 +01:00
Wilco Baan Hofman
df3451aec0
Fix writing corrupt registries because of hardcoded version string in IDL.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:51 +01:00
Wilco Baan Hofman
5a7d48f82b
Fix writing corrupt REG_SZ to the registry.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Wilco Baan Hofman
45bb24e939
Fix trailing garbage in the hbin block.
...
This specifically fixes a problem showing extra bytes of garbage in list and
print in regshell, even though the vk.data_length has the correct size.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-11-15 19:26:50 +01:00
Andrew Bartlett
fd5174e88c
lib/util Split data_blob_hex_string() into upper and lower
...
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.
This reverts most of the callers back to upper case, as things were
before tridge's patch. The critical call in the extended DN code is
of course handled in lower case.
Andrew Bartlett
2009-11-12 16:34:01 +11:00
Andrew Tridgell
3050f83288
s4-python: we need to include Python.h first
...
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Andrew Tridgell
4ad0397d8a
s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
...
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.
The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
2009-10-23 14:52:17 +11:00
Wilco Baan Hofman
9af1c6db0f
regshell: Add support for 'cd ..' and cd relative to the root.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-26 17:05:34 +02:00
Jelmer Vernooij
169ff6efea
registry: Fix warning freeing talloc pointer with multiple parents.
2009-09-26 15:41:22 +02:00
Jelmer Vernooij
6768cfe624
DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
...
Use py_talloc_reference in DCE/RPC code, fixes
access to SAMR pipe.
2009-07-30 20:04:42 +02:00
Slava Semushin
11fa3ed9ee
source4/lib/registry/patchfile.c(reg_diff_load): fixed possible resource leak.
...
File descriptor leaks when write(2) fails and we are returning from
function.
Found by cppcheck:
[./source4/lib/registry/patchfile.c:319]: (error) Resource leak: fd
2009-07-19 16:01:12 +02:00
Matthias Dieter Wallnöfer
2627c6c0c2
Fixed some uninitialised variables
...
I tried hard to not change the program logic. Should fix bug #6439 .
2009-06-19 11:32:01 +10:00
Jelmer Vernooij
fe2b04b4bb
python: Move helper functions for using param into a separate file rather
...
than linking against the python module.
2009-06-02 18:05:40 +02:00
Jelmer Vernooij
80420745ff
Add a new non-convenience version of push_codepoint.
2009-04-23 17:50:18 +02:00
Jelmer Vernooij
94069bd274
s4: Use same function signature for convert_* as s3.
2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e
Add allow_badcharcnv argument to all conversion function, for
...
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Stefan Metzmacher
2170a810ed
s4:pyregistry: fix crash bugs introduced by e5a6eadd8214b56da34f733318a0fecaebbe5ef5
...
The registry api uses wild casts in the returned types, so we can't check
the talloc name against the type used in the public api...
metze
2009-02-06 12:13:26 +01:00
Stefan Metzmacher
e5a6eadd82
s4:pyregistry: fix compiler warnings
...
metze
2009-02-05 17:48:14 +01:00
Stefan Metzmacher
4cb9ccd841
s4:lib/registry: fix c++ warnings
...
metze
2009-02-05 17:48:10 +01:00
Stefan Metzmacher
eb012dd212
s4:auth/credentials: the python bindings don't use swig anymore
...
metze
2009-02-02 15:16:09 +01:00
Stefan Metzmacher
0c3bc60a01
s4:lib/registry: s/new/nkey
...
metze
2009-02-02 13:09:18 +01:00
Günther Deschner
9361c73c2f
winreg: fix winreg_EnumValue callers.
...
Guenther
2009-01-16 00:28:46 +01:00
Jelmer Vernooij
ba5d6e6d70
Avoid using a utility header for Python replacements included in Samba,
...
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea
s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4
2009-01-07 15:03:16 -08:00
Jelmer Vernooij
d2c70d24e1
py: Properly increase the reference counter of Py_None.
2009-01-06 04:13:57 +01:00
scudette@gmail.com
793f1cdbd9
Changed code to use proper talloc context instead of NULL to control memory leak.
2009-01-02 20:55:20 +01:00
scudette@gmail.com
cc9771d3da
Memory leak fixed due to accumulation of open reg keys.
2009-01-02 20:55:20 +01:00
scudette@gmail.com
de58ef45ac
Fixes uninitialised access as reported by valgrind.
2009-01-02 20:55:20 +01:00
Stefan Metzmacher
54c0f626f5
s4:pyregistry: use tevent_context_init()
...
metze
2009-01-02 18:16:48 +01:00
Stefan Metzmacher
183c379fe5
s4:lib/tevent: rename structs
...
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"
for s in $list; do
o=`echo $s | cut -d ':' -f1`
n=`echo $s | cut -d ':' -f2`
r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
for f in $files; do
cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
mv $f.tmp $f
done
done
metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
d58270c537
Add header for pyparam.
2008-12-22 04:38:57 +01:00
Jelmer Vernooij
2e7a6cb6bf
py: Fix initialisation of subtypes, fix segfaults.
2008-12-21 03:08:14 +01:00
Jelmer Vernooij
61a2d5c878
Use plain Python C API for registry module, rather than SWIG.
2008-12-18 16:49:33 +00:00
Jelmer Vernooij
0c0b9c738f
Start converting registry python module to plain C rather than SWIG.
2008-12-16 21:51:01 +01:00
Stefan Metzmacher
45cf68ce8f
s4:torture: fix the build with auto dependencies
...
metze
2008-11-16 16:21:25 +01:00
Jelmer Vernooij
a1cc278142
Remove use of global_loadparm during initialization of gensec.
2008-11-02 17:04:22 +01:00
Jelmer Vernooij
c9f69f1436
Fix installation of Samba 4 during merged build.
2008-10-30 23:19:51 +01:00
Jelmer Vernooij
23302413b3
Remove unused include param/param.h.
2008-10-24 16:37:56 +02:00
Jelmer Vernooij
a803525863
Regenerate SWIG files.
2008-10-24 15:30:43 +02:00