version 1.24, 2007/06/06 19:15:33 |
version 1.25, 2007/06/20 17:56:37 |
|
|
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; |
} |
} |
|
|
} |
} |
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 |
|
|
} |
} |
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) { |
|
|
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"); |
|
|
*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"); |