ckpasswd.c trouble

Tomasz Dymek tomek at
Mon Jan 22 11:30:09 UTC 2001


I've done some tests of password file auth with inn 2.3.0. I'v some trouble 
with making chpasswd.c work. 
I'm not C programmer and my C skills are low. Mayby You can make this better

ckpasswd.c started to work after following changes.

in GetFilePass() I've added

    if (!(colon = strchr(iter, ':'))) //I think it looks for second colon. Am i right?
    *colon = 0;
    iter++;   // *THIS* w/o this change it returns :<crypted> instead of <crypted>
    strcpy(pass, iter);

and change from:

    if (strcmp(rpass, crypt(pass, rpass)) == 0) {
        printf("user:%s\n", uname);


    if (strcmp(rpass, crypt(pass, rpass)) == 0) {
        printf("User:%s\n", uname); 	//nnrpd exprects User:<username>

Please check I'm not replacing old bugs with news ones.

                                                       * Tomek
(setq disclaimer 'standard e-mail '
      pgp-fp "53B8A68AD35A64AF A61DD53E9E5A1C0F")

More information about the inn-bugs mailing list