Updated dependencies

This commit is contained in:
Dennis Schwerdel 2018-08-16 12:15:09 +02:00
parent 381bdf654d
commit c8c5a7e901
7 changed files with 667 additions and 197 deletions

772
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -8,37 +8,36 @@ description = "Deduplicating backup tool"
lto = true
[dependencies]
serde = "1.0"
rmp-serde = "0.13"
serde_yaml = "0.7"
serde_utils = "0.6"
serde_bytes = "0.10"
squash-sys = "0.9"
quick-error = "1.1"
blake2-rfc = "0.2"
murmurhash3 = "0.0.5"
chrono = "0.4"
serde = "^1.0"
rmp-serde = "^0.13"
serde_yaml = "~0.7"
serde_utils = "~0.6"
serde_bytes = "~0.10"
squash-sys = "~0.10"
quick-error = "^1.1"
blake2-rfc = "~0.2"
murmurhash3 = "~0.0.5"
chrono = "~0.4"
clap = "^2.24"
log = "0.4"
byteorder = "1.0"
ansi_term = "0.11"
sodiumoxide = "0.0.16"
libsodium-sys = "0.0.16"
filetime = "0.1"
regex = "0.2"
fuse = "0.3"
lazy_static = "1.0"
rand = "0.4"
tar = "0.4"
xattr = "0.2"
crossbeam = "0.3"
pbr = "1.0"
users = "0.6"
time = "*"
libc = "0.2"
runtime-fmt = "0.3"
locale_config = "^0.2.2"
mmap = "0.1"
log = "~0.4"
byteorder = "^1.0"
ansi_term = "~0.11"
sodiumoxide = { git = "https://github.com/sodiumoxide/sodiumoxide" }
filetime = "~0.2"
regex = "^1.0"
fuse = "~0.3"
lazy_static = "^1.0"
rand = "~0.5"
tar = "~0.4"
xattr = "~0.2"
crossbeam = "~0.4"
pbr = "^1.0"
users = "~0.7"
time = "~0.1"
libc = "~0.2"
runtime-fmt = "~0.3"
locale_config = "~0.2.2"
mmap = "~0.1"
[features]
default = []

View File

@ -289,7 +289,7 @@ impl Inode {
}
}
}
let time = FileTime::from_seconds_since_1970(self.timestamp as u64, 0);
let time = FileTime::from_unix_time(self.timestamp, 0);
if let Err(err) = filetime::set_file_times(&full_path, time, time) {
tr_warn!("Failed to set file time on {:?}: {}", full_path, err);
}

View File

@ -21,7 +21,6 @@ extern crate clap;
extern crate log;
extern crate byteorder;
extern crate sodiumoxide;
extern crate libsodium_sys;
extern crate ansi_term;
extern crate filetime;
extern crate regex;

View File

@ -5,7 +5,7 @@ use std::sync::{Mutex, Condvar, Arc};
use std::{mem, fs, thread};
use std::path::{Path, PathBuf};
use crossbeam::sync::MsQueue;
use crossbeam::queue::MsQueue;
pub struct BundleUploader {

View File

@ -284,9 +284,7 @@ impl CompressionStream {
impl Drop for CompressionStream {
fn drop(&mut self) {
unsafe {
//squash_object_unref(self.stream as *mut ::std::os::raw::c_void);
use libc;
squash_object_unref(self.stream as *mut libc::c_void);
squash_object_unref(self.stream as *mut ::std::os::raw::c_void);
}
}
}

View File

@ -7,10 +7,10 @@ use std::sync::{RwLock, Once, ONCE_INIT};
use serde_yaml;
use serde_bytes::ByteBuf;
use libsodium_sys;
use sodiumoxide;
use sodiumoxide::crypto::sealedbox;
use sodiumoxide::crypto::box_;
use sodiumoxide::crypto::box_::curve25519xsalsa20poly1305::{keypair_from_seed, Seed};
use sodiumoxide::crypto::pwhash;
pub use sodiumoxide::crypto::box_::{SecretKey, PublicKey};
@ -20,7 +20,7 @@ use util::*;
static INIT: Once = ONCE_INIT;
fn sodium_init() {
INIT.call_once(|| if !sodiumoxide::init() {
INIT.call_once(|| if sodiumoxide::init().is_err() {
tr_panic!("Failed to initialize sodiumoxide");
});
}
@ -277,20 +277,12 @@ impl Crypto {
pwhash::OPSLIMIT_INTERACTIVE,
pwhash::MEMLIMIT_INTERACTIVE
).unwrap();
let mut seed = [0u8; 32];
let offset = key.len() - seed.len();
for (i, b) in seed.iter_mut().enumerate() {
*b = key[i + offset];
}
let mut pk = [0u8; 32];
let mut sk = [0u8; 32];
if unsafe { libsodium_sys::crypto_box_seed_keypair(&mut pk, &mut sk, &seed) } != 0 {
tr_panic!("Libsodium failed");
}
(
PublicKey::from_slice(&pk).unwrap(),
SecretKey::from_slice(&sk).unwrap()
)
let seed = if let Some(seed) = Seed::from_slice(&key[key.len()-32..]) {
seed
} else {
tr_panic!("Seed failed");
};
keypair_from_seed(&seed)
}
}