-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add owning user and group, together with unix permissions (#194)
* added basic dac mode * compressed index size in basic test increased to 90 * index tests pass * added permissions to restore module * print backed up mode for each file * added proper octal formatting * added mode display to restore * added dac to test so it can pass * made tests pass * restructured file * renamed Permissions to UnixMode and reformatted mode display * added SUID, SGID, and sticky * spelling correction * added unix mode to ls command * changed default mode from 0o777 to 0o775 * edited comments * fixed tests to work on DevContainer * added long_listing option "-l" to backup, restore, and ls commands * attempt to fix windows build * reordered code * filetime::set_symlink_file_times not used on windows * added from<UnixMode> for Permissions on not(unix) * added From<&str> for UnixMode * fixed fmt * fixed From<&str> for UnixMode and typo in From<Permissions> in not(unix) * refactored to (hopefully) build on windows * replaced another instance of umode.into in not(unix) cfg * fixed UnixMode::readonly function * made tests easier so they pass on WIndows * disabled permission restore on Windows * fixed syntax error * cargo fmt * removed problem messages as they were causing tests to fail * added users crate to target.'cfg(unix)'.dependencies * added owning user and group to necessary files * added ownership to restore function * removed debug print * created long_listing test for unix * removed unused code * added test to verify user, group, and mode are backed up and restored properly * fmt and clippy * added comment * fixed not(unix) build error * split regex onto multiple lines for readability * added owner to is_unchanged_from * fixed serialization test to match new mode default * added mask to only compare permissions, sticky, and set bits * added unix_mode crate * added comment * use unix_mode crate and don't compare filetype * removed partial from<str> impl * renamed Entry::umode to unix_mode * Changed UnixMode to a tuple type struct * added format changes to doc * errors in restoring permissions or owner are now recoverable * format * compacted Owner serialization * format * added nix as a dev-dependency for testing user and group * removed nix dependency * added test backup_unix_permissions to properly test unix_mode field * added todo to comments * added long_listing_old_archive test * removed & to appease clippy * changed unix_mode to strip the inode type bits * added fixed column alignment of 10 to owner * changed UnixMode to store mode bits as Option * removed ampersands to appease clippy * format * removed more ampersands to appease clippy * removed more needless borrows in tests * removed more needless borrows in tests * removed more ampersands * removed more needless borrows * fixed windows build error * removed more borrows to appease clippy * Set root directory permissions in test * Update docs for owner/group * Split out Unix permission tests to their own file * Add a new old_archive with names and permissions * Remove an unnecessary borrow #clippy * Refactor owner/group restore code a bit * Turn off CI clippy and rustfmt Co-authored-by: Martin Pool <[email protected]> Fixes #46
- Loading branch information
1 parent
d703dd1
commit d2f7629
Showing
27 changed files
with
805 additions
and
29 deletions.
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.