[PATCH] Xext: relax assert in SecurityAuthorizationExpired.

Cyril Brulebois kibi at debian.org
Tue Mar 15 05:56:18 PDT 2011


Cyril Brulebois <kibi at debian.org> (07/03/2011):
> The following code path is considered valid:
>   SecurityAuthorizationExpired
>   TimerSet
>   SecurityStartAuthorizationTimer
> 
> In other words, SecurityAuthorizationExpired can be called while
> pAuth->timer is still NULL, so relax the assert() accordingly.
> 
> That might happen when one uses big timeouts in xauth calls, and would
> make the server abort.
> 
> Debian Bug #616667 <http://bugs.debian.org/616667>
> X.Org Bug #27134 <http://bugs.freedesktop.org/show_bug.cgi?id=27134>
> X.Org Bug #35066 <http://bugs.freedesktop.org/show_bug.cgi?id=35066>
> 
> Signed-off-by: Cyril Brulebois <kibi at debian.org>
> ---
>  Xext/security.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> 
> Notes:
>  * I guess a single X.Org Bug reference would be sufficient, but
>    #27134 is still private right now, so I'm mentioning both bugs.

(#27134 is still restricted to X.Org security team.)

>  * Probably a candidate for stable branches.
> 
> 
> diff --git a/Xext/security.c b/Xext/security.c
> index 8673880..003da79 100644
> --- a/Xext/security.c
> +++ b/Xext/security.c
> @@ -312,7 +312,7 @@ SecurityAuthorizationExpired(
>  {
>      SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)pval;
>  
> -    assert(pAuth->timer == timer);
> +    assert((pAuth->timer == NULL) || (pAuth->timer == timer));
>  
>      if (pAuth->secondsRemaining)
>      {
> -- 
> 1.7.4.1

Any taker?

KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110315/41320311/attachment-0001.pgp>


More information about the xorg-devel mailing list