~kennylevinsen/greetd

23fadf16d444164983784db5ce9d91d2c655fcd6 — Kenny Levinsen 8 months ago dd96c93
cargo: Update dependencies
M Cargo.lock => Cargo.lock +48 -41
@@ 16,9 16,9 @@ dependencies = [

[[package]]
name = "async-trait"
version = "0.1.59"
version = "0.1.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364"
checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3"
dependencies = [
 "proc-macro2",
 "quote",


@@ 33,9 33,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"

[[package]]
name = "bitflags"
version = "1.2.1"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "bytes"


@@ 44,12 44,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c"

[[package]]
name = "cc"
version = "1.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"


@@ 119,15 113,15 @@ version = "0.1.0"

[[package]]
name = "itoa"
version = "1.0.4"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"

[[package]]
name = "libc"
version = "0.2.138"
version = "0.2.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"

[[package]]
name = "log"


@@ 146,9 140,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "memoffset"
version = "0.6.5"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
 "autocfg",
]


@@ 167,15 161,16 @@ dependencies = [

[[package]]
name = "nix"
version = "0.20.2"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945"
checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694"
dependencies = [
 "bitflags",
 "cc",
 "cfg-if",
 "libc",
 "memoffset",
 "pin-utils",
 "static_assertions",
]

[[package]]


@@ 194,19 189,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"

[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"

[[package]]
name = "proc-macro2"
version = "1.0.47"
version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
dependencies = [
 "unicode-ident",
]

[[package]]
name = "quote"
version = "1.0.21"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
dependencies = [
 "proc-macro2",
]


@@ 223,24 224,24 @@ dependencies = [

[[package]]
name = "ryu"
version = "1.0.11"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"

[[package]]
name = "serde"
version = "1.0.149"
version = "1.0.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055"
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
dependencies = [
 "serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.149"
version = "1.0.152"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4"
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
dependencies = [
 "proc-macro2",
 "quote",


@@ 249,9 250,9 @@ dependencies = [

[[package]]
name = "serde_json"
version = "1.0.89"
version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db"
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
dependencies = [
 "itoa",
 "ryu",


@@ 278,10 279,16 @@ dependencies = [
]

[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"

[[package]]
name = "syn"
version = "1.0.105"
version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
dependencies = [
 "proc-macro2",
 "quote",


@@ 290,18 297,18 @@ dependencies = [

[[package]]
name = "thiserror"
version = "1.0.37"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e"
checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
dependencies = [
 "thiserror-impl",
]

[[package]]
name = "thiserror-impl"
version = "1.0.37"
version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb"
checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
dependencies = [
 "proc-macro2",
 "quote",


@@ 310,9 317,9 @@ dependencies = [

[[package]]
name = "tokio"
version = "1.23.0"
version = "1.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46"
checksum = "7125661431c26622a80ca5051a2f936c9a678318e0351007b0cc313143024e5c"
dependencies = [
 "autocfg",
 "bytes",


@@ 339,9 346,9 @@ dependencies = [

[[package]]
name = "unicode-ident"
version = "1.0.5"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"

[[package]]
name = "unicode-width"

M agreety/Cargo.toml => agreety/Cargo.toml +2 -2
@@ 12,5 12,5 @@ greetd_ipc = { path = "../greetd_ipc", features = ["sync-codec"]}
inish = { path = "../inish"}
rpassword = "5.0"
getopts = "0.2"
enquote = "1.0.3"
nix = "0.20"
enquote = "1.1"
nix = "0.26"

M agreety/src/main.rs => agreety/src/main.rs +8 -8
@@ 39,18 39,18 @@ fn get_issue() -> Result<String, Box<dyn std::error::Error>> {
        .unwrap_or_else(|_| "0".to_string())
        .parse()
        .expect("unable to parse VTNR");
    let uts = uname();
    let uts = uname()?;
    Ok(fs::read_to_string("/etc/issue")?
        .replace(
            "\\S",
            &get_distro_name().unwrap_or_else(|_| "Linux".to_string()),
        )
        .replace("\\l", &format!("tty{}", vtnr))
        .replace("\\s", &uts.sysname())
        .replace("\\r", &uts.release())
        .replace("\\v", &uts.version())
        .replace("\\n", &uts.nodename())
        .replace("\\m", &uts.machine())
        .replace("\\s", &uts.sysname().to_str().unwrap())
        .replace("\\r", &uts.release().to_str().unwrap())
        .replace("\\v", &uts.version().to_str().unwrap())
        .replace("\\n", &uts.nodename().to_str().unwrap())
        .replace("\\m", &uts.machine().to_str().unwrap())
        .replace("\\\\", "\\"))
}



@@ 171,9 171,9 @@ fn main() {
        print!("{}", issue);
    }

    let uts = uname();
    let uts = uname().unwrap();
    for _ in 0..max_failures {
        match login(uts.nodename(), &mut cmd) {
        match login(uts.nodename().to_str().unwrap(), &mut cmd) {
            Ok(LoginResult::Success) => break,
            Ok(LoginResult::Failure) => eprintln!("Login incorrect\n"),
            Err(e) => {

M fakegreet/Cargo.toml => fakegreet/Cargo.toml +1 -1
@@ 10,5 10,5 @@ repository = "https://git.sr.ht/~kennylevinsen/greetd/"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
tokio = { version = "1.5", features = ["process"] }
tokio = { version = "1.5", features = ["process", "macros", "time", "net", "rt"] }
thiserror = "1.0"

M greetd/Cargo.toml => greetd/Cargo.toml +3 -3
@@ 11,7 11,7 @@ repository = "https://git.sr.ht/~kennylevinsen/greetd/"
debug = []

[dependencies]
nix = "0.20"
nix = "0.26"
pam-sys = "0.5.6"
users = "0.11.0"
serde = { version = "1.0", features = ["derive"] }


@@ 19,8 19,8 @@ serde_json = "1.0"
greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
inish = { path = "../inish" }
libc = "0.2"
tokio = { version = "1.5", features = ["net", "sync", "macros", "signal", "rt", "io-util", "time"] }
tokio = { version = "1", features = ["net", "sync", "macros", "signal", "rt", "io-util", "time"] }
getopts = "0.2"
thiserror = "1.0"
async-trait = "0.1"
enquote = "1.0.3"
enquote = "1.1"

M greetd/src/context.rs => greetd/src/context.rs +2 -2
@@ 375,10 375,10 @@ impl Context {
                Ok(_) => continue,

                // Interrupted.
                Err(nix::Error::Sys(nix::errno::Errno::EINTR)) => continue,
                Err(nix::errno::Errno::EINTR) => continue,

                // We do not have any children right now.
                Err(nix::Error::Sys(nix::errno::Errno::ECHILD)) => break Ok(()),
                Err(nix::errno::Errno::ECHILD) => break Ok(()),

                // Uh, what?
                Err(e) => panic!("waitpid returned an unexpected error: {}", e),

M greetd/src/session/worker.rs => greetd/src/session/worker.rs +1 -1
@@ 264,7 264,7 @@ fn worker(sock: &UnixDatagram) -> Result<(), Error> {
    // Wait for process to terminate, handling EINTR as necessary.
    loop {
        match waitpid(child, None) {
            Err(nix::Error::Sys(nix::errno::Errno::EINTR)) => continue,
            Err(nix::errno::Errno::EINTR) => continue,
            Err(e) => {
                eprintln!("session: waitpid on inner child failed: {}", e);
                break;

M greetd_ipc/Cargo.toml => greetd_ipc/Cargo.toml +1 -1
@@ 20,6 20,6 @@ tokio-codec = ["codec", "tokio", "async-trait"]
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.5", features = ["io-util"], optional = true }
tokio = { version = "1", features = ["io-util"], optional = true }
async-trait = { version = "0.1", optional = true }
thiserror = { version = "1.0", optional = true }