blob: bbc0e83456e62ef4381626e48528d4e5e3e8ff65 (
plain)
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
|
#!/bin/sh
dir="$1/strangename"
mkdir -p "$dir"
# All file names are quoted twice, once for the shell and once for tar
# (-T)
# File named <quote><backslash><space>
echo "foo" > "$dir/'\\ "
# File named <backslash>
echo "bar" > "$dir/\\"
# File named <backslash><backslash>
# - causes md5sums-lists-nonexistent-file
echo "bar" > "$dir/\\\\"
# File named a<backslash><backslash>b
# - causes md5sums-lists-nonexistent-file
echo "bar" > "$dir/a\\\\b"
# Symlink to file named a<backslash><backslash>b
ln -s 'a\\b' "$dir/link-to-weird-file1"
# Because the above is not insane enough...
# If Lintian gets this wrong, it will become an
# "unsafe-symlink".
mkdir -p "$dir/\\.\\./\\.\\."
echo "golf" > "$dir/\\.\\./\\.\\./\\.\\."
ln -s '\.\./\.\./\.\.' "$dir/some-file"
|