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/a2ce8f06fa79
branches:  trunk
changeset: 336530:a2ce8f06fa79
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 7965e4c748b2 -r a2ce8f06fa79 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