View | Details | Raw Unified | Return to bug 20525 | Differences between
and this patch

Collapse All | Expand All

(-)xrdp-0.5.0~20100303cvs.orig/rdp/rdp.c (+29 lines)
 Lines 21-26    Link Here 
21
*/
21
*/
22
22
23
#include "rdp.h"
23
#include "rdp.h"
24
#include <signal.h>
25
#include <stdio.h>
26
#include <unistd.h>
27
#include <signal.h>
28
#include <sys/types.h>
29
#include <string.h>
30
#include <stdlib.h>
24
31
25
/******************************************************************************/
32
/******************************************************************************/
26
/* return error */
33
/* return error */
 Lines 43-48    Link Here 
43
int DEFAULT_CC
50
int DEFAULT_CC
44
lib_mod_connect(struct mod* mod)
51
lib_mod_connect(struct mod* mod)
45
{
52
{
53
  FILE *fdpass;
54
  char passpath[256]= "/tmp/";
55
  char command[512] = "/usr/sbin/univention-dvs-sessionbroker-xrdp";
46
  DEBUG(("in lib_mod_connect"));
56
  DEBUG(("in lib_mod_connect"));
47
  /* clear screen */
57
  /* clear screen */
48
  mod->server_begin_update(mod);
58
  mod->server_begin_update(mod);
 Lines 50-55    Link Here 
50
  mod->server_fill_rect(mod, 0, 0, mod->width, mod->height);
60
  mod->server_fill_rect(mod, 0, 0, mod->width, mod->height);
51
  mod->server_end_update(mod);
61
  mod->server_end_update(mod);
52
  /* connect */
62
  /* connect */
63
  // hier reinhacken
64
  strcat(passpath,mod->username);
65
  fdpass = fopen(passpath,"w");
66
  fprintf(fdpass,"%s\n",mod->password);
67
  fclose(fdpass);
68
  //strcat(command,cmd);
69
  strcat(command," -u ");
70
  strcat(command,mod->username);
71
  strcat(command," -y ");
72
  strcat(command,passpath);
73
  mod->pid = (pid_t*) malloc(sizeof(pid_t));
74
  mod->fdpipe = popen(command, "r");
75
  fscanf(mod->fdpipe,"%i\n",mod->pid);
76
  fscanf(mod->fdpipe,"%s",mod->ip);
77
  remove(passpath);
53
  if (rdp_rdp_connect(mod->rdp_layer, mod->ip, mod->port) == 0)
78
  if (rdp_rdp_connect(mod->rdp_layer, mod->ip, mod->port) == 0)
54
  {
79
  {
55
    mod->sck = mod->rdp_layer->sec_layer->mcs_layer->iso_layer->tcp_layer->sck;
80
    mod->sck = mod->rdp_layer->sec_layer->mcs_layer->iso_layer->tcp_layer->sck;
 Lines 326-331    Link Here 
326
int EXPORT_CC
351
int EXPORT_CC
327
mod_exit(struct mod* mod)
352
mod_exit(struct mod* mod)
328
{
353
{
354
  kill(*(mod->pid),SIGUSR1);
355
  free(mod->pid);
356
  sleep(2);
357
  pclose(mod->fdpipe);
329
  DEBUG(("in mod_exit"));
358
  DEBUG(("in mod_exit"));
330
  g_free(mod);
359
  g_free(mod);
331
  DEBUG(("out mod_exit"));
360
  DEBUG(("out mod_exit"));
(-)xrdp-0.5.0~20100303cvs.orig/rdp/rdp.h (+4 lines)
 Lines 27-32    Link Here 
27
#include "ssl_calls.h"
27
#include "ssl_calls.h"
28
#include "xrdp_constants.h"
28
#include "xrdp_constants.h"
29
#include "defines.h"
29
#include "defines.h"
30
#include <stdio.h>
31
#include <sys/types.h>
30
32
31
struct rdp_brush
33
struct rdp_brush
32
{
34
{
 Lines 333-338    Link Here 
333
  char program[256];
335
  char program[256];
334
  char directory[256];
336
  char directory[256];
335
  int keylayout;
337
  int keylayout;
338
  FILE * fdpipe;
339
  pid_t *  pid;
336
  int up_and_running;
340
  int up_and_running;
337
  struct stream* in_s;
341
  struct stream* in_s;
338
  tbus sck_obj;
342
  tbus sck_obj;

Return to bug 20525