Re: [PATCH] MySQL Administrator segfaults on executing crontab
Alfredo Kengi Kojima <[email protected]>
| Newsgroups | gmane.comp.db.mysql.mycc |
|---|---|
| Message-ID | <[email protected]> |
Hi Sven!
Thanks for the report & patch, I've commited it to the bk repository and
it should be included in the next release.
Thanks a lot once again.
--
Alfredo
On Fri, 14 Jan 2005, Sven Wegener wrote:
> Hi all!
>
> MySQL Administrator has a bug which makes it to segfault when no cron
> daemon is installed, or the user executing mysql-administrator has not
> sufficient rights to execute crontab.
>
> The problematic code is in mysql-gui-common/source/linux/MCrontab.cc in
> line 225:
>
> 222 if (!g_spawn_command_line_sync(cmdline, &stdout_text, &stderr_text, &exit_status,
> 223 &error) || exit_status != 0)
> 224 {
> 225 if (!strstr(stderr_text, "no crontab"))
> 226 {
> 227 got_error= true;
>
> We execute crontab via g_spawn_command_line_sync() and if it fails we
> check stderr_text for "no crontab" with the strstr function. In case we
> can't execute crontab, because no cron daemon is installed, or the user
> has not sufficient rights to execute crontab, stderr_text will be NULL
> and strstr produces a segfault.
>
> Please find attached a patch which makes mysql-administrator to
> correctly check for errors.
>
> Cheers,
> Sven
>
> --
> Sven Wegener
> Gentoo Linux Developer
> http://www.gentoo.org/
>
--
MySQL GUI Tools Mailing List
For list archives: http://lists.mysql.com/gui-tools
To unsubscribe: http://lists.mysql.com/[email protected]