Changing LOG_DEVEL to LOG to avoid silent failures.

This commit is contained in:
Alexandre Quesnel 2020-12-05 18:28:34 +00:00
parent 2d6d249f76
commit a82ee03d4d
11 changed files with 220 additions and 220 deletions

View File

@ -131,18 +131,18 @@ libxrdp_force_read(struct trans *trans)
if (trans_force_read(trans, 4) != 0) if (trans_force_read(trans, 4) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_force_read: header read error"); LOG(LOG_LEVEL_WARNING, "libxrdp_force_read: header read error");
return 0; return 0;
} }
bytes = libxrdp_get_pdu_bytes(s->data); bytes = libxrdp_get_pdu_bytes(s->data);
if (bytes < 4 || bytes > s->size) if (bytes < 4 || bytes > s->size)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_force_read: bad header length %d", bytes); LOG(LOG_LEVEL_WARNING, "libxrdp_force_read: bad header length %d", bytes);
return 0; return 0;
} }
if (trans_force_read(trans, bytes - 4) != 0) if (trans_force_read(trans, bytes - 4) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_force_read: Can't read PDU"); LOG(LOG_LEVEL_WARNING, "libxrdp_force_read: Can't read PDU");
return 0; return 0;
} }
return s; return s;
@ -163,12 +163,12 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
do_read = s == 0; do_read = s == 0;
if (do_read && session->up_and_running) if (do_read && session->up_and_running)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data: error logic"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data: error logic");
return 1; return 1;
} }
if (session->in_process_data != 0) if (session->in_process_data != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data: error reentry"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data: error reentry");
return 1; return 1;
} }
session->in_process_data++; session->in_process_data++;
@ -208,7 +208,7 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
} }
if (s == 0) if (s == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data: libxrdp_force_read failed"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data: libxrdp_force_read failed");
rv = 1; rv = 1;
break; break;
} }
@ -216,7 +216,7 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
if (xrdp_rdp_recv(rdp, s, &code) != 0) if (xrdp_rdp_recv(rdp, s, &code) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data: xrdp_rdp_recv failed"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data: xrdp_rdp_recv failed");
rv = 1; rv = 1;
break; break;
} }
@ -238,7 +238,7 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
case PDUTYPE_DATAPDU: case PDUTYPE_DATAPDU:
if (xrdp_rdp_process_data(rdp, s) != 0) if (xrdp_rdp_process_data(rdp, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data returned non zero"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data returned non zero");
cont = 0; cont = 0;
term = 1; term = 1;
} }
@ -246,13 +246,13 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
case 2: /* FASTPATH_INPUT_EVENT */ case 2: /* FASTPATH_INPUT_EVENT */
if (xrdp_fastpath_process_input_event(rdp->sec_layer->fastpath_layer, s) != 0) if (xrdp_fastpath_process_input_event(rdp->sec_layer->fastpath_layer, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_process_data returned non zero"); LOG(LOG_LEVEL_ERROR, "libxrdp_process_data returned non zero");
cont = 0; cont = 0;
term = 1; term = 1;
} }
break; break;
default: default:
LOG_DEVEL(LOG_LEVEL_TRACE, "unknown in libxrdp_process_data: code= %d", code); LOG(LOG_LEVEL_ERROR, "unknown in libxrdp_process_data: code= %d", code);
dead_lock_counter++; dead_lock_counter++;
break; break;
} }
@ -261,8 +261,8 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
{ {
/*This situation can happen and this is a workaround*/ /*This situation can happen and this is a workaround*/
cont = 0; cont = 0;
LOG_DEVEL(LOG_LEVEL_TRACE, "Serious programming error: we were locked in a deadly loop"); LOG(LOG_LEVEL_ERROR, "Serious programming error: we were locked in a deadly loop");
LOG_DEVEL(LOG_LEVEL_TRACE, "Remaining: %d", (int) (s->end - s->next_packet)); LOG(LOG_LEVEL_ERROR, "Remaining: %d", (int) (s->end - s->next_packet));
s->next_packet = 0; s->next_packet = 0;
} }
@ -542,14 +542,14 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height,
if (j > MAX_BITMAP_BUF_SIZE) if (j > MAX_BITMAP_BUF_SIZE)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "libxrdp_send_bitmap: error, decompressed " LOG(LOG_LEVEL_WARNING, "libxrdp_send_bitmap: error, decompressed "
"size too big: %d bytes", j); "size too big: %d bytes", j);
} }
if (bufsize > MAX_BITMAP_BUF_SIZE) if (bufsize > MAX_BITMAP_BUF_SIZE)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "libxrdp_send_bitmap: error, compressed size " LOG(LOG_LEVEL_WARNING, "libxrdp_send_bitmap: error, compressed size "
"too big: %d bytes", bufsize); "too big: %d bytes", bufsize);
} }
s->p = s->end; s->p = s->end;
@ -566,8 +566,8 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height,
if (total_bufsize > MAX_BITMAP_BUF_SIZE) if (total_bufsize > MAX_BITMAP_BUF_SIZE)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "libxrdp_send_bitmap: error, total compressed " LOG(LOG_LEVEL_WARNING, "libxrdp_send_bitmap: error, total compressed "
"size too big: %d bytes", total_bufsize); "size too big: %d bytes", total_bufsize);
} }
} }
@ -594,7 +594,7 @@ libxrdp_send_bitmap(struct xrdp_session *session, int width, int height,
if (lines_sending == 0) if (lines_sending == 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "libxrdp_send_bitmap: error, lines_sending == zero"); LOG(LOG_LEVEL_WARNING, "libxrdp_send_bitmap: error, lines_sending == zero");
break; break;
} }
@ -699,14 +699,14 @@ libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
{ {
if (bpp != 24) if (bpp != 24)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_send_pointer: error client does not support " LOG(LOG_LEVEL_ERROR, "libxrdp_send_pointer: error client does not support "
"new cursors and bpp is %d", bpp); "new cursors and bpp is %d", bpp);
return 1; return 1;
} }
} }
if ((bpp == 15) && (bpp != 16) && (bpp != 24) && (bpp != 32)) if ((bpp == 15) && (bpp != 16) && (bpp != 24) && (bpp != 32))
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_send_pointer: error"); LOG(LOG_LEVEL_ERROR, "libxrdp_send_pointer: error");
return 1; return 1;
} }
make_stream(s); make_stream(s);
@ -1167,7 +1167,7 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
if (mcs->channel_list == NULL) if (mcs->channel_list == NULL)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_query_channel - No channel initialized"); LOG(LOG_LEVEL_ERROR, "libxrdp_query_channel - No channel initialized");
return 1 ; return 1 ;
} }
@ -1175,7 +1175,7 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
if (index < 0 || index >= count) if (index < 0 || index >= count)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_query_channel - Channel out of range %d", index); LOG(LOG_LEVEL_ERROR, "libxrdp_query_channel - Channel out of range %d", index);
return 1; return 1;
} }
@ -1185,14 +1185,14 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
if (channel_item == 0) if (channel_item == 0)
{ {
/* this should not happen */ /* this should not happen */
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_query_channel - channel item is 0"); LOG(LOG_LEVEL_ERROR, "libxrdp_query_channel - channel item is 0");
return 1; return 1;
} }
if (channel_name != 0) if (channel_name != 0)
{ {
g_strncpy(channel_name, channel_item->name, 8); g_strncpy(channel_name, channel_item->name, 8);
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_query_channel - Channel %d name %s", index, channel_name); LOG(LOG_LEVEL_ERROR, "libxrdp_query_channel - Channel %d name %s", index, channel_name);
} }
if (channel_flags != 0) if (channel_flags != 0)
@ -1220,7 +1220,7 @@ libxrdp_get_channel_id(struct xrdp_session *session, const char *name)
if (mcs->channel_list == NULL) if (mcs->channel_list == NULL)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_get_channel_id No channel initialized"); LOG(LOG_LEVEL_ERROR, "libxrdp_get_channel_id No channel initialized");
return -1 ; return -1 ;
} }
@ -1272,7 +1272,7 @@ libxrdp_send_to_channel(struct xrdp_session *session, int channel_id,
if (xrdp_channel_send(chan, s, channel_id, total_data_len, flags) != 0) if (xrdp_channel_send(chan, s, channel_id, total_data_len, flags) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "libxrdp_send_to_channel: error, server channel data NOT sent to client channel"); LOG(LOG_LEVEL_ERROR, "libxrdp_send_to_channel: error, server channel data NOT sent to client channel");
free_stream(s); free_stream(s);
return 1; return 1;
} }

View File

@ -77,7 +77,7 @@ xrdp_caps_process_general(struct xrdp_rdp *self, struct stream *s,
if (len < 10 + 2) if (len < 10 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_general: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_general: error");
return 1; return 1;
} }
@ -115,7 +115,7 @@ xrdp_caps_process_order(struct xrdp_rdp *self, struct stream *s,
LOG_DEVEL(LOG_LEVEL_TRACE, "order capabilities"); LOG_DEVEL(LOG_LEVEL_TRACE, "order capabilities");
if (len < 20 + 2 + 2 + 2 + 2 + 2 + 2 + 32 + 2 + 2 + 4 + 4 + 4 + 4) if (len < 20 + 2 + 2 + 2 + 2 + 2 + 2 + 32 + 2 + 2 + 4 + 4 + 4 + 4)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_order: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_order: error");
return 1; return 1;
} }
in_uint8s(s, 20); /* Terminal desc, pad */ in_uint8s(s, 20); /* Terminal desc, pad */
@ -186,7 +186,7 @@ xrdp_caps_process_bmpcache(struct xrdp_rdp *self, struct stream *s,
if (len < 24 + 2 + 2 + 2 + 2 + 2 + 2) if (len < 24 + 2 + 2 + 2 + 2 + 2 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_bmpcache: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_bmpcache: error");
return 1; return 1;
} }
self->client_info.bitmap_cache_version |= 1; self->client_info.bitmap_cache_version |= 1;
@ -229,7 +229,7 @@ xrdp_caps_process_bmpcache2(struct xrdp_rdp *self, struct stream *s,
if (len < 2 + 2 + 4 + 4 + 4) if (len < 2 + 2 + 4 + 4 + 4)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_bmpcache2: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_bmpcache2: error");
return 1; return 1;
} }
self->client_info.bitmap_cache_version |= 2; self->client_info.bitmap_cache_version |= 2;
@ -271,7 +271,7 @@ xrdp_caps_process_cache_v3_codec_id(struct xrdp_rdp *self, struct stream *s,
if (len < 1) if (len < 1)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_cache_v3_codec_id: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_cache_v3_codec_id: error");
return 1; return 1;
} }
in_uint8(s, codec_id); in_uint8(s, codec_id);
@ -293,7 +293,7 @@ xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s,
if (len < 2 + 2 + 2) if (len < 2 + 2 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_pointer: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_pointer: error");
return 1; return 1;
} }
no_new_cursor = self->client_info.pointer_flags & 2; no_new_cursor = self->client_info.pointer_flags & 2;
@ -304,21 +304,21 @@ xrdp_caps_process_pointer(struct xrdp_rdp *self, struct stream *s,
self->client_info.pointer_cache_entries = i; self->client_info.pointer_cache_entries = i;
if (colorPointerFlag & 1) if (colorPointerFlag & 1)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_pointer: client supports " LOG(LOG_LEVEL_INFO, "xrdp_caps_process_pointer: client supports "
"new(color) cursor"); "new(color) cursor");
in_uint16_le(s, i); in_uint16_le(s, i);
i = MIN(i, 32); i = MIN(i, 32);
self->client_info.pointer_cache_entries = i; self->client_info.pointer_cache_entries = i;
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_pointer: client does not support " LOG(LOG_LEVEL_INFO, "xrdp_caps_process_pointer: client does not support "
"new(color) cursor"); "new(color) cursor");
} }
if (no_new_cursor) if (no_new_cursor)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_pointer: new(color) cursor is " LOG(LOG_LEVEL_INFO, "xrdp_caps_process_pointer: new(color) cursor is "
"disabled by config"); "disabled by config");
self->client_info.pointer_flags = 0; self->client_info.pointer_flags = 0;
} }
return 0; return 0;
@ -352,7 +352,7 @@ xrdp_caps_process_brushcache(struct xrdp_rdp *self, struct stream *s,
if (len < 4) if (len < 4)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_brushcache: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_brushcache: error");
return 1; return 1;
} }
in_uint32_le(s, code); in_uint32_le(s, code);
@ -369,7 +369,7 @@ xrdp_caps_process_glyphcache(struct xrdp_rdp *self, struct stream *s,
if (len < 40 + 4 + 2 + 2) /* MS-RDPBCGR 2.2.7.1.8 */ if (len < 40 + 4 + 2 + 2) /* MS-RDPBCGR 2.2.7.1.8 */
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_glyphcache: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_glyphcache: error");
return 1; return 1;
} }
@ -396,7 +396,7 @@ xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s,
if (len < 4 + 2 + 2) if (len < 4 + 2 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_offscreen_bmpcache: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_offscreen_bmpcache: error");
return 1; return 1;
} }
in_uint32_le(s, i32); in_uint32_le(s, i32);
@ -405,11 +405,11 @@ xrdp_caps_process_offscreen_bmpcache(struct xrdp_rdp *self, struct stream *s,
self->client_info.offscreen_cache_size = i32 * 1024; self->client_info.offscreen_cache_size = i32 * 1024;
in_uint16_le(s, i32); in_uint16_le(s, i32);
self->client_info.offscreen_cache_entries = i32; self->client_info.offscreen_cache_entries = i32;
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_process_offscreen_bmpcache: support level %d " LOG(LOG_LEVEL_INFO, "xrdp_process_offscreen_bmpcache: support level %d "
"cache size %d MB cache entries %d", "cache size %d MB cache entries %d",
self->client_info.offscreen_support_level, self->client_info.offscreen_support_level,
self->client_info.offscreen_cache_size, self->client_info.offscreen_cache_size,
self->client_info.offscreen_cache_entries); self->client_info.offscreen_cache_entries);
return 0; return 0;
} }
@ -421,13 +421,13 @@ xrdp_caps_process_rail(struct xrdp_rdp *self, struct stream *s, int len)
if (len < 4) if (len < 4)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_rail: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_rail: error");
return 1; return 1;
} }
in_uint32_le(s, i32); in_uint32_le(s, i32);
self->client_info.rail_support_level = i32; self->client_info.rail_support_level = i32;
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_process_capset_rail: rail_support_level %d", LOG(LOG_LEVEL_INFO, "xrdp_process_capset_rail: rail_support_level %d",
self->client_info.rail_support_level); self->client_info.rail_support_level);
return 0; return 0;
} }
@ -439,7 +439,7 @@ xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len)
if (len < 4 + 1 + 2) if (len < 4 + 1 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_window: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_window: error");
return 1; return 1;
} }
in_uint32_le(s, i32); in_uint32_le(s, i32);
@ -448,11 +448,11 @@ xrdp_caps_process_window(struct xrdp_rdp *self, struct stream *s, int len)
self->client_info.wnd_num_icon_caches = i32; self->client_info.wnd_num_icon_caches = i32;
in_uint16_le(s, i32); in_uint16_le(s, i32);
self->client_info.wnd_num_icon_cache_entries = i32; self->client_info.wnd_num_icon_cache_entries = i32;
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_process_capset_window wnd_support_level %d " LOG(LOG_LEVEL_INFO, "xrdp_process_capset_window wnd_support_level %d "
"wnd_num_icon_caches %d wnd_num_icon_cache_entries %d", "wnd_num_icon_caches %d wnd_num_icon_cache_entries %d",
self->client_info.wnd_support_level, self->client_info.wnd_support_level,
self->client_info.wnd_num_icon_caches, self->client_info.wnd_num_icon_caches,
self->client_info.wnd_num_icon_cache_entries); self->client_info.wnd_num_icon_cache_entries);
return 0; return 0;
} }
@ -470,7 +470,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
if (len < 1) if (len < 1)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_codecs: error");
return 1; return 1;
} }
in_uint8(s, codec_count); in_uint8(s, codec_count);
@ -481,7 +481,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
codec_guid = s->p; codec_guid = s->p;
if (len < 16 + 1 + 2) if (len < 16 + 1 + 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_codecs: error");
return 1; return 1;
} }
in_uint8s(s, 16); in_uint8s(s, 16);
@ -490,7 +490,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
len -= 16 + 1 + 2; len -= 16 + 1 + 2;
if (len < codec_properties_length) if (len < codec_properties_length)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: error"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_codecs: error");
return 1; return 1;
} }
len -= codec_properties_length; len -= codec_properties_length;
@ -498,8 +498,8 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
if (g_memcmp(codec_guid, XR_CODEC_GUID_NSCODEC, 16) == 0) if (g_memcmp(codec_guid, XR_CODEC_GUID_NSCODEC, 16) == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: nscodec, codec id %d, properties len %d", LOG(LOG_LEVEL_INFO, "xrdp_caps_process_codecs: nscodec, codec id %d, properties len %d",
codec_id, codec_properties_length); codec_id, codec_properties_length);
self->client_info.ns_codec_id = codec_id; self->client_info.ns_codec_id = codec_id;
i1 = MIN(64, codec_properties_length); i1 = MIN(64, codec_properties_length);
g_memcpy(self->client_info.ns_prop, s->p, i1); g_memcpy(self->client_info.ns_prop, s->p, i1);
@ -507,8 +507,8 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
} }
else if (g_memcmp(codec_guid, XR_CODEC_GUID_REMOTEFX, 16) == 0) else if (g_memcmp(codec_guid, XR_CODEC_GUID_REMOTEFX, 16) == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: RemoteFX, codec id %d, properties len %d", LOG(LOG_LEVEL_INFO, "xrdp_caps_process_codecs: RemoteFX, codec id %d, properties len %d",
codec_id, codec_properties_length); codec_id, codec_properties_length);
self->client_info.rfx_codec_id = codec_id; self->client_info.rfx_codec_id = codec_id;
i1 = MIN(64, codec_properties_length); i1 = MIN(64, codec_properties_length);
g_memcpy(self->client_info.rfx_prop, s->p, i1); g_memcpy(self->client_info.rfx_prop, s->p, i1);
@ -516,8 +516,8 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
} }
else if (g_memcmp(codec_guid, XR_CODEC_GUID_JPEG, 16) == 0) else if (g_memcmp(codec_guid, XR_CODEC_GUID_JPEG, 16) == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: jpeg, codec id %d, properties len %d", LOG(LOG_LEVEL_INFO, "xrdp_caps_process_codecs: jpeg, codec id %d, properties len %d",
codec_id, codec_properties_length); codec_id, codec_properties_length);
self->client_info.jpeg_codec_id = codec_id; self->client_info.jpeg_codec_id = codec_id;
i1 = MIN(64, codec_properties_length); i1 = MIN(64, codec_properties_length);
g_memcpy(self->client_info.jpeg_prop, s->p, i1); g_memcpy(self->client_info.jpeg_prop, s->p, i1);
@ -525,16 +525,16 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
/* make sure that requested quality is between 0 to 100 */ /* make sure that requested quality is between 0 to 100 */
if (self->client_info.jpeg_prop[0] < 0 || self->client_info.jpeg_prop[0] > 100) if (self->client_info.jpeg_prop[0] < 0 || self->client_info.jpeg_prop[0] > 100)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " Warning: the requested jpeg quality (%d) is invalid," LOG_DEVEL(LOG_LEVEL_WARNING, " Warning: the requested jpeg quality (%d) is invalid,"
" falling back to default", self->client_info.jpeg_prop[0]); " falling back to default", self->client_info.jpeg_prop[0]);
self->client_info.jpeg_prop[0] = 75; /* use default */ self->client_info.jpeg_prop[0] = 75; /* use default */
} }
LOG_DEVEL(LOG_LEVEL_TRACE, " jpeg quality set to %d", self->client_info.jpeg_prop[0]); LOG(LOG_LEVEL_INFO, " jpeg quality set to %d", self->client_info.jpeg_prop[0]);
} }
else if (g_memcmp(codec_guid, XR_CODEC_GUID_H264, 16) == 0) else if (g_memcmp(codec_guid, XR_CODEC_GUID_H264, 16) == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: h264, codec id %d, properties len %d", LOG(LOG_LEVEL_INFO, "xrdp_caps_process_codecs: h264, codec id %d, properties len %d",
codec_id, codec_properties_length); codec_id, codec_properties_length);
self->client_info.h264_codec_id = codec_id; self->client_info.h264_codec_id = codec_id;
i1 = MIN(64, codec_properties_length); i1 = MIN(64, codec_properties_length);
g_memcpy(self->client_info.h264_prop, s->p, i1); g_memcpy(self->client_info.h264_prop, s->p, i1);
@ -542,7 +542,7 @@ xrdp_caps_process_codecs(struct xrdp_rdp *self, struct stream *s, int len)
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_codecs: unknown codec id %d", codec_id); LOG(LOG_LEVEL_WARNING, "xrdp_caps_process_codecs: unknown codec id %d", codec_id);
} }
s->p = next_guid; s->p = next_guid;
@ -575,8 +575,8 @@ xrdp_caps_process_frame_ack(struct xrdp_rdp *self, struct stream *s, int len)
in_uint32_le(s, self->client_info.max_unacknowledged_frame_count); in_uint32_le(s, self->client_info.max_unacknowledged_frame_count);
if (self->client_info.max_unacknowledged_frame_count < 0) if (self->client_info.max_unacknowledged_frame_count < 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " invalid max_unacknowledged_frame_count value (%d), setting to 0", LOG(LOG_LEVEL_WARNING, " invalid max_unacknowledged_frame_count value (%d), setting to 0",
self->client_info.max_unacknowledged_frame_count); self->client_info.max_unacknowledged_frame_count);
self->client_info.max_unacknowledged_frame_count = 0; self->client_info.max_unacknowledged_frame_count = 0;
} }
LOG_DEVEL(LOG_LEVEL_TRACE, " max_unacknowledged_frame_count %d", self->client_info.max_unacknowledged_frame_count); LOG_DEVEL(LOG_LEVEL_TRACE, " max_unacknowledged_frame_count %d", self->client_info.max_unacknowledged_frame_count);
@ -589,7 +589,7 @@ xrdp_caps_process_surface_cmds(struct xrdp_rdp *self, struct stream *s, int len)
{ {
int cmdFlags; int cmdFlags;
#ifndef XRDP_DEBUG #ifndef XRDP_DEBUG
/* TODO: remove UNUSED_VAR once the `cmdFlags` variable is used for more than /* TODO: remove UNUSED_VAR once the `cmdFlags` variable is used for more than
logging in debug mode */ logging in debug mode */
UNUSED_VAR(cmdFlags); UNUSED_VAR(cmdFlags);
#endif #endif
@ -631,15 +631,15 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
p = s->p; p = s->p;
if (!s_check_rem(s, 4)) if (!s_check_rem(s, 4))
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_confirm_active: error 1"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_confirm_active: error 1");
return 1; return 1;
} }
in_uint16_le(s, type); in_uint16_le(s, type);
in_uint16_le(s, len); in_uint16_le(s, len);
if ((len < 4) || !s_check_rem(s, len - 4)) if ((len < 4) || !s_check_rem(s, len - 4))
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_confirm_active: error: len %d, " LOG(LOG_LEVEL_ERROR, "xrdp_caps_process_confirm_active: error: len %d, "
"remaining %d", len, (int) (s->end - s->p)); "remaining %d", len, (int) (s->end - s->p));
return 1; return 1;
} }
len -= 4; len -= 4;
@ -731,7 +731,7 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
xrdp_caps_process_frame_ack(self, s, len); xrdp_caps_process_frame_ack(self, s, len);
break; break;
default: default:
LOG_DEVEL(LOG_LEVEL_TRACE, "unknown in xrdp_caps_process_confirm_active %d", type); LOG(LOG_LEVEL_WARNING, "unknown in xrdp_caps_process_confirm_active %d", type);
break; break;
} }
@ -741,9 +741,9 @@ xrdp_caps_process_confirm_active(struct xrdp_rdp *self, struct stream *s)
if (self->client_info.no_orders_supported && if (self->client_info.no_orders_supported &&
(self->client_info.offscreen_support_level != 0)) (self->client_info.offscreen_support_level != 0))
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_process_confirm_active: not enough orders " LOG(LOG_LEVEL_WARNING, "xrdp_caps_process_confirm_active: not enough orders "
"supported by client, client wants off screen bitmap but " "supported by client, client wants off screen bitmap but "
"offscreen bitmaps disabled"); "offscreen bitmaps disabled");
self->client_info.offscreen_support_level = 0; self->client_info.offscreen_support_level = 0;
self->client_info.offscreen_cache_size = 0; self->client_info.offscreen_cache_size = 0;
self->client_info.offscreen_cache_entries = 0; self->client_info.offscreen_cache_entries = 0;
@ -1047,7 +1047,7 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self)
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_send_demand_active: sending monitor layout pdu"); LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_send_demand_active: sending monitor layout pdu");
if (xrdp_caps_send_monitorlayout(self) != 0) if (xrdp_caps_send_monitorlayout(self) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_caps_send_demand_active: error sending monitor layout pdu"); LOG(LOG_LEVEL_ERROR, "xrdp_caps_send_demand_active: error sending monitor layout pdu");
} }
} }

View File

@ -51,7 +51,7 @@ xrdp_channel_get_item(struct xrdp_channel *self, int channel_id)
if (self->mcs_layer->channel_list == NULL) if (self->mcs_layer->channel_list == NULL)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_get_item - No channel initialized"); LOG(LOG_LEVEL_ERROR, "xrdp_channel_get_item - No channel initialized");
return NULL ; return NULL ;
} }
@ -114,13 +114,13 @@ xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id,
if (channel == NULL) if (channel == NULL)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_send - no such channel"); LOG(LOG_LEVEL_ERROR, "xrdp_channel_send - no such channel");
return 1; return 1;
} }
if (channel->disabled) if (channel->disabled)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_send, channel disabled"); LOG(LOG_LEVEL_WARNING, "xrdp_channel_send, channel disabled");
return 0; /* not an error */ return 0; /* not an error */
} }
@ -147,7 +147,7 @@ xrdp_channel_send(struct xrdp_channel *self, struct stream *s, int channel_id,
if (xrdp_sec_send(self->sec_layer, s, channel->chanid) != 0) if (xrdp_sec_send(self->sec_layer, s, channel->chanid) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_send - failure sending data"); LOG(LOG_LEVEL_ERROR, "xrdp_channel_send - failure sending data");
return 1; return 1;
} }
@ -182,12 +182,12 @@ xrdp_channel_call_callback(struct xrdp_channel *self, struct stream *s,
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "in xrdp_channel_call_callback, session->callback is nil"); LOG(LOG_LEVEL_TRACE, "in xrdp_channel_call_callback, session->callback is nil");
} }
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "in xrdp_channel_call_callback, session is nil"); LOG(LOG_LEVEL_TRACE, "in xrdp_channel_call_callback, session is nil");
} }
return rv; return rv;
@ -269,12 +269,12 @@ drdynvc_process_capability_response(struct xrdp_channel *self,
in_uint16_le(s, cap_version); in_uint16_le(s, cap_version);
if ((cap_version != 2) && (cap_version != 3)) if ((cap_version != 2) && (cap_version != 3))
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "drdynvc_process_capability_response: incompatible DVC " LOG(LOG_LEVEL_ERROR, "drdynvc_process_capability_response: incompatible DVC "
"version %d detected", cap_version); "version %d detected", cap_version);
return 1; return 1;
} }
LOG_DEVEL(LOG_LEVEL_TRACE, "drdynvc_process_capability_response: DVC version %d selected", LOG(LOG_LEVEL_INFO, "drdynvc_process_capability_response: DVC version %d selected",
cap_version); cap_version);
self->drdynvc_state = 1; self->drdynvc_state = 1;
session = self->sec_layer->rdp_layer->session; session = self->sec_layer->rdp_layer->session;
rv = session->callback(session->id, 0x5558, 0, 0, 0, 0); rv = session->callback(session->id, 0x5558, 0, 0, 0, 0);
@ -496,7 +496,7 @@ xrdp_channel_process_drdynvc(struct xrdp_channel *self,
ls = s; ls = s;
break; break;
default: default:
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_process_drdynvc: error"); LOG(LOG_LEVEL_ERROR, "xrdp_channel_process_drdynvc: error");
return 1; return 1;
} }
if (ls == NULL) if (ls == NULL)
@ -556,12 +556,12 @@ xrdp_channel_process(struct xrdp_channel *self, struct stream *s,
channel = xrdp_channel_get_item(self, channel_id); channel = xrdp_channel_get_item(self, channel_id);
if (channel == NULL) if (channel == NULL)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_process, channel not found"); LOG(LOG_LEVEL_ERROR, "xrdp_channel_process, channel not found");
return 1; return 1;
} }
if (channel->disabled) if (channel->disabled)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_process, channel disabled"); LOG(LOG_LEVEL_WARNING, "xrdp_channel_process, channel disabled");
return 0; /* not an error */ return 0; /* not an error */
} }
if (channel_id == self->drdynvc_channel_id) if (channel_id == self->drdynvc_channel_id)

View File

@ -367,8 +367,8 @@ xrdp_fastpath_process_input_event(struct xrdp_fastpath *self,
} }
break; break;
default: default:
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_fastpath_process_input_event: unknown " LOG(LOG_LEVEL_WARNING, "xrdp_fastpath_process_input_event: unknown "
"eventCode %d", eventCode); "eventCode %d", eventCode);
break; break;
} }
} }

View File

@ -77,7 +77,7 @@ xrdp_iso_negotiate_security(struct xrdp_iso *self)
!g_file_readable(client_info->key_file)) !g_file_readable(client_info->key_file))
{ {
/* certificate or privkey is not readable */ /* certificate or privkey is not readable */
LOG(LOG_LEVEL_DEBUG, "No readable certificates or " LOG(LOG_LEVEL_WARNING, "No readable certificates or "
"private keys, cannot accept TLS connections"); "private keys, cannot accept TLS connections");
self->failureCode = SSL_CERT_NOT_ON_SERVER; self->failureCode = SSL_CERT_NOT_ON_SERVER;
rv = 1; /* error */ rv = 1; /* error */
@ -125,29 +125,29 @@ xrdp_iso_process_rdp_neg_req(struct xrdp_iso *self, struct stream *s)
if (!s_check_rem(s, 7)) if (!s_check_rem(s, 7))
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_process_rdpNegReq: unexpected end-of-record"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_process_rdpNegReq: unexpected end-of-record");
return 1; return 1;
} }
in_uint8(s, flags); in_uint8(s, flags);
if (flags != 0x0 && flags != 0x8 && flags != 0x1) if (flags != 0x0 && flags != 0x8 && flags != 0x1)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_process_rdpNegReq: error, flags: %x", flags); LOG(LOG_LEVEL_ERROR, "xrdp_iso_process_rdpNegReq: error, flags: %x", flags);
return 1; return 1;
} }
in_uint16_le(s, len); in_uint16_le(s, len);
if (len != 8) if (len != 8)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_process_rdpNegReq: error, length: %x", len); LOG(LOG_LEVEL_ERROR, "xrdp_iso_process_rdpNegReq: error, length: %x", len);
return 1; return 1;
} }
in_uint32_le(s, self->requestedProtocol); in_uint32_le(s, self->requestedProtocol);
if (self->requestedProtocol > 0xb) if (self->requestedProtocol > 0xb)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_process_rdpNegReq: error, requestedProtocol: %x", LOG(LOG_LEVEL_ERROR, "xrdp_iso_process_rdpNegReq: error, requestedProtocol: %x",
self->requestedProtocol); self->requestedProtocol);
return 1; return 1;
} }
@ -175,7 +175,7 @@ xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len)
if (s != self->trans->in_s) if (s != self->trans->in_s)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_recv_msg error logic"); LOG(LOG_LEVEL_WARNING, "xrdp_iso_recv_msg error logic");
} }
/* TPKT header is 4 bytes, then first 2 bytes of the X.224 CR-TPDU */ /* TPKT header is 4 bytes, then first 2 bytes of the X.224 CR-TPDU */
@ -191,16 +191,16 @@ xrdp_iso_recv_msg(struct xrdp_iso *self, struct stream *s, int *code, int *len)
if (ver != 3) if (ver != 3)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_recv_msg: bad ver"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_recv_msg: bad ver");
LOG_DEVEL_HEXDUMP(LOG_LEVEL_TRACE, "header", s->data, 4); LOG_DEVEL_HEXDUMP(LOG_LEVEL_ERROR, "header", s->data, 4);
return 1; return 1;
} }
if (*len == 255) if (*len == 255)
{ {
/* X.224 13.2.1 - reserved value */ /* X.224 13.2.1 - reserved value */
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_iso_recv_msg: reserved length encountered"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_recv_msg: reserved length encountered");
LOG_DEVEL_HEXDUMP(LOG_LEVEL_TRACE, "header", s->data, 4); LOG_DEVEL_HEXDUMP(LOG_LEVEL_ERROR, "header", s->data, 4);
return 1; return 1;
} }
@ -238,13 +238,13 @@ xrdp_iso_recv(struct xrdp_iso *self, struct stream *s)
if (xrdp_iso_recv_msg(self, s, &code, &len) != 0) if (xrdp_iso_recv_msg(self, s, &code, &len) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, " out xrdp_iso_recv xrdp_iso_recv_msg return non zero"); LOG(LOG_LEVEL_ERROR, " out xrdp_iso_recv xrdp_iso_recv_msg return non zero");
return 1; return 1;
} }
if (code != ISO_PDU_DT || len != 2) if (code != ISO_PDU_DT || len != 2)
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, " out xrdp_iso_recv code != ISO_PDU_DT or length != 2"); LOG(LOG_LEVEL_ERROR, " out xrdp_iso_recv code != ISO_PDU_DT or length != 2");
return 1; return 1;
} }
@ -349,7 +349,7 @@ xrdp_iso_incoming(struct xrdp_iso *self)
if (xrdp_iso_recv_msg(self, s, &code, &len) != 0) if (xrdp_iso_recv_msg(self, s, &code, &len) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_iso_incoming: xrdp_iso_recv_msg returned non zero"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_incoming: xrdp_iso_recv_msg returned non zero");
return 1; return 1;
} }
@ -369,8 +369,8 @@ xrdp_iso_incoming(struct xrdp_iso *self)
expected_pdu_len = (s->end - s->p) + 6; expected_pdu_len = (s->end - s->p) + 6;
if (len != expected_pdu_len) if (len != expected_pdu_len)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_iso_incoming: X.224 CR-TPDU length exp %d got %d", LOG(LOG_LEVEL_ERROR, "xrdp_iso_incoming: X.224 CR-TPDU length exp %d got %d",
expected_pdu_len, len); expected_pdu_len, len);
return 1; return 1;
} }
@ -386,7 +386,7 @@ xrdp_iso_incoming(struct xrdp_iso *self)
self->rdpNegData = 1; self->rdpNegData = 1;
if (xrdp_iso_process_rdp_neg_req(self, s) != 0) if (xrdp_iso_process_rdp_neg_req(self, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_iso_incoming: xrdp_iso_process_rdpNegReq returned non zero"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_incoming: xrdp_iso_process_rdpNegReq returned non zero");
return 1; return 1;
} }
break; break;
@ -394,7 +394,7 @@ xrdp_iso_incoming(struct xrdp_iso *self)
// TODO // TODO
if (!s_check_rem(s, 1 + 2 + 16 + 16)) if (!s_check_rem(s, 1 + 2 + 16 + 16))
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_iso_incoming: short correlation info"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_incoming: short correlation info");
return 1; return 1;
} }
@ -427,7 +427,7 @@ xrdp_iso_incoming(struct xrdp_iso *self)
/* send connection confirm back to client */ /* send connection confirm back to client */
if (xrdp_iso_send_cc(self) != 0) if (xrdp_iso_send_cc(self) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_iso_incoming: xrdp_iso_send_cc returned non zero"); LOG(LOG_LEVEL_ERROR, "xrdp_iso_incoming: xrdp_iso_send_cc returned non zero");
return 1; return 1;
} }

View File

@ -55,12 +55,12 @@ xrdp_jpeg_compress(void *handle, char *in_data, int width, int height,
if (bpp != 24) if (bpp != 24)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_jpeg_compress: bpp wrong %d", bpp); LOG(LOG_LEVEL_WARNING, "xrdp_jpeg_compress: bpp wrong %d", bpp);
return height; return height;
} }
if (handle == 0) if (handle == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_jpeg_compress: handle is nil"); LOG(LOG_LEVEL_WARNING, "xrdp_jpeg_compress: handle is nil");
return height; return height;
} }
tj_han = (tjhandle) handle; tj_han = (tjhandle) handle;
@ -147,7 +147,7 @@ xrdp_codec_jpeg_compress(void *handle,
if (handle == 0) if (handle == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_codec_jpeg_compress: handle is nil"); LOG(LOG_LEVEL_WARNING, "xrdp_codec_jpeg_compress: handle is nil");
return height; return height;
} }
@ -400,7 +400,7 @@ jpeg_compress(char *in_data, int width, int height,
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "bpp wrong %d", bpp); LOG(LOG_LEVEL_WARNING, "bpp wrong %d", bpp);
} }
cdata_bytes = byte_limit; cdata_bytes = byte_limit;

View File

@ -94,7 +94,7 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid)
if (xrdp_iso_init(self->iso_layer, s) != 0) if (xrdp_iso_init(self->iso_layer, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send_cjcf error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send_cjcf error");
return 1; return 1;
} }
@ -108,7 +108,7 @@ xrdp_mcs_send_cjcf(struct xrdp_mcs *self, int userid, int chanid)
if (xrdp_iso_send(self->iso_layer, s) != 0) if (xrdp_iso_send(self->iso_layer, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send_cjcf error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send_cjcf error");
return 1; return 1;
} }
@ -133,8 +133,8 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
{ {
if (xrdp_iso_recv(self->iso_layer, s) != 0) if (xrdp_iso_recv(self->iso_layer, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_recv, xrdp_iso_recv return non zero"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_recv, xrdp_iso_recv return non zero");
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_mcs_recv: xrdp_iso_recv failed"); LOG(LOG_LEVEL_ERROR, "xrdp_mcs_recv: xrdp_iso_recv failed");
return 1; return 1;
} }
@ -148,8 +148,8 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
if (appid == MCS_DPUM) /* Disconnect Provider Ultimatum */ if (appid == MCS_DPUM) /* Disconnect Provider Ultimatum */
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "received Disconnect Provider Ultimatum"); LOG(LOG_LEVEL_ERROR, "received Disconnect Provider Ultimatum");
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_recv appid != MCS_DPUM"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_recv appid != MCS_DPUM");
return 1; return 1;
} }
@ -175,7 +175,7 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
s = libxrdp_force_read(self->iso_layer->trans); s = libxrdp_force_read(self->iso_layer->trans);
if (s == 0) if (s == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_mcs_recv: libxrdp_force_read failed"); LOG(LOG_LEVEL_ERROR, "xrdp_mcs_recv: libxrdp_force_read failed");
return 1; return 1;
} }
@ -196,7 +196,7 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
if (appid != MCS_SDRQ) if (appid != MCS_SDRQ)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_recv err got 0x%x need MCS_SDRQ", appid); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_recv err got 0x%x need MCS_SDRQ", appid);
return 1; return 1;
} }
@ -553,7 +553,7 @@ xrdp_mcs_send_aucf(struct xrdp_mcs *self)
if (xrdp_iso_init(self->iso_layer, s) != 0) if (xrdp_iso_init(self->iso_layer, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send_aucf error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send_aucf error");
return 1; return 1;
} }
@ -565,7 +565,7 @@ xrdp_mcs_send_aucf(struct xrdp_mcs *self)
if (xrdp_iso_send(self->iso_layer, s) != 0) if (xrdp_iso_send(self->iso_layer, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send_aucf error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send_aucf error");
return 1; return 1;
} }
@ -789,7 +789,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
if (self->rsa_key_bytes == 64) if (self->rsa_key_bytes == 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_out_mcs_data: using 512 bit RSA key"); LOG(LOG_LEVEL_DEBUG, "xrdp_sec_out_mcs_data: using 512 bit RSA key");
out_uint16_le(s, SEC_TAG_SRV_CRYPT); out_uint16_le(s, SEC_TAG_SRV_CRYPT);
out_uint16_le(s, 0x00ec); /* len is 236 */ out_uint16_le(s, 0x00ec); /* len is 236 */
out_uint32_le(s, self->crypt_method); out_uint32_le(s, self->crypt_method);
@ -819,7 +819,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
} }
else if (self->rsa_key_bytes == 256) else if (self->rsa_key_bytes == 256)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_out_mcs_data: using 2048 bit RSA key"); LOG(LOG_LEVEL_DEBUG, "xrdp_sec_out_mcs_data: using 2048 bit RSA key");
out_uint16_le(s, SEC_TAG_SRV_CRYPT); out_uint16_le(s, SEC_TAG_SRV_CRYPT);
out_uint16_le(s, 0x01ac); /* len is 428 */ out_uint16_le(s, 0x01ac); /* len is 428 */
out_uint32_le(s, self->crypt_method); out_uint32_le(s, self->crypt_method);
@ -849,7 +849,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
} }
else if (self->rsa_key_bytes == 0) /* no security */ else if (self->rsa_key_bytes == 0) /* no security */
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_out_mcs_data: using no security"); LOG(LOG_LEVEL_DEBUG, "xrdp_sec_out_mcs_data: using no security");
out_uint16_le(s, SEC_TAG_SRV_CRYPT); out_uint16_le(s, SEC_TAG_SRV_CRYPT);
out_uint16_le(s, 12); /* len is 12 */ out_uint16_le(s, 12); /* len is 12 */
out_uint32_le(s, self->crypt_method); out_uint32_le(s, self->crypt_method);
@ -857,7 +857,7 @@ xrdp_mcs_out_gcc_data(struct xrdp_sec *self)
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_out_mcs_data: error"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_out_mcs_data: error");
} }
/* end certificate */ /* end certificate */
s_mark_end(s); s_mark_end(s);
@ -897,7 +897,7 @@ xrdp_mcs_send_connect_response(struct xrdp_mcs *self)
if (xrdp_iso_send(self->iso_layer, s) != 0) if (xrdp_iso_send(self->iso_layer, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send_connect_response error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send_connect_response error");
return 1; return 1;
} }
@ -1031,7 +1031,7 @@ xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan)
if (len > 8192 * 2) if (len > 8192 * 2)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error in xrdp_mcs_send, size too big: %d bytes", len); LOG(LOG_LEVEL_WARNING, "error in xrdp_mcs_send, size too big: %d bytes", len);
} }
//if (len > max_len) //if (len > max_len)
@ -1068,7 +1068,7 @@ xrdp_mcs_send(struct xrdp_mcs *self, struct stream *s, int chan)
if (xrdp_iso_send(self->iso_layer, s) != 0) if (xrdp_iso_send(self->iso_layer, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_send error"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_send error");
return 1; return 1;
} }
@ -1119,7 +1119,7 @@ xrdp_mcs_disconnect(struct xrdp_mcs *self)
{ {
free_stream(s); free_stream(s);
close_rdp_socket(self); close_rdp_socket(self);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_disconnect error - 1"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_disconnect error - 1");
return 1; return 1;
} }
@ -1131,7 +1131,7 @@ xrdp_mcs_disconnect(struct xrdp_mcs *self)
{ {
free_stream(s); free_stream(s);
close_rdp_socket(self); close_rdp_socket(self);
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_mcs_disconnect error - 2"); LOG(LOG_LEVEL_ERROR, " out xrdp_mcs_disconnect error - 2");
return 1; return 1;
} }

View File

@ -237,7 +237,7 @@ xrdp_orders_check(struct xrdp_orders *self, int max_size)
size = (int)(self->out_s->p - self->order_count_ptr); size = (int)(self->out_s->p - self->order_count_ptr);
if (size < 0) if (size < 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error in xrdp_orders_check, size too small: %d bytes", size); LOG(LOG_LEVEL_ERROR, "error in xrdp_orders_check, size too small: %d bytes", size);
return 1; return 1;
} }
if (size > max_order_size) if (size > max_order_size)
@ -245,7 +245,7 @@ xrdp_orders_check(struct xrdp_orders *self, int max_size)
/* this suggests someone calls this function without passing the /* this suggests someone calls this function without passing the
correct max_size so we end up putting more into the buffer correct max_size so we end up putting more into the buffer
than we indicate we can */ than we indicate we can */
LOG_DEVEL(LOG_LEVEL_TRACE, "error in xrdp_orders_check, size too big: %d bytes", size); LOG(LOG_LEVEL_WARNING, "error in xrdp_orders_check, size too big: %d bytes", size);
/* We where getting called with size already greater than /* We where getting called with size already greater than
max_order_size max_order_size
Which I suspect was because the sending of text did not include Which I suspect was because the sending of text did not include
@ -2219,13 +2219,13 @@ xrdp_orders_send_raw_bitmap(struct xrdp_orders *self,
if (width > 64) if (width > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, width > 64"); LOG(LOG_LEVEL_ERROR, "error, width > 64");
return 1; return 1;
} }
if (height > 64) if (height > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, height > 64"); LOG(LOG_LEVEL_ERROR, "error, height > 64");
return 1; return 1;
} }
@ -2345,13 +2345,13 @@ xrdp_orders_send_bitmap(struct xrdp_orders *self,
if (width > 64) if (width > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, width > 64"); LOG(LOG_LEVEL_ERROR, "error, width > 64");
return 1; return 1;
} }
if (height > 64) if (height > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, height > 64"); LOG(LOG_LEVEL_ERROR, "error, height > 64");
return 1; return 1;
} }
@ -2645,13 +2645,13 @@ xrdp_orders_send_raw_bitmap2(struct xrdp_orders *self,
if (width > 64) if (width > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, width > 64"); LOG(LOG_LEVEL_ERROR, "error, width > 64");
return 1; return 1;
} }
if (height > 64) if (height > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, height > 64"); LOG(LOG_LEVEL_ERROR, "error, height > 64");
return 1; return 1;
} }
@ -2773,13 +2773,13 @@ xrdp_orders_send_bitmap2(struct xrdp_orders *self,
if (width > 64) if (width > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, width > 64"); LOG(LOG_LEVEL_ERROR, "error, width > 64");
return 1; return 1;
} }
if (height > 64) if (height > 64)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "error, height > 64"); LOG(LOG_LEVEL_ERROR, "error, height > 64");
return 1; return 1;
} }
@ -3008,7 +3008,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
if (!xrdp_orders_send_as_jpeg(self, width, height, bpp, hints)) if (!xrdp_orders_send_as_jpeg(self, width, height, bpp, hints))
{ {
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_orders_send_bitmap3: jpeg skipped"); LOG(LOG_LEVEL_ERROR, "xrdp_orders_send_bitmap3: jpeg skipped");
return 2; return 2;
} }
@ -3040,7 +3040,7 @@ xrdp_orders_send_bitmap3(struct xrdp_orders *self,
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_orders_send_bitmap3: todo unknown codec"); LOG(LOG_LEVEL_ERROR, "xrdp_orders_send_bitmap3: todo unknown codec");
return 1; return 1;
} }

View File

@ -459,8 +459,8 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code)
if (error != 0) if (error != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_recv error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_recv error");
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_rdp_recv: xrdp_sec_recv failed"); LOG(LOG_LEVEL_ERROR, "xrdp_rdp_recv: xrdp_sec_recv failed");
return 1; return 1;
} }
@ -470,14 +470,14 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code)
{ {
if (xrdp_channel_process(self->sec_layer->chan_layer, s, chan) != 0) if (xrdp_channel_process(self->sec_layer->chan_layer, s, chan) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_channel_process returned unhandled error") ; LOG(LOG_LEVEL_ERROR, "xrdp_channel_process returned unhandled error") ;
} }
} }
else else
{ {
if (chan != 1) if (chan != 1)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "Wrong channel Id to be handled by xrdp_channel_process %d", chan); LOG(LOG_LEVEL_ERROR, "Wrong channel Id to be handled by xrdp_channel_process %d", chan);
} }
} }
@ -532,7 +532,7 @@ xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type)
if (xrdp_sec_send(self->sec_layer, s, MCS_GLOBAL_CHANNEL) != 0) if (xrdp_sec_send(self->sec_layer, s, MCS_GLOBAL_CHANNEL) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send error");
return 1; return 1;
} }
@ -620,7 +620,7 @@ xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s,
if (xrdp_sec_send(self->sec_layer, s, MCS_GLOBAL_CHANNEL) != 0) if (xrdp_sec_send(self->sec_layer, s, MCS_GLOBAL_CHANNEL) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send_data error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send_data error");
return 1; return 1;
} }
@ -775,7 +775,7 @@ xrdp_rdp_send_fastpath(struct xrdp_rdp *self, struct stream *s,
send_s.end = send_s.p + send_len; send_s.end = send_s.p + send_len;
if (xrdp_sec_send_fastpath(self->sec_layer, &send_s) != 0) if (xrdp_sec_send_fastpath(self->sec_layer, &send_s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_rdp_send_fastpath: xrdp_fastpath_send failed"); LOG(LOG_LEVEL_ERROR, "xrdp_rdp_send_fastpath: xrdp_fastpath_send failed");
return 1; return 1;
} }
frag_s.p += no_comp_len; frag_s.p += no_comp_len;
@ -810,7 +810,7 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self)
{ {
if (xrdp_rdp_init_data(self, s) != 0) if (xrdp_rdp_init_data(self, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send_data_update_sync error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send_data_update_sync error");
free_stream(s); free_stream(s);
return 1; return 1;
} }
@ -833,7 +833,7 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self)
{ {
if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_UPDATE) != 0) if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_UPDATE) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send_data_update_sync error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send_data_update_sync error");
free_stream(s); free_stream(s);
return 1; return 1;
} }
@ -1375,7 +1375,7 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self)
if (xrdp_rdp_init(self, s) != 0) if (xrdp_rdp_init(self, s) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send_deactivate error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send_deactivate error");
return 1; return 1;
} }
@ -1384,7 +1384,7 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self)
if (xrdp_rdp_send(self, s, PDUTYPE_DEACTIVATEALLPDU) != 0) if (xrdp_rdp_send(self, s, PDUTYPE_DEACTIVATEALLPDU) != 0)
{ {
free_stream(s); free_stream(s);
LOG_DEVEL(LOG_LEVEL_TRACE, "out xrdp_rdp_send_deactivate error"); LOG(LOG_LEVEL_ERROR, "out xrdp_rdp_send_deactivate error");
return 1; return 1;
} }

View File

@ -235,8 +235,8 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
char keyboard_cfg_file[256] = { 0 }; char keyboard_cfg_file[256] = { 0 };
char rdp_layout[256] = { 0 }; char rdp_layout[256] = { 0 };
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: keyboard_type [%d] keyboard_subtype [%d]", LOG(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: keyboard_type [%d] keyboard_subtype [%d]",
client_info->keyboard_type, client_info->keyboard_subtype); client_info->keyboard_type, client_info->keyboard_subtype);
/* infer model/variant */ /* infer model/variant */
/* TODO specify different X11 keyboard models/variants */ /* TODO specify different X11 keyboard models/variants */
@ -256,7 +256,7 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
} }
g_snprintf(keyboard_cfg_file, 255, "%s/xrdp_keyboard.ini", XRDP_CFG_PATH); g_snprintf(keyboard_cfg_file, 255, "%s/xrdp_keyboard.ini", XRDP_CFG_PATH);
LOG_DEVEL(LOG_LEVEL_DEBUG, "keyboard_cfg_file %s", keyboard_cfg_file); LOG(LOG_LEVEL_DEBUG, "keyboard_cfg_file %s", keyboard_cfg_file);
fd = g_file_open(keyboard_cfg_file); fd = g_file_open(keyboard_cfg_file);
@ -287,8 +287,8 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
{ {
item = (char *)list_get_item(items, i); item = (char *)list_get_item(items, i);
value = (char *)list_get_item(values, i); value = (char *)list_get_item(values, i);
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_load_keyboard_layout: item %s value %s", LOG(LOG_LEVEL_DEBUG, "xrdp_load_keyboard_layout: item %s value %s",
item, value); item, value);
if (g_strcasecmp(item, "keyboard_type") == 0) if (g_strcasecmp(item, "keyboard_type") == 0)
{ {
int v = g_atoi(value); int v = g_atoi(value);
@ -354,9 +354,9 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
* mixing items from different sections will result in * mixing items from different sections will result in
* skipping over current section. * skipping over current section.
*/ */
LOG_DEVEL(LOG_LEVEL_DEBUG, "xrdp_load_keyboard_layout: skipping " LOG(LOG_LEVEL_DEBUG, "xrdp_load_keyboard_layout: skipping "
"configuration item - %s, continuing to next " "configuration item - %s, continuing to next "
"section", item); "section", item);
break; break;
} }
} }
@ -422,15 +422,15 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info)
list_delete(items); list_delete(items);
list_delete(values); list_delete(values);
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: model [%s] variant [%s] " LOG(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: model [%s] variant [%s] "
"layout [%s] options [%s]", client_info->model, "layout [%s] options [%s]", client_info->model,
client_info->variant, client_info->layout, client_info->options); client_info->variant, client_info->layout, client_info->options);
g_file_close(fd); g_file_close(fd);
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_load_keyboard_layout: error opening %s", LOG(LOG_LEVEL_ERROR, "xrdp_load_keyboard_layout: error opening %s",
keyboard_cfg_file); keyboard_cfg_file);
} }
} }
@ -461,7 +461,7 @@ xrdp_sec_delete(struct xrdp_sec *self)
{ {
if (self == 0) if (self == 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_delete: self is null"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_delete: self is null");
return; return;
} }
@ -685,9 +685,9 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if ((flags & RDP_LOGON_NORMAL) != RDP_LOGON_NORMAL) /* 0x33 */ if ((flags & RDP_LOGON_NORMAL) != RDP_LOGON_NORMAL) /* 0x33 */
{ {
/* must be or error */ /* must be or error */
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_process_logon_info: flags wrong, major error"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_process_logon_info: flags wrong, major error");
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_sec_process_logon_info: flags wrong, likely decrypt " LOG(LOG_LEVEL_ERROR, "xrdp_sec_process_logon_info: flags wrong, likely decrypt "
"not working"); "not working");
return 1; return 1;
} }
@ -732,7 +732,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if (len_domain >= INFO_CLIENT_MAX_CB_LEN) if (len_domain >= INFO_CLIENT_MAX_CB_LEN)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "ERROR [xrdp_sec_process_logon_info()]: len_domain >= %d", INFO_CLIENT_MAX_CB_LEN); LOG(LOG_LEVEL_ERROR, "ERROR [xrdp_sec_process_logon_info()]: len_domain >= %d", INFO_CLIENT_MAX_CB_LEN);
return 1; return 1;
} }
@ -754,7 +754,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if (len_user >= INFO_CLIENT_MAX_CB_LEN) if (len_user >= INFO_CLIENT_MAX_CB_LEN)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "ERROR [xrdp_sec_process_logon_info()]: len_user >= %d", INFO_CLIENT_MAX_CB_LEN); LOG(LOG_LEVEL_ERROR, "ERROR [xrdp_sec_process_logon_info()]: len_user >= %d", INFO_CLIENT_MAX_CB_LEN);
return 1; return 1;
} }
@ -766,7 +766,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if (len_password >= INFO_CLIENT_MAX_CB_LEN) if (len_password >= INFO_CLIENT_MAX_CB_LEN)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "ERROR [xrdp_sec_process_logon_info()]: len_password >= %d", INFO_CLIENT_MAX_CB_LEN); LOG(LOG_LEVEL_ERROR, "ERROR [xrdp_sec_process_logon_info()]: len_password >= %d", INFO_CLIENT_MAX_CB_LEN);
return 1; return 1;
} }
@ -778,7 +778,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if (len_program >= INFO_CLIENT_MAX_CB_LEN) if (len_program >= INFO_CLIENT_MAX_CB_LEN)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "ERROR [xrdp_sec_process_logon_info()]: len_program >= %d", INFO_CLIENT_MAX_CB_LEN); LOG(LOG_LEVEL_ERROR, "ERROR [xrdp_sec_process_logon_info()]: len_program >= %d", INFO_CLIENT_MAX_CB_LEN);
return 1; return 1;
} }
@ -790,7 +790,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
if (len_directory >= INFO_CLIENT_MAX_CB_LEN) if (len_directory >= INFO_CLIENT_MAX_CB_LEN)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "ERROR [xrdp_sec_process_logon_info()]: len_directory >= %d", INFO_CLIENT_MAX_CB_LEN); LOG(LOG_LEVEL_ERROR, "ERROR [xrdp_sec_process_logon_info()]: len_directory >= %d", INFO_CLIENT_MAX_CB_LEN);
return 1; return 1;
} }
@ -833,7 +833,7 @@ xrdp_sec_process_logon_info(struct xrdp_sec *self, struct stream *s)
in_uint8s(s, len_password + 2); in_uint8s(s, len_password + 2);
if (self->rdp_layer->client_info.require_credentials) if (self->rdp_layer->client_info.require_credentials)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_process_logon_info: credentials on cmd line is mandatory"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_process_logon_info: credentials on cmd line is mandatory");
return 1; /* credentials on cmd line is mandatory */ return 1; /* credentials on cmd line is mandatory */
} }
} }
@ -1180,7 +1180,7 @@ xrdp_sec_recv_fastpath(struct xrdp_sec *self, struct stream *s)
int pad; int pad;
#ifndef XRDP_DEBUG #ifndef XRDP_DEBUG
/* TODO: remove UNUSED_VAR once the `var` variable is used for more than /* TODO: remove UNUSED_VAR once the `var` variable is used for more than
logging in debug mode */ logging in debug mode */
UNUSED_VAR(ver); UNUSED_VAR(ver);
#endif #endif
@ -1252,8 +1252,8 @@ xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
if (xrdp_mcs_recv(self->mcs_layer, s, chan) != 0) if (xrdp_mcs_recv(self->mcs_layer, s, chan) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_sec_recv : error"); LOG(LOG_LEVEL_ERROR, " out xrdp_sec_recv : error");
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_recv: xrdp_mcs_recv failed"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_recv: xrdp_mcs_recv failed");
return 1; return 1;
} }
@ -1342,7 +1342,7 @@ xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
{ {
if (xrdp_sec_process_logon_info(self, s) != 0) if (xrdp_sec_process_logon_info(self, s) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_sec_recv error"); LOG(LOG_LEVEL_ERROR, " out xrdp_sec_recv error");
return 1; return 1;
} }
@ -1350,7 +1350,7 @@ xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
{ {
if (xrdp_sec_send_media_lic_response(self) != 0) if (xrdp_sec_send_media_lic_response(self) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_sec_recv error"); LOG(LOG_LEVEL_ERROR, " out xrdp_sec_recv error");
return 1; return 1;
} }
@ -1360,7 +1360,7 @@ xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
if (xrdp_sec_send_lic_initial(self) != 0) if (xrdp_sec_send_lic_initial(self) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_sec_recv error"); LOG(LOG_LEVEL_ERROR, " out xrdp_sec_recv error");
return 1; return 1;
} }
@ -1373,7 +1373,7 @@ xrdp_sec_recv(struct xrdp_sec *self, struct stream *s, int *chan)
{ {
if (xrdp_sec_send_lic_response(self) != 0) if (xrdp_sec_send_lic_response(self) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " out xrdp_sec_recv error"); LOG(LOG_LEVEL_ERROR, " out xrdp_sec_recv error");
return 1; return 1;
} }
@ -1773,19 +1773,19 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
in_uint32_le(s, crypt_method); in_uint32_le(s, crypt_method);
if (crypt_method & CRYPT_METHOD_40BIT) if (crypt_method & CRYPT_METHOD_40BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client supports 40 bit encryption"); LOG(LOG_LEVEL_INFO, " client supports 40 bit encryption");
} }
if (crypt_method & CRYPT_METHOD_128BIT) if (crypt_method & CRYPT_METHOD_128BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client supports 128 bit encryption"); LOG(LOG_LEVEL_INFO, " client supports 128 bit encryption");
} }
if (crypt_method & CRYPT_METHOD_56BIT) if (crypt_method & CRYPT_METHOD_56BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client supports 56 bit encryption"); LOG(LOG_LEVEL_INFO, " client supports 56 bit encryption");
} }
if (crypt_method & CRYPT_METHOD_FIPS) if (crypt_method & CRYPT_METHOD_FIPS)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client supports fips encryption"); LOG(LOG_LEVEL_INFO, " client supports fips encryption");
} }
found = 0; found = 0;
if ((found == 0) && if ((found == 0) &&
@ -1794,7 +1794,7 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
{ {
if (crypt_method & CRYPT_METHOD_FIPS) if (crypt_method & CRYPT_METHOD_FIPS)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client and server support fips, using fips"); LOG(LOG_LEVEL_INFO, " client and server support fips, using fips");
self->crypt_method = CRYPT_METHOD_FIPS; self->crypt_method = CRYPT_METHOD_FIPS;
self->crypt_level = CRYPT_LEVEL_FIPS; self->crypt_level = CRYPT_LEVEL_FIPS;
found = 1; found = 1;
@ -1806,8 +1806,8 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
{ {
if (crypt_method & CRYPT_METHOD_128BIT) if (crypt_method & CRYPT_METHOD_128BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client and server support high crypt, using " LOG(LOG_LEVEL_INFO, " client and server support high crypt, using "
"high crypt"); "high crypt");
self->crypt_method = CRYPT_METHOD_128BIT; self->crypt_method = CRYPT_METHOD_128BIT;
self->crypt_level = CRYPT_LEVEL_HIGH; self->crypt_level = CRYPT_LEVEL_HIGH;
found = 1; found = 1;
@ -1819,8 +1819,8 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
{ {
if (crypt_method & CRYPT_METHOD_40BIT) if (crypt_method & CRYPT_METHOD_40BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client and server support medium crypt, using " LOG(LOG_LEVEL_INFO, " client and server support medium crypt, using "
"medium crypt"); "medium crypt");
self->crypt_method = CRYPT_METHOD_40BIT; self->crypt_method = CRYPT_METHOD_40BIT;
self->crypt_level = CRYPT_LEVEL_CLIENT_COMPATIBLE; self->crypt_level = CRYPT_LEVEL_CLIENT_COMPATIBLE;
found = 1; found = 1;
@ -1832,8 +1832,8 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
{ {
if (crypt_method & CRYPT_METHOD_40BIT) if (crypt_method & CRYPT_METHOD_40BIT)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client and server support low crypt, using " LOG(LOG_LEVEL_INFO, " client and server support low crypt, using "
"low crypt"); "low crypt");
self->crypt_method = CRYPT_METHOD_40BIT; self->crypt_method = CRYPT_METHOD_40BIT;
self->crypt_level = CRYPT_LEVEL_LOW; self->crypt_level = CRYPT_LEVEL_LOW;
found = 1; found = 1;
@ -1844,8 +1844,8 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream *s)
{ {
if (crypt_method == CRYPT_METHOD_NONE) if (crypt_method == CRYPT_METHOD_NONE)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, " client and server support none crypt, using " LOG(LOG_LEVEL_INFO, " client and server support none crypt, using "
"none crypt"); "none crypt");
self->crypt_method = CRYPT_METHOD_NONE; self->crypt_method = CRYPT_METHOD_NONE;
self->crypt_level = CRYPT_LEVEL_NONE; self->crypt_level = CRYPT_LEVEL_NONE;
found = 1; found = 1;
@ -1947,16 +1947,16 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s)
//verify flags - must be 0x0 //verify flags - must be 0x0
if (flags != 0) if (flags != 0)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "[ERROR] xrdp_sec_process_mcs_data_monitors: flags MUST be " LOG(LOG_LEVEL_ERROR, "[ERROR] xrdp_sec_process_mcs_data_monitors: flags MUST be "
"zero, detected: %d", flags); "zero, detected: %d", flags);
return 1; return 1;
} }
in_uint32_le(s, monitorCount); in_uint32_le(s, monitorCount);
//verify monitorCount - max 16 //verify monitorCount - max 16
if (monitorCount > 16) if (monitorCount > 16)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "[ERROR] xrdp_sec_process_mcs_data_monitors: max allowed " LOG(LOG_LEVEL_ERROR, "[ERROR] xrdp_sec_process_mcs_data_monitors: max allowed "
"monitors is 16, detected: %d", monitorCount); "monitors is 16, detected: %d", monitorCount);
return 1; return 1;
} }
@ -2030,7 +2030,7 @@ xrdp_sec_process_mcs_data_monitors(struct xrdp_sec *self, struct stream *s)
if (client_info->width > 0x7FFE || client_info->width < 0xC8 || if (client_info->width > 0x7FFE || client_info->width < 0xC8 ||
client_info->height > 0x7FFE || client_info->height < 0xC8) client_info->height > 0x7FFE || client_info->height < 0xC8)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "[ERROR] xrdp_sec_process_mcs_data_monitors: error, virtual desktop width / height is too large"); LOG(LOG_LEVEL_ERROR, "[ERROR] xrdp_sec_process_mcs_data_monitors: error, virtual desktop width / height is too large");
return 1; /* error */ return 1; /* error */
} }
@ -2076,8 +2076,8 @@ xrdp_sec_process_mcs_data(struct xrdp_sec *self)
if ((size < 4) || (!s_check_rem(s, size - 4))) if ((size < 4) || (!s_check_rem(s, size - 4)))
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "error in xrdp_sec_process_mcs_data tag %d size %d", LOG(LOG_LEVEL_ERROR, "error in xrdp_sec_process_mcs_data tag %d size %d",
tag, size); tag, size);
break; break;
} }
@ -2119,8 +2119,8 @@ xrdp_sec_process_mcs_data(struct xrdp_sec *self)
SC_MCS_MSGCHANNEL 0x0C04 SC_MCS_MSGCHANNEL 0x0C04
SC_MULTITRANSPORT 0x0C08 */ SC_MULTITRANSPORT 0x0C08 */
default: default:
LOG_DEVEL(LOG_LEVEL_INFO, "error unknown xrdp_sec_process_mcs_data " LOG(LOG_LEVEL_ERROR, "error unknown xrdp_sec_process_mcs_data "
"tag 0x%4.4x size %d", tag, size); "tag 0x%4.4x size %d", tag, size);
break; break;
} }
@ -2132,10 +2132,10 @@ xrdp_sec_process_mcs_data(struct xrdp_sec *self)
if (self->rdp_layer->client_info.bpp > if (self->rdp_layer->client_info.bpp >
self->rdp_layer->client_info.max_bpp) self->rdp_layer->client_info.max_bpp)
{ {
LOG_DEVEL(LOG_LEVEL_INFO, "xrdp_rdp_parse_client_mcs_data: client asked " LOG(LOG_LEVEL_INFO, "xrdp_rdp_parse_client_mcs_data: client asked "
"for %dbpp connection but configuration is limited " "for %dbpp connection but configuration is limited "
"to %dbpp", self->rdp_layer->client_info.bpp, "to %dbpp", self->rdp_layer->client_info.bpp,
self->rdp_layer->client_info.max_bpp); self->rdp_layer->client_info.max_bpp);
self->rdp_layer->client_info.bpp = self->rdp_layer->client_info.bpp =
self->rdp_layer->client_info.max_bpp; self->rdp_layer->client_info.max_bpp;
} }
@ -2281,7 +2281,7 @@ xrdp_sec_incoming(struct xrdp_sec *self)
/* negotiate security layer */ /* negotiate security layer */
if (xrdp_iso_incoming(iso) != 0) if (xrdp_iso_incoming(iso) != 0)
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "xrdp_sec_incoming: xrdp_iso_incoming failed"); LOG(LOG_LEVEL_ERROR, "xrdp_sec_incoming: xrdp_iso_incoming failed");
return 1; return 1;
} }

View File

@ -111,7 +111,7 @@ xrdp_surface_send_surface_bits(struct xrdp_surface *self, int bpp, char *data,
} }
else else
{ {
LOG_DEVEL(LOG_LEVEL_TRACE, "bpp = %d is not supported\n", bpp); LOG(LOG_LEVEL_ERROR, "bpp = %d is not supported\n", bpp);
return 1; return 1;
} }