Apply socket permissions after socket creation
This commit is contained in:
parent
c73f132421
commit
a82e4e1d50
|
@ -121,12 +121,13 @@ pub async fn serve(path: &Path, app: Router) -> Result<(), Error> {
|
|||
.await
|
||||
.unwrap();
|
||||
|
||||
let uds = UnixListener::bind(path.clone())
|
||||
.context(SocketCreateSnafu { path: path.clone() })?;
|
||||
|
||||
// TODO: make proper permissions
|
||||
// Apply 777 permissions
|
||||
FSPermissions::new().chmod(0o777).apply_to(&path).await?;
|
||||
|
||||
let uds = UnixListener::bind(path.clone())
|
||||
.context(SocketCreateSnafu { path: path.clone() })?;
|
||||
hyper::Server::builder(ServerAccept::new(uds))
|
||||
.serve(app.into_make_service_with_connect_info::<UdsConnectInfo>())
|
||||
.await.context(ServerSnafu)?;
|
||||
|
|
Loading…
Reference in New Issue
Block a user