tape: clear encryption key before writing labels
We always write labels unencrypted.
This commit is contained in:
parent
d5a48b5ce4
commit
619554af2b
@ -461,6 +461,8 @@ impl TapeDriver for LinuxTapeHandle {
|
||||
bail!("write_media_set_label failed - got wrong file number ({} != 1)", file_number);
|
||||
}
|
||||
|
||||
self.set_encryption(None)?;
|
||||
|
||||
let mut handle = TapeWriterHandle {
|
||||
writer: BlockedWriter::new(&mut self.file),
|
||||
};
|
||||
|
@ -81,6 +81,8 @@ pub trait TapeDriver {
|
||||
|
||||
self.rewind()?;
|
||||
|
||||
self.set_encryption(None)?;
|
||||
|
||||
self.erase_media(true)?;
|
||||
|
||||
let raw = serde_json::to_string_pretty(&serde_json::to_value(&label)?)?;
|
||||
|
@ -327,6 +327,8 @@ impl TapeDriver for VirtualTapeHandle {
|
||||
|
||||
fn write_media_set_label(&mut self, media_set_label: &MediaSetLabel) -> Result<(), Error> {
|
||||
|
||||
self.set_encryption(None)?;
|
||||
|
||||
let mut status = self.load_status()?;
|
||||
match status.current_tape {
|
||||
Some(VirtualTapeStatus { ref name, ref mut pos }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user