Bug 217104 - sysutils/pefs-kmod: wrong perm when built with a normal user
Summary: sysutils/pefs-kmod: wrong perm when built with a normal user
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-14 19:17 UTC by Mikael Urankar
Modified: 2017-10-11 13:02 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gleb)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2017-02-14 19:17:27 UTC
Hi,

I build my ports with a normal user, the port doesn't change the owner of pam_pefs.so*:

ll work/stage/usr/local/lib/pam_pefs.so*
lrwxr-xr-x  1 mik  mik  uarch work/stage/usr/local/lib/pam_pefs.so@ -> pam_pefs.so.6
-r--r--r--  1 mik  mik  uarch work/stage/usr/local/lib/pam_pefs.so.6

ll /usr/local/lib/pam_pefs.so
lrwxr-xr-x  1 mik  wheel  uarch pam_pefs.so@ -> pam_pefs.so.6
-r--r--r--  1 mik  wheel  uarch pam_pefs.so.6

My box won't reboot after that:
login: in openpam_check_desc_owner_perms(): /usr/local/lib/pam_pefs.so: insecure ownership or permissions
login: in try_module(): /usr/local/lib/pam_pefs.so: Operation not permitted
Comment 1 Gleb Kurtsou freebsd_committer freebsd_triage 2017-02-19 10:00:57 UTC
Binaries are installed with normal user owner due to USES=uidfix.

Change to pefs-kmod was made by rene back in 2014.

https://svnweb.freebsd.org/ports/head/sysutils/pefs-kmod/Makefile?annotate=341389#l20

I'm not sure how uidfix is supposed to be working. It overrides owner for binaries installed into staging area, but it's not clear how we intend to create usable packages out of it as information about "expected" owner is not preserved.

Problem is not unique to pefs-kmod. I've only tried to build emulators/rtc but it also exhibits the same behavior. Having both 'kmod' and 'uidfix' in USES might not be working as expected.

Meanwhile there is a lot of USES=uidfix instances in the tree. Perhaps rene@freebsd.org or somebody else could clarify it.
Comment 2 Gleb Kurtsou freebsd_committer freebsd_triage 2017-02-19 10:09:59 UTC
Assigning back to freebsd-ports-bugs. Problem doesn't seem to be pefs-kmod specific.