commit | e90bcfd520818971e6889192e0ed18c5f1deab3e | [log] [tgz] |
---|---|---|
author | Bogdan Caprita <caprita@google.com> | Fri Aug 07 13:31:55 2015 -0700 |
committer | Bogdan Caprita <caprita@google.com> | Fri Aug 07 13:31:55 2015 -0700 |
tree | 6aa4951268cce3dad698f612ffc5707fd4662756 | |
parent | 6069de7f4e6fd8872b06fe714af2643279227068 [diff] |
services/internal/binarylib: bug fix: Create call on existing binary resets ACLs Because Create's implementation first set the ACLs and then checks if the binary already exists, calling Create on a name corresponding to an existing binary ends up resetting the ACLs for the binary. This gives ownership of the object to the caller of the second Create (and overwriting any explicit ACL settings done after the first Create). This was detected in production, where we occasionally called "device publish" for the same binary (proxyd) twice during the same second. This CL swaps the ordering of operations in Create, first setting up the directory corresponding to the new binary, and, only if it turns out that the object is indeed new, setting the ACLs. To prevent unauthorized access to the object after it's created but before ACLs are set, we restrict the authorizer to only allow Create calls against objects without permissions set on them. Change-Id: I4788143ed739c4006e286fe36833ed0cf7a51fcf
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.