Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 574158

Summary: sys-apps/apparmor-2.10: attempting to load profiles returns Unknown error (9): Bad file descriptor
Product: Gentoo Linux Reporter: Dainius Masiliūnas <pastas4>
Component: HardenedAssignee: Michael Palimaka (kensington) <kensington>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: hardened
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Dainius Masiliūnas 2016-02-08 12:17:29 UTC
After installing apparmor-2.10 and apparmor-profiles-2.10, and while running a kernel with the AppArmor patches included, attempting to run `apparmor_parser -a /etc/apparmor.d/` to load the default profiles results in an error:

apparmor_parser: Unable to add "/usr/sbin/nmbd".  Unknown error (9): Bad file descriptor

If /etc/apparmor.d/usr.sbin.nmbd is disabled, another profile fails with the same error, and so on.

I'm using the hardened kernel 4.3.3.
Comment 1 Dainius Masiliūnas 2016-02-08 12:18:10 UTC
Created attachment 424886 [details]
emerge --info
Comment 2 Dainius Masiliūnas 2016-02-09 07:30:05 UTC
Note that this only happens if the whole directory is passed. Passing profiles file by file to apparmor_parser works correctly.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2016-02-09 10:13:36 UTC
I can reproduce, but I'm not aware of anything Gentoo-specific that would cause it (maybe upstream would have a better idea?).
Comment 4 Michael Palimaka (kensington) gentoo-dev 2016-05-25 17:53:04 UTC
This is fixed for me in 2.10.1