/* socket path has been cleared because it is being shutdown
* can only fall back to original sun_path request
*/
- struct aa_sk_ctx *ctx = SK_CTX(&u->sk);
+ struct aa_sk_ctx *ctx = aa_sock(&u->sk);
if (ctx->path.dentry)
return aa_path_perm(op, label, &ctx->path, flags, mask,
&cond);
state = PROFILE_MEDIATES_AF(profile, AF_UNIX);
if (state) {
- struct aa_sk_ctx *peer_ctx = SK_CTX(peer_sk);
+ struct aa_sk_ctx *peer_ctx = aa_sock(peer_sk);
struct aa_profile *peerp;
struct sockaddr_un *addr = NULL;
int len = 0;
error = unix_fs_perm(op, request, label, unix_sk(peer_sk),
PATH_SOCK_COND);
} else {
- struct aa_sk_ctx *pctx = SK_CTX(peer_sk);
+ struct aa_sk_ctx *pctx = aa_sock(peer_sk);
if (sk_req)
error = aa_unix_label_sk_perm(label, op, sk_req,
sock->sk);
static int apparmor_unix_stream_connect(struct sock *sk, struct sock *peer_sk,
struct sock *newsk)
{
- struct aa_sk_ctx *sk_ctx = SK_CTX(sk);
- struct aa_sk_ctx *peer_ctx = SK_CTX(peer_sk);
- struct aa_sk_ctx *new_ctx = SK_CTX(newsk);
+ struct aa_sk_ctx *sk_ctx = aa_sock(sk);
+ struct aa_sk_ctx *peer_ctx = aa_sock(peer_sk);
+ struct aa_sk_ctx *new_ctx = aa_sock(newsk);
struct aa_label *label;
struct path *path;
int error;
*/
static int apparmor_unix_may_send(struct socket *sock, struct socket *peer)
{
- struct aa_sk_ctx *peer_ctx = SK_CTX(peer->sk);
+ struct aa_sk_ctx *peer_ctx = aa_sock(peer->sk);
struct aa_label *label;
int error;
*/
peer_sk = unix_peer_get(sk);
if (peer_sk) {
- ctx = SK_CTX(peer_sk);
+ ctx = aa_sock(peer_sk);
if (ctx->label)
label = aa_get_label(ctx->label);
sock_put(peer_sk);