The branch, master has been updated
       via  6640cf5e32f samba-tool: add new --dns-directory-partition option to 
dns zonecreate command
       via  3a9e0b318db s3:tests: Do not export UID_WRAPPER_ROOT in 
test_smbXsrv_client_cross_node.sh
       via  3799074b30e s3:tests: Do not export UID_WRAPPER_ROOT in 
test_smbXsrv_client_dead_rec.sh
       via  9cbd4a3abdd s3:tests: Do not export UID_WRAPPER_ROOT in 
test_net_machine_account
       via  e013d70e8ed testprogs: Do not export UID_WRAPPER_ROOT in 
test_net_rpc_oldjoin.sh
       via  457a83e7abc testprogs: Do not export UID_WRAPPER_ROOT in 
test_kpasswd_heimdal.sh
       via  b41ff81a783 testprogs: Do not export UID_WRAPPER_ROOT in 
test_kpasswd_mit.sh
       via  ea566a825a0 testprogs: Do not export UID_WRAPPER_ROOT in 
test_pdbtest.sh
       via  579182372a1 testprogs: Do not export UID_WRAPPER_ROOT in 
test_net_ads_dns.sh
       via  1fb0b3684ea testprogs: Do not export UID_WRAPPER_ROOT in 
test_samba-tool_ntacl.sh
       via  3b612dc64a6 testprogs:subunit: Fix integer comparisons
       via  e4b77dc38bf testprogs:subunit: Fix assigning an array to a string
       via  8fb833fc759 vfs_default.c: use DBG* macros instead of static log 
level numbers
       via  5c37615efa2 smbXsrv_tcon.c: use DBG* macros instead of static log 
level numbers
       via  659e88544aa dcesrv_drsuapi.c:use DBG* macros instead of static log 
level numbers
       via  c257b0a2e1c smb2_service.c: use DBG* macros instread of static log 
level numbers
       via  6003090d5f8 smbXsrv_session.c: use DBG* macros instead of static 
log level numbers
       via  fa700369a96 dns_update.c: use DBG* macros instead of static log 
level numbers
       via  a33df1250cb oplock_linux.c: use DBG macros instead of static log 
level
       via  1186ec227da nmbd_become_lmb.c: use DBG* macros instead of static 
log level numbers
       via  2fbd773a515 nmbd/asyncdns.c: use DBG* macros instead of static log 
level numbers
       via  5181b1c8cb6 nmbd_sendannounce.c: use DBG* macros instead of static 
log level numbers
       via  b6049a30127 nmbd: use DBG_ macros and raise some log levels
      from  96a64fb3333 smbd: smbd_dirptr_lanman2_match_fn(): Remove 
"exact_match" handling

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6640cf5e32fd8c0561aa8bb4a48fe0fc73740403
Author: Björn Baumbach <b...@sernet.de>
Date:   Thu Jun 15 18:24:50 2023 +0200

    samba-tool: add new --dns-directory-partition option to dns zonecreate 
command
    
    The new --dns-directory-partition chooses the directory partition for
    the new zone - "domain" or "forest". Defaults to the current default
    "domain".
    
    Signed-off-by: Björn Baumbach <b...@sernet.de>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abart...@samba.org>
    Autobuild-Date(master): Fri Jun 16 21:23:28 UTC 2023 on atb-devel-224

commit 3a9e0b318db7a3888e9b5c60f2748edd704630a1
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:30:23 2023 +0200

    s3:tests: Do not export UID_WRAPPER_ROOT in 
test_smbXsrv_client_cross_node.sh
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 3799074b30e1791c68efb50ccb4519b365d0e7fc
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:29:41 2023 +0200

    s3:tests: Do not export UID_WRAPPER_ROOT in test_smbXsrv_client_dead_rec.sh
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 9cbd4a3abdd7d4065da312b6ce7bbb5ff4615a61
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:29:01 2023 +0200

    s3:tests: Do not export UID_WRAPPER_ROOT in test_net_machine_account
    
    Just set it for the test.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit e013d70e8ed5cbdd8b1ea357d1f9ba7b23d91816
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:27:31 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_net_rpc_oldjoin.sh
    
    This is already set for smbpasswd.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 457a83e7abc8cd179eda38ddf3a24b5129a9ba3d
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:26:52 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_kpasswd_heimdal.sh
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit b41ff81a783339ef0d68c70916ef800d5dec421b
Author: Andreas Schneider <a...@samba.org>
Date:   Tue Apr 11 15:26:21 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_kpasswd_mit.sh
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit ea566a825a0e13dd5cff54370b6769f9f644d0cf
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Mar 27 10:17:39 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_pdbtest.sh
    
    We already set root for smbpasswd.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 579182372a106044c138c784cd7df6012dccf870
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Mar 27 10:16:40 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_net_ads_dns.sh
    
    There is not need for root here.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 1fb0b3684eacf458fe175c6f8669eaf010bfe9b6
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Mar 27 10:03:50 2023 +0200

    testprogs: Do not export UID_WRAPPER_ROOT in test_samba-tool_ntacl.sh
    
    There is not need for root here.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 3b612dc64a67c14b5a32fd16e7ff0b953c8a72ab
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jun 16 09:57:00 2023 +0200

    testprogs:subunit: Fix integer comparisons
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit e4b77dc38bf79f46484849f9ee7bbafaeb068177
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Jun 16 09:42:07 2023 +0200

    testprogs:subunit: Fix assigning an array to a string
    
    $@ is an array and we want a string.
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 8fb833fc7591e67ecfcbba18481923cf8c21098a
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 02:42:16 2023 +0200

    vfs_default.c: use DBG* macros instead of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 5c37615efa2f9ca73e37829ecb3527dab60acf97
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 02:30:32 2023 +0200

    smbXsrv_tcon.c: use DBG* macros instead of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 659e88544aa050822e59f0d08dfbae0015906d25
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 02:23:59 2023 +0200

    dcesrv_drsuapi.c:use DBG* macros instead of static log level numbers
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit c257b0a2e1c54ad95349dd606b1cfc449afdc413
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 02:18:21 2023 +0200

    smb2_service.c: use DBG* macros instread of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 6003090d5f8d05cabe5bfd9d651595fcaa45aedb
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 02:05:57 2023 +0200

    smbXsrv_session.c: use DBG* macros instead of static log level numbers
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit fa700369a96663423b3b766d335d52d3f22698ea
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 01:50:39 2023 +0200

    dns_update.c: use DBG* macros instead of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit a33df1250cbde521c062c113aecc318c580eaa5c
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 01:45:47 2023 +0200

    oplock_linux.c: use DBG macros instead of static log level
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 1186ec227daf09e60fbd6a53ce54506d04fe7a65
Author: Björn Jacke <b...@sernet.de>
Date:   Mon Jun 12 17:24:15 2023 +0200

    nmbd_become_lmb.c: use DBG* macros instead of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=4143
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 2fbd773a515fe4b5e1e26a250d64d69019947b7d
Author: Björn Jacke <b...@sernet.de>
Date:   Mon Jun 12 17:23:40 2023 +0200

    nmbd/asyncdns.c: use DBG* macros instead of static log level numbers
    
    Some log levels change because the macros don't cover all the previously 
used
    log levels or because importance was slightly reconsidered.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=4143
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit 5181b1c8cb653d9085a1d55a1fe69f8526ce9123
Author: Björn Jacke <b...@sernet.de>
Date:   Mon Jun 12 17:23:01 2023 +0200

    nmbd_sendannounce.c: use DBG* macros instead of static log level numbers
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=4143
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

commit b6049a30127ee3851faad62b4b57d1e8e674bc98
Author: Björn Jacke <b...@sernet.de>
Date:   Wed Jun 7 00:16:25 2023 +0200

    nmbd: use DBG_ macros and raise some log levels
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=4143
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 python/samba/netcmd/dns.py                         |  27 +++-
 python/samba/tests/samba_tool/dnscmd.py            |  91 ++++++++++++
 source3/modules/vfs_default.c                      |  70 ++++-----
 source3/nmbd/asyncdns.c                            |  24 +--
 source3/nmbd/nmbd.c                                |  81 +++++------
 source3/nmbd/nmbd_become_lmb.c                     | 129 ++++++++--------
 source3/nmbd/nmbd_sendannounce.c                   |  54 +++----
 source3/script/tests/test_net_machine_account.sh   |  15 +-
 source3/script/tests/test_net_rpc_oldjoin.sh       |   3 -
 .../script/tests/test_smbXsrv_client_cross_node.sh |   3 -
 .../script/tests/test_smbXsrv_client_dead_rec.sh   |   1 -
 source3/smbd/oplock_linux.c                        |  16 +-
 source3/smbd/smb2_service.c                        |  52 +++----
 source3/smbd/smbXsrv_session.c                     | 162 ++++++++++-----------
 source3/smbd/smbXsrv_tcon.c                        |  96 ++++++------
 source4/dns_server/dns_update.c                    |   8 +-
 source4/rpc_server/drsuapi/dcesrv_drsuapi.c        |  54 +++----
 testprogs/blackbox/subunit.sh                      |  26 ++--
 testprogs/blackbox/test_kpasswd_heimdal.sh         |   3 -
 testprogs/blackbox/test_kpasswd_mit.sh             |   3 -
 testprogs/blackbox/test_net_ads_dns.sh             |   3 -
 testprogs/blackbox/test_pdbtest.sh                 |   3 -
 testprogs/blackbox/test_samba-tool_ntacl.sh        |   3 -
 23 files changed, 506 insertions(+), 421 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/netcmd/dns.py b/python/samba/netcmd/dns.py
index d61f121b5b9..f10e67e0d4e 100644
--- a/python/samba/netcmd/dns.py
+++ b/python/samba/netcmd/dns.py
@@ -913,18 +913,35 @@ class cmd_zonecreate(Command):
     takes_options = [
         Option('--client-version', help='Client Version',
                default='longhorn', metavar='w2k|dotnet|longhorn',
-               choices=['w2k', 'dotnet', 'longhorn'], dest='cli_ver')
+               choices=['w2k', 'dotnet', 'longhorn'], dest='cli_ver'),
+        Option('--dns-directory-partition',
+               help='Specify the naming context for the new zone, which '
+                    'affects the replication scope (domain or forest wide '
+                    'replication).',
+               default='domain',
+               metavar='domain|forest',
+               choices=['domain', 'forest'],
+               dest='dns_dp'),
     ]
 
-    def run(self, server, zone, cli_ver, sambaopts=None, credopts=None,
+    def run(self,
+            server,
+            zone,
+            cli_ver,
+            dns_dp,
+            sambaopts=None,
+            credopts=None,
             versionopts=None):
-
         self.lp = sambaopts.get_loadparm()
         self.creds = credopts.get_credentials(self.lp)
         dns_conn = DnsConnWrapper(server, self.lp, self.creds)
 
         zone = zone.lower()
 
+        dns_directorypartition = dnsserver.DNS_DP_DOMAIN_DEFAULT
+        if dns_dp == 'forest':
+            dns_directorypartition = dnsserver.DNS_DP_FOREST_DEFAULT
+
         client_version = dns_client_version(cli_ver)
         if client_version == dnsserver.DNS_CLIENT_VERSION_W2K:
             typeid = dnsserver.DNSSRV_TYPEID_ZONE_CREATE_W2K
@@ -942,7 +959,7 @@ class cmd_zonecreate(Command):
             zone_create_info.fAging = 0
             zone_create_info.fDsIntegrated = 1
             zone_create_info.fLoadExisting = 1
-            zone_create_info.dwDpFlags = dnsserver.DNS_DP_DOMAIN_DEFAULT
+            zone_create_info.dwDpFlags = dns_directorypartition
         else:
             typeid = dnsserver.DNSSRV_TYPEID_ZONE_CREATE
             zone_create_info = dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN()
@@ -951,7 +968,7 @@ class cmd_zonecreate(Command):
             zone_create_info.fAging = 0
             zone_create_info.fDsIntegrated = 1
             zone_create_info.fLoadExisting = 1
-            zone_create_info.dwDpFlags = dnsserver.DNS_DP_DOMAIN_DEFAULT
+            zone_create_info.dwDpFlags = dns_directorypartition
 
         dns_conn.DnssrvOperation2(client_version, 0, server, None,
                                   0, 'ZoneCreate', typeid,
diff --git a/python/samba/tests/samba_tool/dnscmd.py 
b/python/samba/tests/samba_tool/dnscmd.py
index 33492458be3..c36c4b535d0 100644
--- a/python/samba/tests/samba_tool/dnscmd.py
+++ b/python/samba/tests/samba_tool/dnscmd.py
@@ -1415,3 +1415,94 @@ class DnsCmdTestCase(SambaToolCmdTest):
             for s in output_substrings:
                 self.assertIn(s, out)
             tsmap = new_tsmap
+
+    def test_zonecreate_dns_domain_directory_partition(self):
+        zone = "test-dns-domain-dp-zone"
+        dns_dp_opt = "--dns-directory-partition=domain"
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zonecreate",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string,
+                                          dns_dp_opt)
+        self.assertCmdSuccess(result,
+                              out,
+                              err,
+                              "Failed to create zone with "
+                              "--dns-directory-partition option")
+        self.assertTrue('Zone %s created successfully' % zone in out,
+                        "Unexpected output: %s")
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zoneinfo",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err)
+        self.assertTrue("DNS_DP_DOMAIN_DEFAULT" in out,
+                        "Missing DNS_DP_DOMAIN_DEFAULT flag")
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zonedelete",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err,
+                              "Failed to delete zone in domain DNS directory "
+                              "partition")
+        result, out, err = self.runsubcmd("dns",
+                                          "zonelist",
+                                          os.environ["SERVER"],
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err,
+                              "Failed to delete zone in domain DNS directory "
+                              "partition")
+        self.assertTrue(zone not in out,
+                        "Deleted zone still exists")
+
+    def test_zonecreate_dns_forest_directory_partition(self):
+        zone = "test-dns-forest-dp-zone"
+        dns_dp_opt = "--dns-directory-partition=forest"
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zonecreate",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string,
+                                          dns_dp_opt)
+        self.assertCmdSuccess(result,
+                              out,
+                              err,
+                              "Failed to create zone with "
+                              "--dns-directory-partition option")
+        self.assertTrue('Zone %s created successfully' % zone in out,
+                        "Unexpected output: %s")
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zoneinfo",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err)
+        self.assertTrue("DNS_DP_FOREST_DEFAULT" in out,
+                        "Missing DNS_DP_FOREST_DEFAULT flag")
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zonedelete",
+                                          os.environ["SERVER"],
+                                          zone,
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err,
+                              "Failed to delete zone in forest DNS directory "
+                              "partition")
+
+        result, out, err = self.runsubcmd("dns",
+                                          "zonelist",
+                                          os.environ["SERVER"],
+                                          self.creds_string)
+        self.assertCmdSuccess(result, out, err,
+                              "Failed to delete zone in forest DNS directory "
+                              "partition")
+        self.assertTrue(zone not in out,
+                        "Deleted zone still exists")
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index cbced890597..1ea0dded619 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -200,12 +200,12 @@ static uint32_t vfswrap_fs_capabilities(struct 
vfs_handle_struct *handle,
                *p_ts_res = TIMESTAMP_SET_SECONDS;
 #endif
 
-               DEBUG(10,("vfswrap_fs_capabilities: timestamp "
+               DBG_DEBUG("vfswrap_fs_capabilities: timestamp "
                        "resolution of %s "
                        "available on share %s, directory %s\n",
                        *p_ts_res == TIMESTAMP_SET_MSEC ? "msec" : "sec",
                        lp_servicename(talloc_tos(), lp_sub, 
conn->params->service),
-                       conn->connectpath ));
+                       conn->connectpath );
        }
        TALLOC_FREE(smb_fname_cpath);
        return caps;
@@ -223,7 +223,7 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct 
vfs_handle_struct *handle,
        size_t i;
        uint16_t max_referral_level = r->in.req.max_referral_level;
 
-       if (DEBUGLVL(10)) {
+       if (DEBUGLVL(DBGLVL_DEBUG)) {
                NDR_PRINT_IN_DEBUG(dfs_GetDFSReferral, r);
        }
 
@@ -276,7 +276,7 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct 
vfs_handle_struct *handle,
        if (!self_referral) {
                pathnamep[consumedcnt] = '\0';
 
-               if (DEBUGLVL(3)) {
+               if (DEBUGLVL(DBGLVL_INFO)) {
                        dbgtext("Path %s to alternate path(s):",
                                pathnamep);
                        for (i=0; i < junction->referral_count; i++) {
@@ -383,12 +383,12 @@ static NTSTATUS vfswrap_get_dfs_referrals(struct 
vfs_handle_struct *handle,
                }
                break;
        default:
-               DEBUG(0,("Invalid dfs referral version: %d\n",
-                       max_referral_level));
+               DBG_ERR("Invalid dfs referral version: %d\n",
+                       max_referral_level);
                return NT_STATUS_INVALID_LEVEL;
        }
 
-       if (DEBUGLVL(10)) {
+       if (DEBUGLVL(DBGLVL_DEBUG)) {
                NDR_PRINT_OUT_DEBUG(dfs_GetDFSReferral, r);
        }
 
@@ -1507,8 +1507,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                 * I think I'll make this be the inode+dev. JRA.
                 */
 
-               DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on %s\n",
-                         fsp_fnum_dbg(fsp)));
+               DBG_DEBUG("FSCTL_CREATE_OR_GET_OBJECT_ID: called on %s\n",
+                         fsp_fnum_dbg(fsp));
 
                *out_len = MIN(max_out_len, 64);
 
@@ -1565,8 +1565,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                char *cur_pdata = NULL;
 
                if (max_out_len < 16) {
-                       DEBUG(0,("FSCTL_GET_SHADOW_COPY_DATA: 
max_data_count(%u) < 16 is invalid!\n",
-                               max_out_len));
+                       DBG_ERR("FSCTL_GET_SHADOW_COPY_DATA: max_data_count(%u) 
< 16 is invalid!\n",
+                               max_out_len);
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
@@ -1576,7 +1576,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
 
                shadow_data = talloc_zero(ctx, struct shadow_copy_data);
                if (shadow_data == NULL) {
-                       DEBUG(0,("TALLOC_ZERO() failed!\n"));
+                       DBG_ERR("TALLOC_ZERO() failed!\n");
                        return NT_STATUS_NO_MEMORY;
                }
 
@@ -1584,7 +1584,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                 * Call the VFS routine to actually do the work.
                 */
                if (SMB_VFS_GET_SHADOW_COPY_DATA(fsp, shadow_data, labels)!=0) {
-                       int log_lev = 0;
+                       int log_lev = DBGLVL_ERR;
                        if (errno == 0) {
                                /* broken module didn't set errno on error */
                                status = NT_STATUS_UNSUCCESSFUL;
@@ -1592,7 +1592,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                                status = map_nt_error_from_unix(errno);
                                if (NT_STATUS_EQUAL(status,
                                                    NT_STATUS_NOT_SUPPORTED)) {
-                                       log_lev = 5;
+                                       log_lev = DBGLVL_INFO;
                                }
                        }
                        DEBUG(log_lev, ("FSCTL_GET_SHADOW_COPY_DATA: "
@@ -1613,8 +1613,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                }
 
                if (max_out_len < *out_len) {
-                       DEBUG(0,("FSCTL_GET_SHADOW_COPY_DATA: 
max_data_count(%u) too small (%u) bytes needed!\n",
-                               max_out_len, *out_len));
+                       DBG_ERR("FSCTL_GET_SHADOW_COPY_DATA: max_data_count(%u) 
too small (%u) bytes needed!\n",
+                               max_out_len, *out_len);
                        TALLOC_FREE(shadow_data);
                        return NT_STATUS_BUFFER_TOO_SMALL;
                }
@@ -1640,8 +1640,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
 
                cur_pdata += 12;
 
-               DEBUG(10,("FSCTL_GET_SHADOW_COPY_DATA: %u volumes for 
path[%s].\n",
-                         shadow_data->num_volumes, fsp_str_dbg(fsp)));
+               DBG_DEBUG("FSCTL_GET_SHADOW_COPY_DATA: %u volumes for 
path[%s].\n",
+                         shadow_data->num_volumes, fsp_str_dbg(fsp));
                if (labels && shadow_data->labels) {
                        for (i=0; i<shadow_data->num_volumes; i++) {
                                size_t len = 0;
@@ -1655,7 +1655,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                                        return status;
                                }
                                cur_pdata += 2 * sizeof(SHADOW_COPY_LABEL);
-                               DEBUGADD(10,("Label[%u]: 
'%s'\n",i,shadow_data->labels[i]));
+                               DEBUGADD(DBGLVL_DEBUG,("Label[%u]: 
'%s'\n",i,shadow_data->labels[i]));
                        }
                }
 
@@ -1678,8 +1678,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                uid_t uid;
                size_t sid_len;
 
-               DEBUG(10, ("FSCTL_FIND_FILES_BY_SID: called on %s\n",
-                          fsp_fnum_dbg(fsp)));
+               DBG_DEBUG("FSCTL_FIND_FILES_BY_SID: called on %s\n",
+                          fsp_fnum_dbg(fsp));
 
                if (in_len < 8) {
                        /* NT_STATUS_BUFFER_TOO_SMALL maybe? */
@@ -1695,13 +1695,13 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                if (ret == -1) {
                        return NT_STATUS_INVALID_PARAMETER;
                }
-               DEBUGADD(10, ("for SID: %s\n",
+               DEBUGADD(DBGLVL_DEBUG, ("for SID: %s\n",
                              dom_sid_str_buf(&sid, &buf)));
 
                if (!sid_to_uid(&sid, &uid)) {
-                       DEBUG(0,("sid_to_uid: failed, sid[%s] sid_len[%lu]\n",
+                       DBG_ERR("sid_to_uid: failed, sid[%s] sid_len[%lu]\n",
                                 dom_sid_str_buf(&sid, &buf),
-                                (unsigned long)sid_len));
+                                (unsigned long)sid_len);
                        uid = (-1);
                }
 
@@ -1742,14 +1742,14 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                char *out_data_tmp = NULL;
 
                if (in_len != 16) {
-                       DEBUG(0,("FSCTL_QUERY_ALLOCATED_RANGES: data_count(%u) 
!= 16 is invalid!\n",
-                               in_len));
+                       DBG_ERR("FSCTL_QUERY_ALLOCATED_RANGES: data_count(%u) 
!= 16 is invalid!\n",
+                               in_len);
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
                if (max_out_len < 16) {
-                       DEBUG(0,("FSCTL_QUERY_ALLOCATED_RANGES: max_out_len 
(%u) < 16 is invalid!\n",
-                               max_out_len));
+                       DBG_ERR("FSCTL_QUERY_ALLOCATED_RANGES: max_out_len (%u) 
< 16 is invalid!\n",
+                               max_out_len);
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
@@ -1770,7 +1770,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                *out_len = 16;
                out_data_tmp = talloc_array(ctx, char, *out_len);
                if (out_data_tmp == NULL) {
-                       DEBUG(10, ("unable to allocate memory for response\n"));
+                       DBG_DEBUG("unable to allocate memory for response\n");
                        return NT_STATUS_NO_MEMORY;
                }
 
@@ -1792,8 +1792,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
 
        case FSCTL_IS_VOLUME_DIRTY:
        {
-               DEBUG(10,("FSCTL_IS_VOLUME_DIRTY: called on %s "
-                         "(but remotely not supported)\n", fsp_fnum_dbg(fsp)));
+               DBG_DEBUG("FSCTL_IS_VOLUME_DIRTY: called on %s "
+                         "(but remotely not supported)\n", fsp_fnum_dbg(fsp));
                /*
                 * 
http://msdn.microsoft.com/en-us/library/cc232128%28PROT.10%29.aspx
                 * says we have to respond with NT_STATUS_INVALID_PARAMETER
@@ -1808,8 +1808,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct 
*handle,
                 */
                if (!vfswrap_logged_ioctl_message) {
                        vfswrap_logged_ioctl_message = true;
-                       DEBUG(2, ("%s (0x%x): Currently not implemented.\n",
-                       __func__, function));
+                       DBG_NOTICE("%s (0x%x): Currently not implemented.\n",
+                       __func__, function);
                }
        }
 
@@ -2969,8 +2969,8 @@ static int strict_allocate_ftruncate(vfs_handle_struct 
*handle, files_struct *fs
        if (ret == 0) {
                return 0;
        }
-       DEBUG(10,("strict_allocate_ftruncate: SMB_VFS_FALLOCATE failed with "
-               "error %d. Falling back to slow manual allocation\n", errno));
+       DBG_DEBUG("strict_allocate_ftruncate: SMB_VFS_FALLOCATE failed with "
+               "error %d. Falling back to slow manual allocation\n", errno);
 
        /* available disk space is enough or not? */
        space_avail =
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 2d4a9cd8446..7f37c401279 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -34,14 +34,14 @@ static struct name_record *add_dns_result(struct nmb_name 
*question, struct in_a
 
        if (!addr.s_addr) {
                /* add the fail to WINS cache of names. give it 1 hour in the 
cache */
-               DEBUG(3,("add_dns_result: Negative DNS answer for %s\n", 
qname));
+               DBG_INFO("add_dns_result: Negative DNS answer for %s\n", qname);
                add_name_to_subnet( wins_server_subnet, qname, name_type,
                                NB_ACTIVE, 60*60, DNSFAIL_NAME, 1, &addr );
                return NULL;
        }
 
        /* add it to our WINS cache of names. give it 2 hours in the cache */
-       DEBUG(3,("add_dns_result: DNS gave answer for %s of %s\n", qname, 
inet_ntoa(addr)));
+       DBG_INFO("add_dns_result: DNS gave answer for %s of %s\n", qname, 
inet_ntoa(addr));
 
        add_name_to_subnet( wins_server_subnet, qname, name_type,
                               NB_ACTIVE, 2*60*60, DNS_NAME, 1, &addr);
@@ -144,7 +144,7 @@ void start_async_dns(struct messaging_context *msg)
        CatchChild();
 
        if (pipe(fd1) || pipe(fd2)) {
-               DEBUG(0,("can't create asyncdns pipes\n"));
+               DBG_ERR("can't create asyncdns pipes\n");
                return;
        }
 
@@ -155,7 +155,7 @@ void start_async_dns(struct messaging_context *msg)
                fd_out = fd2[1];
                close(fd1[1]);
                close(fd2[0]);
-               DEBUG(0,("started asyncdns process %d\n", (int)child_pid));
+               DBG_NOTICE("started asyncdns process %d\n", (int)child_pid);
                return;
        }
 
@@ -170,7 +170,7 @@ void start_async_dns(struct messaging_context *msg)
        status = reinit_after_fork(msg, nmbd_event_context(), true);
 
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("reinit_after_fork() failed\n"));
+               DBG_ERR("reinit_after_fork() failed\n");
                smb_panic("reinit_after_fork() failed");
        }
 
@@ -223,7 +223,7 @@ void run_dns_queue(struct messaging_context *msg)
        status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r));
 
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("read from child failed: %s\n", nt_errstr(status)));
+               DBG_ERR("read from child failed: %s\n", nt_errstr(status));
                fd_in = -1;
                return;
        }
@@ -232,7 +232,7 @@ void run_dns_queue(struct messaging_context *msg)
 
        if (dns_current) {
                if (query_current(&r)) {
-                       DEBUG(3,("DNS calling 
send_wins_name_query_response\n"));
+                       DBG_INFO("DNS calling send_wins_name_query_response\n");
                        in_dns = 1;
                        if(namerec == NULL)
                                send_wins_name_query_response(NAM_ERR, 
dns_current, NULL);
@@ -253,7 +253,7 @@ void run_dns_queue(struct messaging_context *msg)
                struct nmb_name *question = &nmb->question.question_name;
 
                if (nmb_name_equal(question, &r.name)) {
-                       DEBUG(3,("DNS calling 
send_wins_name_query_response\n"));
+                       DBG_INFO("DNS calling send_wins_name_query_response\n");
                        in_dns = 1;
                        if(namerec == NULL)
                                send_wins_name_query_response(NAM_ERR, p, NULL);
@@ -276,7 +276,7 @@ void run_dns_queue(struct messaging_context *msg)
                DLIST_REMOVE(dns_queue, dns_queue);
 
                if (!write_child(dns_current)) {
-                       DEBUG(3,("failed to send DNS query to child!\n"));
+                       DBG_NOTICE("failed to send DNS query to child!\n");
                        return;
                }
        }
@@ -293,7 +293,7 @@ bool queue_dns_query(struct packet_struct *p,struct 
nmb_name *question)
 
        if (!dns_current) {
                if (!write_child(p)) {
-                       DEBUG(3,("failed to send DNS query to child!\n"));
+                       DBG_NOTICE("failed to send DNS query to child!\n");
                        return False;
                }
                dns_current = p;
@@ -303,7 +303,7 @@ bool queue_dns_query(struct packet_struct *p,struct 
nmb_name *question)
                DLIST_ADD(dns_queue, p);
        }
 
-       DEBUG(3,("added DNS query for %s\n", nmb_namestr(question)));
+       DBG_NOTICE("added DNS query for %s\n", nmb_namestr(question));
        return True;
 }
 
@@ -322,7 +322,7 @@ bool queue_dns_query(struct packet_struct *p,struct 
nmb_name *question)
 
        pull_ascii_nstring(qname, sizeof(qname), question->name);
 
-       DEBUG(3,("DNS search for %s - ", nmb_namestr(question)));
+       DBG_NOTICE("DNS search for %s - ", nmb_namestr(question));
 
        dns_ip.s_addr = interpret_addr(qname);
 
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index e5794cc13bd..e095b7f8245 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -56,7 +56,7 @@ struct tevent_context *nmbd_event_context(void)
 
 static void terminate(struct messaging_context *msg)


-- 
Samba Shared Repository

Reply via email to