[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Jan 5 01:03:02 UTC 2022


The branch, master has been updated
       via  42cf3f4f007 lib: Fix a typo
       via  621ceafe7f1 vfs: Modernize a DEBUG statement
       via  aa377c7fd78 smbd: Modernize a DEBUG statement
       via  09708226998 rpc_server3: Inline single-use rpcint_binding_handle_ex()
       via  bad374ae66d rpc_server3: Inline pipes_struct into dcerpc_ncacn_conn
       via  55cdb61269f rpc_server3: Remove dcerpc_ncacn_conn->session_info
       via  79024fa681f rpc_server3: Remove dcerpc_ncacn_conn->local_server_addr
       via  10478d39a1c rpc_server3: Remove dcerpc_ncacn_conn->remote_client_addr
       via  7c5b247e314 rpc_server3: Remove dcerpc_ncacn_conn->tstream
       via  0d315ddbfe9 rpc_server3: Remove dcerpc_ncacn_conn->dce_ctx
       via  909e309414f rpc_server3: Remove dcerpc_ncacn_conn->msg_ctx
       via  7d92880fbf4 rpc_server3: dcerpc_ncacn_conn->ev_ctx was only set but never used
       via  0eed31db6c3 winbind: Don't transfer a pointer that's NULL anyway
       via  0cae08f2988 rpc_server3: No linked list for pipes_struct anymore
       via  0a7ecf1880a rpc_server3: Remove pipes_struct->auth
       via  8379d8cd532 rpc_server3: Remove pipes_struct->session_info
       via  716727c020f rpc_server3: Remove pipes_struct->pipe_bound
       via  cdc18db7e2b rpc_server3: Inline make_base_pipes_struct()
       via  640f4403c65 rpc_server3: Remove pipes_struct->remote_address
       via  5a0155fb51d rpc_server3: Remove pipes_struct->local_address
       via  2777fde6a1a rpc_server3: Inline make_base_pipes_struct() into rpc_worker.c
       via  0f9f1fa0c26 rpc_server3: Inline make_internal_ncacn_conn() into rpc_worker.c
       via  22176770ad2 smbd: Avoid a DEBUGADD statement
       via  25aa7243fb2 Remove some unused code
       via  c7e36be5da5 lib: Avoid a cast
       via  d60f583245a smbd: Avoid some casts
       via  9a2f5a52e8c smbd: Remove an unneeded anonymous struct declaration
       via  6c64e698f03 smbd: Move fast_string_hash() to mangle_hash.c, the only user
       via  5ce8b395ec4 smbd: Fix a few typos
       via  d0b61ecd74c smbd: Save a few lines by using cp_smb_filename_nostream()
      from  dd988610051 auth/ntlmssp: make sure we return INVALID_PARAMETER for NTLMv2_RESPONSE parsing errors

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


- Log -----------------------------------------------------------------
commit 42cf3f4f0079549b99d6cdecdc741654ff7844d6
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 23 13:24:27 2021 +0100

    lib: Fix a typo
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Wed Jan  5 01:02:38 UTC 2022 on sn-devel-184

commit 621ceafe7f1ff1148b8ca3249a25f57c62a17c97
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Dec 21 12:54:56 2021 +0100

    vfs: Modernize a DEBUG statement
    
    Fix the function name printed
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit aa377c7fd788585ac359c2a61066b7ffe90d8883
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Dec 19 11:02:46 2021 +0100

    smbd: Modernize a DEBUG statement
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0970822699804dad44dba02513f47d875cf54d8d
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Oct 7 14:52:47 2021 +0200

    rpc_server3: Inline single-use rpcint_binding_handle_ex()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit bad374ae66d795f971153c5561067b26c45e1c7b
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 12:20:17 2021 +0200

    rpc_server3: Inline pipes_struct into dcerpc_ncacn_conn
    
    This makes it clear that our internal representation of a rpc client
    connection in the source3/ server is struct dcerpc_ncacn_conn and that
    struct pipes_struct is only around for API compatibility with the
    existing server stubs.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 55cdb61269f828be13186060b35c9be742a22fa0
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->session_info
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    The talloc hierarchy is correctly maintained, dcesrv_endpoint_connect() takes a
    talloc_reference() of session_info.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 79024fa681f3d64d21db80abc23ef6b8c238750a
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->local_server_addr
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 10478d39a1c028a79991a91984243f8d9d063045
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->remote_client_addr
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7c5b247e31484862edd394072e25c7154b890d8b
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->tstream
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0d315ddbfe919898d75284c9aefce5ed56cf6ca8
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->dce_ctx
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 909e309414fcc6926f8b574ac8247f837befb32a
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:16:21 2021 +0200

    rpc_server3: Remove dcerpc_ncacn_conn->msg_ctx
    
    This was only used inside rpc_worker_new_client(), a leftover from
    times where accepting a client was an async process waiting for the
    struct named_pipe_auth_req_info4.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7d92880fbf42e77a4193c7ff5ab2a22a0a65a79c
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:14:30 2021 +0200

    rpc_server3: dcerpc_ncacn_conn->ev_ctx was only set but never used
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0eed31db6c327eaedc984ff5aab32afeea8a144a
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Oct 1 16:28:57 2021 +0200

    winbind: Don't transfer a pointer that's NULL anyway
    
    ncacn_conn was created by make_internal_ncacn_conn with talloc_zero(),
    and that does not set session_info for the purely one-shot connection
    state in winbindd_dual_ndrcmd().
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0cae08f298856af10959a031794155946a4e778c
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 6 11:39:21 2021 +0200

    rpc_server3: No linked list for pipes_struct anymore
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0a7ecf1880a8d3191a142ed5d18d57fbe858f86c
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 13:50:02 2021 +0200

    rpc_server3: Remove pipes_struct->auth
    
    Replace with a call to dcesrv_call_auth_info(p->dce_call)
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8379d8cd532be9540cd61332923b76197ddb1e2c
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 13:40:02 2021 +0200

    rpc_server3: Remove pipes_struct->session_info
    
    This is a big patch, but all it does is replace all "p->session_info"
    with "session_info" after introducing a local variable from
    dcesrv_call_session_info(p->dce_call).
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 716727c020fefa8f5efe2e68814eb979e1bb5e22
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 12:49:56 2021 +0200

    rpc_server3: Remove pipes_struct->pipe_bound
    
    Only used in pipe_access_check(), superseded by dcesrv_call_auth_info()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit cdc18db7e2b43a52da1b7f038be7ae4483f81d04
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 12:37:30 2021 +0200

    rpc_server3: Inline make_base_pipes_struct()
    
    This did not even use all its arguments anymore.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 640f4403c65f3d07551127c1fe6ce8f9ed2b6785
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 12:26:18 2021 +0200

    rpc_server3: Remove pipes_struct->remote_address
    
    Also available via dcesrv_connection_get_remote_address(p->dce_call->conn)
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5a0155fb51dff6ce9f874f29ca847aebf349108d
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 12:19:57 2021 +0200

    rpc_server3: Remove pipes_struct->local_address
    
    Also available via dcesrv_connection_get_local_address(p->dce_call->conn)
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2777fde6a1a7d6b6683712b08f21d156080e97e3
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Oct 4 12:03:55 2021 +0200

    rpc_server3: Inline make_base_pipes_struct() into rpc_worker.c
    
    This is the only user, and in winbind_dual_ndr.c's
    make_internal_ncacn_conn we have another creator of pipes_struct. So
    it seems not necessary to keep this public.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0f9f1fa0c26c065984d32426c1e55f88e7bcaced
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 28 13:26:18 2021 +0200

    rpc_server3: Inline make_internal_ncacn_conn() into rpc_worker.c
    
    This was the only user, and as we have another custom version in
    winbind with make_internal_ncacn_conn(), I think this is not really
    required to keep around as a separate function.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 22176770ad2257319dd0a8b9c265b42de1d06122
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Dec 21 17:12:55 2021 +0100

    smbd: Avoid a DEBUGADD statement
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 25aa7243fb238f910ba52fc084d94f3430811ead
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 12 12:06:20 2021 +0200

    Remove some unused code
    
    I think that if we want to work on asn1 routines we should use
    libtasn1. We already depend on this via gnutls these days.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c7e36be5da5f09d03689c23e2a91d79a011e9204
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Dec 27 11:25:34 2021 +0100

    lib: Avoid a cast
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d60f583245a9847e791a42c25286f2200662fc8d
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Nov 24 12:28:34 2021 +0100

    smbd: Avoid some casts
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9a2f5a52e8c534ae9d70ceaa5ea697237480fab0
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Nov 26 16:36:25 2021 +0100

    smbd: Remove an unneeded anonymous struct declaration
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6c64e698f036d2028c3273939c2ebbeb3c74485c
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Nov 26 16:35:44 2021 +0100

    smbd: Move fast_string_hash() to mangle_hash.c, the only user
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5ce8b395ec4bebb441fb568769cf6b91a94c1dd4
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Nov 25 16:52:41 2021 +0100

    smbd: Fix a few typos
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d0b61ecd74c2d564ca38a6e84c3c8dae81a1ddb7
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Nov 25 15:37:00 2021 +0100

    smbd: Save a few lines by using cp_smb_filename_nostream()
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 lib/util/util_net.c                              |   2 +-
 pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm   |  19 +-
 source3/lib/filename_util.c                      |   3 +-
 source3/modules/vfs_fake_acls.c                  |   2 +-
 source3/modules/vfs_streams_xattr.c              |   5 +-
 source3/rpc_server/dfs/srv_dfs_nt.c              |  60 +++-
 source3/rpc_server/epmapper/srv_epmapper.c       |  20 +-
 source3/rpc_server/eventlog/srv_eventlog_nt.c    |   7 +-
 source3/rpc_server/fss/srv_fss_agent.c           |  38 ++-
 source3/rpc_server/lsa/srv_lsa_nt.c              | 126 +++++---
 source3/rpc_server/mdssvc/srv_mdssvc_nt.c        |  10 +-
 source3/rpc_server/netlogon/srv_netlog_nt.c      |  69 ++++-
 source3/rpc_server/ntsvcs/srv_ntsvcs_nt.c        |   6 +-
 source3/rpc_server/rpc_handles.c                 |  56 +---
 source3/rpc_server/rpc_ncacn_np.c                |  60 ++--
 source3/rpc_server/rpc_pipes.h                   |  21 --
 source3/rpc_server/rpc_server.c                  |  31 +-
 source3/rpc_server/rpc_server.h                  |  21 +-
 source3/rpc_server/rpc_worker.c                  |  69 ++---
 source3/rpc_server/samr/srv_samr_nt.c            | 148 ++++++---
 source3/rpc_server/spoolss/srv_iremotewinspool.c |  20 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c      | 140 ++++++---
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c        | 107 +++++--
 source3/rpc_server/svcctl/srv_svcctl_nt.c        |  35 ++-
 source3/rpc_server/winreg/srv_winreg_nt.c        |  18 +-
 source3/rpc_server/wkssvc/srv_wkssvc_nt.c        |  35 ++-
 source3/smbd/filename.c                          |  19 +-
 source3/smbd/files.c                             |   2 +-
 source3/smbd/mangle_hash.c                       |  16 +
 source3/smbd/open.c                              |  42 +--
 source3/smbd/proto.h                             |   2 -
 source3/smbd/statcache.c                         |  16 -
 source3/smbd/trans2.c                            |  17 +-
 source3/winbindd/winbindd_dual_ndr.c             |  13 +-
 source3/winbindd/winbindd_dual_srv.c             |  11 +-
 source4/build/pasn1/Makefile                     |   5 -
 source4/build/pasn1/asn1.yp                      | 306 ------------------
 source4/build/pasn1/pasn1.pl                     |  93 ------
 source4/build/pasn1/util.pm                      | 379 -----------------------
 39 files changed, 752 insertions(+), 1297 deletions(-)
 delete mode 100644 source4/build/pasn1/Makefile
 delete mode 100644 source4/build/pasn1/asn1.yp
 delete mode 100755 source4/build/pasn1/pasn1.pl
 delete mode 100644 source4/build/pasn1/util.pm


Changeset truncated at 500 lines:

diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index fe474dc16be..a0032cca22f 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -365,7 +365,7 @@ uint32_t interpret_addr(const char *str)
 		ret = dest.s_addr; /* NETWORK BYTE ORDER ! */
 	} else {
 		/* Otherwise assume it's a network name of some sort and use
-			getadddrinfo. */
+			getaddrinfo. */
 		struct addrinfo *res = NULL;
 		struct addrinfo *res_list = NULL;
 		if (!interpret_string_addr_internal(&res_list,
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
index 9ea70a3af93..be275cc9109 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
@@ -226,11 +226,6 @@ sub boilerplate_iface($)
 	$self->pidl("static NTSTATUS $name\__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)");
 	$self->pidl("{");
 	$self->indent();
-	$self->pidl("struct pipes_struct *p = NULL;");
-	$self->pidl("");
-	$self->pidl("/* Retrieve pipes struct */");
-	$self->pidl("p = dcesrv_get_pipes_struct(context->conn);");
-	$self->pidl("p->pipe_bound = true;");
 	$self->pidlnoindent("#ifdef DCESRV_INTERFACE_$uname\_BIND");
 	$self->pidl("return DCESRV_INTERFACE_$uname\_BIND(context,iface);");
 	$self->pidlnoindent("#else");
@@ -290,7 +285,6 @@ sub boilerplate_iface($)
 	$self->indent();
 	$self->pidl("uint16_t opnum = dce_call->pkt.u.request.opnum;");
 	$self->pidl("struct pipes_struct *p = NULL;");
-	$self->pidl("struct auth_session_info *pipe_session_info = NULL;");
 	$self->pidl("NTSTATUS status = NT_STATUS_OK;");
 	$self->pidl("bool impersonated = false;");
 	$self->pidl("");
@@ -298,12 +292,6 @@ sub boilerplate_iface($)
 	$self->pidl("p = dcesrv_get_pipes_struct(dce_call->conn);");
 	$self->pidl("p->dce_call = dce_call;");
 	$self->pidl("p->mem_ctx = mem_ctx;");
-	$self->pidl("/* Update pipes struct session info */");
-	$self->pidl("pipe_session_info = p->session_info;");
-	$self->pidl("p->session_info = dce_call->auth_state->session_info;");
-	$self->pidl("p->auth.auth_type = dce_call->auth_state->auth_type;");
-	$self->pidl("p->auth.auth_level = dce_call->auth_state->auth_level;");
-	$self->pidl("p->auth.auth_context_id = dce_call->auth_state->auth_context_id;");
 	$self->pidl("/* Reset pipes struct fault state */");
 	$self->pidl("p->fault_state = 0;");
 	$self->pidl("");
@@ -311,7 +299,7 @@ sub boilerplate_iface($)
 	$self->pidl("/* Impersonate */");
 	$self->pidl("if (dispatch == S3COMPAT_RPC_DISPATCH_EXTERNAL) {");
 	$self->indent();
-	$self->pidl("impersonated = become_authenticated_pipe_user(p->session_info);");
+	$self->pidl("impersonated = become_authenticated_pipe_user(dce_call->auth_state->session_info);");
 	$self->pidl("if (!impersonated) {");
 	$self->indent();
 	$self->pidl("dce_call->fault_code = DCERPC_FAULT_ACCESS_DENIED;");
@@ -344,11 +332,6 @@ sub boilerplate_iface($)
 
 	$self->pidl("p->dce_call = NULL;");
 	$self->pidl("p->mem_ctx = NULL;");
-	$self->pidl("/* Restore session info */");
-	$self->pidl("p->session_info = pipe_session_info;");
-	$self->pidl("p->auth.auth_type = 0;");
-	$self->pidl("p->auth.auth_level = 0;");
-	$self->pidl("p->auth.auth_context_id = 0;");
 	$self->pidl("/* Check pipes struct fault state */");
 	$self->pidl("if (p->fault_state != 0) {");
 	$self->indent();
diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c
index f2ef0fbb074..ca4d77713ad 100644
--- a/source3/lib/filename_util.c
+++ b/source3/lib/filename_util.c
@@ -208,8 +208,7 @@ const char *fsp_fnum_dbg(const struct files_struct *fsp)
 		return "fnum [invalid value]";
 	}
 
-	str = talloc_asprintf(talloc_tos(), "fnum %llu",
-			      (unsigned long long)fsp->fnum);
+	str = talloc_asprintf(talloc_tos(), "fnum %"PRIu64, fsp->fnum);
 	if (str == NULL) {
 		DEBUG(1, ("%s: talloc_asprintf failed\n", __FUNCTION__));
 		return "fnum [talloc failed!]";
diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c
index f7b6e3ba220..441e22ea3f6 100644
--- a/source3/modules/vfs_fake_acls.c
+++ b/source3/modules/vfs_fake_acls.c
@@ -668,7 +668,7 @@ static int fake_acls_connect(struct vfs_handle_struct *handle,
 	}
 	/*
 	 * Create a struct can tell us if we're recursing
-	 * into open_pathref_fsp() in this module. This will
+	 * into openat_pathref_fsp() in this module. This will
 	 * go away once we have SMB_VFS_STATX() and we will
 	 * have a way for a caller to as for specific stat
 	 * fields in a granular way. Then we will know exactly
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 76b23c7224f..682d492fee3 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -330,8 +330,9 @@ static int streams_xattr_openat(struct vfs_handle_struct *handle,
 	SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
 				return -1);
 
-	DEBUG(10, ("streams_xattr_open called for %s with flags 0x%x\n",
-		   smb_fname_str_dbg(smb_fname), flags));
+	DBG_DEBUG("called for %s with flags 0x%x\n",
+		  smb_fname_str_dbg(smb_fname),
+		  flags);
 
 	if (!is_named_stream(smb_fname)) {
 		return SMB_VFS_NEXT_OPENAT(handle,
diff --git a/source3/rpc_server/dfs/srv_dfs_nt.c b/source3/rpc_server/dfs/srv_dfs_nt.c
index 4821bea2457..b69f7025191 100644
--- a/source3/rpc_server/dfs/srv_dfs_nt.c
+++ b/source3/rpc_server/dfs/srv_dfs_nt.c
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "ntdomain.h"
+#include "librpc/rpc/dcesrv_core.h"
 #include "librpc/gen_ndr/ndr_dfs.h"
 #include "librpc/gen_ndr/ndr_dfs_scompat.h"
 #include "msdfs.h"
@@ -47,6 +48,14 @@ void _dfs_GetManagerVersion(struct pipes_struct *p, struct dfs_GetManagerVersion
 
 WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+	const struct tsocket_address *local_address =
+		dcesrv_connection_get_local_address(dcesrv_conn);
+	const struct tsocket_address *remote_address =
+		dcesrv_connection_get_remote_address(dcesrv_conn);
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	struct junction_map *jn = NULL;
 	struct referral *old_referral_list = NULL;
 	bool self_ref = False;
@@ -55,7 +64,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
 	NTSTATUS status;
 	TALLOC_CTX *ctx = talloc_tos();
 
-	if (p->session_info->unix_token->uid != sec_initial_uid()) {
+	if (session_info->unix_token->uid != sec_initial_uid()) {
 		DEBUG(10,("_dfs_add: uid != 0. Access denied.\n"));
 		return WERR_ACCESS_DENIED;
 	}
@@ -77,10 +86,10 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
 
 	/* The following call can change the cwd. */
 	status = get_referred_path(ctx,
-				   p->session_info,
+				   session_info,
 				   r->in.path,
-				   p->remote_address,
-				   p->local_address,
+				   remote_address,
+				   local_address,
 				   true, /*allow_broken_path */
 				   jn, &consumedcnt, &self_ref);
 	if(!NT_STATUS_IS_OK(status)) {
@@ -109,7 +118,7 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
 	jn->referral_list[jn->referral_count-1].ttl = REFERRAL_TTL;
 	jn->referral_list[jn->referral_count-1].alternate_path = altpath;
 
-	if(!create_msdfs_link(jn, p->session_info)) {
+	if (!create_msdfs_link(jn, session_info)) {
 		return WERR_NERR_DFSCANTCREATEJUNCTIONPOINT;
 	}
 
@@ -118,6 +127,14 @@ WERROR _dfs_Add(struct pipes_struct *p, struct dfs_Add *r)
 
 WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+	const struct tsocket_address *local_address =
+		dcesrv_connection_get_local_address(dcesrv_conn);
+	const struct tsocket_address *remote_address =
+		dcesrv_connection_get_remote_address(dcesrv_conn);
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	struct junction_map *jn = NULL;
 	bool self_ref = False;
 	int consumedcnt = 0;
@@ -126,7 +143,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
 	char *altpath = NULL;
 	NTSTATUS status;
 
-	if (p->session_info->unix_token->uid != sec_initial_uid()) {
+	if (session_info->unix_token->uid != sec_initial_uid()) {
 		DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n"));
 		return WERR_ACCESS_DENIED;
 	}
@@ -151,10 +168,10 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
 	}
 
 	status = get_referred_path(ctx,
-				   p->session_info,
+				   session_info,
 				   r->in.dfs_entry_path,
-				   p->remote_address,
-				   p->local_address,
+				   remote_address,
+				   local_address,
 				   true, /*allow_broken_path */
 				   jn, &consumedcnt, &self_ref);
 	if(!NT_STATUS_IS_OK(status)) {
@@ -163,7 +180,7 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
 
 	/* if no server-share pair given, remove the msdfs link completely */
 	if(!r->in.servername && !r->in.sharename) {
-		if(!remove_msdfs_link(jn, p->session_info)) {
+		if(!remove_msdfs_link(jn, session_info)) {
 			return WERR_NERR_DFSNOSUCHVOLUME;
 		}
 	} else {
@@ -194,11 +211,11 @@ WERROR _dfs_Remove(struct pipes_struct *p, struct dfs_Remove *r)
 
 		/* Only one referral, remove it */
 		if(jn->referral_count == 1) {
-			if(!remove_msdfs_link(jn, p->session_info)) {
+			if(!remove_msdfs_link(jn, session_info)) {
 				return WERR_NERR_DFSNOSUCHVOLUME;
 			}
 		} else {
-			if(!create_msdfs_link(jn, p->session_info)) {
+			if(!create_msdfs_link(jn, session_info)) {
 				return WERR_NERR_DFSCANTCREATEJUNCTIONPOINT;
 			}
 		}
@@ -291,12 +308,15 @@ static bool init_reply_dfs_info_100(TALLOC_CTX *mem_ctx, struct junction_map* j,
 
 WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	struct junction_map *jn = NULL;
 	size_t num_jn = 0;
 	size_t i;
 	TALLOC_CTX *ctx = talloc_tos();
 
-	jn = enum_msdfs_links(ctx, p->session_info, &num_jn);
+	jn = enum_msdfs_links(ctx, session_info, &num_jn);
 	if (!jn || num_jn == 0) {
 		num_jn = 0;
 		jn = NULL;
@@ -364,6 +384,14 @@ WERROR _dfs_Enum(struct pipes_struct *p, struct dfs_Enum *r)
 
 WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct dcesrv_connection *dcesrv_conn = dce_call->conn;
+	const struct tsocket_address *local_address =
+		dcesrv_connection_get_local_address(dcesrv_conn);
+	const struct tsocket_address *remote_address =
+		dcesrv_connection_get_remote_address(dcesrv_conn);
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	int consumedcnt = strlen(r->in.dfs_entry_path);
 	struct junction_map *jn = NULL;
 	bool self_ref = False;
@@ -385,10 +413,10 @@ WERROR _dfs_GetInfo(struct pipes_struct *p, struct dfs_GetInfo *r)
 
 	/* The following call can change the cwd. */
 	status = get_referred_path(ctx,
-				   p->session_info,
+				   session_info,
 				   r->in.dfs_entry_path,
-				   p->remote_address,
-				   p->local_address,
+				   remote_address,
+				   local_address,
 				   true, /*allow_broken_path */
 				   jn, &consumedcnt, &self_ref);
 	if(!NT_STATUS_IS_OK(status) ||
diff --git a/source3/rpc_server/epmapper/srv_epmapper.c b/source3/rpc_server/epmapper/srv_epmapper.c
index b2b8935af15..64f53cb4998 100644
--- a/source3/rpc_server/epmapper/srv_epmapper.c
+++ b/source3/rpc_server/epmapper/srv_epmapper.c
@@ -286,6 +286,8 @@ error_status_t _epm_Delete(struct pipes_struct *p,
 error_status_t _epm_Lookup(struct pipes_struct *p,
 			   struct epm_Lookup *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct dcesrv_connection *dcesrv_conn = dce_call->conn;
 	struct policy_handle *entry_handle;
 	struct rpc_eps *eps;
 	TALLOC_CTX *tmp_ctx;
@@ -310,6 +312,8 @@ error_status_t _epm_Lookup(struct pipes_struct *p,
 
 	if (r->in.entry_handle == NULL ||
 	    ndr_policy_handle_empty(r->in.entry_handle)) {
+		const struct tsocket_address *local_address =
+			dcesrv_connection_get_local_address(dcesrv_conn);
 		char *srv_addr = NULL;
 
 		DEBUG(7, ("_epm_Lookup: No entry_handle found, creating it.\n"));
@@ -320,11 +324,11 @@ error_status_t _epm_Lookup(struct pipes_struct *p,
 			goto done;
 		}
 
-		if (p->local_address != NULL &&
-		    tsocket_address_is_inet(p->local_address, "ipv4"))
+		if (local_address != NULL &&
+		    tsocket_address_is_inet(local_address, "ipv4"))
 		{
-			srv_addr = tsocket_address_inet_addr_string(p->local_address,
-								    tmp_ctx);
+			srv_addr = tsocket_address_inet_addr_string(
+				local_address, tmp_ctx);
 		}
 
 		switch (r->in.inquiry_type) {
@@ -740,6 +744,8 @@ fail:
 error_status_t _epm_Map(struct pipes_struct *p,
 			struct epm_Map *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct dcesrv_connection *dcesrv_conn = dce_call->conn;
 	struct policy_handle *entry_handle;
 	enum dcerpc_transport_t transport;
 	struct ndr_syntax_id ifid;
@@ -818,6 +824,8 @@ error_status_t _epm_Map(struct pipes_struct *p,
 
 	if (r->in.entry_handle == NULL ||
 	    ndr_policy_handle_empty(r->in.entry_handle)) {
+		const struct tsocket_address *local_addr =
+			dcesrv_connection_get_local_address(dcesrv_conn);
 		char *local_address = NULL;
 		struct ndr_syntax_id_buf buf;
 		char *if_string = NULL;
@@ -837,14 +845,14 @@ error_status_t _epm_Map(struct pipes_struct *p,
 		DBG_INFO("Mapping interface %s\n", if_string);
 
 		if ((transport == NCACN_IP_TCP) &&
-		    tsocket_address_is_inet(p->local_address, "ip")) {
+		    tsocket_address_is_inet(local_addr, "ip")) {
 			/*
 			 * We don't have the host ip in the epm
 			 * database. For NCACN_IP_TCP, add the IP that
 			 * the client connected to.
 			 */
 			local_address = tsocket_address_inet_addr_string(
-				p->local_address, tmp_ctx);
+				local_addr, tmp_ctx);
 		}
 
 		eps = epm_map_get_towers(
diff --git a/source3/rpc_server/eventlog/srv_eventlog_nt.c b/source3/rpc_server/eventlog/srv_eventlog_nt.c
index a3e602a2710..5c82417dcac 100644
--- a/source3/rpc_server/eventlog/srv_eventlog_nt.c
+++ b/source3/rpc_server/eventlog/srv_eventlog_nt.c
@@ -288,6 +288,9 @@ static bool get_oldest_entry_hook( EVENTLOG_INFO * info )
 
 static NTSTATUS elog_open( struct pipes_struct * p, const char *logname, struct policy_handle *hnd )
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	EVENTLOG_INFO *elog;
 
 	/* first thing is to validate the eventlog name */
@@ -321,7 +324,7 @@ static NTSTATUS elog_open( struct pipes_struct * p, const char *logname, struct
 			elog->logname = talloc_strdup( elog, ELOG_APPL );
 
 			/* do the access check */
-			if ( !elog_check_access( elog, p->session_info) ) {
+			if ( !elog_check_access( elog, session_info) ) {
 				TALLOC_FREE( elog );
 				return NT_STATUS_ACCESS_DENIED;
 			}
@@ -339,7 +342,7 @@ static NTSTATUS elog_open( struct pipes_struct * p, const char *logname, struct
 
 	/* now do the access check.  Close the tdb if we fail here */
 
-	if ( !elog_check_access( elog, p->session_info) ) {
+	if ( !elog_check_access( elog, session_info) ) {
 		TALLOC_FREE( elog );
 		return NT_STATUS_ACCESS_DENIED;
 	}
diff --git a/source3/rpc_server/fss/srv_fss_agent.c b/source3/rpc_server/fss/srv_fss_agent.c
index 0f25bf17188..4de600fd06c 100644
--- a/source3/rpc_server/fss/srv_fss_agent.c
+++ b/source3/rpc_server/fss/srv_fss_agent.c
@@ -438,22 +438,26 @@ static NTSTATUS srv_fssa_start(struct messaging_context *msg_ctx)
  */
 static bool fss_permitted(struct pipes_struct *p)
 {
-	if (p->session_info->unix_token->uid == sec_initial_uid()) {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
+
+	if (session_info->unix_token->uid == sec_initial_uid()) {
 		DEBUG(6, ("Granting FSRVP op, user started smbd\n"));
 		return true;
 	}
 
 	if (nt_token_check_sid(&global_sid_Builtin_Administrators,
-			       p->session_info->security_token)) {
+			       session_info->security_token)) {
 		DEBUG(6, ("Granting FSRVP op, administrators group member\n"));
 		return true;
 	}
 	if (nt_token_check_sid(&global_sid_Builtin_Backup_Operators,
-			       p->session_info->security_token)) {
+			       session_info->security_token)) {
 		DEBUG(6, ("Granting FSRVP op, backup operators group member\n"));
 		return true;
 	}
-	if (security_token_has_privilege(p->session_info->security_token,
+	if (security_token_has_privilege(session_info->security_token,
 					 SEC_PRIV_BACKUP)) {
 		DEBUG(6, ("Granting FSRVP op, backup privilege present\n"));
 		return true;
@@ -728,6 +732,9 @@ static uint32_t map_share_comment(struct fss_sc_smap *sc_smap,
 uint32_t _fss_AddToShadowCopySet(struct pipes_struct *p,
 				 struct fss_AddToShadowCopySet *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	uint32_t ret;
 	struct fss_sc_set *sc_set;
 	struct fss_sc *sc;
@@ -773,12 +780,12 @@ uint32_t _fss_AddToShadowCopySet(struct pipes_struct *p,
 		goto err_tmp_free;
 	}
 
-	status = fss_conn_create_tos(p->msg_ctx, p->session_info, snum, &conn);
+	status = fss_conn_create_tos(p->msg_ctx, session_info, snum, &conn);
 	if (!NT_STATUS_IS_OK(status)) {
 		ret = HRES_ERROR_V(HRES_E_ACCESSDENIED);
 		goto err_tmp_free;
 	}
-	if (!become_user_without_service_by_session(conn, p->session_info)) {
+	if (!become_user_without_service_by_session(conn, session_info)) {
 		DEBUG(0, ("failed to become user\n"));
 		ret = HRES_ERROR_V(HRES_E_ACCESSDENIED);
 		goto err_tmp_free;
@@ -929,6 +936,9 @@ static NTSTATUS commit_sc_with_conn(TALLOC_CTX *mem_ctx,
 uint32_t _fss_CommitShadowCopySet(struct pipes_struct *p,
 				  struct fss_CommitShadowCopySet *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	struct fss_sc_set *sc_set;
 	struct fss_sc *sc;
 	uint32_t commit_count;
@@ -961,7 +971,7 @@ uint32_t _fss_CommitShadowCopySet(struct pipes_struct *p,
 		char *base_path;
 		char *snap_path;
 		status = commit_sc_with_conn(frame, global_event_context(),
-					     p->msg_ctx, p->session_info, sc,
+					     p->msg_ctx, session_info, sc,
 					     &base_path, &snap_path);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(0, ("snap create failed for shadow copy of "
@@ -1330,6 +1340,9 @@ uint32_t _fss_AbortShadowCopySet(struct pipes_struct *p,
 uint32_t _fss_IsPathSupported(struct pipes_struct *p,
 			      struct fss_IsPathSupported *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	int snum;
 	char *service;
 	char *base_vol;
@@ -1358,12 +1371,12 @@ uint32_t _fss_IsPathSupported(struct pipes_struct *p,
 		return HRES_ERROR_V(HRES_E_INVALIDARG);
 	}
 
-	status = fss_conn_create_tos(p->msg_ctx, p->session_info, snum, &conn);
+	status = fss_conn_create_tos(p->msg_ctx, session_info, snum, &conn);
 	if (!NT_STATUS_IS_OK(status)) {
 		TALLOC_FREE(frame);
 		return HRES_ERROR_V(HRES_E_ACCESSDENIED);
 	}
-	if (!become_user_without_service_by_session(conn, p->session_info)) {
+	if (!become_user_without_service_by_session(conn, session_info)) {
 		DEBUG(0, ("failed to become user\n"));
 		TALLOC_FREE(frame);
 		return HRES_ERROR_V(HRES_E_ACCESSDENIED);
@@ -1569,6 +1582,9 @@ err_cancel:
 uint32_t _fss_DeleteShareMapping(struct pipes_struct *p,
 				 struct fss_DeleteShareMapping *r)
 {
+	struct dcesrv_call_state *dce_call = p->dce_call;
+	struct auth_session_info *session_info =
+		dcesrv_call_session_info(dce_call);
 	struct fss_sc_set *sc_set;
 	struct fss_sc *sc;
 	struct fss_sc_smap *sc_smap;
@@ -1638,11 +1654,11 @@ uint32_t _fss_DeleteShareMapping(struct pipes_struct *p,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list