[BACK]Return to edit.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / chpass

Diff for /src/usr.bin/chpass/edit.c between version 1.19 and 1.20

version 1.19, 2000/03/05 19:20:37 version 1.20, 2000/09/26 16:00:08
Line 101 
Line 101 
                 pw_error(tempname, 1, 1);                  pw_error(tempname, 1, 1);
   
         (void)fprintf(fp,          (void)fprintf(fp,
             "#Changing user database information for %s.\n", pw->pw_name);              "# Changing user database information for %s.\n", pw->pw_name);
         if (!uid) {          if (!uid) {
                 (void)fprintf(fp, "Login: %s\n", pw->pw_name);                  (void)fprintf(fp, "Login: %s\n", pw->pw_name);
                 (void)fprintf(fp, "Encrypted password: %s\n", pw->pw_passwd);                  (void)fprintf(fp, "Encrypted password: %s\n", pw->pw_passwd);
Line 146 
Line 146 
         struct passwd *pw;          struct passwd *pw;
 {  {
         ENTRY *ep;          ENTRY *ep;
         char *p;          char *p, *q;
         struct stat sb;          struct stat sb;
         FILE *fp;          FILE *fp;
         int len, alen, line;          unsigned int len, alen, line;
         static char buf[LINE_MAX];          static char buf[LINE_MAX];
   
         if (!(fp = fopen(tempname, "r")))          if (!(fp = fopen(tempname, "r")))
Line 187 
Line 187 
                                         goto bad;                                          goto bad;
                                 }                                  }
                                 while (isspace(*++p));                                  while (isspace(*++p));
                                 if (ep->except && strpbrk(p, ep->except)) {                                  for (q = p; *q && isprint(*q); q++) {
                                           if (ep->except && strchr(ep->except,*q))
                                                   break;
                                   }
                                   if (*q) {
                                         warnx(                                          warnx(
                                    "illegal character in the \"%s\" field",                                     "illegal character in the \"%s\" field",
                                             ep->prompt);                                              ep->prompt);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20