Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumphijack Make ATCALL() behave for absolute paths too.



details:   https://anonhg.NetBSD.org/src/rev/031c15c3428b
branches:  trunk
changeset: 806672:031c15c3428b
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Mar 04 23:42:26 2015 +0000

description:
Make ATCALL() behave for absolute paths too.

diffstat:

 lib/librumphijack/hijack.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cfcf32111c16 -r 031c15c3428b lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Wed Mar 04 23:31:49 2015 +0000
+++ b/lib/librumphijack/hijack.c        Wed Mar 04 23:42:26 2015 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.114 2015/03/04 23:31:49 pooka Exp $      */
+/*      $NetBSD: hijack.c,v 1.115 2015/03/04 23:42:26 pooka Exp $      */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -34,7 +34,7 @@
 #include <rump/rumpuser_port.h>
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.114 2015/03/04 23:31:49 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.115 2015/03/04 23:42:26 pooka Exp $");
 #endif
 
 #include <sys/param.h>
@@ -531,7 +531,7 @@
        type (*fun) proto;                                              \
        int isrump = -1;                                                \
                                                                        \
-       if (fd == AT_FDCWD) {                                           \
+       if (fd == AT_FDCWD || *path == '/') {                           \
                isrump = path_isrump(path);                             \
        } else {                                                        \
                isrump = fd_isrump(fd);                                 \



Home | Main Index | Thread Index | Old Index