Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3916/src/backends/monet5/merovingian

Modified Files:
      Tag: Feb2010
        merovingian.c 
Log Message:
propagated changes of Wednesday Jan 13 2010 - Thursday Jan 14 2010
from the Nov2009 branch to the Feb2010 branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/01/13 - mr-meltdown:
          src/backends/monet5/merovingian/merovingian.c,1.65.2.6
  Strip trailing newlines from the control channel password, bug #2931392
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: merovingian.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/merovingian.c,v
retrieving revision 1.69
retrieving revision 1.69.2.1
diff -u -d -r1.69 -r1.69.2.1
--- merovingian.c       7 Jan 2010 15:24:31 -0000       1.69
+++ merovingian.c       14 Jan 2010 15:59:49 -0000      1.69.2.1
@@ -684,14 +684,16 @@
 
                len = fread(_mero_controlpass, 1,
                                sizeof(_mero_controlpass) - 1, secretf);
+               fclose(secretf);
                _mero_controlpass[len] = '\0';
                len = strlen(_mero_controlpass); /* secret can contain 
null-bytes */
+               /* strip trailing newlines */
+               for (; len > 0 && _mero_controlpass[len - 1] == '\n'; len--)
+                       _mero_controlpass[len - 1] = '\0';
                if (len == 0) {
                        Mfprintf(stderr, "control passphrase has 
zero-length\n");
-                       fclose(secretf);
                        MERO_EXIT(1);
                }
-               fclose(secretf);
        }
 
        /* we need a pidfile */


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to