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

Diff for /src/usr.bin/ftp/ruserpass.c between version 1.24 and 1.25

version 1.24, 2007/06/06 19:15:33 version 1.25, 2007/06/20 17:56:37
Line 149 
Line 149 
                         if ((t = token()) == -1)                          if ((t = token()) == -1)
                                 goto bad;                                  goto bad;
                         if (t) {                          if (t) {
                                 if (*aname == 0)                                  if (*aname == 0) {
                                         *aname = strdup(tokval);                                          if ((*aname = strdup(tokval)) == NULL)
                                 else {                                                  err(1, "strdup");
                                   } else {
                                         if (strcmp(*aname, tokval))                                          if (strcmp(*aname, tokval))
                                                 goto next;                                                  goto next;
                                 }                                  }
Line 167 
Line 168 
                         }                          }
                         if ((t = token()) == -1)                          if ((t = token()) == -1)
                                 goto bad;                                  goto bad;
                         if (t && *apass == 0)                          if (t && *apass == 0) {
                                 *apass = strdup(tokval);                                  if ((*apass = strdup(tokval)) == NULL)
                                           err(1, "strdup");
                           }
                         break;                          break;
                 case ACCOUNT:                  case ACCOUNT:
                         if (fstat(fileno(cfile), &stb) >= 0                          if (fstat(fileno(cfile), &stb) >= 0
Line 179 
Line 182 
                         }                          }
                         if ((t = token()) == -1)                          if ((t = token()) == -1)
                                 goto bad;                                  goto bad;
                         if (t && *aacct == 0)                          if (t && *aacct == 0) {
                                 *aacct = strdup(tokval);                                  if ((*aacct = strdup(tokval)) == NULL)
                                           err(1, "strdup");
                           }
                         break;                          break;
                 case MACDEF:                  case MACDEF:
                         if (proxy) {                          if (proxy) {
Line 285 
Line 290 
         cp = tokval;          cp = tokval;
         if (c == '"') {          if (c == '"') {
                 while ((c = fgetc(cfile)) != EOF && c != '"') {                  while ((c = fgetc(cfile)) != EOF && c != '"') {
                         if (c == '\\')                          if (c == '\\' && (c = fgetc(cfile)) == EOF)
                                 c = fgetc(cfile);                                  break;
                         *cp++ = c;                          *cp++ = c;
                         if (cp == tokval + sizeof(tokval)) {                          if (cp == tokval + sizeof(tokval)) {
                                 warnx("Token in .netrc too long");                                  warnx("Token in .netrc too long");
Line 297 
Line 302 
                 *cp++ = c;                  *cp++ = c;
                 while ((c = fgetc(cfile)) != EOF                  while ((c = fgetc(cfile)) != EOF
                     && c != '\n' && c != '\t' && c != ' ' && c != ',') {                      && c != '\n' && c != '\t' && c != ' ' && c != ',') {
                         if (c == '\\')                          if (c == '\\' && (c = fgetc(cfile)) == EOF)
                                 c = fgetc(cfile);                                  break;
                         *cp++ = c;                          *cp++ = c;
                         if (cp == tokval + sizeof(tokval)) {                          if (cp == tokval + sizeof(tokval)) {
                                 warnx("Token in .netrc too long");                                  warnx("Token in .netrc too long");

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25