Public bug reported:
Tool: lxsession-logout
File: dbus-interface.c
Line: 192 (function systemd_query)
===============
if (g_variant_is_of_type (result, G_VARIANT_TYPE ("(s)")))
{
g_variant_get (result, "(s)", &str);
if (g_strcmp0 (str, "yes") || g_strcmp0 (str,
"challenge")) <------- "g_strcmp0" return "0" if strings are equal !!!!
function_result = TRUE;
else
function_result = default_result;
}
g_variant_unref (result);
return function_result;
===============
If result is "no" g_strcmp0 return "-1" as per documentation function
and conditial if is satisfied.
____________
g_strcmp0 ()
int g_strcmp0 (const char
*str1, const char *str2);
Compares str1 and str2 like strcmp(). Handles NULL gracefully by sorting
it before non-NULL strings. Comparing two NULL pointers returns 0.
str1 :
a C string or NULL
str2 :
another C string or NULL
Returns :
-1, 0 or 1, if str1 is <, == or > than str2.
Since 2.16
_______________
Correct Line 192 is:
WRONG
if (g_strcmp0 (str, "yes") || g_strcmp0 (str, "challenge"))
RIGHT:
if ( g_strcmp0 (str, "yes") == 0 || g_strcmp0 (str, "challenge") == 0 )
** Affects: lxsession (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1242456
Title:
lxsession-logout - dbus-interface.c - Wrong logic condition
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxsession/+bug/1242456/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs