[Bug 986892] Re: mysql-server postrm breaks apparmor profile for later versions on purge

Thomas "Tanghus" Olsen thomas at tanghus.net
Tue Aug 14 12:45:00 UTC 2012


@Clint: You suggested that the comment on http://tanghus.net/2012/03/yet-another-mysql-vs-apparmor-barf/#comment-298 is related, which seems to be the case. What I experienced wasn't a missing /etc/apparmor.d/local/usr.sbin.mysqld, but rather that the update would have changed the paths back to the not-working /var/run/* paths after I had manually corrected them to use /run prior to upgrading to Precise.
I didn't have an image earlier than 12.04, but tried to install mysql-server in a VM (it wasn't available in proposed anymore?). I'm not sure what conditional logic to look for in /var/lib/dpkg/info/mysql-server-5.5.postrm. /var/lib/dpkg/info/mysql-server-5.1.postrm does get removed on purge, but I assume that is intended behaviour?

/etc/apparmor.d/local/usr.sbin.mysqld is empty except for:

 # Site-specific additions and overrides for usr.sbin.mysqld.
 # For more details, please see /etc/apparmor.d/local/README.

/etc/apparmor.d/usr.sbin.mysqld otoh contains both:

  /var/run/mysqld/mysqld.pid w,
  /var/run/mysqld/mysqld.sock w,
  /run/mysqld/mysqld.pid w,
  /run/mysqld/mysqld.sock w,

But mysql runs fine:

Aug 14 14:34:30 NemID-VirtualBox kernel: [ 1530.635603] type=1400 audit(1344947670.136:27): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=6072 comm="apparmor_parser"
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6116]: Upgrading MySQL tables if necessary.
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6119]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6119]: Looking for 'mysql' as: /usr/bin/mysql
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6119]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6119]: This installation of MySQL is already upgraded to 5.5.24, use --force if you still need to run mysql_upgrade
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6130]: Checking for insecure root accounts.
Aug 14 14:34:32 NemID-VirtualBox /etc/mysql/debian-start[6135]: Triggering myisam-recover for all MyISAM tables

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-5.1 in Ubuntu.
https://bugs.launchpad.net/bugs/986892

Title:
  mysql-server postrm breaks apparmor profile for later versions on
  purge

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/986892/+subscriptions



More information about the Ubuntu-server-bugs mailing list