Bug #24732 Executables do not include Vista manifests
Submitted: 30 Nov 2006 20:32 Modified: 3 Aug 2007 2:03
Reporter: Reggie Burnett Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:Windows (Vista)
Assigned to: Iggy Galarza CPU Architecture:Any

[30 Nov 2006 20:32] Reggie Burnett
Description:
In order to pass logo requirements for Vista, all executables that ship with a product must include a manifest that outlines the type of security they need.

Currently Vista ships with a shim that allows parts of mysql to successfully elevate to admin privs and work.

An embedded manifest would look something like this:  
<requestedExecutionLevel level="asInvoker|highestAvailable|requireAdministrator" uiAccess="true|false"/>

How to repeat:
No steps.

Suggested fix:
Include manifests in the generation of all executables during Windows builds.
[1 Dec 2006 10:57] Sveta Smirnova
Thank you for the report.

But Windows Vista is not supported until it's official release.
[1 Dec 2006 13:39] Reggie Burnett
Vista has been officially released and we are under a time crunch to get MySQL compatible with Vista so moving this bug report back to open.
[23 Apr 2007 19:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/25175

ChangeSet@1.2449, 2007-04-23 15:41:24-04:00, iggy@recycle.(none) +12 -0
  Bug#24732 Executables do not include Vista manifests
  - Added script to generate application specific manifest.
  - Added new CMake MACRO to add customer build events which will first
  generate a manifest and then embeds that manifest into an executable.
[23 Apr 2007 20:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/25185

ChangeSet@1.2577, 2007-04-23 16:23:32-04:00, iggy@recycle.(none) +9 -0
  Bug#24732 Executables do not include Vista manifests
  - Post merge cleanup.
[24 Apr 2007 1:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/25209

ChangeSet@1.2450, 2007-04-23 21:43:36-04:00, iggy@recycle.(none) +1 -0
  Bug#24732 Executables do not include Vista manifests
  - Correct PushBuild failure.
[26 Apr 2007 11:36] Bugs System
Pushed into 5.1.18-beta
[26 Apr 2007 11:37] Bugs System
Pushed into 5.0.42
[4 May 2007 7:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/26067

ChangeSet@1.2476, 2007-05-04 09:37:50+02:00, df@pippilotta.erinye.com +1 -0
  BUG#24732 manifest file was not included in VS2005 amd64 builds
[4 May 2007 7:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/26069

ChangeSet@1.2514, 2007-05-04 09:42:46+02:00, df@pippilotta.erinye.com +1 -0
  BUG#24732 manifest file was not included in VS2005 amd64 builds (5.1 tree version)
[4 May 2007 8:06] Daniel Fischer
The above patches fix the problem that on our win64 build host, the defaults of VS were set up in such a way that our generated manifest was overwritten by the default manifest created by VS. Since this is a default, simply replacing the /MANIFEST switch in cmake's ADDITIONAL linker flags doesn't work and these patches therefore append an explicity /MANIFEST:NO if it is not present.

I'm also resetting the status of this bug to "in progress" since binaries that actually have *our* manifest included won't run at all. When run from a command line, the error message is "Permission denied". Inspection of the system event log reveals that there is a "syntax error" in the manifest. I'm using the double quotes because of course there is no syntactical error in it since it is valid XML, and furthermore passes validation by mt.exe, but that's all Windows is telling me.

Removing the assemblyIdentity element makes the executable run. I cannot tell if this is because there is an error in this element, or if omission just makes Windows ignore something else in the manifest. It is possible that an attribute is missing that should be there, but I was unable to find a definition of this element that had required attributes that we don't include.

This behaviour is consistent on both of our Windows build hosts. I haven't tried on other installations of Windows. In any case, as long as this fails on at least one reasonable installation for running MySQL on, we can't embed the manifest in our Windows binaries that are supposed to run on all Windows versions since 2000.
[7 May 2007 14:11] Daniel Fischer
Testing on Vista gives the following error message:

The application has failed to start because it's side-by-side configuration is incorrect.

Vista's application event log says the version attribute of the assemblyIdentity tag is invalid. The value used in 5.0.41 is "5.0.41".
[15 May 2007 14:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/26707

ChangeSet@1.2478, 2007-05-15 10:30:11-04:00, iggy@amd64.(none) +2 -0
  Bug#24732 Executables do not include Vista manifests
  - Manifest requires four part application version.
  - mysqld does not need requireAdministrator rights 
  to run.
[15 May 2007 14:37] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/26708

ChangeSet@1.2487, 2007-05-15 10:37:14-04:00, iggy@amd64.(none) +1 -0
  Bug#24732 Executables do not include Vista manifests
  - mysqld does not need requireAdministrator rights 
  to run.
[18 May 2007 9:09] Bugs System
Pushed into 5.1.19-beta
[18 May 2007 9:11] Bugs System
Pushed into 5.0.44
[22 May 2007 17:01] Bugs System
Pushed into 5.1.19-beta
[22 May 2007 17:03] Bugs System
Pushed into 5.0.44
[25 May 2007 10:51] Joerg Bruehe
Built 5.1.19-beta with this patch included.

Running the server ("mysqld-nt.exe") fails from both Perl (test script) and bash, on both 32 and 64 bit, message is
Can't exec "C:/cygwin/home/mysqldev/build/mysql-5.1.19-beta-winbuild/mysql-5.1.19-beta-winx64/bin/mysqld-nt.exe": Permission denied at ./mysql-test-run.pl line 1366.

The Windows event log contains entries ending
  The manifest file contains one or more syntax errors
[1 Jun 2007 11:23] Daniel Fischer
Setting back to verified because not fixed in 5.1.19.
[1 Jun 2007 20:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/27966

ChangeSet@1.2505, 2007-06-01 16:48:23-04:00, iggy@amd64.(none) +2 -0
  Bug #24732 Executables do not include Vista manifests
  - Cleanup typo.
  - Make sure to only embedded four part numberic version.
[6 Jun 2007 16:55] Bugs System
Pushed into 5.1.20-beta
[6 Jun 2007 16:58] Bugs System
Pushed into 5.0.44
[19 Jun 2007 10:47] Daniel Fischer
Re-opening bug because still not working in 5.0.44. (Syntax error in SideBySide manifest according to System event log.)
[26 Jun 2007 15:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/29621

ChangeSet@1.2503, 2007-06-26 11:26:01-04:00, iggy@amd64.(none) +3 -0
  Bug#24732 Executables do not include Vista manifests
  - Corrected manifest attributes.
[26 Jun 2007 18:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/29632

ChangeSet@1.2509, 2007-06-26 14:24:01-04:00, iggy@amd64.(none) +1 -0
  Bug#24732 Executables do not include Vista manifests
  - Post Merge Fixup
[10 Jul 2007 13:27] Bugs System
Pushed into 5.1.21-beta
[10 Jul 2007 13:28] Bugs System
Pushed into 5.0.46
[25 Jul 2007 17:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31557

ChangeSet@1.2479, 2007-07-25 13:18:12-04:00, iggy@amd64.(none) +5 -0
  Bug#24732 Executables do not include Vista manifests
  - Sign executables with MySQL AB security certificate.
[25 Jul 2007 17:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/31561

ChangeSet@1.2556, 2007-07-25 13:33:39-04:00, iggy@amd64.(none) +2 -0
  Bug#24732 Executables do not include Vista manifests
  - Required manual merge.
[2 Aug 2007 19:12] Bugs System
Pushed into 5.1.21-beta
[2 Aug 2007 19:15] Bugs System
Pushed into 5.0.48
[3 Aug 2007 2:03] Paul DuBois
Noted in 5.0.48, 5.1.21 changelogs.

On Windows, executables did not include Vista manifests.
[2 Feb 2008 4:16] Matthew Campbell
I'm attempting to install the MySQL community server 5.0.51a on Vista ultimate edition, and both the essentials and full install look like they install fine but fail when running the MySQLInstanceConfig.exe.  The error message is "The application has failed to start because its side-by-side configuration is incorrect.  See the application event log for more details."  Vista's application error log states the following:

"Activation context generation failed for "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe".Error in manifest or policy file "C:\Program Files\MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe" on line 6. The value "asAdministrator" of attribute "level" in element "urn:schemas-microsoft-com:asm.v1^requestedPrivileges" is invalid."

I'm not a hundred percent sure this is related to this bug, but it seems to jive with the rest of the comments here (minus the fact that this bug is marked as fixed).
[4 Feb 2008 14:17] Magnus Blåudd
Please go ahead and file another bug about the problem running MySQLInstanceConfig.exe, meanwhile you can try to run MySQLInstanceConfig.exe as Administrator.
[8 Feb 2008 23:12] jurtel tikert
I just downloaded the mysql install on a brand new vista machine and got the same problem trying to run 'mysqlinstanceconfig.exe'. Running as administrator gave me the same problem.
[13 Feb 2008 6:15] Cate Deans
I have the same problem with Vista Ultimate
[13 Feb 2008 6:16] Cate Deans
I should clarify - using administrator account, and a clean machine
[13 Feb 2008 9:02] Magnus Blåudd
See BUG#30823 for problems related to MySQLInstanceConfig.exe