blob: 1e9366dbcc155336fdbe05f541f8f9547b7b4577 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
$ mkdir d
$ cd d
$ touch f
$ setfattr -n user.test -v test f
$ ln -s f l
This case should be obvious:
$ getfattr -d f
> # file: f
> user.test="test"
>
If a symlink is explicitly specified on the command line, follow it
(-H behavior):
$ getfattr -d l
> # file: l
> user.test="test"
>
Unless we are explicitly told not to dereference symlinks:
$ getfattr -hd l
When walking a tree, it does not make sense to follow symlinks. We should
only see f's attributes here -- that's a bug:
$ getfattr -Rd .
> # file: f
> user.test="test"
>
This case works as expected:
$ getfattr -Rhd .
> # file: f
> user.test="test"
>
In these two cases, getfattr should dereference the symlink passed on the
command line, but not l. This doesn't work correctly, either; it's the same
bug:
$ ln -s . here
$ getfattr -Rd here
> # file: here/f
> user.test="test"
>
$ getfattr -Rhd here
> # file: here/f
> user.test="test"
>
$ cd ..
$ rm -rf d
|