Summary
llLinksetDataReset()
can currently be called by any script anywhere in a linkset. It deletes the entire linkset datastore, including entries created with
llLinksetDataWriteProtected()
.
This means that an unrelated script in any child prim can erase all protected data, despite being unable to read, overwrite, or individually delete those entries without the correct password.
Use case
Complex linksets are often assembled from independently scripted products. For example, a rezzer-managed building may contain linked furniture whose scripts were written under the assumption that the furniture owns its entire linkset.
Such a furniture script might reasonably call
llLinksetDataReset()
during initialization or a factory reset to guarantee an empty datastore. Once that furniture has been linked into a larger build, the same call silently destroys the datastore belonging to the entire build, including protected entries used by the rezzer.
Conversely, protected entries cannot simply be made immune to resets. When two linksets are joined, their datastores are merged. The controller of the resulting linkset must remain able to remove protected data inherited from the other linkset, since it cannot be expected to know passwords chosen by unrelated products.
Proposed behaviour
Restrict
llLinksetDataReset()
so that it succeeds only when called by a script located in the current root prim.
A call originating from a child prim should be ignored or otherwise fail without modifying the datastore.
This provides a natural authority boundary:
* A standalone product can reset its own datastore because its controller is in its root prim.
* After that product is linked beneath another root, its scripts can no longer erase the resulting linkset’s complete datastore.
* The controller in the new root can still wipe and rebuild the datastore, including removing protected records inherited during linking.
* Password protection continues to govern individual protected-entry operations.
Rationale
The linkset datastore is itself a property of the root prim. Giving only scripts in that prim authority to erase the entire datastore is consistent with that ownership model.
Currently, protected entries are protected against every destructive operation except the most destructive one. Restricting wholesale reset authority to the root prim would close that gap without making inherited protected entries impossible for the resulting linkset’s controller to remove.