aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-23 21:13:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-23 21:13:16 -0500
commit66b3f4f0a0fcc197a1e432c3d2134f5c6a5275b9 (patch)
tree00a5b55daae62443f4242c2036dcdaadb346ba83 /kernel/auditsc.c
parent53262d12d1658669029ab39a63e3d314108abe66 (diff)
parent041d7b98ffe59c59fdd639931dea7d74f9aa9a59 (diff)
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit
Pull audit fixes from Paul Moore: "Four patches to fix various problems with the audit subsystem, all are fairly small and straightforward. One patch fixes a problem where we weren't using the correct gfp allocation flags (GFP_KERNEL regardless of context, oops), one patch fixes a problem with old userspace tools (this was broken for a while), one patch fixes a problem where we weren't recording pathnames correctly, and one fixes a problem with PID based filters. In general I don't think there is anything controversial with this patchset, and it fixes some rather unfortunate bugs; the allocation flag one can be particularly scary looking for users" * 'upstream' of git://git.infradead.org/users/pcmoore/audit: audit: restore AUDIT_LOGINUID unset ABI audit: correctly record file names with different path name types audit: use supplied gfp_mask from audit_buffer in kauditd_send_multicast_skb audit: don't attempt to lookup PIDs when changing PID filtering audit rules
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index c75522a83678..37c69ab561da 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1877,12 +1877,18 @@ void __audit_inode(struct filename *name, const struct dentry *dentry,
1877 } 1877 }
1878 1878
1879out_alloc: 1879out_alloc:
1880 /* unable to find the name from a previous getname(). Allocate a new 1880 /* unable to find an entry with both a matching name and type */
1881 * anonymous entry. 1881 n = audit_alloc_name(context, AUDIT_TYPE_UNKNOWN);
1882 */
1883 n = audit_alloc_name(context, AUDIT_TYPE_NORMAL);
1884 if (!n) 1882 if (!n)
1885 return; 1883 return;
1884 if (name)
1885 /* since name is not NULL we know there is already a matching
1886 * name record, see audit_getname(), so there must be a type
1887 * mismatch; reuse the string path since the original name
1888 * record will keep the string valid until we free it in
1889 * audit_free_names() */
1890 n->name = name;
1891
1886out: 1892out:
1887 if (parent) { 1893 if (parent) {
1888 n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL; 1894 n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL;