182 |
/* Skip variable processing. */ |
/* Skip variable processing. */ |
183 |
else if (!regexec(&creg[10], line, 4, match, 0) || |
else if (!regexec(&creg[10], line, 4, match, 0) || |
184 |
!regexec(&creg[11], line, 4, match, 0) || |
!regexec(&creg[11], line, 4, match, 0) || |
185 |
!regexec(&creg[12], line, 4, match, 0)); |
!regexec(&creg[12], line, 4, match, 0)) |
186 |
|
continue; |
187 |
else |
else |
188 |
return row; |
return row; |
189 |
|
|
230 |
*(line + m[3].rm_eo - 1) == '"') |
*(line + m[3].rm_eo - 1) == '"') |
231 |
strncat(opts.logfile, line + m[3].rm_so + 1, |
strncat(opts.logfile, line + m[3].rm_so + 1, |
232 |
min((m[3].rm_eo - m[3].rm_so - 2), |
min((m[3].rm_eo - m[3].rm_so - 2), |
233 |
PATH_MAX - 1)); |
PATH_MAX - 1)); |
234 |
else |
else |
235 |
strncat(opts.logfile, line + m[3].rm_so, |
strncat(opts.logfile, line + m[3].rm_so, |
236 |
min((m[3].rm_eo - m[3].rm_so), |
min((m[3].rm_eo - m[3].rm_so), |
237 |
PATH_MAX - 1)); |
PATH_MAX - 1)); |
238 |
} |
} |
239 |
} else if (!strncasecmp(line + m[2].rm_so, "charset", 7)) { |
} else if (!strncasecmp(line + m[2].rm_so, "charset", 7)) { |
240 |
if (*(line + m[3].rm_so) == '"' && |
if (*(line + m[3].rm_so) == '"' && |
241 |
*(line + m[3].rm_eo - 1) == '"') |
*(line + m[3].rm_eo - 1) == '"') |
242 |
strncat(opts.charset, line + m[3].rm_so + 1, |
strncat(opts.charset, line + m[3].rm_so + 1, |
243 |
min((m[3].rm_eo - m[3].rm_so - 2), |
min((m[3].rm_eo - m[3].rm_so - 2), |
244 |
CHARSET_LEN - 1)); |
CHARSET_LEN - 1)); |
245 |
else |
else |
246 |
strncat(opts.charset, line + m[3].rm_so, |
strncat(opts.charset, line + m[3].rm_so, |
247 |
min((m[3].rm_eo - m[3].rm_so), CHARSET_LEN - 1)); |
min((m[3].rm_eo - m[3].rm_so), CHARSET_LEN - 1)); |
329 |
|
|
330 |
|
|
331 |
/* |
/* |
332 |
* Parse unencrypted password file. |
* Parse unencrypted password file. |
333 |
*/ |
*/ |
334 |
int |
int |
335 |
parse_passwords(FILE * fd) |
parse_passwords(FILE * fd) |
376 |
if ((pe = (char *)find_password(user, serv))) |
if ((pe = (char *)find_password(user, serv))) |
377 |
strncat(pe, line + match[3].rm_so, |
strncat(pe, line + match[3].rm_so, |
378 |
min(match[3].rm_eo - match[3].rm_so, |
min(match[3].rm_eo - match[3].rm_so, |
379 |
PASS_LEN - 1)); |
PASS_LEN - 1)); |
380 |
|
|
381 |
line = strtok_r(NULL, "\n", &c); |
line = strtok_r(NULL, "\n", &c); |
382 |
} |
} |