version 1.11, 2015/01/16 06:40:13 |
version 1.12, 2015/10/07 06:00:33 |
|
|
argv += optind; |
argv += optind; |
argc -= optind; |
argc -= optind; |
|
|
|
if (argc == 2 || outfile) { |
|
if (tame("stdio rpath wpath cpath", NULL) == -1) |
|
err(1, "tame"); |
|
} else { |
|
if (tame("stdio", NULL) == -1) |
|
err(1, "tame"); |
|
} |
|
|
switch(argc) { |
switch(argc) { |
case 2: /* optional first argument is input file */ |
case 2: /* optional first argument is input file */ |
if (!freopen(*argv, "r", stdin) || fstat(fileno(stdin), &sb)) |
if (!freopen(*argv, "r", stdin) || fstat(fileno(stdin), &sb)) |