From: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
To: linux-kernel@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>
Subject: [PATCH v2 1/2] include/uapi: Define AT_ABSOLUTE to allow only absolute paths
Date: Wed, 09 Jul 2014 23:51:11 +0000 (GMT) [thread overview]
Message-ID: <fb4eb72f7cd0.53bdd56f@langara.bc.ca> (raw)
This way people can use existing functionality (passing an invalid value
for dirfd to allow only absolute paths in *at style functions) and be
compatible for the future if Linux ever adds in new AT_* flags.
Signed-off-by: Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca>
---
include/uapi/linux/fcntl.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/fcntl.h b/include/uapi/linux/fcntl.h
index 074b886..c4c5705 100644
--- a/include/uapi/linux/fcntl.h
+++ b/include/uapi/linux/fcntl.h
@@ -38,9 +38,16 @@
#define DN_ATTRIB 0x00000020 /* File changed attibutes */
#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
+#define AT_FDABSOLUTE -1 /* Special value used to indicate
+ openat should not use any directory
+ and only accept absolute values.
+ Currently, other values work for this
+ but in the future that might
+ change. */
#define AT_FDCWD -100 /* Special value used to indicate
- openat should use the current
- working directory. */
+ openat should use the current
+ working directory. */
+
#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
#define AT_REMOVEDIR 0x200 /* Remove directory instead of
unlinking file. */
--
1.7.9.5
next reply other threads:[~2014-07-09 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 23:51 Steven Stewart-Gallus [this message]
2014-07-09 23:53 ` [PATCH v2 2/2] man2: Document constant for only allowing absolute paths Steven Stewart-Gallus
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=fb4eb72f7cd0.53bdd56f@langara.bc.ca \
--to=sstewartgallus00@mylangara.bc.ca \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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