Source-Changes-HG archive

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

[src/trunk]: src/lib/librumphijack block cross-kernel rename in the other dir...



details:   https://anonhg.NetBSD.org/src/rev/8cd15bd4acbb
branches:  trunk
changeset: 762267:8cd15bd4acbb
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Feb 18 14:44:46 2011 +0000

description:
block cross-kernel rename in the other direction also

diffstat:

 lib/librumphijack/hijack.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 0f04f23f18eb -r 8cd15bd4acbb lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Fri Feb 18 14:33:11 2011 +0000
+++ b/lib/librumphijack/hijack.c        Fri Feb 18 14:44:46 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $       */
+/*      $NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $       */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.52 2011/02/18 14:33:11 pooka Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.53 2011/02/18 14:44:46 pooka Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -702,6 +702,9 @@
                to = path_host2rump(to);
                op_rename = GETSYSCALL(rump, RENAME);
        } else {
+               if (path_isrump(to))
+                       return EXDEV;
+
                op_rename = GETSYSCALL(host, RENAME);
        }
 



Home | Main Index | Thread Index | Old Index