381 |
yyin = fdopen (dup (0), "r"); |
yyin = fdopen (dup (0), "r"); |
382 |
} else { |
} else { |
383 |
#ifdef COMP_SRC |
#ifdef COMP_SRC |
384 |
|
struct compression *comp; |
385 |
|
#endif /* COMP_SRC */ |
386 |
|
struct stat st; |
387 |
|
|
388 |
|
if (stat (file, &st)) { |
389 |
|
error (0, errno, "%s", file); |
390 |
|
return 0; |
391 |
|
} |
392 |
|
|
393 |
|
if (S_ISDIR (st.st_mode)) { |
394 |
|
error (0, EISDIR, "%s", file); |
395 |
|
return 0; |
396 |
|
} |
397 |
|
|
398 |
|
#ifdef COMP_SRC |
399 |
/* See if we need to decompress the file(s) first. */ |
/* See if we need to decompress the file(s) first. */ |
400 |
struct compression *comp = comp_info (file); |
comp = comp_info (file); |
401 |
if (comp) { |
if (comp) { |
402 |
file = decompress (file, comp); |
file = decompress (file, comp); |
403 |
if (!file) |
if (!file) |
404 |
return 0; |
return 0; |
405 |
} |
} |
406 |
#endif |
#endif /* COMP_SRC */ |
407 |
drop_effective_privs (); |
drop_effective_privs (); |
408 |
yyin = fopen (file, "r"); |
yyin = fopen (file, "r"); |
409 |
regain_effective_privs (); |
regain_effective_privs (); |
411 |
error (0, errno, _("can't open %s"), file); |
error (0, errno, _("can't open %s"), file); |
412 |
#ifdef COMP_SRC |
#ifdef COMP_SRC |
413 |
remove_ztemp (); |
remove_ztemp (); |
414 |
#endif |
#endif /* COMP_SRC */ |
415 |
return 0; |
return 0; |
416 |
} |
} |
417 |
} |
} |