Skip to content

Commit 7d91023

Browse files
committed
Fix mode check to only care about owner/setuid.
1 parent aee47ab commit 7d91023

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/unix_platform.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class UnixPlatform : public AbstractPlatform
6868
if ((file_stat.st_mode & S_ISUID) && file_stat.st_uid != 0)
6969
throw runtime_error("backend is setuid but owner is not root!");
7070

71-
return (file_stat.st_uid == 0 && file_stat.st_mode == MODE);
71+
return (file_stat.st_uid == 0 && (file_stat.st_mode & S_ISUID));
7272
}
7373

7474
void fix_permissions() {

0 commit comments

Comments
 (0)