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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Feb 2010 16:45:01 -0600
From:	Serge Hallyn <serue@...ibm.com>
To:	serue@...ibm.com
Cc:	Greg KH <greg@...ah.com>, rsc@...ch.com,
	Ashwin Ganti <ashwin.ganti@...il.com>, ericvh@...il.com,
	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	Ron Minnich <rminnich@...il.com>
Subject: [PATCH 8/8] p9auth: don't trim entries on write-only open

From: Serge E. Hallyn <serue@...ibm.com>

If we want to support an admin clearing all entries, let's
not do it through some subtle hidden channel, but rather
implement a 'CLEAR' command to /dev/caphash, which requires
privilege to use.

Signed-off-by: Serge E. Hallyn <serue@...ibm.com>
Cc: Greg KH <greg@...ah.com>
cc: rsc@...ch.com
Cc: Ashwin Ganti <ashwin.ganti@...il.com>
Cc: ericvh@...il.com
Cc: devel@...uxdriverproject.org
Cc: linux-kernel@...r.kernel.org
Cc: Ron Minnich <rminnich@...il.com>
---
 drivers/staging/p9auth/p9auth.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/p9auth/p9auth.c b/drivers/staging/p9auth/p9auth.c
index 6012bd9..06128c3 100644
--- a/drivers/staging/p9auth/p9auth.c
+++ b/drivers/staging/p9auth/p9auth.c
@@ -146,13 +146,6 @@ static int cap_open(struct inode *inode, struct file *filp)
 	dev = container_of(inode->i_cdev, struct cap_dev, cdev);
 	filp->private_data = dev;
 
-	/* trim to 0 the length of the device if open was write-only */
-	if ((filp->f_flags & O_ACCMODE) == O_WRONLY) {
-		if (down_interruptible(&dev->sem))
-			return -ERESTARTSYS;
-		cap_trim(dev);
-		up(&dev->sem);
-	}
 	/* initialise the head if it is NULL */
 	if (dev->head == NULL) {
 		dev->head = kmalloc(sizeof(struct cap_node), GFP_KERNEL);
-- 
1.6.1

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