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]
Message-ID: <Pine.LNX.4.61.0609040911510.9108@yvahk01.tjqt.qr>
Date:	Mon, 4 Sep 2006 09:18:31 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Josef Sipek <jsipek@...sunysb.edu>
cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, akpm@...l.org, viro@....linux.org.uk
Subject: Re: [PATCH 10/22][RFC] Unionfs: Inode operations


>+			//DQ: vfs_create has a different prototype in 2.6

I found a relic! :-)

>+				if (IS_ERR(hidden_dentry)) {
>+					err = PTR_ERR(hidden_dentry);
>+				}
-{}

>+/* We don't lock the dentry here, because readlink does the heavy lifting. */
>+static void *unionfs_follow_link(struct dentry *dentry, struct nameidata *nd)
>+{
>+	char *buf;
>+	int len = PAGE_SIZE, err;
>+	mm_segment_t old_fs;
>+
>+	/* This is freed by the put_link method assuming a successful call. */
>+	buf = (char *)kmalloc(len, GFP_KERNEL);

Nocast.

>+void unionfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
>+{
>+	char *link;
>+	link = nd_get_link(nd);
>+	kfree(link);
>+}

kfree(nd_get_link(nd));

>+	/* Ordinary permission routines do not understand MAY_APPEND. */
>+	submask = mask & ~MAY_APPEND;
>+	if (inode->i_op && inode->i_op->permission) {
>+		retval = inode->i_op->permission(inode, submask, nd);
>+		if ((retval == -EACCES) && (submask & MAY_WRITE) &&
>+		    (!strcmp("nfs", (inode)->i_sb->s_type->name)) &&
>+		    (nd) && (nd->mnt) && (nd->mnt->mnt_sb) &&
>+		    (branchperms(nd->mnt->mnt_sb, bindex) & MAY_NFSRO)) {
>+			retval = generic_permission(inode, submask, NULL);

I am not sure right now, I would need to test; does someone know out of the box
whether other network filesystems (in particular SMBFS/CIFS) behave like NFS
and also return -EACCES rather than -EROFS?

>+	return ((retval == -EROFS) ? 0 : retval);	/* ignore EROFS */
outer ()
>+	for (bindex = bstart; (bindex <= bend) || (bindex == bstart); bindex++) {

>+				/* if error is in the leftmost f/s, pass it up */

"f/s" => branch, to follow unionfs terminiology.



Jan Engelhardt
-- 

-- 
VGER BF report: H 0.0311395
-
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