The branch, master has been updated
       via  b067a5e... s3: Remove debug_ctx()
      from  558e2de... Added some dn to the info in the log messages.

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


- Log -----------------------------------------------------------------
commit b067a5e4e83556d11a68ea1837ce4698762c123d
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Nov 3 10:59:18 2009 +0100

    s3: Remove debug_ctx()
    
    smbd just crashed on me: In a debug message I called a routine preparing a
    string that itself used debug_ctx. The outer routine also used it after the
    inner routine had returned. It was still referencing the talloc context
    that the outer debug_ctx() had given us, which the inner DEBUG had already
    freed.

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

Summary of changes:
 source3/include/proto.h        |    1 -
 source3/lib/debug.c            |   19 +------------
 source3/lib/util_sid.c         |    2 +-
 source3/libsmb/trusts_util.c   |    2 +-
 source3/locking/brlock.c       |    2 +-
 source3/locking/locking.c      |   12 ++++----
 source3/passdb/pdb_ads.c       |   56 ++++++++++++++++++++--------------------
 source3/rpc_client/cli_pipe.c  |   34 ++++++++++++------------
 source3/rpc_parse/parse_prs.c  |    2 +-
 source3/smbd/change_trust_pw.c |    2 +-
 source3/smbd/filename_util.c   |    6 ++--
 source3/smbd/oplock.c          |   10 +++---
 source3/smbd/oplock_onefs.c    |    8 +++---
 13 files changed, 70 insertions(+), 86 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3402233..6c8cb2e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -491,7 +491,6 @@ void check_log_size( void );
 void dbgflush( void );
 bool dbghdrclass(int level, int cls, const char *location, const char *func);
 bool dbghdr(int level, const char *location, const char *func);
-TALLOC_CTX *debug_ctx(void);
 
 /* The following definitions come from lib/display_sec.c  */
 
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 2e19f89..e851fd2 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -90,8 +90,6 @@ bool    AllowDebugChange = True;
 */
 bool    override_logfile;
 
-static TALLOC_CTX *tmp_debug_ctx;
-
 /*
  * This is to allow assignment to DEBUGLEVEL before the debug
  * system has been initialized.
@@ -888,8 +886,6 @@ void check_log_size( void )
        }
 
  done:
-       TALLOC_FREE(tmp_debug_ctx);
-
        errno = old_errno;
 
        return( 0 );
@@ -1057,12 +1053,12 @@ bool dbghdrclass(int level, int cls, const char 
*location, const char *func)
                /* Print it all out at once to prevent split syslog output. */
                if( lp_debug_prefix_timestamp() ) {
                    (void)Debug1( "[%s, %2d%s] ",
-                       current_timestring(debug_ctx(),
+                       current_timestring(talloc_tos(),
                                           lp_debug_hires_timestamp()),
                        level, header_str);
                } else {
                    (void)Debug1( "[%s, %2d%s] %s(%s)\n",
-                       current_timestring(debug_ctx(),
+                       current_timestring(talloc_tos(),
                                           lp_debug_hires_timestamp()),
                        level, header_str, location, func );
                }
@@ -1110,14 +1106,3 @@ bool dbghdr(int level, const char *location, const char 
*func)
        SAFE_FREE(msgbuf);
        return ret;
 }
-
-/*
- * Get us a temporary talloc context usable just for DEBUG arguments
- */
-TALLOC_CTX *debug_ctx(void)
-{
-        if (tmp_debug_ctx == NULL) {
-                tmp_debug_ctx = talloc_named_const(NULL, 0, "debug_ctx");
-        }
-        return tmp_debug_ctx;
-}
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 9e5d4d3..639269c 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -201,7 +201,7 @@ char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID 
*sid)
 
 char *sid_string_dbg(const DOM_SID *sid)
 {
-       return sid_string_talloc(debug_ctx(), sid);
+       return sid_string_talloc(talloc_tos(), sid);
 }
 
 /*****************************************************************
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 584217d..5dda3c5 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -64,7 +64,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
 
        if (NT_STATUS_IS_OK(nt_status)) {
                DEBUG(3,("%s : trust_pw_change_and_store_it: Changed 
password.\n", 
-                        current_timestring(debug_ctx(), False)));
+                        current_timestring(talloc_tos(), False)));
                /*
                 * Return the result of trying to write the new password
                 * back into the trust account file.
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 18a7981..c72fad7 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -45,7 +45,7 @@ static void print_lock_struct(unsigned int i, struct 
lock_struct *pls)
                        i,
                        (unsigned int)pls->context.smbpid,
                        (unsigned int)pls->context.tid,
-                       procid_str(debug_ctx(), &pls->context.pid) ));
+                       procid_str(talloc_tos(), &pls->context.pid) ));
        
        DEBUG(10,("start = %.0f, size = %.0f, fnum = %d, %s %s\n",
                (double)pls->start,
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 5b17e3b..cf787d4 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -545,9 +545,9 @@ static bool parse_share_modes(const TDB_DATA dbuf, struct 
share_mode_lock *lck)
        DEBUG(10, ("parse_share_modes: delete_on_close: %d, owrt: %s, "
                   "cwrt: %s, tok: %u, num_share_modes: %d\n",
                   lck->delete_on_close,
-                  timestring(debug_ctx(),
+                  timestring(talloc_tos(),
                              convert_timespec_to_time_t(lck->old_write_time)),
-                  timestring(debug_ctx(),
+                  timestring(talloc_tos(),
                              convert_timespec_to_time_t(
                                      lck->changed_write_time)),
                   (unsigned int)data.u.s.delete_token_size,
@@ -719,9 +719,9 @@ static TDB_DATA unparse_share_modes(const struct 
share_mode_lock *lck)
 
        DEBUG(10,("unparse_share_modes: del: %d, owrt: %s cwrt: %s, tok: %u, "
                  "num: %d\n", data->u.s.delete_on_close,
-                 timestring(debug_ctx(),
+                 timestring(talloc_tos(),
                             convert_timespec_to_time_t(lck->old_write_time)),
-                 timestring(debug_ctx(),
+                 timestring(talloc_tos(),
                             convert_timespec_to_time_t(
                                     lck->changed_write_time)),
                  (unsigned int)data->u.s.delete_token_size,
@@ -1476,7 +1476,7 @@ bool set_sticky_write_time(struct file_id fileid, struct 
timespec write_time)
        struct share_mode_lock *lck;
 
        DEBUG(5,("set_sticky_write_time: %s id=%s\n",
-                timestring(debug_ctx(),
+                timestring(talloc_tos(),
                            convert_timespec_to_time_t(write_time)),
                 file_id_string_tos(&fileid)));
 
@@ -1499,7 +1499,7 @@ bool set_write_time(struct file_id fileid, struct 
timespec write_time)
        struct share_mode_lock *lck;
 
        DEBUG(5,("set_write_time: %s id=%s\n",
-                timestring(debug_ctx(),
+                timestring(talloc_tos(),
                            convert_timespec_to_time_t(write_time)),
                 file_id_string_tos(&fileid)));
 
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 70d5500..35aadbd 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -358,7 +358,7 @@ static NTSTATUS pdb_ads_getsamupriv(struct pdb_ads_state 
*state,
                                &users, "%s", filter);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(result);
                return NT_STATUS_LDAP(rc);
        }
@@ -487,7 +487,7 @@ static NTSTATUS pdb_ads_create_user(struct pdb_methods *m,
        rc = tldap_add(ld, dn, num_mods, mods, NULL, 0, NULL, 0);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_add failed %s\n",
-                          tldap_errstr(debug_ctx(), ld, rc)));
+                          tldap_errstr(talloc_tos(), ld, rc)));
                TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
@@ -499,7 +499,7 @@ static NTSTATUS pdb_ads_create_user(struct pdb_methods *m,
                                name);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not find just created user %s: %s\n",
-                          name, tldap_errstr(debug_ctx(), state->ld, rc)));
+                          name, tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
@@ -549,7 +549,7 @@ static NTSTATUS pdb_ads_delete_user(struct pdb_methods *m,
        TALLOC_FREE(dn);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_delete for %s failed: %s\n", dn,
-                          tldap_errstr(debug_ctx(), ld, rc)));
+                          tldap_errstr(talloc_tos(), ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        return NT_STATUS_OK;
@@ -591,7 +591,7 @@ static NTSTATUS pdb_ads_update_sam_account(struct 
pdb_methods *m,
        TALLOC_FREE(mods);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_modify for %s failed: %s\n", priv->dn,
-                          tldap_errstr(debug_ctx(), ld, rc)));
+                          tldap_errstr(talloc_tos(), ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -635,7 +635,7 @@ static NTSTATUS pdb_ads_getgrfilter(struct pdb_methods *m, 
GROUP_MAP *map,
                                &group, "%s", filter);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        if (talloc_array_length(group) != 1) {
@@ -775,7 +775,7 @@ static NTSTATUS pdb_ads_create_dom_group(struct pdb_methods 
*m,
        rc = tldap_add(ld, dn, num_mods, mods, NULL, 0, NULL, 0);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_add failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(frame);
                return NT_STATUS_LDAP(rc);
        }
@@ -786,7 +786,7 @@ static NTSTATUS pdb_ads_create_dom_group(struct pdb_methods 
*m,
                "(&(objectclass=group)(samaccountname=%s))", name);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not find just created alias %s: %s\n",
-                          name, tldap_errstr(debug_ctx(), state->ld, rc)));
+                          name, tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(frame);
                return NT_STATUS_LDAP(rc);
        }
@@ -834,7 +834,7 @@ static NTSTATUS pdb_ads_delete_dom_group(struct pdb_methods 
*m,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -862,7 +862,7 @@ static NTSTATUS pdb_ads_delete_dom_group(struct pdb_methods 
*m,
        TALLOC_FREE(msg);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_delete failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -921,7 +921,7 @@ static NTSTATUS pdb_ads_enum_group_members(struct 
pdb_methods *m,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        switch talloc_array_length(msg) {
@@ -983,7 +983,7 @@ static NTSTATUS pdb_ads_enum_group_memberships(struct 
pdb_methods *m,
                priv->dn, GTYPE_SECURITY_GLOBAL_GROUP);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -1072,7 +1072,7 @@ static NTSTATUS pdb_ads_mod_groupmem(struct pdb_methods 
*m,
        TALLOC_FREE(frame);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_modify failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                if (rc == TLDAP_TYPE_OR_VALUE_EXISTS) {
                        return NT_STATUS_MEMBER_IN_GROUP;
                }
@@ -1146,7 +1146,7 @@ static NTSTATUS pdb_ads_create_alias(struct pdb_methods 
*m,
        rc = tldap_add(ld, dn, num_mods, mods, NULL, 0, NULL, 0);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_add failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(frame);
                return NT_STATUS_LDAP(rc);
        }
@@ -1157,7 +1157,7 @@ static NTSTATUS pdb_ads_create_alias(struct pdb_methods 
*m,
                "(&(objectclass=group)(samaccountname=%s))", name);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not find just created alias %s: %s\n",
-                          name, tldap_errstr(debug_ctx(), state->ld, rc)));
+                          name, tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(frame);
                return NT_STATUS_LDAP(rc);
        }
@@ -1210,7 +1210,7 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods 
*m,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
@@ -1228,7 +1228,7 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods 
*m,
        rc = tldap_delete(ld, dn, NULL, 0, NULL, 0);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_delete failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
@@ -1269,7 +1269,7 @@ static NTSTATUS pdb_ads_set_aliasinfo(struct pdb_methods 
*m,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        switch talloc_array_length(msg) {
@@ -1310,7 +1310,7 @@ static NTSTATUS pdb_ads_set_aliasinfo(struct pdb_methods 
*m,
        TALLOC_FREE(msg);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_modify failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        return NT_STATUS_OK;
@@ -1333,7 +1333,7 @@ static NTSTATUS pdb_ads_sid2dn(struct pdb_ads_state 
*state,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -1406,7 +1406,7 @@ static NTSTATUS pdb_ads_mod_aliasmem(struct pdb_methods 
*m,
        TALLOC_FREE(frame);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_modify failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                if (rc == TLDAP_TYPE_OR_VALUE_EXISTS) {
                        return NT_STATUS_MEMBER_IN_ALIAS;
                }
@@ -1488,7 +1488,7 @@ static NTSTATUS pdb_ads_enum_aliasmem(struct pdb_methods 
*m,
        TALLOC_FREE(sidstr);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
        switch talloc_array_length(msg) {
@@ -1585,7 +1585,7 @@ static NTSTATUS pdb_ads_enum_alias_memberships(struct 
pdb_methods *m,
        TALLOC_FREE(filter);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("tldap_search failed %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return NT_STATUS_LDAP(rc);
        }
 
@@ -1658,7 +1658,7 @@ static NTSTATUS pdb_ads_lookup_rids(struct pdb_methods *m,
                TALLOC_FREE(sidstr);
                if (rc != TLDAP_SUCCESS) {
                        DEBUG(10, ("ldap_search failed %s\n",
-                                  tldap_errstr(debug_ctx(), state->ld, rc)));
+                                  tldap_errstr(talloc_tos(), state->ld, rc)));
                        continue;
                }
 
@@ -1797,7 +1797,7 @@ static bool pdb_ads_search_filter(struct pdb_methods *m,
                "%s", filter);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search_ext_s failed: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                return false;
        }
 
@@ -2220,7 +2220,7 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state 
*state,
        rc = tldap_fetch_rootdse(ld);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not retrieve rootdse: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                status = NT_STATUS_LDAP(rc);
                goto done;
        }
@@ -2253,7 +2253,7 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state 
*state,
                talloc_tos(), &domain, "(objectclass=*)");
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not retrieve domain: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                status = NT_STATUS_LDAP(rc);
                goto done;
        }
@@ -2285,7 +2285,7 @@ static NTSTATUS pdb_ads_connect(struct pdb_ads_state 
*state,
                talloc_tos(), &ncname, "(ncname=%s)", state->domaindn);
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("Could not retrieve ncname: %s\n",
-                          tldap_errstr(debug_ctx(), state->ld, rc)));
+                          tldap_errstr(talloc_tos(), state->ld, rc)));
                status = NT_STATUS_LDAP(rc);
                goto done;
        }
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index c197bd4..e150059 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -618,7 +618,7 @@ static NTSTATUS cli_pipe_verify_ntlmssp(struct 
rpc_pipe_client *cli, RPC_HDR *pr
                        if (!NT_STATUS_IS_OK(status)) {
                                DEBUG(0,("cli_pipe_verify_ntlmssp: failed to 
unseal "
                                        "packet from %s. Error was %s.\n",
-                                       rpccli_pipe_txt(debug_ctx(), cli),
+                                       rpccli_pipe_txt(talloc_tos(), cli),
                                        nt_errstr(status) ));
                                return status;
                        }
@@ -633,7 +633,7 @@ static NTSTATUS cli_pipe_verify_ntlmssp(struct 
rpc_pipe_client *cli, RPC_HDR *pr
                        if (!NT_STATUS_IS_OK(status)) {
                                DEBUG(0,("cli_pipe_verify_ntlmssp: check 
signing failed on "
                                        "packet from %s. Error was %s.\n",
-                                       rpccli_pipe_txt(debug_ctx(), cli),
+                                       rpccli_pipe_txt(talloc_tos(), cli),
                                        nt_errstr(status) ));
                                return status;
                        }
@@ -756,7 +756,7 @@ static NTSTATUS cli_pipe_verify_schannel(struct 
rpc_pipe_client *cli, RPC_HDR *p
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(3,("cli_pipe_verify_schannel: failed to decode PDU "
                                "Connection to %s (%s).\n",
-                               rpccli_pipe_txt(debug_ctx(), cli),
+                               rpccli_pipe_txt(talloc_tos(), cli),
                                nt_errstr(status)));
                return NT_STATUS_INVALID_PARAMETER;
        }
@@ -814,7 +814,7 @@ static NTSTATUS cli_pipe_validate_rpc_response(struct 
rpc_pipe_client *cli, RPC_
                                DEBUG(3, ("cli_pipe_validate_rpc_response: "
                                          "Connection to %s - got non-zero "
                                          "auth len %u.\n",
-                                       rpccli_pipe_txt(debug_ctx(), cli),
+                                       rpccli_pipe_txt(talloc_tos(), cli),
                                        (unsigned int)prhdr->auth_len ));
                                return NT_STATUS_INVALID_PARAMETER;
                        }
@@ -840,7 +840,7 @@ static NTSTATUS cli_pipe_validate_rpc_response(struct 
rpc_pipe_client *cli, RPC_
                default:
                        DEBUG(3, ("cli_pipe_validate_rpc_response: Connection "
                                  "to %s - unknown internal auth type %u.\n",
-                                 rpccli_pipe_txt(debug_ctx(), cli),
+                                 rpccli_pipe_txt(talloc_tos(), cli),
                                  cli->auth->auth_type ));
                        return NT_STATUS_INVALID_INFO_CLASS;
        }
@@ -944,7 +944,7 @@ static NTSTATUS cli_pipe_validate_current_pdu(struct 
rpc_pipe_client *cli, RPC_H
                case DCERPC_PKT_BIND_NAK:
                        DEBUG(1, ("cli_pipe_validate_current_pdu: Bind NACK "
                                  "received from %s!\n",
-                                 rpccli_pipe_txt(debug_ctx(), cli)));
+                                 rpccli_pipe_txt(talloc_tos(), cli)));
                        /* Use this for now... */
                        return NT_STATUS_NETWORK_ACCESS_DENIED;
 
@@ -965,8 +965,8 @@ static NTSTATUS cli_pipe_validate_current_pdu(struct 
rpc_pipe_client *cli, RPC_H
 
                        DEBUG(1, ("cli_pipe_validate_current_pdu: RPC fault "
                                  "code %s received from %s!\n",
-                               dcerpc_errstr(debug_ctx(), 
NT_STATUS_V(fault_resp.status)),
-                               rpccli_pipe_txt(debug_ctx(), cli)));
+                               dcerpc_errstr(talloc_tos(), 
NT_STATUS_V(fault_resp.status)),
+                               rpccli_pipe_txt(talloc_tos(), cli)));
                        if (NT_STATUS_IS_OK(fault_resp.status)) {
                                return NT_STATUS_UNSUCCESSFUL;
                        } else {
@@ -978,14 +978,14 @@ static NTSTATUS cli_pipe_validate_current_pdu(struct 
rpc_pipe_client *cli, RPC_H
                        DEBUG(0, ("cli_pipe_validate_current_pdu: unknown 
packet type %u received "
                                "from %s!\n",
                                (unsigned int)prhdr->pkt_type,
-                               rpccli_pipe_txt(debug_ctx(), cli)));
+                               rpccli_pipe_txt(talloc_tos(), cli)));
                        return NT_STATUS_INVALID_INFO_CLASS;
        }
 
        if (prhdr->pkt_type != expected_pkt_type) {
                DEBUG(3, ("cli_pipe_validate_current_pdu: Connection to %s "
                          "got an unexpected RPC packet type - %u, not %u\n",
-                       rpccli_pipe_txt(debug_ctx(), cli),
+                       rpccli_pipe_txt(talloc_tos(), cli),
                        prhdr->pkt_type,
                        expected_pkt_type));
                return NT_STATUS_INVALID_INFO_CLASS;
@@ -1292,7 +1292,7 @@ static struct tevent_req *rpc_api_pipe_send(TALLOC_CTX 
*mem_ctx,
                goto post_status;
        }
 
-       DEBUG(5,("rpc_api_pipe: %s\n", rpccli_pipe_txt(debug_ctx(), cli)));
+       DEBUG(5,("rpc_api_pipe: %s\n", rpccli_pipe_txt(talloc_tos(), cli)));
 
        max_recv_frag = cli->max_recv_frag;
 


-- 
Samba Shared Repository

Reply via email to