
On 08/10/2012 07:19 AM, Ján Tomko wrote: Commit message is sparse, give one or two sentences why this might be useful.
--- src/conf/storage_conf.c | 8 +++++--- src/storage/storage_backend.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3132aae..017648d 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -667,7 +667,8 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt, } else { int tmp;
- if (virStrToLong_i(mode, NULL, 8, &tmp) < 0 || (tmp & ~0777)) { + if (virStrToLong_i(mode, NULL, 8, &tmp) < 0 || + (tmp & ~(S_ISVTX | S_IRWXUGO))) {
POSIX requires S_ISVTX to be a constant value, so it's also okay to write this 01777, but I like the symbolic naming as evidence of what we're doing. ACK once you provide a commit message. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org