[Bugs] [Bug 1363613] Crash of glusterd when using long username with geo-replication
bugzilla at redhat.com
bugzilla at redhat.com
Thu Aug 18 14:11:31 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1363613
--- Comment #5 from Saravanakumar <sarumuga at redhat.com> ---
(In reply to Mrten from comment #4)
> I think I got it: slave_vol_config struct is a
>
> struct slave_vol_config {
> char old_slvhost[_POSIX_HOST_NAME_MAX+1];
> char old_slvuser[_POSIX_LOGIN_NAME_MAX];
> unsigned old_slvidx;
> char slave_voluuid[GF_UUID_BUF_SIZE];
> };
>
> and _POSIX_LOGIN_NAME_MAX is ... 9.
>
> my login name is 14 characters long, so, crash.
>
> I'd suggest using LOGIN_NAME_MAX instead of _POSIX_LOGIN_NAME_MAX, which is
> 256 long.
>
> Don't switch the _POSIX_HOST_NAME_MAX to HOST_NAME_MAX though, that's 255 vs
> 64.
Thanks for the detailed bug report and RCA.
Unfortunately, having LOGIN_NAME_MAX will not honour POSIX.
(Also, it will be inconsistent to have _POSIX_HOST_NAME_MAX and LOGIN_NAME as
LOGIN_NAME_MAX)
I have posted a patch, which checks whether length is within
_POSIX_LOGIN_NAME_MAX, so glusterd should no longer crash.
This is under review - http://review.gluster.org/#/c/15199
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=rGbx3JCaOs&a=cc_unsubscribe
More information about the Bugs
mailing list