The branch, master has been updated via 7964b36 tdb: Fix a "increases alignment" warning via 2adbb1f tdb: Align a few integer types via 6f45cbf tdb: Harden allocating the tdb recovery area via 5f24fd6 tdb: Make sure the hash size fits via 1b0fbda Harden tdb_check_used_record against overflow via 2c94093 tdb: Handle TDB_NEXT_LOCK_ERR in tdb_traverse_internal via df2a036 tdb: Harden tdb_rec_read via ac33b56 tdbdump: Avoid an int cast via fc922bd s3: docs: Add documentation for "smb2" and "smb2_credits" debug classes. via ad973fd s3: smbd: SMB2: Add DBGC_SMB2_CREDITS class to specifically debug credit issues. via cdde6d9 lib: debug: Add DBGC_XXX versions of the macros to allow class-specific messages. via 8dabcf8 s3: debug: smb2: Create a new DBGC_SMB2 debug class and mark all smbd/smb2_*.c files with it. from e0cf35a lib:param: Fix the size type in lp_do_parameter_parametric()
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 7964b3640aacaab68f002c290d82f86e7c709268 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 11:51:13 2018 +0100 tdb: Fix a "increases alignment" warning Many of those warnings are difficult to fix, but this one was easy :-) Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Thu Mar 22 07:21:44 CET 2018 on sn-devel-144 commit 2adbb1f75183a1105848ccb6acc577541279b3f6 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 11:48:47 2018 +0100 tdb: Align a few integer types Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 6f45cbf42738d869e310027c05e0a5bba07de9fc Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 11:26:37 2018 +0100 tdb: Harden allocating the tdb recovery area Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 5f24fd6863f1278f1e5ea27829c5402c0cae4366 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 11:09:10 2018 +0100 tdb: Make sure the hash size fits Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1b0fbdaf853b341a8e53e23e1e3f2ae1c9037dc2 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 10:46:09 2018 +0100 Harden tdb_check_used_record against overflow Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2c94093ad961f3e93302dae6aa373e5b3fe8ee95 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 10:21:09 2018 +0100 tdb: Handle TDB_NEXT_LOCK_ERR in tdb_traverse_internal Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit df2a036377ad68a999cbccd6e2ba813fa48e7cb9 Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 10:07:29 2018 +0100 tdb: Harden tdb_rec_read Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit ac33b5653f9ee7a69cd367e262bdaceb29c9867c Author: Volker Lendecke <v...@samba.org> Date: Sun Mar 4 10:07:09 2018 +0100 tdbdump: Avoid an int cast Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit fc922bd29b40a20450f16728fa7347f8f83d3bcd Author: Jeremy Allison <j...@samba.org> Date: Wed Mar 21 12:56:12 2018 -0700 s3: docs: Add documentation for "smb2" and "smb2_credits" debug classes. https://bugzilla.samba.org/show_bug.cgi?id=13347 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Böhme <s...@samba.org> commit ad973fddef00d6d92443be89e7f5404006a94d99 Author: Jeremy Allison <j...@samba.org> Date: Wed Mar 21 12:52:49 2018 -0700 s3: smbd: SMB2: Add DBGC_SMB2_CREDITS class to specifically debug credit issues. https://bugzilla.samba.org/show_bug.cgi?id=13347 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Böhme <s...@samba.org> commit cdde6d93605d15a59e816a35e8e02ca193bf1403 Author: Jeremy Allison <j...@samba.org> Date: Wed Mar 21 12:40:50 2018 -0700 lib: debug: Add DBGC_XXX versions of the macros to allow class-specific messages. https://bugzilla.samba.org/show_bug.cgi?id=13347 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Böhme <s...@samba.org> commit 8dabcf8948c2e514b489169c34673e093519b583 Author: Jeremy Allison <j...@samba.org> Date: Wed Mar 21 12:01:05 2018 -0700 s3: debug: smb2: Create a new DBGC_SMB2 debug class and mark all smbd/smb2_*.c files with it. Will allow easier smb2-specific debugging. https://bugzilla.samba.org/show_bug.cgi?id=13347 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Böhme <s...@samba.org> ----------------------------------------------------------------------- Summary of changes: docs-xml/smbdotconf/logging/loglevel.xml | 2 ++ lib/tdb/common/check.c | 17 ++++++++++- lib/tdb/common/io.c | 28 ++++++++++++++++++ lib/tdb/common/open.c | 15 ++++++++++ lib/tdb/common/transaction.c | 25 +++++++++++----- lib/tdb/common/traverse.c | 13 ++++---- lib/tdb/tools/tdbdump.c | 4 +-- lib/util/debug.c | 2 ++ lib/util/debug.h | 32 ++++++++++++++++++++ source3/smbd/smb2_break.c | 3 ++ source3/smbd/smb2_close.c | 3 ++ source3/smbd/smb2_create.c | 3 ++ source3/smbd/smb2_flush.c | 3 ++ source3/smbd/smb2_getinfo.c | 3 ++ source3/smbd/smb2_glue.c | 3 ++ source3/smbd/smb2_ioctl.c | 3 ++ source3/smbd/smb2_ioctl_dfs.c | 3 ++ source3/smbd/smb2_ioctl_filesys.c | 3 ++ source3/smbd/smb2_ioctl_named_pipe.c | 3 ++ source3/smbd/smb2_ioctl_network_fs.c | 3 ++ source3/smbd/smb2_keepalive.c | 3 ++ source3/smbd/smb2_lock.c | 3 ++ source3/smbd/smb2_negprot.c | 3 ++ source3/smbd/smb2_notify.c | 3 ++ source3/smbd/smb2_query_directory.c | 3 ++ source3/smbd/smb2_read.c | 3 ++ source3/smbd/smb2_server.c | 51 +++++++++++++++++++++----------- source3/smbd/smb2_sesssetup.c | 3 ++ source3/smbd/smb2_setinfo.c | 3 ++ source3/smbd/smb2_tcon.c | 3 ++ source3/smbd/smb2_write.c | 3 ++ 31 files changed, 219 insertions(+), 33 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/logging/loglevel.xml b/docs-xml/smbdotconf/logging/loglevel.xml index 1a3767d..d3b5c45 100644 --- a/docs-xml/smbdotconf/logging/loglevel.xml +++ b/docs-xml/smbdotconf/logging/loglevel.xml @@ -22,6 +22,8 @@ <listitem><para><parameter moreinfo="none">printdrivers</parameter></para></listitem> <listitem><para><parameter moreinfo="none">lanman</parameter></para></listitem> <listitem><para><parameter moreinfo="none">smb</parameter></para></listitem> + <listitem><para><parameter moreinfo="none">smb2</parameter></para></listitem> + <listitem><para><parameter moreinfo="none">smb2_credits</parameter></para></listitem> <listitem><para><parameter moreinfo="none">rpc_parse</parameter></para></listitem> <listitem><para><parameter moreinfo="none">rpc_srv</parameter></para></listitem> <listitem><para><parameter moreinfo="none">rpc_cli</parameter></para></listitem> diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c index e632af5..3a5c8b8 100644 --- a/lib/tdb/common/check.c +++ b/lib/tdb/common/check.c @@ -242,12 +242,27 @@ static bool tdb_check_used_record(struct tdb_context *tdb, void *private_data) { TDB_DATA key, data; + tdb_len_t len; if (!tdb_check_record(tdb, off, rec)) return false; /* key + data + tailer must fit in record */ - if (rec->key_len + rec->data_len + sizeof(tdb_off_t) > rec->rec_len) { + len = rec->key_len; + len += rec->data_len; + if (len < rec->data_len) { + /* overflow */ + TDB_LOG((tdb, TDB_DEBUG_ERROR, "Record lengths overflow\n")); + return false; + } + len += sizeof(tdb_off_t); + if (len < sizeof(tdb_off_t)) { + /* overflow */ + TDB_LOG((tdb, TDB_DEBUG_ERROR, "Record lengths overflow\n")); + return false; + } + + if (len > rec->rec_len) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "Record offset %u too short for contents\n", off)); return false; diff --git a/lib/tdb/common/io.c b/lib/tdb/common/io.c index 15ba5b7..94b3163 100644 --- a/lib/tdb/common/io.c +++ b/lib/tdb/common/io.c @@ -733,6 +733,9 @@ int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key, /* read/write a record */ int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct tdb_record *rec) { + int ret; + tdb_len_t overall_len; + if (tdb->methods->tdb_read(tdb, offset, rec, sizeof(*rec),DOCONV()) == -1) return -1; if (TDB_BAD_MAGIC(rec)) { @@ -741,6 +744,31 @@ int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct tdb_record *r TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_rec_read bad magic 0x%x at offset=%u\n", rec->magic, offset)); return -1; } + + overall_len = rec->key_len + rec->data_len; + if (overall_len < rec->data_len) { + /* overflow */ + return -1; + } + + if (overall_len > rec->rec_len) { + /* invalid record */ + return -1; + } + + ret = tdb->methods->tdb_oob(tdb, offset, rec->key_len, 1); + if (ret == -1) { + return -1; + } + ret = tdb->methods->tdb_oob(tdb, offset, rec->data_len, 1); + if (ret == -1) { + return -1; + } + ret = tdb->methods->tdb_oob(tdb, offset, rec->rec_len, 1); + if (ret == -1) { + return -1; + } + return tdb->methods->tdb_oob(tdb, rec->next, sizeof(*rec), 0); } diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c index cfb476d..8baa7e4 100644 --- a/lib/tdb/common/open.c +++ b/lib/tdb/common/open.c @@ -687,6 +687,21 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td } } + if (tdb->hash_size > UINT32_MAX/4) { + TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: " + "hash size %"PRIu32" too large\n", tdb->hash_size)); + errno = EINVAL; + goto fail; + } + + ret = tdb->methods->tdb_oob(tdb, FREELIST_TOP, 4*tdb->hash_size, 1); + if (ret == -1) { + TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: " + "hash size %"PRIu32" does not fit\n", tdb->hash_size)); + errno = EINVAL; + goto fail; + } + if (locked) { if (tdb_nest_unlock(tdb, ACTIVE_LOCK, F_WRLCK, false) == -1) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: " diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index 7d281fc..73d02b6 100644 --- a/lib/tdb/common/transaction.c +++ b/lib/tdb/common/transaction.c @@ -592,7 +592,8 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t static int _tdb_transaction_cancel(struct tdb_context *tdb) { - int i, ret = 0; + uint32_t i; + int ret = 0; if (tdb->transaction == NULL) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_cancel: no transaction\n")); @@ -654,7 +655,7 @@ _PUBLIC_ int tdb_transaction_cancel(struct tdb_context *tdb) static bool tdb_recovery_size(struct tdb_context *tdb, tdb_len_t *result) { tdb_len_t recovery_size = 0; - int i; + uint32_t i; recovery_size = sizeof(uint32_t); for (i=0;i<tdb->transaction->num_blocks;i++) { @@ -689,6 +690,8 @@ int tdb_recovery_area(struct tdb_context *tdb, tdb_off_t *recovery_offset, struct tdb_record *rec) { + int ret; + if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, recovery_offset) == -1) { return -1; } @@ -709,6 +712,13 @@ int tdb_recovery_area(struct tdb_context *tdb, *recovery_offset = 0; rec->rec_len = 0; } + + ret = methods->tdb_oob(tdb, *recovery_offset, rec->rec_len, 1); + if (ret == -1) { + *recovery_offset = 0; + rec->rec_len = 0; + } + return 0; } @@ -834,7 +844,7 @@ static int transaction_setup_recovery(struct tdb_context *tdb, tdb_off_t recovery_offset, recovery_max_size; tdb_off_t old_map_size = tdb->transaction->old_map_size; uint32_t magic, tailer; - int i; + uint32_t i; /* check that the recovery area has enough space @@ -844,13 +854,12 @@ static int transaction_setup_recovery(struct tdb_context *tdb, return -1; } - data = (unsigned char *)malloc(recovery_size + sizeof(*rec)); - if (data == NULL) { + rec = malloc(recovery_size + sizeof(*rec)); + if (rec == NULL) { tdb->ecode = TDB_ERR_OOM; return -1; } - rec = (struct tdb_record *)data; memset(rec, 0, sizeof(*rec)); rec->magic = TDB_RECOVERY_INVALID_MAGIC; @@ -859,6 +868,8 @@ static int transaction_setup_recovery(struct tdb_context *tdb, rec->key_len = old_map_size; CONVERT(*rec); + data = (unsigned char *)rec; + /* build the recovery data into a single blob to allow us to do a single large write, which should be more efficient */ p = data + sizeof(*rec); @@ -1096,7 +1107,7 @@ static bool repack_worthwhile(struct tdb_context *tdb) _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb) { const struct tdb_methods *methods; - int i; + uint32_t i; bool need_repack = false; if (tdb->transaction == NULL) { diff --git a/lib/tdb/common/traverse.c b/lib/tdb/common/traverse.c index 9b83379..7a1d567 100644 --- a/lib/tdb/common/traverse.c +++ b/lib/tdb/common/traverse.c @@ -166,9 +166,16 @@ static int tdb_traverse_internal(struct tdb_context *tdb, /* tdb_next_lock places locks on the record returned, and its chain */ while ((off = tdb_next_lock(tdb, tl, &rec)) != 0) { - tdb_len_t full_len = rec.key_len + rec.data_len; + tdb_len_t full_len; int nread; + if (off == TDB_NEXT_LOCK_ERR) { + ret = -1; + goto out; + } + + full_len = rec.key_len + rec.data_len; + if (full_len > recbuf_len) { recbuf_len = full_len; @@ -195,10 +202,6 @@ static int tdb_traverse_internal(struct tdb_context *tdb, } } - if (off == TDB_NEXT_LOCK_ERR) { - ret = -1; - goto out; - } count++; /* now read the full record */ nread = tdb->methods->tdb_read(tdb, tl->off + sizeof(rec), diff --git a/lib/tdb/tools/tdbdump.c b/lib/tdb/tools/tdbdump.c index 8cf3146..2c68970 100644 --- a/lib/tdb/tools/tdbdump.c +++ b/lib/tdb/tools/tdbdump.c @@ -41,10 +41,10 @@ static void print_data(TDB_DATA d) static int traverse_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) { printf("{\n"); - printf("key(%d) = \"", (int)key.dsize); + printf("key(%zu) = \"", key.dsize); print_data(key); printf("\"\n"); - printf("data(%d) = \"", (int)dbuf.dsize); + printf("data(%zu) = \"", dbuf.dsize); print_data(dbuf); printf("\"\n"); printf("}\n"); diff --git a/lib/util/debug.c b/lib/util/debug.c index 6428550..d010b72 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -541,6 +541,8 @@ static const char *default_classname_table[] = { [DBGC_AUTH_AUDIT_JSON] = "auth_json_audit", [DBGC_KERBEROS] = "kerberos", [DBGC_DRS_REPL] = "drs_repl", + [DBGC_SMB2] = "smb2", + [DBGC_SMB2_CREDITS] = "smb2_credits", }; /* diff --git a/lib/util/debug.h b/lib/util/debug.h index e82553a..1e184b4 100644 --- a/lib/util/debug.h +++ b/lib/util/debug.h @@ -93,6 +93,8 @@ bool dbghdr( int level, const char *location, const char *func); #define DBGC_AUTH_AUDIT_JSON 25 #define DBGC_KERBEROS 26 #define DBGC_DRS_REPL 27 +#define DBGC_SMB2 28 +#define DBGC_SMB2_CREDITS 29 /* So you can define DBGC_CLASS before including debug.h */ #ifndef DBGC_CLASS @@ -216,6 +218,14 @@ extern int *DEBUGLEVEL_CLASS; && (dbgtext("%s: ", __func__)) \ && (dbgtext body) ) +/* Prefix messages with the function name - class specific */ +#define DBGC_PREFIX(dbgc_class, level, body ) \ + (void)( ((level) <= MAX_DEBUG_LEVEL) && \ + unlikely(DEBUGLEVEL_CLASS[ dbgc_class ] >= (level)) \ + && (dbghdrclass(level, dbgc_class, __location__, __func__ )) \ + && (dbgtext("%s: ", __func__)) \ + && (dbgtext body) ) + /* * Debug levels matching RFC 3164 */ @@ -231,12 +241,34 @@ extern int *DEBUGLEVEL_CLASS; #define DBG_INFO(...) DBG_PREFIX(DBGLVL_INFO, (__VA_ARGS__)) #define DBG_DEBUG(...) DBG_PREFIX(DBGLVL_DEBUG, (__VA_ARGS__)) +#define DBGC_ERR(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \ + DBGLVL_ERR, (__VA_ARGS__)) +#define DBGC_WARNING(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \ + DBGLVL_WARNING, (__VA_ARGS__)) +#define DBGC_NOTICE(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \ + DBGLVL_NOTICE, (__VA_ARGS__)) +#define DBGC_INFO(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \ + DBGLVL_INFO, (__VA_ARGS__)) +#define DBGC_DEBUG(dbgc_class, ...) DBGC_PREFIX(dbgc_class, \ + DBGLVL_DEBUG, (__VA_ARGS__)) + #define D_ERR(...) DEBUG(DBGLVL_ERR, (__VA_ARGS__)) #define D_WARNING(...) DEBUG(DBGLVL_WARNING, (__VA_ARGS__)) #define D_NOTICE(...) DEBUG(DBGLVL_NOTICE, (__VA_ARGS__)) #define D_INFO(...) DEBUG(DBGLVL_INFO, (__VA_ARGS__)) #define D_DEBUG(...) DEBUG(DBGLVL_DEBUG, (__VA_ARGS__)) +#define DC_ERR(...) DEBUGC(dbgc_class, \ + DBGLVL_ERR, (__VA_ARGS__)) +#define DC_WARNING(...) DEBUGC(dbgc_class, \ + DBGLVL_WARNING, (__VA_ARGS__)) +#define DC_NOTICE(...) DEBUGC(dbgc_class, \ + DBGLVL_NOTICE, (__VA_ARGS__)) +#define DC_INFO(...) DEBUGC(dbgc_class, \ + DBGLVL_INFO, (__VA_ARGS__)) +#define DC_DEBUG(...) DEBUGC(dbgc_class, \ + DBGLVL_DEBUG, (__VA_ARGS__)) + /* The following definitions come from lib/debug.c */ /** Possible destinations for the debug log (in order of precedence - diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index 4c5d62e..86529ed 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -26,6 +26,9 @@ #include "../lib/util/tevent_ntstatus.h" #include "locking/leases_db.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static NTSTATUS smbd_smb2_request_process_lease_break( struct smbd_smb2_request *req); diff --git a/source3/smbd/smb2_close.c b/source3/smbd/smb2_close.c index 5830228..992b529 100644 --- a/source3/smbd/smb2_close.c +++ b/source3/smbd/smb2_close.c @@ -25,6 +25,9 @@ #include "../lib/util/tevent_ntstatus.h" #include "lib/tevent_wait.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static struct tevent_req *smbd_smb2_close_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbd_smb2_request *smb2req, diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index d34a5f7..3f38af5 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -29,6 +29,9 @@ #include "../lib/util/tevent_ntstatus.h" #include "messages.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + int map_smb2_oplock_levels_to_samba(uint8_t in_oplock_level) { switch(in_oplock_level) { diff --git a/source3/smbd/smb2_flush.c b/source3/smbd/smb2_flush.c index 51584ca..d1ab3a0 100644 --- a/source3/smbd/smb2_flush.c +++ b/source3/smbd/smb2_flush.c @@ -24,6 +24,9 @@ #include "../libcli/smb/smb_common.h" #include "../lib/util/tevent_ntstatus.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static struct tevent_req *smbd_smb2_flush_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbd_smb2_request *smb2req, diff --git a/source3/smbd/smb2_getinfo.c b/source3/smbd/smb2_getinfo.c index 7f44868..694e9f8 100644 --- a/source3/smbd/smb2_getinfo.c +++ b/source3/smbd/smb2_getinfo.c @@ -26,6 +26,9 @@ #include "trans2.h" #include "../lib/util/tevent_ntstatus.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static struct tevent_req *smbd_smb2_getinfo_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbd_smb2_request *smb2req, diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c index bf2ea5a..6a73ec0 100644 --- a/source3/smbd/smb2_glue.c +++ b/source3/smbd/smb2_glue.c @@ -23,6 +23,9 @@ #include "smbd/globals.h" #include "../libcli/smb/smb_common.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req) { struct smb_request *smbreq; diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c index 993682f..be70e3a 100644 --- a/source3/smbd/smb2_ioctl.c +++ b/source3/smbd/smb2_ioctl.c @@ -27,6 +27,9 @@ #include "smb2_ioctl_private.h" #include "librpc/gen_ndr/ioctl.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static struct tevent_req *smbd_smb2_ioctl_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbd_smb2_request *smb2req, diff --git a/source3/smbd/smb2_ioctl_dfs.c b/source3/smbd/smb2_ioctl_dfs.c index f4dd189..72893ca 100644 --- a/source3/smbd/smb2_ioctl_dfs.c +++ b/source3/smbd/smb2_ioctl_dfs.c @@ -26,6 +26,9 @@ #include "include/ntioctl.h" #include "smb2_ioctl_private.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static NTSTATUS fsctl_dfs_get_refers(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct connection_struct *conn, diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c index 79c5021..8a9c8c6 100644 --- a/source3/smbd/smb2_ioctl_filesys.c +++ b/source3/smbd/smb2_ioctl_filesys.c @@ -31,6 +31,9 @@ #include "librpc/gen_ndr/ndr_ioctl.h" #include "smb2_ioctl_private.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + /* * XXX this may reduce dup_extents->byte_count so that it's less than the * target file size. diff --git a/source3/smbd/smb2_ioctl_named_pipe.c b/source3/smbd/smb2_ioctl_named_pipe.c index 13c4982..f9e3dec 100644 --- a/source3/smbd/smb2_ioctl_named_pipe.c +++ b/source3/smbd/smb2_ioctl_named_pipe.c @@ -27,6 +27,9 @@ #include "include/ntioctl.h" #include "smb2_ioctl_private.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static void smbd_smb2_ioctl_pipe_write_done(struct tevent_req *subreq); static void smbd_smb2_ioctl_pipe_read_done(struct tevent_req *subreq); diff --git a/source3/smbd/smb2_ioctl_network_fs.c b/source3/smbd/smb2_ioctl_network_fs.c index 4006ccf..c0d1756 100644 --- a/source3/smbd/smb2_ioctl_network_fs.c +++ b/source3/smbd/smb2_ioctl_network_fs.c @@ -31,6 +31,9 @@ #include "smb2_ioctl_private.h" #include "../lib/tsocket/tsocket.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + static void copychunk_pack_limits(struct srv_copychunk_rsp *cc_rsp) { cc_rsp->chunks_written = COPYCHUNK_MAX_CHUNKS; diff --git a/source3/smbd/smb2_keepalive.c b/source3/smbd/smb2_keepalive.c index b16ff6b..fac567c 100644 --- a/source3/smbd/smb2_keepalive.c +++ b/source3/smbd/smb2_keepalive.c @@ -23,6 +23,9 @@ #include "smbd/globals.h" #include "../libcli/smb/smb_common.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_SMB2 + NTSTATUS smbd_smb2_request_process_keepalive(struct smbd_smb2_request *req) { -- Samba Shared Repository