]> git.baikalelectronics.ru Git - kernel.git/commit
NetLabel: Allow passing the LSM domain as a shared pointer
authorPaul Moore <paul.moore@hp.com>
Sun, 13 Apr 2008 02:06:42 +0000 (19:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Apr 2008 02:06:42 +0000 (19:06 -0700)
commitd9c7e44e820be07e2d7048f31f607e74cdf30bc2
treeea4215f6f3040507b46bf90fe133ca73a59c9c0e
parentdb487b4077346eabcb8960ba17a675e3176a2e57
NetLabel: Allow passing the LSM domain as a shared pointer

Smack doesn't have the need to create a private copy of the LSM "domain" when
setting NetLabel security attributes like SELinux, however, the current
NetLabel code requires a private copy of the LSM "domain".  This patches fixes
that by letting the LSM determine how it wants to pass the domain value.

 * NETLBL_SECATTR_DOMAIN_CPY
   The current behavior, NetLabel assumes that the domain value is a copy and
   frees it when done

 * NETLBL_SECATTR_DOMAIN
   New, Smack-friendly behavior, NetLabel assumes that the domain value is a
   reference to a string managed by the LSM and does not free it when done

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/netlabel.h
security/selinux/ss/services.c
security/smack/smack_lsm.c