Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Temporary directory created before dropping privileges #209

Open
virtugon opened this issue Aug 1, 2019 · 0 comments
Open

Temporary directory created before dropping privileges #209

virtugon opened this issue Aug 1, 2019 · 0 comments

Comments

@virtugon
Copy link

virtugon commented Aug 1, 2019

When running stenotype via stenographer with the option to drop privileges from root to another user we run into a problem. The temporary packet directory (/tmp/stenographer${NUMBER}/PKT0/${RANDOM}) is created on the filesystem before dropping the privileges, thereby setting the owner and group of the temporary packet directory to root:root. This causes the first attempt of the thread to write a packet to the temporary directory to fail and exit.

A work-around is to start the stenographer watchdog process as the same user, however a simple remedy would be to create the temporary packet directory after dropping the privileges or simply setting the owner and group of that directory to the user and group supplied in the options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant