Re: mysql problems - bugfix?


From: Amon Ott <ao@rsbac.org>
Subject: Re: mysql problems - bugfix?
Date: Tue, 17 Apr 2001 10:12:00 +0200

Next Article (by Subject): Re: mysql problems - bugfix? Bencsath Boldizsar
Previous Article (by Subject): mysql problems Bencsath Boldizsar
Next in Thread: Re: mysql problems - bugfix? Bencsath Boldizsar
Articles sorted by: [Date] [Author] [Subject]


--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

On Son, 15 Apr 2001 Bencsath Boldizsar wrote:
> I am trying to install mysql too...
> Mysql 3.23.36, rsbac 1.1.1, kernel 2.4.3 ->
> can't bind to unix socket....
> The problem is just like with rsbac, a short patch of mysql solves the
> problem: sql/mysqld.cc:
>     (void) unlink(mysql_unix_port);
>     (void) setsockopt(unix_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,
>                       sizeof(arg));
>     umask(0);        
>     if (bind(unix_sock, my_reinterpret_cast(struct sockaddr *) (&UNIXaddr),
> -           sizeof(UNIXaddr)) < 0)
> +sizeof(UNIXaddr)-sizeof(UNIXaddr.sun_path) +strlen(UNIXaddr.sun_path) +1)<0)
> 
> It could be great if it wouldn't be neccesary to patch all other programs ;-)

I will try to find out what exactly goes wrong there.

Congratulation: You triggered an RSBAC bug, which only happens if addrlen >
sizeof(struct sockaddr). :(

I just fixed this memory allocation bug, but I will need it tested before
making an official bugfix. Patch to net/socket.c is attached.

> /* i am surprised that noone uses rsbac and syslog-ng or mysqld ? */

I have been using mysqld with rsbac for ages - but without RSBAC net support.

Amon.
--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD
Content-Type: text/x-c;
  name="rsbac-bugfix-v1.1.1-2.diff.pre1"
Content-Transfer-Encoding: base64
Content-Description: RSBAC v1.1.1 bugfix 2 -pre1
Content-Disposition: attachment; filename="rsbac-bugfix-v1.1.1-2.diff.pre1"

LS0tIHNvY2tldC5jfglXZWQgTWFyIDI4IDExOjQ4Oj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BpZCwKIAkJCQkJCSAgVF9JUEMsCg==

--Boundary-=_nWlrBbmQBhCDarzOwKkYHIDdqSCD--
-
To unsubscribe from the rsbac list, send a mail to
majordomo@rsbac.org with
unsubscribe rsbac
as single line in the body.

Next Article (by Subject): Re: mysql problems - bugfix? Bencsath Boldizsar
Previous Article (by Subject): mysql problems Bencsath Boldizsar
Next in Thread: Re: mysql problems - bugfix? Bencsath Boldizsar
Articles sorted by: [Date] [Author] [Subject]


Go to Compuniverse LWGate Home Page.