[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha5-203-g6d640ee

Stefan Metzmacher metze at samba.org
Fri Aug 1 15:28:06 GMT 2008


The branch, v4-0-test has been updated
       via  6d640ee4b84c72f6c2da0ee047c9bac916bf3e57 (commit)
       via  3bd7e68a5cfe80733782367e327b570d04b21586 (commit)
      from  3817d653faecb70bfafb850fe7d6e83aaed7e6d1 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 6d640ee4b84c72f6c2da0ee047c9bac916bf3e57
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 1 17:22:54 2008 +0200

    auth_server: set the workstation name
    
    metze

commit 3bd7e68a5cfe80733782367e327b570d04b21586
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Aug 1 17:21:57 2008 +0200

    heimdal: add missing file heimdal/lib/gssapi/mech/gss_pseudo_random.c
    
    metze

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

Summary of changes:
 source/auth/ntlm/auth_server.c                     |    4 ++
 ...ss_add_oid_set_member.c => gss_pseudo_random.c} |   52 ++++++++++---------
 2 files changed, 31 insertions(+), 25 deletions(-)
 copy source/heimdal/lib/gssapi/mech/{gss_add_oid_set_member.c => gss_pseudo_random.c} (66%)


Changeset truncated at 500 lines:

diff --git a/source/auth/ntlm/auth_server.c b/source/auth/ntlm/auth_server.c
index 42606c1..bb8773e 100644
--- a/source/auth/ntlm/auth_server.c
+++ b/source/auth/ntlm/auth_server.c
@@ -71,6 +71,10 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
 
 	/* We don't want to get as far as the session setup */
 	io.in.credentials = cli_credentials_init_anon(mem_ctx);
+	cli_credentials_set_workstation(io.in.credentials,
+					lp_netbios_name(ctx->auth_ctx->lp_ctx),
+					CRED_SPECIFIED);
+
 	io.in.service = NULL;
 
 	io.in.workgroup = ""; /* only used with SPNEGO, disabled above */
diff --git a/source/heimdal/lib/gssapi/mech/gss_add_oid_set_member.c b/source/heimdal/lib/gssapi/mech/gss_pseudo_random.c
similarity index 66%
copy from source/heimdal/lib/gssapi/mech/gss_add_oid_set_member.c
copy to source/heimdal/lib/gssapi/mech/gss_pseudo_random.c
index d89adbf..ba027cb 100644
--- a/source/heimdal/lib/gssapi/mech/gss_add_oid_set_member.c
+++ b/source/heimdal/lib/gssapi/mech/gss_pseudo_random.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska Högskolan
+ * Copyright (c) 2007 Kungliga Tekniska Högskolan
  * (Royal Institute of Technology, Stockholm, Sweden). 
  * All rights reserved. 
  *
@@ -31,37 +31,39 @@
  * SUCH DAMAGE. 
  */
 
+/* $Id: gss_pseudo_random.c 23025 2008-04-17 10:01:57Z lha $ */
+
 #include "mech_locl.h"
-RCSID("$Id: gss_add_oid_set_member.c 23025 2008-04-17 10:01:57Z lha $");
+RCSID("$Id: gss_pseudo_random.c 23025 2008-04-17 10:01:57Z lha $");
 
 OM_uint32 GSSAPI_LIB_FUNCTION
-gss_add_oid_set_member (OM_uint32 * minor_status,
-			const gss_OID member_oid,
-			gss_OID_set * oid_set)
+gss_pseudo_random(OM_uint32 *minor_status,
+		  gss_ctx_id_t context,
+		  int prf_key,
+		  const gss_buffer_t prf_in,
+		  ssize_t desired_output_len,
+		  gss_buffer_t prf_out)
 {
-    gss_OID tmp;
-    size_t n;
-    OM_uint32 res;
-    int present;
+    struct _gss_context *ctx = (struct _gss_context *) context;
+    gssapi_mech_interface m = ctx->gc_mech;
+    OM_uint32 major_status;
 
-    res = gss_test_oid_set_member(minor_status, member_oid, *oid_set, &present);
-    if (res != GSS_S_COMPLETE)
-	return res;
+    _mg_buffer_zero(prf_out);
+    *minor_status = 0;
 
-    if (present) {
+    if (ctx == NULL) {
 	*minor_status = 0;
-	return GSS_S_COMPLETE;
+	return GSS_S_NO_CONTEXT;
     }
 
-    n = (*oid_set)->count + 1;
-    tmp = realloc ((*oid_set)->elements, n * sizeof(gss_OID_desc));
-    if (tmp == NULL) {
-	*minor_status = ENOMEM;
-	return GSS_S_FAILURE;
-    }
-    (*oid_set)->elements = tmp;
-    (*oid_set)->count = n;
-    (*oid_set)->elements[n-1] = *member_oid;
-    *minor_status = 0;
-    return GSS_S_COMPLETE;
+    if (m->gm_pseudo_random == NULL)
+	return GSS_S_UNAVAILABLE;
+    
+    major_status = (*m->gm_pseudo_random)(minor_status, ctx->gc_ctx,
+					  prf_key, prf_in, desired_output_len,
+					  prf_out);
+    if (major_status != GSS_S_COMPLETE)
+	_gss_mg_error(m, major_status, *minor_status);
+
+    return major_status;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list