[Mauiusers] Fix for the Wiki authentication (Slurm case)

Eygene Ryabinkin rea+maui at grid.kiae.ru
Tue Oct 21 15:57:15 MDT 2008

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 <rea+maui at grid.kiae.ru>
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 <rea+maui at grid.kiae.ru>
 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(
-            (S->RBufSize - (ptr - S->RBuffer)),
+            strlen(ptr),
Any thoughts?

Eygene Ryabinkin, Russian Research Centre "Kurchatov Institute"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/mauiusers/attachments/20081022/5edede2f/attachment.bin

More information about the mauiusers mailing list