bug: chmod() and chown() return values silently ignored in metadata restore #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
src/shared/metadata.c, the return values of security-critical system calls are silently discarded:Line 99:
chmod()return value ignoredLine 100-101:
chown()return value explicitly suppressedThis means:
chmodfails (e.g., permission denied, read-only filesystem), the operation silently continues with incorrect permissionschownfails (e.g., not running as root), the operation silently continues with wrong ownershipFix: Check return values and log warnings/errors when metadata restoration fails.
Severity: high