chore: update dependencies

The ICU update reduces binary size by ~20 MB.
This commit is contained in:
Vukašin Vojinović 2025-09-16 13:08:16 +02:00 committed by Jeremy Soller
parent f1f7862fbc
commit 31912afaa1
11 changed files with 878 additions and 928 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "cosmic-greeter-daemon"
version = "0.1.0"
edition = "2021"
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -26,7 +26,7 @@ kdl.workspace = true
#TODO: reduce features
tokio = { workspace = true, features = ["full"] }
xdg = "3.0.0"
xdg = "3.0"
[features]
default = ["systemd"]

View file

@ -8,7 +8,7 @@ use std::{
};
pub use cosmic_applets_config::time::TimeAppletConfig;
pub use cosmic_bg_config::{state::State as BgState, Color, Source as BgSource};
pub use cosmic_bg_config::{Color, Source as BgSource, state::State as BgState};
pub use cosmic_comp_config::{CosmicCompConfig, XkbConfig, ZoomConfig};
pub use cosmic_theme::{Theme, ThemeBuilder};

View file

@ -1,11 +1,10 @@
use color_eyre::eyre::Context;
use color_eyre::eyre::WrapErr;
use cosmic_greeter_daemon::UserData;
use std::{env, error::Error, future::pending, io, path::Path};
use tracing::metadata::LevelFilter;
use tracing::{error, warn};
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
use zbus::{connection::Builder, DBusError};
use tracing::warn;
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
use zbus::{DBusError, connection::Builder};
//IMPORTANT: this function is critical to the security of this proxy. It must ensure that the
// callback is executed with the permissions of the specified user id. A good test is to see if
@ -15,7 +14,9 @@ fn run_as_user<F: FnOnce() -> T, T>(user: &pwd::Passwd, f: F) -> Result<T, io::E
let root_home_opt = env::var_os("HOME");
// Switch to user HOME
env::set_var("HOME", &user.dir);
unsafe {
env::set_var("HOME", &user.dir);
}
// Switch to user UID
if unsafe { libc::seteuid(user.uid) } != 0 {
@ -31,8 +32,12 @@ fn run_as_user<F: FnOnce() -> T, T>(user: &pwd::Passwd, f: F) -> Result<T, io::E
// Restore root HOME
match root_home_opt {
Some(root_home) => env::set_var("HOME", root_home),
None => env::remove_var("HOME"),
Some(root_home) => unsafe {
env::set_var("HOME", root_home);
},
None => unsafe {
env::remove_var("HOME");
},
}
Ok(t)