Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574158 - sys-apps/apparmor-2.10: attempting to load profiles returns Unknown error (9): Bad file descriptor
Summary: sys-apps/apparmor-2.10: attempting to load profiles returns Unknown error (9)...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Palimaka (kensington)
Depends on:
Reported: 2016-02-08 12:17 UTC by Dainius Masiliūnas
Modified: 2016-05-25 17:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info (file_574158.txt,5.57 KB, text/plain)
2016-02-08 12:18 UTC, Dainius Masiliūnas

Note You need to log in before you can comment on or make changes to this bug.
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