Changeset 10

Show
Ignore:
Timestamp:
03/12/07 19:19:22 (2 years ago)
Author:
evilbunny
Message:

fixed secret change code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pam_freeauth/pam_freeauth.c

    r3 r10  
    436436        if ( (buffer[0]=='#') || (buffer[0]==0) ) continue; 
    437437        buffer[BUFSIZE]=0; 
    438        if ( sscanf(buffer, "%" TO_STR(BUFSIZE) "s %*s %" TO_STR(LEN_SECRET) "s",  &name, &SECRET ) !=2 ) continue; 
     438        if ( !sscanf(buffer, "%s\t%s", &name, &SECRET)) continue; 
    439439        if ( strcmp(user,name)==0 ) break; 
    440440      } 
     
    450450      while ( p && (! isspace(*p)) ) p++;  // skip name 
    451451      while ( p &&    isspace(*p)  ) p++;  // skip gap 
    452       while ( p && (! isspace(*p)) ) p++;  // skip secret 
    453       while ( p &&    isspace(*p)  ) p++;  // skip gap 
    454452      pos += (p-buffer); 
    455453      retval = pam_set_data (pamh, "freeauth-position", (void *)pos, NULL);