[pbs-devel] [PATCH proxmox-backup] fix #5233: don't require root for some tape operations

Dominik Csapak d.csapak at proxmox.com
Wed Nov 13 08:42:22 CET 2024


On 11/12/24 21:15, Thomas Lamprecht wrote:
> Am 10.09.24 um 09:08 schrieb Dominik Csapak:
>> instead, require 'Tape.Write' on '/tape' path.
>> This makes it possible for a TapeAdmin or TapeOperator to
>> format/remove/vault tapes, instead of just root at pam.
>>
>> I opted for the path '/tape' since we don't have a dedicated acl
>> structure for single tapes, just '/tape/pool' (which does not apply
>> since not all tapes have to have a pool), '/tape/device' (which is
>> intended for drives/changers) and '/tape/jobs' (which is for jobs only).
>>
>> Alternatively we could invent a new scheme for tape media, e.g.
>> '/tape/media' for this.
> 
> the path is fine, but why Tape.Write over Tape.Modify?
> 
>> Tape.Modify
>>      Tape.Modify allows a user to modify the configuration of tape drives, changers and backups.
> 
> vs
> 
>> Tape.Write
>>      Tape.Write allows a user to write to a tape media.
> 
> The former might be a better fit here as these calls alter not only the tape
> content, or?
> 
> Noticed because Hannes' recent patch already switched the move-tape one to
> Tape.Modify,
> 


mhmm... not sure why i chose Tape.Write exactly, but IMHO looking at it again, Modify would probably
fit better for the 'update_media_status' (also fits better for the move-tape as Hannes rightly
noticed)

for destroy I'd be inclined to still use Write. While it does update the inventory
(it removes it from there), It's basically the inverse of 'format_media' (as
in, that inserts it into the inventory) which also uses Write.

I'd send a rebased version for using Write for destroy, and Modify for update status if that's
fine with you.




More information about the pbs-devel mailing list