Skip to content

"setfattr -h" fails silently #193

@LHLaurini

Description

@LHLaurini

When building Linux from Scratch, the test suite for attr fails. When I switch back to the vanilla kernel, it passes.

I'm able to reproduce the issue manually:

Zen kernel:

$ touch f
$ ln -s f l
$ setfattr -n user.filename -v f l
$ getfattr -d f l
# file: f
user.filename="f"

# file: l
user.filename="f"

$ setfattr -h -n user.filename -v f l
$ echo $?
0
$ 

setfattr -h should fail with setfattr: l: Operation not permitted, but it doesn't.

Vanilla:

$ touch f
$ ln -s f l
$ setfattr -n user.filename -v f l
$ getfattr -d f l
# file: f
user.filename="f"

# file: l
user.filename="f"

$ setfattr -h -n user.filename -v f l
setfattr: l: Operation not permitted
$ 

Also, it works as expected with both kernels only when run as root.

I'm running Arch:

$ pacman -Q linux{,-zen}
linux 5.9.9.arch1-1
linux-zen 5.9.9.zen1-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions