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

[Xen-changelog] [xen master] xenstored: handle unlikely failure better in ask_parents



commit b865bda00f7cf5b0703e3d23ca22c8d1f607a1dd
Author:     Matthew Daley <mattjd@xxxxxxxxx>
AuthorDate: Wed Sep 18 15:37:54 2013 +1200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Sep 25 13:23:12 2013 +0100

    xenstored: handle unlikely failure better in ask_parents
    
    Coverity-ID: 1055277
    Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/xenstore/xenstored_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index a2cf2a6..0f8ba64 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -523,8 +523,10 @@ static enum xs_perm_type ask_parents(struct connection 
*conn, const char *name)
        } while (!streq(name, "/"));
 
        /* No permission at root?  We're in trouble. */
-       if (!node)
+       if (!node) {
                corrupt(conn, "No permissions file at root");
+               return XS_PERM_NONE;
+       }
 
        return perm_for_conn(conn, node->perms, node->num_perms);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.