s3: Lift talloc_autofree_context() from make_auth_context_fixed()
authorVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 22:35:44 +0000 (15:35 -0700)
committerVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 23:12:37 +0000 (01:12 +0200)
source3/auth/auth.c
source3/include/proto.h
source3/rpc_server/srv_netlog_nt.c
source3/smbd/sesssetup.c

index 4eb0845ba010fb4685a1bfc9bec12d96eebfa095..790bfaca2313bb3baacbcc37e5c099b8576564c9 100644 (file)
@@ -538,11 +538,12 @@ NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
  Make a auth_info struct with a fixed challenge
 ***************************************************************************/
 
-NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8]) 
+NTSTATUS make_auth_context_fixed(TALLOC_CTX *mem_ctx,
+                                struct auth_context **auth_context,
+                                uchar chal[8])
 {
        NTSTATUS nt_status;
-       nt_status = make_auth_context_subsystem(talloc_autofree_context(),
-                                               auth_context);
+       nt_status = make_auth_context_subsystem(mem_ctx, auth_context);
        if (!NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
        }
index 38ee2818ad7cb5d7fc1e9a7046b53d0cab517fdf..c252b0e19ca40daceabffd0f8bf4c2cfdf0b2728 100644 (file)
@@ -31,7 +31,9 @@ bool load_auth_module(struct auth_context *auth_context,
                      const char *module, auth_methods **ret) ;
 NTSTATUS make_auth_context_subsystem(TALLOC_CTX *mem_ctx,
                                     struct auth_context **auth_context);
-NTSTATUS make_auth_context_fixed(struct auth_context **auth_context, uchar chal[8]) ;
+NTSTATUS make_auth_context_fixed(TALLOC_CTX *mem_ctx,
+                                struct auth_context **auth_context,
+                                uchar chal[8]) ;
 
 /* The following definitions come from auth/auth_builtin.c  */
 
index 963737f8970c3f348ee41bb0f90a1f5771b87bf0..fb60ef86cae9055248cbafb71a788ff85113b447 100644 (file)
@@ -1323,7 +1323,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
        {
                const char *wksname = nt_workstation;
 
-               status = make_auth_context_fixed(&auth_context,
+               status = make_auth_context_fixed(talloc_tos(), &auth_context,
                                                 logon->network->challenge);
                if (!NT_STATUS_IS_OK(status)) {
                        return status;
index 68b91b7f1b2985022c11447317f8dc442af46d71..c2a2d16303b1d0d672f9d518cafd40337682dadf 100644 (file)
@@ -147,8 +147,8 @@ static NTSTATUS check_guest_password(struct auth_serversupplied_info **server_in
 
        DEBUG(3,("Got anonymous request\n"));
 
-       if (!NT_STATUS_IS_OK(nt_status = make_auth_context_fixed(&auth_context,
-                                       chal))) {
+       nt_status = make_auth_context_fixed(talloc_tos(), &auth_context, chal);
+       if (!NT_STATUS_IS_OK(nt_status)) {
                return nt_status;
        }