Skip to content

Commit 1196443

Browse files
author
efajardo
committed
Doing the right ownership comparisons
1 parent 16468e1 commit 1196443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

osgtest/library/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def check_file_ownership(file_path, owner_name):
641641
owner_uid = pwd.getpwnam(owner_name)
642642
try:
643643
file_stat = os.stat(file_path)
644-
return (file_stat.st_uid == owner_uid and
644+
return (file_stat.st_uid == owner_uid.pw_uid and
645645
stat.S_ISREG(file_stat.st_mode))
646646
except OSError: # file does not exist
647647
return False

0 commit comments

Comments
 (0)