Ticket #1517: 0001-Do-a-full-not-a-partial-match-on-GECOS-data-when-sel.patch

File 0001-Do-a-full-not-a-partial-match-on-GECOS-data-when-sel.patch, 1.0 KB (added by markdixon, 5 years ago)
  • source/dist/util/sgeCA/sge_ca

    From 29b51fc744a0b6b0dbf5f29d20b051fc66a3bea6 Mon Sep 17 00:00:00 2001
    From: Mark Dixon <m.c.dixon@leeds.ac.uk>
    Date: Fri, 21 Nov 2014 08:55:40 +0000
    Subject: [PATCH] Do a full, not a partial match on GECOS data when selecting cert
    
    ---
     source/dist/util/sgeCA/sge_ca |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/source/dist/util/sgeCA/sge_ca b/source/dist/util/sgeCA/sge_ca
    index 63cfaaf..0edca82 100644
    a b MakeUserCert() 
    757757   fi   
    758758
    759759   if [ "$ADMINUSER" = default ]; then
    760       entries=`grep "CN=$gecos" $CATOP/index.txt|grep '^V'|wc -l`
     760      entries=`grep "CN=$gecos/" $CATOP/index.txt|grep '^V'|wc -l`
    761761   else
    762       entries=`$V5UTILBIN/adminrun $ADMINUSER grep "CN=$gecos" $CATOP/index.txt|grep '^V'|wc -l`
     762      entries=`$V5UTILBIN/adminrun $ADMINUSER grep "CN=$gecos/" $CATOP/index.txt|grep '^V'|wc -l`
    763763   fi
    764764   if [ $entries = 0 ]; then
    765765      $INFOTEXT "Generating %s certificate and key for '%s' ('%s','%s')." \