From: Martin Vogt <[EMAIL PROTECTED]>
Subject: [ANNOUNCE] cvsauth-0.1.5
Date: Fri, 7 Jul 2000 04:45:04 +0900 (JST)

  | cvsauth is finally available for download!
  | 
  | http://cvsauth.sourceforge.net/

I'm trying on FreeBSD-3.x.
crypt() returns a strings which may contain `$'.

*** cvsauth-0.1.5/src/main.cpp.org      Sat Jul  8 01:54:55 2000
--- cvsauth-0.1.5/src/main.cpp  Sat Jul  8 02:10:18 2000
***************
*** 16,21 ****
--- 16,22 ----
  #endif
  
  #include <iostream.h>
+ #include <fstream.h>
  #include <stdio.h>
  #include <stdlib.h>
  
*************** int main(int argn,char** args) {
*** 105,111 ****
        cout << "name must be at leat two charaters long"<<endl;
        exit(-1);
        }
!       cout << "result is START --->"<<crypt(optarg,optarg)<<"<--- END"<<endl;
        exit(-1);
        break;
      }
--- 106,123 ----
        cout << "name must be at leat two charaters long"<<endl;
        exit(-1);
        }
!       char salt[8];
!       ifstream rnd ("/dev/random");
!       if (rnd.is_open())
!           rnd.read(salt, sizeof salt);
!       srand(time(NULL) ^ getpid() ^ getuid());
!       for (int i = 0; i != sizeof salt; i++) {
!           const char s[] = "0123456789"
!                            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
!                            "abcdefghijklmnopqrstuvwxyz";
!           salt[i] = s[(salt[i] ^ rand()) % (sizeof s - 1)];
!       }
!       cout << "result is START --->"<<crypt(optarg,salt)<<"<--- END"<<endl;
        exit(-1);
        break;
      }

*** cvsauth-0.1.5/src/config/lex.ll.org Sat Jul  8 01:34:53 2000
--- cvsauth-0.1.5/src/config/lex.ll     Sat Jul  8 01:43:05 2000
***************
*** 1,4 ****
--- 1,5 ----
  %{
+ /* STRING          [0-9A-Za-z/\.$-]+ */
  #define YY_USER_INIT    openFile(openFileName);
  
  #include "yacc.h"
*************** const char* openFileName=NULL;;
*** 10,16 ****
  %}
  
  DIGIT           [0-9]
! STRING          [0-9A-Za-z/\.-]+
  NEWLINE               [\n]
  WHITESPACE      [ \t]
  
--- 11,17 ----
  %}
  
  DIGIT           [0-9]
! STRING          [^\[\]{}= \t\n:]+
  NEWLINE               [\n]
  WHITESPACE      [ \t]
  


--
KOIE Hidetaka <[EMAIL PROTECTED]>

Reply via email to