Re: [ rdesktop-Bugs-2817779 ] Can't connect to WinServ 2008 SP2: "internal license error"

Thomas Uhle <[email protected]> Fri, 16 Sep 2011 20:40:56 +0200 (CEST)
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Hi Peter,

I am referring to the bug at https://sourceforge.net/tracker/?func=detail&atid=381347&aid=2817779&group_id=24366 .
You asked on 2011/04/18 whether someone could retry with the current 
version 1.7.0 and several guys confirmed that this is still an open 
issue. Since I have experienced the same problem, I thought to look 
into the matter more closely. rdesktop exits in 
handle_disconnect_reason() after receiving a disconnect PDU, please 
see the following two GDB backtraces:

(gdb) bt
#0  handle_disconnect_reason (deactivated=-4200936, reason=256)
    at rdesktop.c:283
283                             text = "Internal licensing error";
#1  0x00019eb0 in main (argc=13, argv=0xffbfea4c) at rdesktop.c:1040
1040            return handle_disconnect_reason(deactivated, ext_disc_reason);

(gdb) bt
#0  process_disconnect_pdu (s=0xd97a4, ext_disc_reason=0xffbfe604)
    at rdp.c:1382
1382            in_uint32_le(s, *ext_disc_reason);
#1  0x0004db34 in process_data_pdu (s=0xd97a4, ext_disc_reason=0xffbfe604)
    at rdp.c:1458
#2  0x0004e4c0 in rdp_loop (deactivated=0xffbfe610, ext_disc_reason=0xffbfe604)
    at rdp.c:1619
#3  0x0004e3a4 in rdp_main_loop (deactivated=0xffbfe610, ext_disc_reason=0xffbfe604)
    at rdp.c:1583
#4  0x00019df8 in main (argc=13, argv=0xffbfea4c) at rdesktop.c:1015


So I decided to recompile rdesktop with CFLAGS="-g -O0 -DWITH_DEBUG" 
and starting a new test session. The two session logs (one with the 
failure due to "Internal licensing error" and the other after removing 
the files in ~/.rdesktop/) differ only after the connection to the RDP 
server was successfully established. I have no clue how to proceed 
because I don't know that much about RDP. Maybe the session logs might 
help someone of you tracking down the issue. I stripped the logs so 
that you can see the difference.

(first try without cleaning ~/.rdesktop/)

[...]
Connection successful.
Sending encrypted packet:
0000 22 00 17 00 ee 03 00 00 00 00 00 01 14 00 1c 00 "...............
0010 00 00 01 00 00 00 e5 83 d6 4d 04 00 00 c1 5b 00 .........M....[.
0020 00 00                                           ..
Sending encrypted packet:
0000 22 00 17 00 ee 03 00 00 00 00 00 01 14 00 1c 00 "...............
0010 00 00 01 00 00 00 e5 83 d6 4d 00 00 00 00 02 00 .........M......
0020 00 00                                           ..
RDP packet #1, (type 7)
0000 16 00 17 00 00 00 00 00 00 00 00 01 16 00 2f 00 ............../.
0010 00 00 00 01 00 00                               ......
Received disconnect PDU
Disconnecting...
disconnect: Internal licensing error.
Exit 16


(second try after cleaning ~/.rdesktop/)

[...]
Connection successful.
Sending encrypted packet:
0000 22 00 17 00 ee 03 00 00 00 00 00 01 14 00 1c 00 "...............
0010 00 00 01 00 00 00 74 84 d6 4d 04 00 00 c1 5b 00 ......t..M....[.
0020 00 00                                           ..
Sending encrypted packet:
0000 22 00 17 00 ee 03 00 00 00 00 00 01 14 00 1c 00 "...............
0010 00 00 01 00 00 00 74 84 d6 4d 00 00 00 00 02 00 ......t..M......
0020 00 00                                           ..
RDP packet #1, (type 1)
0000 aa 01 11 00 ea 03 ea 03 01 00 04 00 94 01 52 44 ..............RD
0010 50 00 12 00 00 00 09 00 08 00 ea 03 00 00 01 00 P...............
0020 18 00 01 00 03 00 00 02 00 00 00 00 1d 04 00 00 ................
0030 00 00 00 00 01 01 14 00 0c 00 02 00 00 00 40 06 ..............@.
0040 00 00 16 00 28 00 01 00 00 00 ff ff ff ff 01 00 ....(...........
0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060 00 00 00 00 00 00 00 00 00 00 0e 00 08 00 01 00 ................
0070 00 00 02 00 1c 00 10 00 01 00 01 00 01 00 f4 04 ................
0080 9c 03 00 00 01 00 01 00 00 0e 01 00 00 00 1d 00 ................
0090 1b 00 01 b9 1b 8d ca 0f 00 4f 15 58 9f ae 2d 1a .........O.X..-.
00a0 87 e2 d6 01 03 00 01 01 03 03 00 58 00 00 00 00 ...........X....
00b0 00 00 00 00 00 00 00 00 00 00 00 00 00 40 42 0f .............@B.
00c0 00 01 00 14 00 00 00 01 00 00 00 aa 00 01 01 01 ................
00d0 01 01 00 00 01 01 01 00 01 00 00 00 01 01 01 01 ................
00e0 01 01 01 01 00 01 01 01 01 00 00 00 00 a1 06 06 ................
00f0 00 40 42 0f 00 40 42 0f 00 01 00 00 00 00 00 00 .@B..@B.........
0100 00 0a 00 08 00 06 00 00 00 12 00 08 00 01 00 00 ................
0110 00 08 00 0a 00 01 00 19 00 19 00 1b 00 06 00 01 ................
0120 00 0d 00 58 00 75 00 00 00 00 00 00 00 00 00 00 ...X.u..........
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0170 00 00 00 00 00 00 00 00 00 17 00 08 00 03 00 00 ................
0180 00 18 00 0b 00 02 00 00 00 03 0c 00 19 00 06 00 ................
0190 01 00 1a 00 08 00 af 94 00 00 1c 00 0c 00 02 00 ................
01a0 00 00 00 00 00 00 00 00 00 00                   ..........
DEMAND_ACTIVE(id=0x103ea)
setting desktop size and depth to: 1268x924x16
Sending encrypted packet:
0000 a4 01 13 00 ee 03 ea 03 01 00 ea 03 06 00 8e 01 ................
0010 4d 53 54 53 43 00 0e 00 00 00 01 00 18 00 01 00 MSTSC...........
0020 03 00 00 02 00 00 00 00 0d 04 00 00 00 00 00 00 ................
0030 00 00 02 00 1c 00 10 00 01 00 01 00 01 00 20 03 .............. .
0040 58 02 00 00 01 00 01 00 00 00 01 00 00 00 03 00 X...............
0050 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 X...............
0060 00 00 00 00 00 00 01 00 14 00 00 00 01 00 47 01 ..............G.
0070 2a 00 01 01 01 01 00 00 00 00 01 01 01 01 00 01 *...............
0080 01 00 00 00 00 00 01 01 01 00 00 01 01 01 00 00 ................
0090 00 00 a1 06 00 00 00 00 00 00 00 84 03 00 00 00 ................
00a0 00 00 e4 04 00 00 13 00 28 00 00 00 00 03 78 00 ........(.....x.
00b0 00 00 78 00 00 00 50 01 00 00 00 00 00 00 00 00 ..x...P.........
00c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 ................
00d0 0a 00 01 00 14 00 14 00 0a 00 08 00 06 00 00 00 ................
00e0 07 00 0c 00 00 00 00 00 00 00 00 00 05 00 0c 00 ................
00f0 00 00 00 00 02 00 02 00 09 00 08 00 00 00 00 00 ................
0100 0f 00 08 00 01 00 00 00 0d 00 58 00 01 00 00 00 ..........X.....
0110 09 04 00 00 04 00 00 00 00 00 00 00 0c 00 00 00 ................
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0160 0c 00 08 00 01 00 00 00 0e 00 08 00 01 00 00 00 ................
0170 10 00 34 00 fe 00 04 00 fe 00 04 00 fe 00 08 00 ..4.............
0180 fe 00 08 00 fe 00 10 00 fe 00 20 00 fe 00 40 00 .......... ...@.
0190 fe 00 80 00 fe 00 00 01 40 00 00 08 00 01 00 01 ........@.......
01a0 02 00 00 00                                     ....
Sending encrypted packet:
0000 16 00 17 00 ee 03 ea 03 01 00 00 01 08 00 1f 00 ................
0010 00 00 01 00 ea 03                               ......
Sending encrypted packet:
0000 1a 00 17 00 ee 03 ea 03 01 00 00 01 0c 00 14 00 ................
0010 00 00 04 00 00 00 00 00 00 00                   ..........
Sending encrypted packet:
0000 1a 00 17 00 ee 03 ea 03 01 00 00 01 0c 00 14 00 ................
0010 00 00 01 00 00 00 00 00 00 00                   ..........
RDP packet #2, (type 7)
0000 16 00 17 00 ea 03 ea 03 01 00 00 02 16 00 1f 00 ................
0010 00 00 01 00 00 00                               ......
RDP packet #3, (type 7)
0000 1a 00 17 00 ea 03 ea 03 01 00 00 02 1a 00 14 00 ................
0010 00 00 04 00 00 00 00 00 00 00                   ..........
RDP packet #4, (type 7)
0000 1a 00 17 00 ea 03 ea 03 01 00 00 02 1a 00 14 00 ................
0010 00 00 02 00 ee 03 ea 03 00 00                   ..........
Sending encrypted packet:
[... and so on ...]


Why does the content of the "first" two sent packets differ between the 
two cases (~/.rdesktop/ is empty and non-empty)? Should the file in 
~/.rdesktop/ perhaps automatically be removed after a proper log-off? Do 
you or does anybody else have a clue?

Thank you in advance for your help!


Thomas Uhle

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2