Bug 278404

Summary: ports-mgmt/portlint: Add check for files' permissions
Product: Ports & Packages Reporter: Älven <alster>
Component: Individual Port(s)Assignee: Joe Marcus Clarke <marcus>
Status: Open ---    
Severity: Affects Only Me Keywords: security
Priority: --- Flags: bugzilla: maintainer-feedback? (marcus)
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277872
Attachments:
Description Flags
List of files in ports with exec flag set
none
List of files in ports with exec flag set none

Description Älven 2024-04-17 07:24:02 UTC

    
Comment 1 Älven 2024-04-17 07:28:56 UTC
There should be some check in portlint(1) and possibly, git hook on git.freebsd.org to keep files with wrong permissions from entering the ports tree.
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-17 15:24:26 UTC
Say more about this.  If you can provide an example port where this caused problem that will also help in testing.
Comment 3 Älven 2024-04-17 18:34:16 UTC
Created attachment 250035 [details]
List of files in ports with exec flag set

By accident I stumbled in this bug #277872 with comms/quisk having permissions 755 instead of 644 on comms/quisk/pkg-descr.
After quick search (`find . -type f -perm +a=x > exec_flag_set.list`) I had rather long list of files with exec flag set (see attachment).
Not sure, whether it can cause any problems, just felt it's not the right thing and may be easily prevented and so avoid any possible problems in the future.
Comment 4 Älven 2024-04-18 12:18:16 UTC
Created attachment 250046 [details]
List of files in ports with exec flag set