File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ static int validate_ownership(const char *repo_path)
512512 bool is_safe ;
513513 int error ;
514514
515- if ((error = git_fs_path_owner_is_current_user (& is_safe , repo_path )) < 0 ) {
515+ if ((error = git_fs_path_owner_is_system_or_current_user (& is_safe , repo_path )) < 0 ) {
516516 if (error == GIT_ENOTFOUND )
517517 error = 0 ;
518518
Original file line number Diff line number Diff line change @@ -484,9 +484,10 @@ void test_repo_open__validates_dir_ownership(void)
484484 cl_git_pass (git_repository_open (& repo , "empty_standard_repo" ));
485485 git_repository_free (repo );
486486
487- /* When the system user owns the repo config, fail */
487+ /* When the system user owns the repo config, also acceptable */
488488 git_fs_path__set_owner (GIT_FS_PATH_MOCK_OWNER_SYSTEM );
489- cl_git_fail (git_repository_open (& repo , "empty_standard_repo" ));
489+ cl_git_pass (git_repository_open (& repo , "empty_standard_repo" ));
490+ git_repository_free (repo );
490491
491492 /* When an unknown user owns the repo config, fail */
492493 git_fs_path__set_owner (GIT_FS_PATH_MOCK_OWNER_OTHER );
You can’t perform that action at this time.
0 commit comments