s3:rpc_server: make use of make_session_info_anonymous()
authorStefan Metzmacher <metze@samba.org>
Fri, 2 Mar 2018 13:40:19 +0000 (14:40 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 15 Mar 2018 20:54:17 +0000 (21:54 +0100)
For unauthenticated connections we should default to a
session info with an anonymous nt token.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13328

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/rpc_server/rpc_server.c

index 2327e433d8af6cfd2b9de0f4617f58c7b6dd5315..a2bcf8545c0ef0f9dd5dfc6cc83b0555c7e0bab8 100644 (file)
@@ -1108,14 +1108,11 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
        }
 
        if (ncacn_conn->session_info == NULL) {
-               /*
-                * TODO: use auth_anonymous_session_info() here?
-                */
-               status = make_session_info_guest(ncacn_conn,
-                                                &ncacn_conn->session_info);
+               status = make_session_info_anonymous(ncacn_conn,
+                                                    &ncacn_conn->session_info);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(2, ("Failed to create "
-                                 "make_session_info_guest - %s\n",
+                                 "make_session_info_anonymous - %s\n",
                                  nt_errstr(status)));
                        talloc_free(ncacn_conn);
                        return;