aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-10-20 12:59:02 -0400
committerJesse Luehrs <doy@tozt.net>2019-10-20 12:59:02 -0400
commit1fd0154711eadcd77c36bf6fc55917be54949f6a (patch)
tree1702186dac1f7f4be3295fd9d53f7dd72477cee6 /src/error.rs
parentce48e85996f81a9a20846217bb5c150f7745b082 (diff)
downloadteleterm-1fd0154711eadcd77c36bf6fc55917be54949f6a.tar.gz
teleterm-1fd0154711eadcd77c36bf6fc55917be54949f6a.zip
drop root privileges during normal operation
it should only be necessary for reading the tls key and binding to low-numbered ports
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index eeca1e8..a02b836 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -347,6 +347,12 @@ pub enum Error {
#[snafu(display("failed to spawn process for `{}`: {}", cmd, source))]
SpawnProcess { cmd: String, source: std::io::Error },
+ #[snafu(display("failed to switch gid: {}", source))]
+ SwitchGid { source: std::io::Error },
+
+ #[snafu(display("failed to switch uid: {}", source))]
+ SwitchUid { source: std::io::Error },
+
#[snafu(display(
"failed to spawn a background thread to read terminal input: {}",
source
@@ -386,6 +392,18 @@ pub enum Error {
#[snafu(display("unexpected message: {:?}", message))]
UnexpectedMessage { message: crate::protocol::Message },
+ #[snafu(display("failed to find group with gid {}", gid))]
+ UnknownGid { gid: users::gid_t },
+
+ #[snafu(display("failed to find group with group name {}", name))]
+ UnknownGroup { name: String },
+
+ #[snafu(display("failed to find user with uid {}", uid))]
+ UnknownUid { uid: users::uid_t },
+
+ #[snafu(display("failed to find user with username {}", name))]
+ UnknownUser { name: String },
+
#[snafu(display("failed to write to event channel: {}", source))]
WriteChannel {
source: tokio::sync::mpsc::error::UnboundedSendError,