From f8ec1473be042f1d4dfa8d235c17f1cd32406436 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 18 Dec 2019 12:20:41 +0100 Subject: [PATCH] src/config/datastore.rs: use backup gid instead of uid --- src/config/datastore.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/datastore.rs b/src/config/datastore.rs index 1e2c30ae..8d71f6f5 100644 --- a/src/config/datastore.rs +++ b/src/config/datastore.rs @@ -58,8 +58,8 @@ pub fn config() -> Result { pub fn save_config(config: &SectionConfigData) -> Result<(), Error> { let raw = CONFIG.write(DATASTORE_CFG_FILENAME, &config)?; - let (backup_uid, _) = crate::tools::getpwnam_ugid("backup")?; - let gid = nix::unistd::Gid::from_raw(backup_uid); + let (_, backup_gid) = crate::tools::getpwnam_ugid("backup")?; + let gid = nix::unistd::Gid::from_raw(backup_gid); let mode = nix::sys::stat::Mode::from_bits_truncate(0o0640); // set the correct owner/group/permissions while saving file // owner(rw) = root, group(r)= backup