[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xenstore: set correct error code when violating quota
commit ec4abec2098ca59b2cb83b45843da21f65da79d7 Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Mon Mar 20 09:00:20 2017 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Wed Mar 22 11:23:10 2017 +0000 xenstore: set correct error code when violating quota When the number of permitted xenstore entries for a domain is being exceeded the operation trying to create a new entry is denied. Unfortunately errno isn't being set in this case so the error code returned to the client is undefined. Set errno to ENOSPC in this case. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/xenstore/xenstored_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 5c659d8..ed80345 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -937,8 +937,10 @@ static struct node *construct_node(struct connection *conn, const void *ctx, if (!parent) return NULL; - if (domain_entry(conn) >= quota_nb_entry_per_domain) + if (domain_entry(conn) >= quota_nb_entry_per_domain) { + errno = ENOSPC; return NULL; + } /* Add child to parent. */ base = basename(name); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |