File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
test-framework/sudo-compliance-tests/src/sudoedit Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ pub fn run_edit(edit_opts: SudoEditOptions) -> Result<(), Error> {
3535 & context. target_group ,
3636 ) {
3737 Ok ( file) => opened_files. push ( ( path, file) ) ,
38- Err ( error) if error. raw_os_error ( ) == Some ( 40 ) => {
38+ // ErrorKind::FilesystemLoop was only stabilized in 1.83
39+ Err ( error) if error. raw_os_error ( ) == Some ( libc:: ELOOP ) => {
3940 user_error ! ( "{arg}: editing symbolic links is not permitted" )
4041 }
4142 Err ( error) => user_error ! ( "error opening {arg}: {error}" ) ,
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ fn cannot_edit_writable_paths() {
2020 . arg ( file)
2121 . output ( & env) ;
2222
23+ output. assert_exit_code ( 1 ) ;
24+
2325 if sudo_test:: is_original_sudo ( ) {
2426 if file != "/tmp/bar/foo.sh" {
2527 assert_contains ! (
@@ -36,14 +38,13 @@ fn cannot_edit_writable_paths() {
3638 "cannot open a file in a path writable by the user"
3739 ) ;
3840 }
39- output. assert_exit_code ( 1 ) ;
4041 }
4142}
4243
4344#[ test]
4445fn can_edit_writable_paths_as_root ( ) {
4546 // note: we already have tests that sudoedit "works" so we are skipping
46- // the content check here--- the point here is that sudoedit does not stop
47+ // the content check here: the point here is that sudoedit does not stop
4748 // the user.
4849
4950 let env = Env ( SUDOERS_ALL_ALL_NOPASSWD )
@@ -123,7 +124,7 @@ fn cannot_edit_files_target_user_cannot_access() {
123124#[ test]
124125fn can_edit_files_target_user_or_group_can_access ( ) {
125126 // note: we already have tests that sudoedit "works" so we are skipping
126- // the content check here--- the point here is that sudoedit does not stop
127+ // the content check here: the point here is that sudoedit does not stop
127128 // the user.
128129
129130 let file = "/test.txt" ;
You can’t perform that action at this time.
0 commit comments