From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: linux-kernel@vger.kernel.org, trond.myklebust@fys.uio.no
Subject: opening symlinks with O_CREAT under latest 2.5.74
Date: Mon, 7 Jul 2003 21:30:34 +0200 [thread overview]
Message-ID: <16137.51802.41123.551648@charged.uio.no> (raw)
In-Reply-To: <20030707154628.GA3220@vana.vc.cvut.cz>
>>>>> " " == Petr Vandrovec <vandrove@vc.cvut.cz> writes:
> Hi,
> couple of things stopped working on my box
> where I have /dev/vc/XX as symlinks to /dev/ttyXX, and some
> things use /dev/vc/XX and some /dev/ttyXX. After last update
> hour ago things which use /dev/vc/XX stopped working for
> non-root - they now fail with EACCES error if they attempt to
> redirect its input or output through '>' or '<>' bash
> redirection operators:
Whoops. Looks like I missed an assumption in open_namei().
Does the following patch fix the problem?
Cheers,
Trond
--- linux-2.5.74-up/fs/namei.c.orig 2003-06-30 08:49:25.000000000 +0200
+++ linux-2.5.74-up/fs/namei.c 2003-07-07 21:25:00.000000000 +0200
@@ -1344,6 +1344,7 @@
* stored in nd->last.name and we will have to putname() it when we
* are done. Procfs-like symlinks just set LAST_BIND.
*/
+ nd->flags |= LOOKUP_PARENT;
error = security_inode_follow_link(dentry, nd);
if (error)
goto exit_dput;
@@ -1352,6 +1353,7 @@
dput(dentry);
if (error)
return error;
+ nd->flags &= ~LOOKUP_PARENT;
if (nd->last_type == LAST_BIND) {
dentry = nd->dentry;
goto ok;
next prev parent reply other threads:[~2003-07-07 19:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-07 15:46 Petr Vandrovec
2003-07-07 18:49 ` Felipe Alfaro Solana
2003-07-07 19:27 ` Petr Vandrovec
2003-07-07 19:30 ` Trond Myklebust [this message]
2003-07-07 19:39 ` Petr Vandrovec
2003-07-07 19:46 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16137.51802.41123.551648@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
--cc=vandrove@vc.cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®