Eygene,

Your patch is correct. I have patched Maui.

http://www.clusterresources.com/download/maui/snapshots/maui-3.2.6p21-snap.1224706197.tar.gz

Thanks,
Brian Christiansen


Eygene Ryabinkin wrote:
Brian, *, good day.

I was struggling with the Slurm <-> Maui Wiki messages authentication
for the last couple of hours and I think that I had found the off-by-one
bug in the code.  Here is the patch that incorporates problem
description.  With this patch I can successfully schedule jobs from
Slurm 1.3.9, at least it is working for the last hour ;)).

-----
From 100e8ae567606c32af39420ae971d79fd434097f Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <[EMAIL PROTECTED]>
Date: Wed, 22 Oct 2008 01:39:13 +0400
Subject: [PATCH] Use proper buffer size for the Wiki protocol authentication

While trying to get Slurm up and running with Maui I had found that
identical DES keys are provoking bad checksums.  After some code digging
I had found that the code in question uses the bad buffer length, so CRC
is calculated on the wrong data contents.  All other invocations of
MSecGetChecksum() are passing strlen(buffer).  And the expression
'(S->RBufSize - (ptr - S->RBuffer))' seem to count the trailing '\0'.

Signed-off-by: Eygene Ryabinkin <[EMAIL PROTECTED]>
---
 src/mcom/MSU.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mcom/MSU.c b/src/mcom/MSU.c
index 7aa7b87..518a9d7 100644
--- a/src/mcom/MSU.c
+++ b/src/mcom/MSU.c
@@ -2491,7 +2491,7 @@ int MSURecvData(
           {
           MSecGetChecksum(
             ptr,
-            (S->RBufSize - (ptr - S->RBuffer)),
+            strlen(ptr),
             CKSum,
             NULL,
             S->CSAlgo,


--

*Brian Christiansen*  |  Moab Developer

Address: 1656 S. East Bay Blvd. Suite #300  |  Provo, UT 84606


_______________________________________________
mauiusers mailing list
[email protected]
http://www.supercluster.org/mailman/listinfo/mauiusers

Reply via email to