The branch, master has been updated
via 7e9acf0 selftest: mark samba4.drs.delete_object.python knownfail
via 89b76b5 s3:smbcacls: fix violation of coding conventions
via 491afa3 s3:net: avoid unnecessary initialization of the registry.
via 83748ae s3:doc manpage for "net registry check"
via 502f0b8 s3:net: add command registry check
via e430c75 s3:net: factor out interact_edit()
via 6b28a51 s3:registry add function srprs_hive()
via 85b145d s3:utils change data_blob_dup_talloc() to take a DATA_BLOB
by value
via 6648d90 s3:smbcontrol: let smbd pass the idmap msg to its children
for convenience
via da85f5a s3: factor out messaging_send_to_children()
via 3ff8733 s3: fix id_cache_kill to delete the the id-mappig from
caches
via b8eec18 s3:smbcacls: make get_domain_sid() static
via 5464999 s3:dbwrap_ctdb: improve the check for skipping the
__db_sequence_number__ record in traverse
via 8a3aa56 s3:dbwrap_ctdb: fix check for skipping the
__db_sequence_number__ in traverse
from c6481f4 samba.upgrade: Use list comprehension.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7e9acf06c5b4c8f77f092f35483b02eb9952b97e
Author: Michael Adam <[email protected]>
Date: Wed Oct 12 22:11:26 2011 +0200
selftest: mark samba4.drs.delete_object.python knownfail
this currently prevents autobuild from succeeding intermittently
Autobuild-User: Michael Adam <[email protected]>
Autobuild-Date: Thu Oct 13 00:22:18 CEST 2011 on sn-devel-104
commit 89b76b5611cfc29fff348ca946a4d94b727ea0af
Author: Gregor Beck <[email protected]>
Date: Wed Oct 12 14:34:45 2011 +0200
s3:smbcacls: fix violation of coding conventions
Signed-off-by: Michael Adam <[email protected]>
commit 491afa3a4c0536bd797ab5a1cd1f8c82183122ce
Author: Gregor Beck <[email protected]>
Date: Mon Sep 26 13:42:15 2011 +0200
s3:net: avoid unnecessary initialization of the registry.
This allows for using help without having access to the registry and
prevents update code to run if only a readonly check is to be performed.
Signed-off-by: Michael Adam <[email protected]>
commit 83748ae49c3d04bd087cbc75bf00e01bca670008
Author: Gregor Beck <[email protected]>
Date: Thu Aug 25 16:26:25 2011 +0200
s3:doc manpage for "net registry check"
Signed-off-by: Michael Adam <[email protected]>
commit 502f0b8edcd339a9e47ad1c515303ccd6c164494
Author: Gregor Beck <[email protected]>
Date: Thu Jun 30 12:08:16 2011 +0200
s3:net: add command registry check
Signed-off-by: Michael Adam <[email protected]>
commit e430c75d4c275323f5a3ac894647f8ebf2a58a7a
Author: Gregor Beck <[email protected]>
Date: Thu Aug 18 14:13:28 2011 +0200
s3:net: factor out interact_edit()
Signed-off-by: Michael Adam <[email protected]>
commit 6b28a517e3a7d128ae6018dbbe6545d4f33cfdb7
Author: Gregor Beck <[email protected]>
Date: Tue Jul 12 13:04:37 2011 +0200
s3:registry add function srprs_hive()
Signed-off-by: Michael Adam <[email protected]>
commit 85b145d7450fc9d9e9c93b0300c899dd94e2e861
Author: Gregor Beck <[email protected]>
Date: Thu Jul 7 14:50:47 2011 +0200
s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
Signed-off-by: Michael Adam <[email protected]>
commit 6648d906525cf27228145c8723e3dbef67dd77bd
Author: Gregor Beck <[email protected]>
Date: Thu Oct 6 15:26:32 2011 +0200
s3:smbcontrol: let smbd pass the idmap msg to its children for convenience
Signed-off-by: Michael Adam <[email protected]>
commit da85f5a43ea427ce49f9eb5abc1aef3c3491b059
Author: Gregor Beck <[email protected]>
Date: Thu Oct 6 14:38:20 2011 +0200
s3: factor out messaging_send_to_children()
Signed-off-by: Michael Adam <[email protected]>
commit 3ff8733792ad9723fdd83532f6d882c073803056
Author: Gregor Beck <[email protected]>
Date: Thu Oct 6 13:49:02 2011 +0200
s3: fix id_cache_kill to delete the the id-mappig from caches
The intendet and documented behavior of smbcontrol smbd idmap kill is to
delete the mapping from caches and additionally kill the smbd if an
affected id
is in use.
Signed-off-by: Michael Adam <[email protected]>
commit b8eec18e3908a886bfaa4f2f5b56e445e1ba6ebb
Author: Michael Adam <[email protected]>
Date: Wed Oct 12 13:02:31 2011 +0200
s3:smbcacls: make get_domain_sid() static
commit 54649993b2ef3065738d572be3ca10a76cb06412
Author: Michael Adam <[email protected]>
Date: Wed Oct 12 12:04:50 2011 +0200
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__
record in traverse
It did not compare the last charcter (usually '\0')
commit 8a3aa56202758dac195a8d3bee446269863221ab
Author: Michael Adam <[email protected]>
Date: Wed Oct 12 12:03:42 2011 +0200
s3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in
traverse
Brown paperbag. This omitted the "== 0" hand hence skipped all keys of the
same length as __db_sequence_number__ but different from it...
-----------------------------------------------------------------------
Summary of changes:
docs-xml/manpages-3/net.8.xml | 73 ++
lib/util/data_blob.h | 2 +-
source3/Makefile.in | 5 +-
source3/include/messages.h | 1 +
source3/lib/dbwrap/dbwrap_ctdb.c | 5 +-
source3/lib/id_cache.c | 28 +-
source3/lib/id_cache.h | 14 +
source3/libsmb/cliconnect.c | 2 +-
source3/registry/reg_format.c | 2 +-
source3/registry/reg_parse_internal.c | 110 ++-
source3/registry/reg_parse_internal.h | 17 +-
source3/rpc_client/cli_pipe.c | 2 +-
source3/smbd/msg_idmap.c | 36 +-
source3/smbd/proto.h | 4 +-
source3/smbd/server.c | 28 +-
source3/utils/interact.c | 126 ++
source3/utils/{net_idmap_check.h => interact.h} | 32 +-
source3/utils/net.c | 4 +
source3/utils/net.h | 3 +
source3/utils/net_idmap_check.c | 94 +--
source3/utils/net_registry.c | 66 +-
source3/utils/net_registry_check.c | 1314 ++++++++++++++++++++
.../{net_idmap_check.h => net_registry_check.h} | 16 +-
source3/utils/smbcacls.c | 3 +-
source3/wscript_build | 2 +
source4/dsdb/samdb/ldb_modules/operational.c | 2 +-
source4/dsdb/schema/schema_prefixmap.c | 4 +-
source4/dsdb/schema/schema_syntax.c | 4 +-
source4/selftest/knownfail | 1 +
29 files changed, 1798 insertions(+), 202 deletions(-)
create mode 100644 source3/utils/interact.c
copy source3/utils/{net_idmap_check.h => interact.h} (61%)
create mode 100644 source3/utils/net_registry_check.c
copy source3/utils/{net_idmap_check.h => net_registry_check.h} (76%)
Changeset truncated at 500 lines:
diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 754fd43..355e3f7 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1871,6 +1871,8 @@ string.</member>
</member>
<member>net registry convert - Convert a registration entries (.reg) file.
</member>
+<member>net registry check - Check and reapair a registry database.
+</member>
</simplelist>
</para>
@@ -2011,6 +2013,77 @@ string.</member>
</para>
</refsect3>
+<refsect3>
+ <title>REGISTRY CHECK [-ravTl] [-o <ODB>] [--wipe] [<DB>]</title>
+ <para>Check and repair the registry database. If no option is given a read
only check of the database is done. Among others an interactive or automatic
repair mode may be chosen with one of the following options
+
+ <variablelist>
+ <varlistentry><term>-r|--repair</term>
+ <listitem><para>
+ Interactive repair mode, ask a lot of questions.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>-a|--auto</term>
+ <listitem><para>
+ Noninteractive repair mode, use default answers.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>-v|--verbose</term>
+ <listitem><para>
+ Produce more output.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>-T|--test</term>
+ <listitem><para>
+ Dry run, show what changes would be made but don't touch anything.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>-l|--lock</term>
+ <listitem><para>
+ Lock the database while doing the check.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>--reg-version={1,2,3}</term>
+ <listitem><para>
+ Specify the format of the registry database. If not given it defaults to
+ the value of the binary or, if an registry.tdb is explizitly stated at
+ the commandline, to the value found in the INFO/version record.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>[--db] <DB></term>
+ <listitem><para>
+ Check the specified database.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>-o|--output <ODB></term>
+ <listitem><para>
+ Create a new registry database <ODB> instead of modifying the
+ input. If <ODB> is already existing --wipe may be used to
+ overwrite it.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>--wipe</term>
+ <listitem><para>
+ Replace the registry database instead of modifying the input or
+ overwrite an existing output database.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term></term>
+ <listitem><para>
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+</refsect3>
</refsect2>
diff --git a/lib/util/data_blob.h b/lib/util/data_blob.h
index 558ade9..09a9292 100644
--- a/lib/util/data_blob.h
+++ b/lib/util/data_blob.h
@@ -50,7 +50,7 @@ struct data_blob_list_item {
#define data_blob(ptr, size) data_blob_named(ptr, size, "DATA_BLOB:
"__location__)
#define data_blob_talloc(ctx, ptr, size) data_blob_talloc_named(ctx, ptr,
size, "DATA_BLOB: "__location__)
-#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx,
(blob)->data, (blob)->length, "DATA_BLOB: "__location__)
+#define data_blob_dup_talloc(ctx, blob) data_blob_talloc_named(ctx,
(blob).data, (blob).length, "DATA_BLOB: "__location__)
/**
construct a data blob, must be freed with data_blob_free()
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 24567e2..27c3393 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1187,14 +1187,15 @@ LIBNET_SAMSYNC_OBJ = libnet/libnet_samsync.o \
NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
- utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o
utils/net_idmap_check.o\
+ utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
+ utils/net_idmap_check.o utils/interact.o \
utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
utils/net_rpc_service.o utils/net_rpc_registry.o
utils/net_usershare.o \
utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
$(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
utils/net_conf.o utils/net_join.o utils/net_user.o \
- utils/net_group.o utils/net_file.o utils/net_registry.o \
+ utils/net_group.o utils/net_file.o utils/net_registry.o
utils/net_registry_check.o\
auth/token_util.o utils/net_dom.o utils/net_share.o \
utils/net_g_lock.o \
utils/net_serverid.o \
diff --git a/source3/include/messages.h b/source3/include/messages.h
index 5ea27f3..083cd56 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -133,6 +133,7 @@ void messaging_deregister(struct messaging_context *ctx,
uint32_t msg_type,
NTSTATUS messaging_send(struct messaging_context *msg_ctx,
struct server_id server,
uint32_t msg_type, const DATA_BLOB *data);
+
NTSTATUS messaging_send_buf(struct messaging_context *msg_ctx,
struct server_id server, uint32_t msg_type,
const uint8 *buf, size_t len);
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index ca43dc1..4c5cd64 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1249,7 +1249,7 @@ static int traverse_persistent_callback(TDB_CONTEXT *tdb,
TDB_DATA kbuf, TDB_DAT
* This is used for persistent transactions internally.
*/
if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 &&
- strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY))
+ strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0)
{
goto done;
}
@@ -1361,8 +1361,7 @@ static int traverse_persistent_callback_read(TDB_CONTEXT
*tdb, TDB_DATA kbuf, TD
* This is used for persistent transactions internally.
*/
if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 &&
- strncmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY,
- strlen(CTDB_DB_SEQNUM_KEY)) == 0)
+ strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0)
{
return 0;
}
diff --git a/source3/lib/id_cache.c b/source3/lib/id_cache.c
index 71693c1..23dcce1 100644
--- a/source3/lib/id_cache.c
+++ b/source3/lib/id_cache.c
@@ -138,7 +138,7 @@ static void flush_uid_cache(void)
memcache_flush(NULL, SID_UID_CACHE);
memcache_flush(NULL, UID_SID_CACHE);
}
-static void delete_from_cache(const struct id_cache_ref* id)
+void id_cache_delete_from_cache(const struct id_cache_ref* id)
{
switch(id->type) {
case UID:
@@ -161,11 +161,11 @@ static void delete_from_cache(const struct id_cache_ref*
id)
}
-static void id_cache_flush(struct messaging_context *msg_ctx,
- void* private_data,
- uint32_t msg_type,
- struct server_id server_id,
- DATA_BLOB* data)
+void id_cache_flush_message(struct messaging_context *msg_ctx,
+ void* private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data)
{
const char *msg = data ? (const char *)data->data : NULL;
@@ -181,11 +181,11 @@ static void id_cache_flush(struct messaging_context
*msg_ctx,
}
}
-static void id_cache_delete(struct messaging_context *msg_ctx,
- void *private_data,
- uint32_t msg_type,
- struct server_id server_id,
- DATA_BLOB* data)
+void id_cache_delete_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data)
{
const char *msg = (data && data->data) ? (const char *)data->data :
"<NULL>";
struct id_cache_ref id;
@@ -195,11 +195,11 @@ static void id_cache_delete(struct messaging_context
*msg_ctx,
return;
}
- delete_from_cache(&id);
+ id_cache_delete_from_cache(&id);
}
void id_cache_register_msgs(struct messaging_context *ctx)
{
- messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush);
- messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete);
+ messaging_register(ctx, NULL, ID_CACHE_FLUSH, id_cache_flush_message);
+ messaging_register(ctx, NULL, ID_CACHE_DELETE, id_cache_delete_message);
}
diff --git a/source3/lib/id_cache.h b/source3/lib/id_cache.h
index 208ce60..53731b5 100644
--- a/source3/lib/id_cache.h
+++ b/source3/lib/id_cache.h
@@ -29,4 +29,18 @@ struct id_cache_ref {
bool id_cache_ref_parse(const char* str, struct id_cache_ref* id);
+void id_cache_delete_from_cache(const struct id_cache_ref* id);
+
void id_cache_register_msgs(struct messaging_context *ctx);
+
+void id_cache_delete_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data);
+
+void id_cache_flush_message(struct messaging_context *msg_ctx,
+ void* private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB* data);
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 92c9014..bba7b03 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2707,7 +2707,7 @@ static void cli_negprot_done(struct tevent_req *subreq)
GUID_from_data_blob(&blob1, &server_guid);
blob1 = data_blob_const(bytes+16, num_bytes-16);
- blob2 = data_blob_dup_talloc(state, &blob1);
+ blob2 = data_blob_dup_talloc(state, blob1);
if (blob1.length > 0 &&
tevent_req_nomem(blob2.data, req)) {
return;
diff --git a/source3/registry/reg_format.c b/source3/registry/reg_format.c
index db03961..06518e3 100644
--- a/source3/registry/reg_format.c
+++ b/source3/registry/reg_format.c
@@ -93,7 +93,7 @@ static int
cbuf_print_hive(cbuf* ost, const char* hive, int len, const struct fmt_key*
fmt)
{
if (fmt->hive_fmt != FMT_HIVE_PRESERVE) {
- const struct hive_info* hinfo = hive_info(hive, len);
+ const struct hive_info* hinfo = hive_info(hive);
if (hinfo == NULL) {
DEBUG(0, ("Unknown hive %*s", len, hive));
} else {
diff --git a/source3/registry/reg_parse_internal.c
b/source3/registry/reg_parse_internal.c
index 2088448..26f4ffe 100644
--- a/source3/registry/reg_parse_internal.c
+++ b/source3/registry/reg_parse_internal.c
@@ -114,13 +114,13 @@ convert:
#define HKEY_PERFORMANCE_NLSTEXT 0x80000060
#endif
-#define HIVE_INFO_ENTRY(SHORT,LONG) \
-static const struct hive_info HIVE_INFO_##SHORT = { \
- .handle = LONG, \
- .short_name = #SHORT, \
- .short_name_len = sizeof(#SHORT)-1, \
- .long_name = #LONG, \
- .long_name_len = sizeof(#LONG)-1, \
+#define HIVE_INFO_ENTRY(SHORT,LONG) \
+const struct hive_info HIVE_INFO_##SHORT = { \
+ .handle = LONG, \
+ .short_name = #SHORT, \
+ .short_name_len = sizeof(#SHORT)-1, \
+ .long_name = #LONG, \
+ .long_name_len = sizeof(#LONG)-1, \
}
HIVE_INFO_ENTRY(HKLM, HKEY_LOCAL_MACHINE);
@@ -134,49 +134,85 @@ HIVE_INFO_ENTRY(HKPT, HKEY_PERFORMANCE_TEXT);
HIVE_INFO_ENTRY(HKPN, HKEY_PERFORMANCE_NLSTEXT);
#undef HIVE_INFO_ENTRY
-static const struct hive_info* HIVE_INFO[] = {
+const struct hive_info* HIVE_INFO[] = {
&HIVE_INFO_HKLM, &HIVE_INFO_HKCU, &HIVE_INFO_HKCR, &HIVE_INFO_HKU,
&HIVE_INFO_HKCC, &HIVE_INFO_HKDD, &HIVE_INFO_HKPD, &HIVE_INFO_HKPT,
&HIVE_INFO_HKPN, NULL
};
-const struct hive_info* hive_info(const char* name, int nlen)
-{
- const struct hive_info** info;
- char buf[32];
- int s;
+#define TOINT(A,B) ((int)(A) << 8) + (int)(B)
- if (nlen >= sizeof(buf)) {
- return NULL;
- }
- for (s=0; s<nlen; s++) {
- buf[s] = toupper(name[s]);
- }
- buf[s] = '\0';
+bool srprs_hive(const char** ptr, const struct hive_info** result)
+{
+ const char* str = *ptr;
+ const struct hive_info* info = NULL;
+ bool long_hive = false;
- if ((s < 3) || (strncmp(buf, "HK", 2) != 0)) {
- return NULL;
+ if ((toupper(str[0]) != 'H') || (toupper(str[1]) != 'K')
+ || (str[2] == '\0') )
+ {
+ return false;
}
- if (s <= 4) {
- for(info = HIVE_INFO; *info; info++) {
- if (strcmp(buf+2, (*info)->short_name+2) == 0) {
- return *info;
+ switch ( TOINT(toupper(str[2]), toupper(str[3])) ) {
+ case TOINT('E', 'Y'):
+ if (str[4] == '_') {
+ int i;
+ for (i=0; (info = HIVE_INFO[i]); i++) {
+ if (strncmp(&str[5], &info->long_name[5],
+ info->long_name_len-5) == 0)
+ {
+ long_hive = true;
+ break;
+ }
}
}
- return NULL;
- }
-
- if ((s < 10) || (strncmp(buf, "HKEY_", 5)) != 0) {
- return NULL;
+ break;
+ case TOINT('L', 'M'):
+ info = &HIVE_INFO_HKLM;
+ break;
+ case TOINT('C', 'U'):
+ info = &HIVE_INFO_HKCU;
+ break;
+ case TOINT('C', 'R'):
+ info = &HIVE_INFO_HKCR;
+ break;
+ case TOINT('C', 'C'):
+ info = &HIVE_INFO_HKCC;
+ break;
+ case TOINT('D', 'D'):
+ info = &HIVE_INFO_HKDD;
+ break;
+ case TOINT('P', 'D'):
+ info = &HIVE_INFO_HKPD;
+ break;
+ case TOINT('P', 'T'):
+ info = &HIVE_INFO_HKPT;
+ break;
+ case TOINT('P', 'N'):
+ info = &HIVE_INFO_HKPN;
+ break;
+ default:
+ if (toupper(str[2]) == 'U') {
+ info = &HIVE_INFO_HKU;
+ }
+ break;
}
-
- for(info = HIVE_INFO; *info; info++) {
- if (strcmp(buf+5, (*info)->long_name+5) == 0) {
- return *info;
+ if (info != NULL) {
+ if (result != NULL) {
+ *result = info;
}
+ *ptr += long_hive ? info->long_name_len : info->short_name_len;
+ return true;
}
- return NULL;
+ return false;
+}
+
+const struct hive_info* hive_info(const char* name)
+{
+ const struct hive_info* info = NULL;
+ srprs_hive(&name, &info);
+ return info;
}
const char* get_charset(const char* c)
diff --git a/source3/registry/reg_parse_internal.h
b/source3/registry/reg_parse_internal.h
index 14fed89..bd364a5 100644
--- a/source3/registry/reg_parse_internal.h
+++ b/source3/registry/reg_parse_internal.h
@@ -56,7 +56,22 @@ struct hive_info {
size_t long_name_len;
};
-const struct hive_info* hive_info(const char* name, int nlen);
+extern const struct hive_info HIVE_INFO_HKLM;
+extern const struct hive_info HIVE_INFO_HKCU;
+extern const struct hive_info HIVE_INFO_HKCR;
+extern const struct hive_info HIVE_INFO_HKU;
+extern const struct hive_info HIVE_INFO_HKCC;
+extern const struct hive_info HIVE_INFO_HKDD;
+extern const struct hive_info HIVE_INFO_HKPD;
+extern const struct hive_info HIVE_INFO_HKPT;
+extern const struct hive_info HIVE_INFO_HKPN;
+
+extern const struct hive_info* HIVE_INFO[];
+
+const struct hive_info* hive_info(const char* name);
+bool srprs_hive(const char** ptr, const struct hive_info** result);
+
+
const char* get_charset(const char* c);
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index ca24e03..ae5b88f 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -3264,7 +3264,7 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
}
if (make_dup) {
- *session_key = data_blob_dup_talloc(mem_ctx, &sk);
+ *session_key = data_blob_dup_talloc(mem_ctx, sk);
} else {
*session_key = sk;
}
diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c
index e4a5652..757cac0 100644
--- a/source3/smbd/msg_idmap.c
+++ b/source3/smbd/msg_idmap.c
@@ -129,12 +129,46 @@ static void id_cache_kill(struct messaging_context
*msg_ctx,
return;
}
+ if (am_parent) {
+ messaging_send_to_children(msg_ctx, msg_type, data);
+ }
+
if (id_in_use(validated_users, &id)) {
exit_server_cleanly(msg);
}
+ id_cache_delete_from_cache(&id);
+}
+
+static void id_cache_flush(struct messaging_context *ctx,
+ void* data,
+ uint32_t msg_type,
+ struct server_id srv_id,
+ DATA_BLOB* msg_data)
+{
+ id_cache_flush_message(ctx, data, msg_type, srv_id, msg_data);
+
+ if (am_parent) {
+ messaging_send_to_children(ctx, msg_type, msg_data);
+ }
}
-void id_cache_register_kill_msg(struct messaging_context *ctx)
+static void id_cache_delete(struct messaging_context *ctx,
+ void* data,
+ uint32_t msg_type,
+ struct server_id srv_id,
+ DATA_BLOB* msg_data)
+{
+ id_cache_delete_message(ctx, data, msg_type, srv_id, msg_data);
+
+ if (am_parent) {
+ messaging_send_to_children(ctx, msg_type, msg_data);
+ }
+}
+
+
+void msg_idmap_register_msg(struct messaging_context *ctx)
--
Samba Shared Repository