commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 67/98: trans: handle invalid responses to dir_lookup requests in


From: Samuel Thibault
Subject: [hurd] 67/98: trans: handle invalid responses to dir_lookup requests in fakeroot
Date: Tue, 14 Jan 2014 02:00:03 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 3688ec3ef963c8e41f845c1d98205ca69f91576b
Author: Justus Winter <address@hidden>
Date:   Sun Dec 8 18:28:01 2013 +0100

    trans: handle invalid responses to dir_lookup requests in fakeroot
    
    * trans/fakeroot.c (netfs_S_dir_lookup): Handle invalid responses to
      dir_lookup requests.
---
 trans/fakeroot.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 6e3b5d4..bee018e 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -276,14 +276,21 @@ netfs_S_dir_lookup (struct protid *diruser,
       break;
 
     case FS_RETRY_MAGICAL:
-    default:
       if (file == MACH_PORT_NULL)
        {
          *retry_port = MACH_PORT_NULL;
          *retry_port_type = MACH_MSG_TYPE_COPY_SEND;
          return 0;
        }
-      break;
+      /* Fallthrough.  */
+
+    default:
+      /* Invalid response to our dir_lookup request.  */
+      if (file != MACH_PORT_NULL)
+       mach_port_deallocate (mach_task_self (), file);
+      *retry_port = MACH_PORT_NULL;
+      *retry_port_type = MACH_MSG_TYPE_COPY_SEND;
+      return EOPNOTSUPP;
     }
 
   /* We have a new port to an underlying node.

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]