lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20081014205249.1057.12197.stgit@paris.rdu.redhat.com>
Date:	Tue, 14 Oct 2008 16:52:49 -0400
From:	Eric Paris <eparis@...hat.com>
To:	linux-kernel@...r.kernel.org, malware-list@...ts.printk.net
Cc:	viro@...IV.linux.org.uk, alan@...rguk.ukuu.org.uk,
	arjan@...radead.org, greg@...ah.com, tytso@....edu
Subject: [PATCH -v2 15/16] fanotify: send tgid with notification messages

Send tgid of original process to fanotify listeners

Signed-off-by: Eric Paris <eparis@...hat.com>
---

 fs/notify/fanotify.h     |    1 +
 fs/notify/notification.c |    2 ++
 include/linux/fanotify.h |    1 +
 3 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/notify/fanotify.h b/fs/notify/fanotify.h
index 74e5d4d..b45c145 100644
--- a/fs/notify/fanotify.h
+++ b/fs/notify/fanotify.h
@@ -49,6 +49,7 @@ struct fanotify_event {
 	/* if waiting for a userspace access answer this is the cookie they will send back */
 	unsigned long cookie;
 	pid_t pid;		/* pid of the original process */
+	pid_t tgid;		/* tgid of the original process */
 	spinlock_t response_lock; /* protects response */
 	unsigned int response;	/* userspace answer to question */
 };
diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index da2045a..acd13b0 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -182,6 +182,7 @@ struct fanotify_event *create_event(struct file *file, unsigned int mask)
 	event->mask = mask;
 
 	event->pid = current->pid;
+	event->tgid = current->tgid;
 
 	WARN_ON(!event->path.dentry);
 	WARN_ON(!event->path.mnt);
@@ -248,6 +249,7 @@ int fanotify_create_event_fd(struct fanotify_group *group, struct fanotify_event
 	data->mask = event->mask;
 	data->cookie = event->cookie;
 	data->pid = event->pid;
+	data->tgid = event->tgid;
 
 	fanotify_put_event(event);
 
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index ab7744a..711efa6 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -72,6 +72,7 @@ struct fanotify_event_metadata {
 	uint32_t mask;
 	uint64_t cookie;
 	pid_t pid;
+	pid_t tgid;
 };
 
 /* fanotify getsockopt optvals */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ