/[rdesktop]/sourceforge.net/trunk/rdesktop/rdp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 436 by jsorg71, Mon Jul 28 18:13:30 2003 UTC revision 437 by jsorg71, Mon Jul 28 21:41:12 2003 UTC
# Line 21  Line 21 
21  #include "rdesktop.h"  #include "rdesktop.h"
22    
23  extern uint16 g_mcs_userid;  extern uint16 g_mcs_userid;
24  extern char username[16];  extern char g_username[16];
25  extern BOOL bitmap_compression;  extern BOOL g_bitmap_compression;
26  extern BOOL orders;  extern BOOL g_orders;
27  extern BOOL encryption;  extern BOOL g_encryption;
28  extern BOOL desktop_save;  extern BOOL desktop_save;
29  extern BOOL use_rdp5;  extern BOOL use_rdp5;
30  extern uint16 server_rdp_version;  extern uint16 server_rdp_version;
# Line 84  rdp_init_data(int maxlen) Line 84  rdp_init_data(int maxlen)
84  {  {
85          STREAM s;          STREAM s;
86    
87          s = sec_init(encryption ? SEC_ENCRYPT : 0, maxlen + 18);          s = sec_init(g_encryption ? SEC_ENCRYPT : 0, maxlen + 18);
88          s_push_layer(s, rdp_hdr, 18);          s_push_layer(s, rdp_hdr, 18);
89    
90          return s;          return s;
# Line 111  rdp_send_data(STREAM s, uint8 data_pdu_t Line 111  rdp_send_data(STREAM s, uint8 data_pdu_t
111          out_uint8(s, 0);        /* compress_type */          out_uint8(s, 0);        /* compress_type */
112          out_uint16(s, 0);       /* compress_len */          out_uint16(s, 0);       /* compress_len */
113    
114          sec_send(s, encryption ? SEC_ENCRYPT : 0);          sec_send(s, g_encryption ? SEC_ENCRYPT : 0);
115  }  }
116    
117  /* Output a string in Unicode */  /* Output a string in Unicode */
# Line 144  rdp_send_logon_info(uint32 flags, char * Line 144  rdp_send_logon_info(uint32 flags, char *
144          int len_ip = 2 * strlen("127.0.0.1");          int len_ip = 2 * strlen("127.0.0.1");
145          int len_dll = 2 * strlen("C:\\WINNT\\System32\\mstscax.dll");          int len_dll = 2 * strlen("C:\\WINNT\\System32\\mstscax.dll");
146          int packetlen = 0;          int packetlen = 0;
147          uint32 sec_flags = encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO;          uint32 sec_flags = g_encryption ? (SEC_LOGON_INFO | SEC_ENCRYPT) : SEC_LOGON_INFO;
148          STREAM s;          STREAM s;
149    
150          if (!use_rdp5 || 1 == server_rdp_version)          if (!use_rdp5 || 1 == server_rdp_version)
# Line 387  rdp_out_bitmap_caps(STREAM s) Line 387  rdp_out_bitmap_caps(STREAM s)
387          out_uint16_le(s, 600);  /* Desktop height */          out_uint16_le(s, 600);  /* Desktop height */
388          out_uint16(s, 0);       /* Pad */          out_uint16(s, 0);       /* Pad */
389          out_uint16(s, 0);       /* Allow resize */          out_uint16(s, 0);       /* Allow resize */
390          out_uint16_le(s, bitmap_compression ? 1 : 0);   /* Support compression */          out_uint16_le(s, g_bitmap_compression ? 1 : 0); /* Support compression */
391          out_uint16(s, 0);       /* Unknown */          out_uint16(s, 0);       /* Unknown */
392          out_uint16_le(s, 1);    /* Unknown */          out_uint16_le(s, 1);    /* Unknown */
393          out_uint16(s, 0);       /* Pad */          out_uint16(s, 0);       /* Pad */
# Line 546  static void Line 546  static void
546  rdp_send_confirm_active(void)  rdp_send_confirm_active(void)
547  {  {
548          STREAM s;          STREAM s;
549          uint32 sec_flags = encryption ? (RDP5_FLAG | SEC_ENCRYPT) : RDP5_FLAG;          uint32 sec_flags = g_encryption ? (RDP5_FLAG | SEC_ENCRYPT) : RDP5_FLAG;
550          uint16 caplen =          uint16 caplen =
551                  RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER +                  RDP_CAPLEN_GENERAL + RDP_CAPLEN_BITMAP + RDP_CAPLEN_ORDER +
552                  RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE +                  RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE +
# Line 898  BOOL Line 898  BOOL
898  rdp_connect(char *server, uint32 flags, char *domain, char *password,  rdp_connect(char *server, uint32 flags, char *domain, char *password,
899              char *command, char *directory)              char *command, char *directory)
900  {  {
901          if (!sec_connect(server, username))          if (!sec_connect(server, g_username))
902                  return False;                  return False;
903    
904          rdp_send_logon_info(flags, domain, username, password, command, directory);          rdp_send_logon_info(flags, domain, g_username, password, command, directory);
905          return True;          return True;
906  }  }
907    

Legend:
Removed from v.436  
changed lines
  Added in v.437

  ViewVC Help
Powered by ViewVC 1.1.26