Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165857
b: refs/heads/master
c: 939cbf2
h: refs/heads/master
i:
  165855: 9d78fc8
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Sep 24, 2009
1 parent 2b5aa08 commit 398037e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44e51a1b7852bd421ff5303c64dcc5c8524c21ef
refs/heads/master: 939cbf260c1abce6cad4b95ea4ba9f5132b660b3
18 changes: 12 additions & 6 deletions trunk/kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,18 +855,24 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
break;
}
case AUDIT_SIGNAL_INFO:
err = security_secid_to_secctx(audit_sig_sid, &ctx, &len);
if (err)
return err;
len = 0;
if (audit_sig_sid) {
err = security_secid_to_secctx(audit_sig_sid, &ctx, &len);
if (err)
return err;
}
sig_data = kmalloc(sizeof(*sig_data) + len, GFP_KERNEL);
if (!sig_data) {
security_release_secctx(ctx, len);
if (audit_sig_sid)
security_release_secctx(ctx, len);
return -ENOMEM;
}
sig_data->uid = audit_sig_uid;
sig_data->pid = audit_sig_pid;
memcpy(sig_data->ctx, ctx, len);
security_release_secctx(ctx, len);
if (audit_sig_sid) {
memcpy(sig_data->ctx, ctx, len);
security_release_secctx(ctx, len);
}
audit_send_reply(NETLINK_CB(skb).pid, seq, AUDIT_SIGNAL_INFO,
0, 0, sig_data, sizeof(*sig_data) + len);
kfree(sig_data);
Expand Down

0 comments on commit 398037e

Please sign in to comment.