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-next>] [day] [month] [year] [list]
Date:	Sun, 20 Sep 2015 23:07:35 +0200
From:	Patrick Puzik <p.puzik91@...il.com>
To:	Jan Kara <jack@...e.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Josef Bacik <jbacik@...com>,
	Dave Chinner <dchinner@...hat.com>,
	Nikolay Borisov <kernel@...p.com>,
	Patrick Puzik <p.puzik91@...il.com>,
	linux-kernel@...r.kernel.org
Cc:	Patrick Puzik <p.puzi91@...il.com>
Subject: [PATCH] Add FS_CLOSE_READ and FS_CLOSE_NOREAD flag to fsnotify

Attached is a patch which is a preparation for the later support of an event notification,
when an unreadable or readable file was closed.

Signed-off-by: Patrick Puzik <p.puzik91@...il.com>
---
 include/linux/fsnotify_backend.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 533c440..7563679 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -28,6 +28,8 @@
 #define FS_ATTRIB		0x00000004	/* Metadata changed */
 #define FS_CLOSE_WRITE		0x00000008	/* Writtable file was closed */
 #define FS_CLOSE_NOWRITE	0x00000010	/* Unwrittable file closed */
+#define FS_CLOSE_READ           0x00000011      /* Unreadable file closed */
+#define FS_CLOSE_NOREAD         0x00000012      /* Readable file was closed */
 #define FS_OPEN			0x00000020	/* File was opened */
 #define FS_MOVED_FROM		0x00000040	/* File was moved from X */
 #define FS_MOVED_TO		0x00000080	/* File was moved to Y */
@@ -56,9 +58,10 @@
 
 /* This is a list of all events that may get sent to a parernt based on fs event
  * happening to inodes inside that directory */
-#define FS_EVENTS_POSS_ON_CHILD   (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\
-				   FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\
-				   FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\
+#define FS_EVENTS_POSS_ON_CHILD   (FS_ACCESS | FS_MODIFY | FS_ATTRIB | \
+				   FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | \
+				   FS_CLOSE_READ | FS_CLOSE_NOREAD | FS_OPEN | \
+				   FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE | \
 				   FS_DELETE | FS_OPEN_PERM | FS_ACCESS_PERM)
 
 #define FS_MOVE			(FS_MOVED_FROM | FS_MOVED_TO)
@@ -66,7 +69,8 @@
 #define ALL_FSNOTIFY_PERM_EVENTS (FS_OPEN_PERM | FS_ACCESS_PERM)
 
 #define ALL_FSNOTIFY_EVENTS (FS_ACCESS | FS_MODIFY | FS_ATTRIB | \
-			     FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN | \
+			     FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | \
+			     FS_CLOSE_READ | FS_CLOSE_NOREAD | FS_OPEN | \
 			     FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE | \
 			     FS_DELETE | FS_DELETE_SELF | FS_MOVE_SELF | \
 			     FS_UNMOUNT | FS_Q_OVERFLOW | FS_IN_IGNORED | \
-- 
2.4.3

--
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