File: 0018include_error_0

package info (click to toggle)
nftables 1.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,384 kB
  • sloc: ansic: 50,901; sh: 20,277; yacc: 5,861; python: 1,746; lex: 1,367; makefile: 392
file content (34 lines) | stat: -rwxr-xr-x 589 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

tmpfile1=$(mktemp)
if [ ! -w $tmpfile1 ] ; then
        echo "Failed to create tmp file" >&2
        exit 1
fi

touch $tmpfile1

RULESET="include \"$tmpfile1\"
)
"

tmpfile2=$(mktemp)
if [ ! -w $tmpfile2 ] ; then
        echo "Failed to create tmp file" >&2
        exit 1
fi

tmpfile3=$(mktemp)
if [ ! -w $tmpfile3 ] ; then
        echo "Failed to create tmp file" >&2
        exit 1
fi

echo "/dev/stdin:2:1-1: Error: syntax error, unexpected ')'
)
^" > $tmpfile3

$NFT -I/tmp/ -f - <<< "$RULESET" 2> $tmpfile2
$DIFF -u $tmpfile2 $tmpfile3

rm $tmpfile1 $tmpfile2 $tmpfile3