1
0
Fork 0
mirror of https://gitlab.redox-os.org/CoffeeCode/redox-ssh.git synced 2025-12-28 15:02:18 +01:00

Update dependencies

This commit is contained in:
Jeremy Soller 2023-03-10 09:03:43 -07:00
parent 8cf8b6073f
commit 656f021eb9
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
4 changed files with 161 additions and 72 deletions

218
Cargo.lock generated
View file

@ -1,133 +1,221 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]] [[package]]
name = "byteorder" name = "autocfg"
version = "1.1.0" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "fuchsia-cprng"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
[[package]] [[package]]
name = "gcc" name = "gcc"
version = "0.3.51" version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.26" version = "0.2.140"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
[[package]] [[package]]
name = "log" name = "log"
version = "0.3.8" version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.17",
]
[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
[[package]] [[package]]
name = "num-bigint" name = "num-bigint"
version = "0.1.39" version = "0.4.3"
source = "git+https://github.com/rust-num/num#d159ed63be98c8ff01b62cbbf912d721e2b0eb41" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
dependencies = [ dependencies = [
"num-integer 0.1.34 (git+https://github.com/rust-num/num)", "autocfg",
"num-traits 0.1.39 (git+https://github.com/rust-num/num)", "num-integer",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.34" version = "0.1.45"
source = "git+https://github.com/rust-num/num#d159ed63be98c8ff01b62cbbf912d721e2b0eb41" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
dependencies = [ dependencies = [
"num-traits 0.1.39 (git+https://github.com/rust-num/num)", "autocfg",
"num-traits",
] ]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.1.39" version = "0.2.15"
source = "git+https://github.com/rust-num/num#d159ed63be98c8ff01b62cbbf912d721e2b0eb41" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
"autocfg",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.3.15" version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c"
dependencies = [ dependencies = [
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"rand 0.4.6",
]
[[package]]
name = "rand"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
dependencies = [
"fuchsia-cprng",
"libc",
"rand_core 0.3.1",
"rdrand",
"winapi",
]
[[package]]
name = "rand_core"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
dependencies = [
"rand_core 0.4.2",
]
[[package]]
name = "rand_core"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
[[package]]
name = "rdrand"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
dependencies = [
"rand_core 0.3.1",
] ]
[[package]] [[package]]
name = "redox-ssh" name = "redox-ssh"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.9",
"num-bigint 0.1.39 (git+https://github.com/rust-num/num)", "num-bigint",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23",
"redox_syscall 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto",
"rustc-serialize",
] ]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.1.26" version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
"bitflags",
]
[[package]] [[package]]
name = "rust-crypto" name = "rust-crypto"
version = "0.2.36" version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
dependencies = [ dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", "gcc",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.23",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize",
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "time",
] ]
[[package]] [[package]]
name = "rustc-serialize" name = "rustc-serialize"
version = "0.3.24" version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c11e5465fcfde38cd9068f031d9eae19d2530bee91b129fed44f2b122697749"
[[package]] [[package]]
name = "time" name = "time"
version = "0.1.38" version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [ dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)", "wasi",
"redox_syscall 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "winapi",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "winapi" name = "wasi"
version = "0.2.8" version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]] [[package]]
name = "winapi-build" name = "winapi"
version = "0.1.1" version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[metadata] [[package]]
"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" name = "winapi-i686-pc-windows-gnu"
"checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a" version = "0.4.0"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)" = "30885bcb161cf67054244d10d4a7f4835ffd58773bc72e07d35fecf472295503" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
"checksum num-bigint 0.1.39 (git+https://github.com/rust-num/num)" = "<none>" [[package]]
"checksum num-integer 0.1.34 (git+https://github.com/rust-num/num)" = "<none>" name = "winapi-x86_64-pc-windows-gnu"
"checksum num-traits 0.1.39 (git+https://github.com/rust-num/num)" = "<none>" version = "0.4.0"
"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d" source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum redox_syscall 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "9df6a71a1e67be2104410736b2389fb8e383c1d7e9e792d629ff13c02867147a" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
"checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

View file

@ -25,13 +25,14 @@ doc = false
[dependencies] [dependencies]
byteorder = "^1.0" byteorder = "^1.0"
log = "^0.3" log = "^0.3"
rust-crypto = "^0.2" num-bigint = "0.4"
rand = "^0.3" rand = "^0.3"
num-bigint = { git = "https://github.com/rust-num/num" } rust-crypto = "^0.2"
rustc-serialize = "=0.3.20"
[target.'cfg(not(target_os = "redox"))'.dependencies] [target.'cfg(not(target_os = "redox"))'.dependencies]
libc = "^0.2.26" libc = "^0.2.26"
[target.'cfg(target_os = "redox")'.dependencies] [target.'cfg(target_os = "redox")'.dependencies]
redox_syscall = "0.1" redox_syscall = "0.2"

View file

@ -89,7 +89,7 @@ impl Channel {
#[cfg(target_os = "redox")] #[cfg(target_os = "redox")]
use syscall::dup; use syscall::dup;
#[cfg(target_os = "redox")] #[cfg(target_os = "redox")]
let master2 = unsafe { dup(master_fd, &[]).unwrap_or(!0) }; let master2 = unsafe { dup(master_fd as usize, &[]).unwrap_or(!0) };
#[cfg(not(target_os = "redox"))] #[cfg(not(target_os = "redox"))]
use libc::dup; use libc::dup;
@ -97,7 +97,7 @@ impl Channel {
let master2 = unsafe { dup(master_fd) }; let master2 = unsafe { dup(master_fd) };
println!("dup result: {}", master2 as u32); println!("dup result: {}", master2 as u32);
let mut master = unsafe { File::from_raw_fd(master2) }; let mut master = unsafe { File::from_raw_fd(master2 as i32) };
loop { loop {
use std::str::from_utf8_unchecked; use std::str::from_utf8_unchecked;
let mut buf = [0; 4096]; let mut buf = [0; 4096];

View file

@ -8,7 +8,7 @@ pub fn before_exec() -> Result<()> {
pub fn fork() -> usize { pub fn fork() -> usize {
extern crate syscall; extern crate syscall;
unsafe { syscall::clone(0).unwrap() } unsafe { syscall::clone(syscall::CloneFlags::empty()).unwrap() }
} }
pub fn set_winsize(fd: RawFd, row: u16, col: u16, xpixel: u16, ypixel: u16) {} pub fn set_winsize(fd: RawFd, row: u16, col: u16, xpixel: u16, ypixel: u16) {}
@ -23,7 +23,7 @@ pub fn getpty() -> (RawFd, PathBuf) {
let count = syscall::fpath(master, &mut buf).unwrap(); let count = syscall::fpath(master, &mut buf).unwrap();
( (
master, master as i32,
PathBuf::from(unsafe { PathBuf::from(unsafe {
String::from_utf8_unchecked(Vec::from(&buf[..count])) String::from_utf8_unchecked(Vec::from(&buf[..count]))
}), }),