Hello all,

I asked a question last week as to what steps were necessary to enable
poppassd to work properly with npassword (2.05). The suggested changes,
though appreciated, didn't seem to do the trick. So I've modified the source
for poppassd.c. I've included the diff file here as an attachment. It should
work with the version of poppassd.c included with Qpopper 4.0.3. I'm looking
for any feedback on this. Thanks in advance.

---
Tim Meader
ACS GSG
[EMAIL PROTECTED]


164a165,167
> /* Change this to 0 if you are NOT using Npasswd */
> #define NPASSWD 1
> 
288a292
>      "Current password: ",                     /* Npasswd */
296,297d299
<      "*\n*\nnew password: ",                     /* shadow */
<      "new password: ",
298a301,302
>      "Changing password for * on *\nNew password (? for help): ",      /* Npasswd */
>      "*\n*\nnew password: ",                     /* shadow */
307a312
>      "New password (again): ",                         /* Npasswd */
314a320
>      "Local password changed for * on *\nLocal password aging changed for * on *",   
>/* Npasswd */
321a328,334
>       
>       /*******************************************
>       * Added for testing npassword error string *
>       *******************************************/
> 
> char         npstring [ BUFSIZE ] = "That password cannot be used because";
> 
328a342,344
> //////////////////////////////////////////////////////////////////
> // Debugging file
> //////////////////////////////////////////////////////////////////
375a392,396
> 
> ////////////////////////////////////////////////////////////////////
> // Opening debugging file
> ////////////////////////////////////////////////////////////////////
> 
873a895
>      char *npass_errmsg = 0;
902a925,937
> 
>       /*************************************************
>       * Added for Npassword                            *
>       *************************************************/
> 
>       if (NPASSWD) {
>          npass_errmsg = strstr(emess, "New");
> 
>          if(npass_errmsg) {
>             *npass_errmsg = '\0';
>          }
>         }
>       
936d970
< 
942c976
<      if (*pat == '*')
---
>      if (*pat == '*') {
943a978
>      }
964,966c999,1008
<      if (tolower(*str) != *pat++) {
<        TRACE ( trace_file, POP_DEBUG, HERE, "...returning 0" );
<        return 0;
---
> 
>       /************************************************
>       *  Changed for Npassword                        *
>       ************************************************/
> 
>      if (NPASSWD) {
>         if (tolower(*str) != tolower(*pat++)) {
>            TRACE ( trace_file, POP_DEBUG, HERE, "...returning 0" );
>            return 0;
>       }
967a1010,1015
>      else {
>       if (tolower(*str) != *pat++) {
>          TRACE ( trace_file, POP_DEBUG, HERE, "...returning 0" );
>            return 0;
>       }
>      }
968a1017,1018
>       /************************************************/
> 
1068c1118
<                 TRACE ( trace_file, POP_DEBUG, HERE, "expect: succes" );
---
>                 TRACE ( trace_file, POP_DEBUG, HERE, "expect: success" );
1109a1160,1162
>    
>    TRACE ( trace_file, POP_DEBUG, HERE, "getemess; master='%d'; expected='%s'",
>            master, *expected );
1110a1164,1166
>       /***********************************************************
>       * Added for error recognition in Npassword                 *
>       ***********************************************************/
1112,1113c1168,1169
<    TRACE ( trace_file, POP_DEBUG, HERE, "getemess; master=%d; expected=%s",
<            master, *expected );
---
>    if (NPASSWD) {   
>        char *nptest=0;
1114a1171,1180
>        nptest = strstr(buf,npstring);
> 
>        if(nptest) {
>         for (q = buf; *q; q++) if (*q == '\n') *q = ' ';
>           return;
>        }
>    }
> 
>       /**********************************************************/
> 
1129a1196
> 

Reply via email to