-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn if target user home directory is not accessible (#139)
Adds additional log output when target user's home directory seems incorrectly configured. This would make issues like #131 less puzzling. * Also added snapshot tests for log output using new `testing_logger` dependency. * Also now using an unprivileged user to build in Docker, as tests assume `/root/` directory is not accessible.
- Loading branch information
Showing
6 changed files
with
121 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ default = [] | |
[dev-dependencies] | ||
clap_complete = "~4.3.1" | ||
snapbox = "0.4.11" | ||
testing_logger = "0.1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
INFO: TEST: Success (no output) | ||
INFO: TEST: Home does not exist | ||
WARN: User nope home directory /tmp/path-does-not-exist.example is not accessible: No such file or directory (os error 2) | ||
INFO: TEST: Permission denied | ||
INFO: User root home directory /root/path-is-not-accessible.example is not accessible: Permission denied (os error 13) | ||
INFO: TEST: Wrong owner | ||
WARN: User root home directory /root has incorrect ownership (expected UID 1234, found 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters