Skip to content
Commit da1b6356 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Casey Schaufler
Browse files

Smack: remove unneeded NULL-termination from securtity label



Values of extended attributes are stored as binary blobs. NULL-termination
of them isn't required. It just wastes disk space and confuses command-line
tools like getfattr because they have to print that zero byte at the end.

This patch removes terminating zero byte from initial security label in
smack_inode_init_security and cuts it out in function smack_inode_getsecurity
which is used by syscall getxattr. This change seems completely safe, because
function smk_parse_smack ignores everything after first zero byte.

Signed-off-by: default avatarKonstantin Khlebnikov <k.khlebnikov@samsung.com>
parent b862e561
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment