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

815 Commits

Author SHA1 Message Date
Michael Adam
18973fa109 s3:registry: adapt the comment explaining the definition of the existence of a key.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:09 +02:00
Michael Adam
a255630358 s3:registry: regdb_key_exists now checks only for the list-of-subkeys-record
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
9e2b2c1fcc s3:registry: rewrite init_registry_key_internal
This rewrites init_registry_key_internal() to correctly also create
base keys. It makes use of the existing create functions instead of
duplicating the code.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
747c67cf30 s3:registry: add regdb_create_basekey()
Function to create a base key in the registry db, i.e. one that
has no parent key.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
144c8d77d8 s3:registry: add regdb_create_subkey_internal() taking additional db context argument
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
15a50ef8f8 s3:registry: add new mode to regdb_store_subkey_list() for handing in NULL parent key
Standard behaviour is to concatenate parent and key path (parent\key).
This new mode allows for storing subkey lists for base keys using a NULL
parent argument.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
fc4d79d41a s3:registry: create the empty list of subkeys of the new key in regdb_create_subkey
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
322eaf1e9e s3:registry: refactor creation of subkey list out into regdb_store_subkey_list()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
394ca1446e s3:registry: remove redundant write of zero-lentgh subkey list record
In this case, the zero-lenght list has already been written in step #2.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
eb797bd206 s3:registry: don't update the sorted subkeys cache any more in regdb_store_keys_internal2()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
5b01a34ad7 s3:registry: don't skip base key in existence check in regdb_store_keys_internal()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:08 +02:00
Michael Adam
da2e64b63f s3:registry: don't skip base keys from existence check in regdb_create_subkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:07 +02:00
Michael Adam
6b99aa496f s3:registry: don't skip base keys from existence check in regdb_delete_subkey()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-07-04 20:02:07 +02:00
Michael Adam
1f72088633 s3:registry: when deleting the records for a key, also delete the sorted subkeys cache
This prevents orphaned empty sorted subkeys cache records from filling the database.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Michael Adam <obnox@samba.org>
2011-06-30 15:41:23 +02:00
Michael Adam
2b162db6e9 s3:registry: add helper function regdb_delete_sorted_subkeys()
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Michael Adam <obnox@samba.org>
2011-06-30 15:41:22 +02:00
Andrew Bartlett
734e1b6812 s3-param Remove 'announce version' parameter
The only users I can find of this on the internet involve confused
users, and our own documentation recommends never setting this.  Don't
confuse our users any longer.

Andrew Bartlett
2011-06-23 13:47:27 +02:00
Rusty Russell
5a7874e119 tdb_traverse/tdb_traverse_read: check returns for negative, not -1.
TDB2 returns a negative error number on failure.  This is compatible
if we always check for < 0 instead of == -1.

Also, there's no tdb_traverse_read in TDB2: we don't try to make
traverse reliable any more, so there are no write locks anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Michael Adam
241ed0a042 s3:registry/reg_parse_internal.c: add copyright information 2011-06-11 11:44:31 +02:00
Michael Adam
d901905210 s3:registry/reg_parse_internal.h: add copyright information 2011-06-11 11:44:31 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
8d4a8389bb s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()
Using the standard macro makes it easier to move code into common, as
TALLOC_MEMDUP isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
5e26e94092 s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
73b377432c s3-talloc Change TALLOC_REALLOC_ARRAY() to talloc_realloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_REALLOC_ARRAY isn't standard talloc.

Andrew Bartlett
2011-06-09 12:40:08 +02:00
Andrew Bartlett
381423b1bd libcli/security: move secdesc.c to the top level libcli/security
This code does not rely on lp_ or other source3 only functions, so can
be part of the common library.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Andrew Bartlett
da662b82b8 s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Michael Adam
26b6831164 s3:registry: add a warning debug message when the sorted subkeys is created from key_exists() 2011-05-12 11:48:30 +02:00
Michael Adam
daf5f29d49 s3:registry: recreate the sorted subkeys cache when storing keys
This is to avoid turning the next read operation into a write op.
2011-05-12 11:48:30 +02:00
Michael Adam
1a6ac6a944 s3:registry: add create_sorted_subkeys() to delete and recreate the sorted subkeys key
This is to be used from other places than the key_exists() code path.
2011-05-12 11:48:30 +02:00
Michael Adam
b1eac2daf3 s3:registry: turn create_sorted_subkeys_internal to NTSTATUS return type
(from bool)
2011-05-12 11:48:30 +02:00
Michael Adam
f5f9355ebe s3:registry: rename create_sorted_subkeys() to create_sorted_subkeys_internal() 2011-05-12 11:48:29 +02:00
Michael Adam
04f0a1cb7b s3:registry: fix a typo in a debug message 2011-05-12 11:48:29 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Jeremy Allison
10a628b6e1 Don't reuse a non-const pointer when manipulating const. 2011-05-05 10:41:40 -07:00
Volker Lendecke
b48e22347d s3: Fix Coverity ID 2047, UNUSED_VALUE
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Apr 22 10:53:24 CEST 2011 on sn-devel-104
2011-04-22 10:53:24 +02:00
Volker Lendecke
a5495e70cc s3: Make reg_backend_db.h includable by itself
(cherry picked from commit 6ba31d3bd29dd11b1b98859f4d8a65d9be7dac60)
2011-04-11 21:22:44 +02:00
Günther Deschner
5fcb4d328c rep_parse_prs: remove some dead, unused code.
Guenther
2011-03-31 00:14:01 +02:00
Günther Deschner
c2d6260f10 s3: only include lib/privileges.h where needed.
This finally removes the global lsa.h inclusion.

Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0a250f4946 registry: create and use shared libcli/registry/util_reg.h header.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
49ccae1c20 s3-includes: no point in including all security headers globally.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Günther Deschner
310d268527 s3-includes: only include system/iconv.h when needed.
Guenther
2011-03-30 01:13:06 +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
Günther Deschner
fa8471a616 s3-registry: remove some unused headers.
Guenther
2011-03-18 13:22:07 +01:00
Michael Adam
aa8c9ef138 s3:registry: fix invalid write in iconvert_talloc()
For a non-preallocated dest-string and sourcestring of len < 2,
(one or both of the) final two two zero-bytes would be written
after the end of the allocated dest-string. The sourcelen did
not include the source string terminator. For longer strings,
this was not a problem because the dest-string would have been
reallocated in the convert-loop. This is fixed now by allocating
two extra bytes for the terminating 0-bytes that are needed anyways
in the initial allocation.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
2011-03-05 01:31:33 +01:00
Volker Lendecke
4b354e67fc s3-amend: Don't overwrite existing values
This saves a ton of tdb transactions on smbd startup

Andreas, Günther, please check!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Feb 15 19:11:25 CET 2011 on sn-devel-104
2011-02-15 19:11:25 +01:00
Andreas Schneider
a3ee831f2d s3-perfcount: Create the directory on tdb open.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:02 +01:00
Andreas Schneider
b2ddfc642d s3-smbd: Init the svcctl registry keys on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
1adbbeef32 s3-registry: Remove obsolete reg_eventlog.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:01 +01:00
Andreas Schneider
a3a38fdb55 s3-smbd: Init the eventlog registry on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:00 +01:00
Andreas Schneider
34e8a50e5a s3-util: Moved eventlog_add_source to admin util.
This function is only used in the admin util.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-02-07 12:32:00 +01:00
Günther Deschner
50be0b2c1e s3: Remove superfluous ;
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 15:44:21 CET 2011 on sn-devel-104
2011-02-02 15:44:21 +01:00
Michael Adam
b1f800a0d1 s3:registry: in deletekey_recursive, fix return code upon error.
correctly keep the werr from inside the transaction when the opearation
inside the transaction fails.

What is the correct behaviour if the cancel operation fails?
2011-01-30 14:09:04 +01:00
Michael Adam
14502c5458 s3:registry: fix comments in regdb_store_regdb_version() 2011-01-27 21:43:48 +01:00
Christian Ambach
d49d203279 s3:registry correct a debug level
this is not a level 0 message, move it to 10
2011-01-21 10:10:03 +01:00
Michael Adam
d91189727a s3:registry: improve debug messages about regdb refcount changes
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  7 15:18:03 CET 2010 on sn-devel-104
2010-12-07 15:18:03 +01:00
Volker Lendecke
4b2e2f94bb s3: Streamline regdb_normalize_keynames_fn a bit
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 28 14:32:11 UTC 2010 on sn-devel-104
2010-10-28 14:32:11 +00:00
Volker Lendecke
8b87603de4 s3: Fix the registry upgrade code
The strings have the 0-terminator as part of the keys. The rest of the registry
code would not cope well without.
2010-10-28 15:50:14 +02:00
Sven Neumann
0bc94c21e5 Fix bug 7754 - samba uses index(), marked as legacy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 27 19:25:16 UTC 2010 on sn-devel-104
2010-10-27 19:25:16 +00:00
Jeremy Allison
272feb7bd1 Revert "Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed"
Not needed - privileges code prevents "enable privileges = no" from adding privileges
anyway.

This reverts commit a8b95686a7.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 23:41:36 UTC 2010 on sn-devel-104
2010-10-22 23:41:36 +00:00
Jeremy Allison
a8b95686a7 Wrap security_token_has_privilege() with a check for lp_enable_privileges(). Needed
to maintain compatibility with smb.conf manpage.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 22 18:15:48 UTC 2010 on sn-devel-104
2010-10-22 18:15:48 +00:00
Michael Adam
cda2db5edf s3:registry: fix some trailing spaces in reg_backend_db
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 12 14:15:42 UTC 2010 on sn-devel-104
2010-10-12 14:15:42 +00:00
Andrew Bartlett
f768b32e37 libcli/security Provide a common, top level libcli/security/security.h
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.

This includes (along with other security headers) dom_sid.h and
security_token.h

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Günther Deschner
caeb819861 s3-reg_parse: fix uninitialized variable in srprs_key().
Guenther
2010-10-05 13:09:05 +00:00
Gregor Beck
f4f5ad9774 s3:registry: proposed aix build fix for reg_parse_internal
Signed-off-by: Michael Adam <obnox@samba.org>
2010-09-27 11:36:49 +02:00
Volker Lendecke
a0d3ffbf92 s3: Fix some 64-bit warnings 2010-09-25 15:01:29 -07:00
Volker Lendecke
e81db37a87 s3: Fix bug 7470
S_IREAD and S_IWRITE are not standard.

Thanks to Joachim Schmitz <schmitz@hp.com> for reporting!
2010-09-25 10:59:15 -07:00
Michael Adam
c3f5d99065 s3:registry: try to fix the build of reg_parse_internal on HP-UX
The HP compiler does not seem to like {} for char[4].
2010-09-23 18:49:30 +02:00
Günther Deschner
fe4576dff0 s3-registry: fix some c++ build warnings.
Guenther
2010-09-22 12:57:34 -07:00
Michael Adam
7a25d13742 s3:registry: remove unneeded TALLOC_CTX argument from reg_deletekey_recursive 2010-09-22 06:30:01 +02:00
Gregor Beck
47313afe97 s3-registry: handle registration entries (.reg) files
Signed-off-by: Michael Adam <obnox@samba.org>
2010-09-22 06:30:00 +02:00
Michael Adam
2d67730daf s3:registry: move regio.h from include/ to registry/ 2010-09-21 09:08:33 +02:00
Michael Adam
4f7d41aa3d s3:registry: move the reg_db.h from include/ to registry/ 2010-09-21 08:53:49 +02:00
Michael Adam
a35daebaf1 s3:registry: move prototype from reg_init_smbconf.c to its own header. 2010-09-21 08:52:06 +02:00
Michael Adam
d25b2adf34 s3:registry: move prototype from reg_init_full.c to its own header. 2010-09-21 08:52:06 +02:00
Michael Adam
0bd2756b97 s3:registry: move prototypes from reg_init_basic.c to their own header. 2010-09-21 08:52:06 +02:00
Michael Adam
4696cd6cbe s3:registry: move reg_api_regf prototypes to their own header file.
These two calls are currently only used in the WINREG rpc server.
And this reqires linking in the regfio code.
2010-09-21 08:52:06 +02:00
Michael Adam
b11cc30508 s3:registry: move the reg_api prototypes to their own header. 2010-09-21 08:52:06 +02:00
Michael Adam
e4eda5f9bc s3:registry:reg_api: update (C) 2010-09-21 08:52:05 +02:00
Michael Adam
08cf13a3df s3:registry: remove now (finally) obsolete reg_util_registry.{c,h} 2010-09-21 06:53:33 +02:00
Michael Adam
2c9cb11f53 s3:registry: move prototypes of unused hilvl functions to ret_api_util.h and comment them out 2010-09-20 19:58:01 +02:00
Michael Adam
8eb487caba s3:registry: move (commented out) hilvl util functions to reg_api_util.c 2010-09-20 19:58:01 +02:00
Michael Adam
0f7e503d21 s3:registry: move higher level function reg_open_path to new module reg_api_util
The reg_api.c code should just export functions that direclty relate to winreg
api calls.
2010-09-20 19:58:01 +02:00
Günther Deschner
91e8f8ded2 s3-registry: move regf based reg_api calls into own file.
Guenther
2010-09-20 02:27:41 +02:00
Günther Deschner
323f729df0 s3-registry: add reg_querymultiplevalues to reg_api matching table.
Guenther
2010-09-20 02:27:41 +02:00
Andrew Bartlett
3bb77516b8 s3-privs Convert from user_has_privileges() -> security_token_has_privilege()
This new call is available in the merged privileges code, and
takes an enum as the parameter, rather than a bitmask.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
2387e3bcfe s3-privs Call security_token_set_privilege() rather than manual assignment
This avoids as much direct modifiction of the bitmask as possible.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:09 +10:00
Andrew Bartlett
d1bb21b0d5 s3:auth Remove NT_USER_TOKEN
The all UPPER case typedef is no longer the preferred Samba style
and this makes it easier to see that this is the IDL-derivied structure

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:06 +10:00
Andrew Bartlett
4bfc8d3b1a s3-auth Change struct nt_user_token -> struct security_token
This common structure is defined in security.idl

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-09-11 18:46:05 +10:00
Andrew Bartlett
eee63b7e75 s3-auth Rename NT_USER_TOKEN privileges -> privilege_mask
This is closer to the struct security_token from security.idl

Andrew Bartlett
2010-08-31 11:25:41 +10:00
Andrew Bartlett
8c15cf54ae s3-auth Rename NT_USER_TOKEN user_sids -> sids
This is closer to the struct security_token from security.idl
2010-08-31 10:20:14 +10:00
Günther Deschner
7a05ca2c9c s3-build: use dbwrap.h only where needed.
Guenther
2010-08-26 00:25:55 +02:00
Günther Deschner
7b6fc9f414 s3-dcerpc: only include rpc_dce.h where needed.
Guenther
2010-08-26 00:20:29 +02:00
Günther Deschner
813fbbd68c s3-build: avoid to globally include printing and spoolss headers.
This shrinks precompiled headers by 3MB and will slightly speed up any build.

Guenther
2010-07-31 00:50:31 +02:00
Andreas Schneider
96c25cdad5 s3-spoolss: Create winprint print processor key.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:14 -04:00
Andreas Schneider
71be0ec140 s3-registry: Redirect KEY_CONTROL_PRINTERS to KEY_WINNT_PRINTERS.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Andreas Schneider
65eb38bc00 s3-registry: Init all needed registry keys for printing.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:06 -04:00
Günther Deschner
914fd13edd s3-registry: use some prs macros to the only place where they are used.
Guenther
2010-07-16 02:20:34 +02:00
Simo Sorce
f4c6c7e7b8 Move the remnants of rpc_parse code under registry/
The registry code is the only last user of this code.
Move everything under registry/ and hope someone will get rid od
it completely from there in the future.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Simo Sorce
67b6fe3dc3 s3-misc: Move smb_io_time() to regfio.c
This is the last file using this function and we do not want anyone
else to keep using hand marshalled stuff anyway.
So make it also private to that file.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-07-16 01:51:18 +02:00
Günther Deschner
d9429a874c s3-registry: remove 2 byte winreg type limitation.
We already pull and push 4 byte winreg type in the registry.tdb, we were just
not using full 4 bytes within the reg_object functions.

With this change we finally pass the set extended value torture test.

Guenther
2010-07-02 10:50:22 +02:00
Günther Deschner
ddb8fae401 s3-registry: allow to read NULL entries (that we allow to store) back from the tdb.
Guenther
2010-07-02 10:50:21 +02:00
Günther Deschner
786198e523 s3-registry: remove unused reg_util_marshalling code.
Guenther
2010-07-02 10:50:21 +02:00
Günther Deschner
b381fba089 s3-registry: avoid using registry_value union.
Just pull and push data as is.

Guenther
2010-07-02 10:50:21 +02:00
Günther Deschner
74721bf706 s3-registry: fix malloc/talloc mismatch upon free in reg_enumvalue().
Guenther
2010-07-01 01:22:11 +02:00
Günther Deschner
21869f5ed0 s3-registry: add reg_querymultiplevalues() to reg_api.
Guenther
2010-06-30 21:46:08 +02:00
Günther Deschner
158504381e s3-registry: missed one perflib keyname delimiter.
Guenther
2010-06-28 14:18:04 +02:00
Günther Deschner
658048ecbc s3-registry: fix printing keyname delimiter.
Guenther
2010-06-28 13:16:31 +02:00
Günther Deschner
3d24040ac6 s3-registry: fix perfmon keyname delimiter.
Guenther
2010-06-28 13:16:31 +02:00
Andreas Schneider
378cd5dc38 s3-registry: Fixed keyname delimiter in KEY_CURRENT_VERSION_NORM. 2010-06-28 12:56:13 +02:00
Michael Adam
6d973607c3 s3:registry: use regdb_store_regdb_version() in regdb_init(). 2010-06-25 18:13:06 +02:00
Michael Adam
2f44dcc96b s3:registry: use regdb_store_regdb_version() in regdb_upgrade_v1_to_v2() 2010-06-25 18:12:28 +02:00
Michael Adam
5641ee02fd s3:registry: add a function regdb_store_regdb_version() 2010-06-25 18:11:35 +02:00
Michael Adam
a9bec6b779 s3:registry: rename regdb_upgrade_to_version_2() -> regdb_upgrade_v1_to_v2() 2010-06-25 18:04:52 +02:00
Michael Adam
8e4f812823 s3:registry: improve logic of upgrade code in regdb_init()
Don't overwrite unknown versions (0 or > 2) of the registry.
2010-06-25 17:35:42 +02:00
Michael Adam
3703b79b11 s3:registry: fix some debug messages in regdb_ini() 2010-06-25 17:35:42 +02:00
Andreas Schneider
15bacaf3c5 s3-registry: Convert registry key delimiter from slash to backslash.
This is needed to support keynames containing a '/' like TCP/IP. Which
is used in serveral standard paths.

Signed-off-by: Michael Adam <obnox@samba.org>
2010-06-25 17:35:41 +02:00
Andreas Schneider
f540833632 s3-registry: Added a db upgrade function to normalize the key delimiter.
This converts the key delimiter from a slash to a blackslash. We need to
support keynames with a backslash.

Signed-off-by: Michael Adam <obnox@samba.org>
2010-06-25 17:35:41 +02:00
Michael Adam
2a0340baa3 s3:registry: remove unused function normalize_dbkey() 2010-06-24 15:36:21 +02:00
Michael Adam
5cac4e648c s3:registry: use normalize_reg_path() in regdb_set_secdesc()
instead of normalize_dbkey
2010-06-24 15:36:20 +02:00
Michael Adam
4c948251d9 s3:registry: use normalize_reg_path() in regdb_get_secdesc()
instead of normalize_dbkey.
2010-06-24 15:36:20 +02:00
Günther Deschner
84a8f0451d s3-build: only include generated spoolss headers (not ndr headers).
Guenther
2010-06-03 11:00:27 +02:00
Günther Deschner
f9f8007361 s3-build: only use ndr_security.h where needed.
Guenther
2010-05-31 11:32:37 +02:00
Michael Adam
af2cbaa700 s3:registry: add C for substantial changes to reg_objects 2010-05-25 10:53:17 +02:00
Michael Adam
80293b8067 s3:registry:reg_objects: Remove use of uint{8,16,32} in favour of C99 types 2010-05-25 10:35:32 +02:00
Michael Adam
0fe1ff99a1 s3:registry: move reg_objects.h to registry/ and use it only where needed
Every place outside of registry/ where this is used, should probably
be changed to use pure reg_api.c code.
2010-05-25 10:35:31 +02:00
Michael Adam
75e691ae6b s3:registry: hide definition of regval_ctr and regval_blob in reg_objects.c 2010-05-25 10:35:31 +02:00
Michael Adam
5fbf935ffc s3:registry: use regval_ctr/blob accessor functoin in reg_eventlog.c 2010-05-25 10:35:29 +02:00
Michael Adam
a71dac4882 s3:registry: user regval_ctr/blob accessor functions in reg_backend_db.c 2010-05-25 10:35:28 +02:00
Michael Adam
0d20053f10 s3:registry: use regval_ctr/blob accessor functions in reg_api.c 2010-05-25 10:35:28 +02:00
Michael Adam
987514d98d s3:registry:reg_objects: add regval_ctr_set_seqnum() 2010-05-25 10:35:28 +02:00
Michael Adam
6b331321e3 s3:registry:reg_objects: add regval_ctr_get_seqnum() 2010-05-25 10:35:28 +02:00
Michael Adam
e0d5bccfd3 s3:registry:reg_objects: add regval_ctr_init() 2010-05-25 10:35:28 +02:00
Michael Adam
97846edfa5 s3:registry: move definition of registry_hook to reg_init_full.c - it's only user 2010-05-25 10:35:27 +02:00
Michael Adam
e829b42978 s3:registry: extract registry_pull/push_value prototypes into own header
reg_util_marshalling.h and use them only where needed.
2010-05-25 10:35:27 +02:00
Michael Adam
36b74e03cf s3:registry: rename lib/util_reg_api.c to registry/reg_util_marshalling.c 2010-05-25 10:35:27 +02:00
Michael Adam
773255ba50 s3:registry: rename reg_util.{c,h} to reg_util_internal.{c,h} 2010-05-25 10:35:27 +02:00
Michael Adam
f3053739b7 s3:registry: move prototype registry_create_admin_token() to new header reg_util_token.h
and use it only where necessary.
2010-05-25 10:35:26 +02:00
Michael Adam
e3f7fab668 s3:registry: move registry_create_admin_token() to new reg_util_token.c 2010-05-25 10:35:26 +02:00
Michael Adam
847a19df94 s3:registry: extract reg_eventlog prototypes to header of their own
and use them only where needed.
2010-05-25 10:35:26 +02:00
Michael Adam
5a92d88f38 s3:registry: extract reg_perfcount prototypes into header of their own.
And use them only when necessary.
2010-05-25 10:35:26 +02:00
Michael Adam
b94267aa3f s3:registry: extraxt the reg_dispatcher prototypes into their own header.
And use them only where needed.
2010-05-25 10:35:26 +02:00
Michael Adam
d335f292ce s3:registry: extract the reg_backend_db prototypes into their own header.
And use them only where needed.
2010-05-25 10:35:25 +02:00
Michael Adam
9ccf66379a s3:registry: adapt callers of regval_ctr_addvalue to uint8 * instead of char * 2010-05-25 10:35:25 +02:00