[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 01/25: remap: Refuse non-absolute paths
From: |
Samuel Thibault |
Subject: |
[hurd] 01/25: remap: Refuse non-absolute paths |
Date: |
Mon, 24 Oct 2016 00:16:43 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 8208fdc63b56c5b1be837ad583534e5bbe4d6808
Author: Samuel Thibault <address@hidden>
Date: Sun Aug 28 20:48:11 2016 +0200
remap: Refuse non-absolute paths
* trans/remap.c (parse_opt): Error out if some path is not absolute.
---
trans/remap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/trans/remap.c b/trans/remap.c
index 5ee0189..b92826f 100644
--- a/trans/remap.c
+++ b/trans/remap.c
@@ -70,6 +70,7 @@ trivfs_S_dir_lookup (struct trivfs_protid *diruser,
return EOPNOTSUPP;
for (remap = remaps; remap; remap = remap->next)
+ /* FIXME: should match just prefix of filename too */
if (!strcmp (remap->from, filename))
{
#ifdef DEBUG
@@ -96,6 +97,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
switch (key)
{
case ARGP_KEY_ARG:
+ if (arg[0] != '/')
+ error(1, 0, "remap only works with absolute paths\n");
/* Skip heading slashes */
while (arg[0] == '/')
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (12576ff -> 341f43d), Samuel Thibault, 2016/10/23
- [hurd] 01/25: remap: Refuse non-absolute paths,
Samuel Thibault <=
- [hurd] 04/25: Fix message about not being able to request shutdown notification, Samuel Thibault, 2016/10/23
- [hurd] 02/25: typo, Samuel Thibault, 2016/10/23
- [hurd] 07/25: Fix looping over runsystem possibilities, Samuel Thibault, 2016/10/23
- [hurd] 03/25: Fix exec crash when setexecdata has never been called, Samuel Thibault, 2016/10/23
- [hurd] 05/25: exec: Fix loading binaries without a memory manager object, Samuel Thibault, 2016/10/23
- [hurd] 10/25: Fix patch to runsystem.hurd, Samuel Thibault, 2016/10/23
- [hurd] 20/25: console-client: Remove unused variable., Samuel Thibault, 2016/10/23
- [hurd] 19/25: ext2fs: Poison pointers into dereferenced cache pages., Samuel Thibault, 2016/10/23
- [hurd] 08/25: libfshelp: acquire references to control ports, Samuel Thibault, 2016/10/23
- [hurd] 15/25: Avoid fatal error handling in option parsers., Samuel Thibault, 2016/10/23