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
This commit is contained in:
@@ -1877,12 +1877,18 @@ void __audit_inode(struct filename *name, const struct dentry *dentry,
|
||||
}
|
||||
|
||||
out_alloc:
|
||||
/* unable to find the name from a previous getname(). Allocate a new
|
||||
* anonymous entry.
|
||||
*/
|
||||
n = audit_alloc_name(context, AUDIT_TYPE_NORMAL);
|
||||
/* unable to find an entry with both a matching name and type */
|
||||
n = audit_alloc_name(context, AUDIT_TYPE_UNKNOWN);
|
||||
if (!n)
|
||||
return;
|
||||
if (name)
|
||||
/* since name is not NULL we know there is already a matching
|
||||
* name record, see audit_getname(), so there must be a type
|
||||
* mismatch; reuse the string path since the original name
|
||||
* record will keep the string valid until we free it in
|
||||
* audit_free_names() */
|
||||
n->name = name;
|
||||
|
||||
out:
|
||||
if (parent) {
|
||||
n->name_len = n->name ? parent_len(n->name->name) : AUDIT_NAME_FULL;
|
||||
|
Reference in New Issue
Block a user