[Spice-devel] [vdagentd-linux] vdagentd: Do not call session_info_is_user() with invalid session_info

Pavel Grunt pgrunt at redhat.com
Wed May 17 07:28:23 UTC 2017


Ack

On Tue, 2017-05-16 at 19:21 +0200, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> If we pass -X command line option which disables
> console-kit/systemd-logind integration, we will have the following
> critical being issued:
> 
>   CRITICAL **: session_info_is_user: assertion 'si != NULL' failed
> 
> This patch avoid it.
> 
> Signed-off-by: Victor Toso <victortoso at redhat.com>
> ---
>  src/vdagentd/vdagentd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c
> index 800a09c..7ffb890 100644
> --- a/src/vdagentd/vdagentd.c
> +++ b/src/vdagentd/vdagentd.c
> @@ -786,7 +786,9 @@ static void
> update_active_session_connection(struct udscs_connection *new_conn)
>      if (debug)
>          syslog(LOG_DEBUG, "%p is now the active session",
> new_conn);
>  
> -    if (active_session_conn && !session_info_is_user(session_info))
> {
> +    if (active_session_conn &&
> +        session_info != NULL &&
> +        !session_info_is_user(session_info)) {
>          if (debug)
>              syslog(LOG_DEBUG, "New session agent does not belong to
> user: "
>                     "disabling file-xfer");


More information about the Spice-devel mailing list