openldap apparmor profile denies access to test files in /tmp/
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| nss-pam-ldapd (Ubuntu) |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| Questing |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| openldap (Ubuntu) |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| Questing |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| python-ldap (Ubuntu) |
Fix Released
|
Undecided
|
Jonas Jelten | ||
| Questing |
Fix Released
|
Undecided
|
Jonas Jelten | ||
Bug Description
[ Impact ]
* when openldap's apparmor profile is re-enabled due to the fix in bug #2119884, tests using openldap fail to run due to its apparmor rules.
* this SRU just fixes the tests of packages, it doesn't change the resulting binary packages.
[ Test Plan ]
observe failure
* have openldap with enabled apparmor profile
* run autopkgtest
* see failures due to apparmor denial
apply fix and observe success
* have same openldap with enabled apparmor profile
* run autopkgtest and see success
[ Where problems could occur ]
* this just changes the autopkgtest, so apart from the possible issues in the update rollout, no behavior change is expected
[ Other info ]
this is a fix needed to re-activate openldap's apparmor profile in bug #2119884 and is related to LP: #2008393. since these are just test changes they could be left in proposed if the SRU team prefers.
[ Error analysis ]
this happens due to fixing apparmor in bug #2119884
package tests run in a directory that is denied by apparmor.
== nss-pam-ldapd ==
sets up slapd config in /tmp/
echo "$script: setting up test slapd..."
tmpslapd=`mktemp -d -t slapd.XXXXXX`
tests/setup_
tests/setup_
=>
105s testsuite: setting up test slapd...
105s Creating blank /tmp/slapd.HYWyj5 slapd environment... done.
108s Fixing permissions... done.
108s Starting OpenLDAP: slapd FAILED
slapd -F "/tmp/slapd.
== python-ldap ==
runs its tests in /tmp/autopkgtest
via TMPDIR = os.environ.
to test the openldap config validity, python-ldap starts:
def _test_config(self):
popen_list = [
"-F", self._slapd_conf,
"-u",
"-v",
"-d", "config"
]
p = subprocess.run(
)
if p.returncode != 0:
raise RuntimeError(
this is denied by apparmor:
192s autopkgtest [04:33:39]: test startserver: [------
192s 2025-10-29 04:33:39,747 ERROR ldif_read_file: Permission denied for "/tmp/autopkgte
192s slaptest: bad configuration directory!
192s
192s Traceback (most recent call last):
192s File "<string>", line 1, in <module>
192s import slapdtest; server = slapdtest.
192s ~~~~~~~~~~~~^^
192s File "/usr/lib/
192s self._test_config()
192s ~~~~~~~~~~~~~~~~~^^
192s File "/usr/lib/
192s raise RuntimeError(
192s RuntimeError: configuration test failed
Related branches
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 121 lines (+76/-1)5 files modifieddebian/changelog (+9/-0)
debian/tests/apparmor.sh (+58/-0)
debian/tests/control (+1/-1)
debian/tests/startserver (+4/-0)
debian/tests/upstream (+4/-0)
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 139 lines (+80/-2)5 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/fix-c23-bool-keyword.patch (+29/-0)
debian/patches/series (+1/-0)
debian/tests/testsuite (+39/-1)
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 27 lines (+7/-1)2 files modifieddebian/changelog (+6/-0)
debian/tests/apparmor.sh (+1/-1)
- git-ubuntu bot: Approve
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 135 lines (+78/-2)6 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
debian/tests/apparmor.sh (+58/-0)
debian/tests/control (+1/-1)
debian/tests/startserver (+4/-0)
debian/tests/upstream (+4/-0)
- Andreas Hasenack: Approve
- Canonical Server Reporter: Pending requested
-
Diff: 82 lines (+47/-1)2 files modifieddebian/changelog (+8/-0)
debian/tests/testsuite (+39/-1)
| description: | updated |
| description: | updated |
| Changed in nss-pam-ldapd (Ubuntu): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in python-ldap (Ubuntu): | |
| status: | New → Incomplete |
| status: | Incomplete → New |
| Changed in nss-pam-ldapd (Ubuntu): | |
| status: | New → In Progress |
| Changed in python-ldap (Ubuntu): | |
| status: | New → In Progress |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in openldap (Ubuntu): | |
| status: | New → Triaged |
| Changed in openldap (Ubuntu): | |
| status: | Triaged → In Progress |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in openldap (Ubuntu): | |
| status: | In Progress → Invalid |
| Changed in openldap (Ubuntu): | |
| status: | Invalid → In Progress |
| status: | In Progress → Invalid |
| Changed in openldap (Ubuntu Questing): | |
| status: | New → In Progress |
| Changed in nss-pam-ldapd (Ubuntu Questing): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in openldap (Ubuntu Questing): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in python-ldap (Ubuntu Questing): | |
| assignee: | nobody → Jonas Jelten (jj) |
| Changed in nss-pam-ldapd (Ubuntu Questing): | |
| status: | New → In Progress |
| Changed in python-ldap (Ubuntu Questing): | |
| status: | New → In Progress |
| Changed in openldap (Ubuntu): | |
| status: | Invalid → In Progress |
| description: | updated |
| description: | updated |
| Changed in openldap (Ubuntu Questing): | |
| status: | In Progress → Fix Released |
| Changed in openldap (Ubuntu): | |
| status: | In Progress → Fix Released |

As we can see in https:/ /autopkgtest. ubuntu. com/packages/ python- ldap
python-ldap autopkgtests fail also in Noble.
(they succeeded in Plucky and Questing because of the bug #2119884 that lets slapd's profile inactive).
so the test failure due to the permission issue on accessing /tmp is not something new, the question is why it has not been fixed in Noble before the Ubuntu Noble release ?