Bug #11707 | Network should be initialized after storage engine initialization | ||
---|---|---|---|
Submitted: | 3 Jul 2005 7:20 | Modified: | 11 Oct 2005 23:22 |
Reporter: | Domas Mituzas | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1, 5.0, 4.0 | OS: | Any (All) |
Assigned to: | Jim Winstead | CPU Architecture: | Any |
[3 Jul 2005 7:20]
Domas Mituzas
[3 Jul 2005 7:26]
Domas Mituzas
diff in a file!
Attachment: startup-sequence.diff (application/octet-stream, text), 466 bytes.
[3 Jul 2005 12:36]
Aleksey Kishkin
Domas, we read all tickets :-)
[28 Jul 2005 0:47]
Jim Winstead
A possible problem is that server_init() also changes the uid of the server. We may need to just split out the listen() calls and do that after the storage engine initialization.
[28 Jul 2005 7:13]
Domas Mituzas
why would setuid() matter? mysql is not using reserved ports, it shouldn't be an issue to bind, then? on the other hand, accessing storage as root is really really bad issue then :)
[28 Jul 2005 17:18]
Jim Winstead
The server already does call setuid() before accessing storage. The issue is that it does it in the middle of server_init() -- after opening the TCP/IP socket, but before opening the Unix domain socket. I'll need to do some research to see if we have a good reason for opening the TCP/IP socket as root. Obviously it is not necessary for the default port of 3306.
[9 Aug 2005 2:07]
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/internals/28047
[23 Aug 2005 1:04]
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/internals/28665
[25 Aug 2005 18:23]
Jim Winstead
Fixed in 5.0.13.
[13 Sep 2005 22:25]
Mike Hillyer
Added to 5.0.13 changelog, noted in manual description for --port: listitem> <para> Reorder network startup to come after all other initialization, particularly storage engine startup which can take a long time. This also prevents MySQL from being run on a privileged port (any port under 1024) unless run as the root user. (Bug #11707) </para> </listitem>
[11 Oct 2005 23:22]
Jim Winstead
The patch was prepared against 4.1, but only pushed to the 5.0 tree.