Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set PCSCLITE_CSOCK_NAME env var #963

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from
Open

Conversation

jsorg71
Copy link
Contributor

@jsorg71 jsorg71 commented Nov 29, 2017

No description provided.

@jsorg71 jsorg71 self-assigned this Nov 29, 2017
@metalefty
Copy link
Member

Check for PCSC sockets should be added to x_server_running_check_ports()?

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 7, 2017

Yes, thanks

@mvalente
Copy link

OK, trying to test this but having some problems.

As I stated before, but restating:

  • I have a Ubuntu MATE 17.10 running perfectly with xrdp, latest repository update. I can use RDC on Windows and connect to it, logging in with an AD credential.

  • I have a working USB card reader, Windows side. On the Linux side I have overwriten the system's default pcsclite lib with xrdp's version. On a console, when I run pcsc_scan I get "One card found", but the card cant be read by any application.

  • further debugging shows this on loop from pcsc_scan

Waiting for the first reader...found one
Scanning present readers...
SCardListReaders:
SCardListReaders: mszGroups (null)
SCardListReaders: *pcchReaders 1
send_message:
0000 06 00 00 00 00 00 00 00 00 00 00 00 ............
get_message:
get_message: loop
SCardListReaders: mszReaders (nil) pcchReaders 0x7fff5e9d6858 num_readers 0
SCardListReaders: status 0x00000000
SCardListReaders:
SCardListReaders: mszGroups (null)
SCardListReaders: *pcchReaders 0
send_message:
0000 06 00 00 00 00 00 00 00 00 00 00 00 ............
get_message:
get_message: loop
SCardListReaders: mszReaders 0x5605a218f670 pcchReaders 0x7fff5e9d6858 num_readers 0
SCardListReaders: status 0x00000000

  • I built this devel version (the one that sets PCSCLITE_CSOCK_NAME) and installed it
  • replaced xrdp's pcsclite lib with the original lib
  • when connecting from Windows using RDC I get the following result (see screenshot); all other files, namely config files, are the same as before:

image

Any help on how to solve or further debug is appreciated.

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 14, 2017

early version did that
sha1 should be 693016a
can you run xrdp and xrdp-sesman in forground to see what happens?

@mvalente
Copy link

Here's the output of foreground xrdp --n

root@LS1710-2:~/xrdp-693016a70c60e3323a414430128596dae98646d6# xrdp -n
logging configuration:
LogFile: /var/log/xrdp.log
LogLevel: 4
EnableSyslog: 1
SyslogLevel: 4
[20171215-12:30:46] [INFO ] starting xrdp with pid 19810
[20171215-12:30:46] [INFO ] listening to port 3389 on 0.0.0.0
[20171215-12:33:39] [INFO ] Socket 12: AF_INET connection received from 172.24.27.178 port 60991
[20171215-12:33:39] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:33:39] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:33:39] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20171215-12:33:39] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20171215-12:33:39] [DEBUG] Security layer: requested 11, selected 1
ssl_tls_accept: TLS connection accepted
ssl_tls_print_error: SSL_read: I/O error
libxrdp_force_read: error
xrdp_process_main_loop: libxrdp_process_incoming failed
got XRDP SIGPIPE(13)
got XRDP SIGPIPE(13)
ssl_tls_print_error: SSL_shutdown: I/O error
[20171215-12:33:39] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
xrdp_mcs_disconnect - socket closed
[20171215-12:33:39] [ERROR] Listening socket is in wrong state, terminating listener
[20171215-12:33:39] [CORE ] shutting down log subsystem...
[20171215-12:33:41] [INFO ] Socket 12: AF_INET connection received from 172.24.27.178 port 60992
[20171215-12:33:41] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:33:41] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:33:41] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20171215-12:33:41] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20171215-12:33:41] [DEBUG] Security layer: requested 11, selected 1
ssl_tls_accept: TLS connection accepted
colorDepth 0xca01 (0xca00 4bpp 0xca01 8bpp)
[20171215-12:33:41] [INFO ] connected client computer name: BEP-V004
postBeta2ColorDepth 0xca01 (0xca00 4bpp 0xca01 8bpp 0xca02 15bpp 0xca03 16bpp 0xca04 24bpp)
highColorDepth 0x0018 (0x0004 4bpp 0x0008 8bpp 0x000f 15bpp 0x0010 16 bpp 0x0018 24bpp)
supportedColorDepths 0x000f (0x0001 24bpp 0x0002 16bpp 0x0004 15bpp 0x0008 32bpp)
earlyCapabilityFlags 0x07ad (0x0002 want32)
got client client connection type 0x00000007
xrdp_sec_process_mcs_data_CS_SECURITY:
client supports 40 bit encryption
client supports 128 bit encryption
client supports 56 bit encryption
client supports fips encryption
error unknown xrdp_sec_process_mcs_data tag 0xc006 size 8
error unknown xrdp_sec_process_mcs_data tag 0xc00a size 8
xrdp_sec_out_mcs_data: using no security
xrdp_load_keyboard_layout: keyboard_type [7] keyboard_subtype [0]
xrdp_load_keyboard_layout: model [] variant [] layout [pt] options []
[20171215-12:33:41] [INFO ] TLS connection established from 172.24.27.178 port 60992: TLSv1.2 with cipher AES256-GCM-SHA384
xrdp_caps_process_order: bitmap cache v3 supported
xrdp_caps_process_pointer: client supports new(color) cursor
xrdp_process_offscreen_bmpcache: support level 1 cache size 7864320 MB cache entries 100
xrdp_caps_process_surface_cmds:
cmdFlags 0x00000052
xrdp_caps_process_frame_ack:
max_unacknowledged_frame_count 2
xrdp_process_capset_window wnd_support_level 2 wnd_num_icon_caches 3 wnd_num_icon_cache_entries 12
xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
xrdp_caps_process_codecs: unknown codec id 5
xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
yeah, up_and_running
xrdp:xrdp_bitmap [1512733752]: xrdp_bitmap_create: noorders
[20171215-12:33:41] [DEBUG] xrdp_00004d88_wm_login_mode_event_00000001
xrdp:xrdp_mm [1512733774]: xrdp_mm_create: bpp 24 mcs_connection_type 7 jpeg_codec_id 0 v3_codec_id 0 rfx_codec_id 3 h264_codec_id 0
[20171215-12:33:41] [INFO ] Loading keymap file /etc/xrdp/km-00000816.ini
[20171215-12:33:41] [WARN ] local keymap file for 0x00000816 found and doesn't match built in keymap, using local keymap file
xrdp_wm_login_mode_changed: login_mode is 0
in xrdp_wm_init:
xrdp_wm_init: no autologin / auto run detected, draw login window
xrdp:xrdp_cache [1512733805]: xrdp_cache_add_bitmap: reset detected cache_id 2
xrdp:xrdp_cache [1512733807]: xrdp_cache_add_bitmap: reset detected cache_id 1
out xrdp_wm_init:
xrdp_wm_login_mode_changed: login_mode is 1
xrdp_wm_login_mode_changed: login_mode is 2
[20171215-12:33:53] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
connecting to sesman ip 127.0.0.1 port 3350
[20171215-12:33:54] [INFO ] xrdp_wm_log_msg: sesman connect ok
sesman connect ok
[20171215-12:33:54] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
sending login info to session manager, please wait...
[20171215-12:33:54] [DEBUG] return value from xrdp_mm_connect 0
xrdp_wm_login_mode_changed: login_mode is 3
[20171215-12:33:56] [INFO ] xrdp_wm_log_msg: login successful for display 11
login successful for display 11
loaded module 'libxup.so' ok, interface size 8456, version 3
[20171215-12:33:56] [DEBUG] xrdp_wm_log_msg: started connecting
started connecting
[20171215-12:34:00] [DEBUG] Closed socket 19 (AF_UNIX)

.....a bunch of these....

[20171215-12:37:23] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:26] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
connection problem, giving up
[20171215-12:37:26] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:26] [DEBUG] xrdp_wm_log_msg: some problem
some problem
[20171215-12:37:26] [DEBUG] xrdp_mm_module_cleanup
[20171215-12:37:26] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:56578)
xrdp_wm_login_mode_changed: login_mode is 11
rdpRRGetInfo:
rdpRRGetInfo:
xrdp_wm_login_mode_changed: login_mode is 0
in xrdp_wm_init:
xrdp_wm_init: no autologin / auto run detected, draw login window
out xrdp_wm_init:
xrdp_wm_login_mode_changed: login_mode is 1
[20171215-12:52:28] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
xrdp_mcs_disconnect - socket closed
[20171215-12:52:28] [DEBUG] xrdp_mm_module_cleanup
xrdp:xrdp_encoder [1513860035]: xrdp_encoder_delete:
[20171215-12:52:28] [ERROR] Listening socket is in wrong state, terminating listener
[20171215-12:52:28] [CORE ] shutting down log subsystem...
^Cshutting down
signal 2 threadid 140589560694592
[20171215-12:52:47] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:52:47] [CORE ] shutting down log subsystem...

@mvalente
Copy link

Here's the output of foreground xrdp-sesman -n

root@LS1710-2:~# xrdp-sesman -n
starting sesman in foreground...
sesman config:
ListenAddress: 127.0.0.1
ListenPort: 3350
EnableUserWindowManager: 1
UserWindowManager: startwm.sh
DefaultWindowManager: startwm.sh
AuthFilePath: disabled
Xvnc parameters:
Parameter 00 Xvnc
Parameter 01 -bs
Parameter 02 -nolisten
Parameter 03 tcp
Parameter 04 -localhost
Parameter 05 -dpi
Parameter 06 96
X11rdp parameters:
Parameter 00 X11rdp
Parameter 01 -bs
Parameter 02 -nolisten
Parameter 03 tcp
Parameter 04 -uds
XOrg parameters:
Parameter 00 Xorg
Parameter 01 -config
Parameter 02 xrdp/xorg.conf
Parameter 03 -noreset
Parameter 04 -nolisten
Parameter 05 tcp
Parameter 06 -logfile
Parameter 07 .xorgxrdp.%s.log
security configuration:
AllowRootLogin: 1
MaxLoginRetry: 4
AlwaysGroupCheck: 0
No TSUsersGroup defined
No TSAdminsGroup defined
session configuration:
MaxSessions: 50
X11DisplayOffset: 10
KillDisconnected: 0
IdleTimeLimit: 0
DisconnectedTimeLimit: 0
Policy: 0
SessionVariables parameters:
Parameter 00 PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
logging configuration:
LogFile: /var/log/xrdp-sesman.log
LogLevel: 4
EnableSyslog: 1
SyslogLevel: 4
[20171215-12:31:35] [DEBUG] libscp initialized
[20171215-12:31:35] [INFO ] starting xrdp-sesman with pid 19845
[20171215-12:31:35] [INFO ] listening to port 3350 on 127.0.0.1
[20171215-12:33:53] [INFO ] A connection received from 127.0.0.1 port 56578
building the list of scripts to run
adding group Q049RnVsbElUIEFkbWluIFVzZXJzLE9VPUZ1bGxJVCxPVT1HcnVwb3MsT1U9R2VzdMOjbyxEQz1hci1zZXJ2aWNvcyxEQz1wdA==
adding group Q049RmFzdFBhc3MgTm90IFVzZXJzLE9VPUZhc3RQYXNzLE9VPUdydXBvcyxPVT1HZXN0w6NvLERDPWFyLXNlcnZpY29zLERDPXB0
adding group Q049TGVpdG9yZXMsT1U9TGVpdG9yZXMsT1U9QVJOZXQsT1U9R3J1cG9zLE9VPUdlc3TDo28sREM9YXItc2Vydmljb3MsREM9cHQ=
the filelist is Admin:Users.sh FastPass:Not:Users.sh Leitores.sh

.... bunch of output from local scripts deleted

++ CHARSET=utf8

  • TAG=linuxint-scripts

(process:19937): dconf-WARNING **: failed to commit changes to dconf: Não foi possível lançar automaticamente o D-Bus sem o $DISPLAY X-11

  • gsettings set org.mate.background show-desktop-icons true

(process:19941): dconf-WARNING **: failed to commit changes to dconf: Não foi possível lançar automaticamente o D-Bus sem o $DISPLAY X-11

  • for i in $FILELIST
    ++ sed 's/:/ /g'

  • DISTRIB_RELEASE=

  • '[' -f /etc/lsb-release ']'

  • . /etc/lsb-release
    ++ DISTRIB_ID=Ubuntu
    ++ DISTRIB_RELEASE=17.10
    ++ DISTRIB_CODENAME=artful
    ++ DISTRIB_DESCRIPTION='Ubuntu 17.10'

  • echo 'LOGIN - OK'

    .... proceeding normal run after local scripts

LOGIN - OK

  • exit 0
    [20171215-12:33:56] [INFO ] ++ created session (access granted): username fmvalente, ip 172.24.27.178:60992 - socket: 12
    [20171215-12:33:56] [INFO ] starting Xorg session...
    [20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:5911)
    [20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:6011)
    [20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:6211)
    [20171215-12:33:56] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
    [20171215-12:33:56] [INFO ] calling auth_start_session from pid 20097
    [20171215-12:33:56] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
    [20171215-12:33:56] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
    [20171215-12:33:57] [INFO ] Xorg :11 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log

X.Org X Server 1.19.5
Release Date: 2017-10-12
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-97-generic x86_64 Ubuntu
Current Operating System: Linux LS1710-2 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.13.0-16-generic root=UUID=5f445233-ff06-4a06-961e-491669361c79 ro quiet splash
Build Date: 15 October 2017 05:51:19PM
xorg-server 2:1.19.5-0ubuntu2 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: ".xorgxrdp.11.log", Time: Fri Dec 15 12:33:57 2017
(++) Using config file: "/etc/X11/xrdp/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xorgxrdpSetup:[20171215-12:33:57] [CORE ] waiting for window manager (pid 20100) to exit

/etc/xrdp/startwm.sh: 2: [: x: unexpected operator
/etc/xrdp/startwm.sh: 2: [: x: unexpected operator
xrdpdevSetup:
rdpmousePlug:
rdpkeybPlug:
rdpIdentify:
rdpDriverFunc: op 10
rdpProbe:
rdpPreInit:
rdpScreenInit: virtualX 800 virtualY 600 rgbBits 8 depth 24
rdpScreenInit: pfbMemory bytes 1920000
rdpScreenInit: pfbMemory 0x7f113f846010
rdpSimdInit: assigning yuv functions
rdpSimdInit: cpuid ax 1 cx 0 return ax 0x000306f0 bx 0x00010800 cx 0xfffa3203 dx 0x0fabfbff
rdpSimdInit: sse2 amd64 yuv functions assigned
rdpXvInit: depth 24
chansrv::main: using log file [/home/AR-SERVICOS/fmvalente/.local/share/xrdp/xrdp-chansrv.11.log]
rdpup_init: /var/run/xrdp/sockdir does not exist
rdpScreenInit: out
[20171215-12:33:57] [CORE ] main: app started pid 20104(0x00004e88)
[20171215-12:33:57] [INFO ] main: DISPLAY env var set to :11.0
[20171215-12:33:57] [INFO ] main: using DISPLAY 11
[20171215-12:33:57] [INFO ] channel_thread_loop: thread start
rdpmousePreInit: drv 0x5614041ff280 info 0x56140449ecb0, flags 0x0
rdpmouseControl: what 0
rdpmouseDeviceInit:
rdpmouseCtrl:
rdpRegisterInputCallback: type 1 proc 0x7f113fc1fc70
rdpmouseControl: what 1
rdpmouseDeviceOn:
rdpkeybPreInit: drv 0x561404200f70 info 0x5614044a15a0, flags 0x0
rdpkeybControl: what 0
rdpkeybDeviceInit:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpRegisterInputCallback: type 0 proc 0x7f113fa1c530
rdpkeybControl: what 1
rdpkeybDeviceOn:
rdpSaveScreen:
rdpDeferredRandR:
rdpResizeSession: width 1024 height 768
calling RRScreenSizeSet
rdpRRScreenSetSize: width 1024 height 768 mmWidth 271 mmHeight 203
rdpRRGetInfo:
screen resized to 1024x768
RRScreenSizeSet ok 1
rdpResizeSession: width 1440 height 900
calling RRScreenSizeSet
rdpRRScreenSetSize: width 1440 height 900 mmWidth 381 mmHeight 238
rdpRRGetInfo:
screen resized to 1440x900
RRScreenSizeSet ok 1
rdpInDeferredUpdateCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpRRGetInfo:
rdpRRGetInfo:
rdpRRGetInfo:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpRRGetInfo:
rdpRRGetInfo:
rdpRRGetInfo:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat on
rdpmouseCtrl:
rdpInDeferredUpdateCallback:
rdpkeybChangeKeyboardControl:
rdpkeybChangeKeyboardControl: autoRepeat off
rdpRRGetInfo:
rdpRRGetInfo:
rdpRRGetInfo:
rdpSaveScreen:
^C[20171215-12:52:37] [INFO ] term_signal_handler: got signal 2
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [INFO ] channel_thread_loop: g_term_event set
xrdp-chansrv [1513869135]: scard_deinit:
chansrv:smartcard_pcsc [1513869135]: scard_pcsc_deinit:
[20171215-12:52:37] [INFO ] channel_thread_loop: thread stop
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [INFO ] main: app exiting pid 20104(0x00004e88)
[20171215-12:52:37] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20171215-12:52:37] [CORE ] shutting down log subsystem...
root@LS1710-2:~# [20171215-12:52:37] [CORE ] window manager (pid 20100) did exit, cleaning up session
[20171215-12:52:37] [INFO ] calling auth_stop_session and auth_end from pid 20097
rdpmouseControl: what 2
rdpmouseDeviceOff:
rdpkeybControl: what 2
rdpkeybDeviceOff:
rdpSaveScreen:
rdpkeybControl: what 3
rdpkeybUnInit: drv 0x561404200f70 info 0x5614044a15a0, flags 0x0
rdpUnregisterInputCallback: proc 0x7f113fa1c530
rdpmouseControl: what 3
rdpmouseUnInit: drv 0x5614041ff280 info 0x56140449ecb0, flags 0x0
rdpUnregisterInputCallback: proc 0x7f113fc1fc70
rdpCloseScreen:
xorgxrdpDownDown:
xorgxrdpDownDown: 1
rdpClientConDeinit:
(II) Server terminated successfully (0). Closing log file.
[20171215-12:52:37] [DEBUG] cleanup_sockets:

root@LS1710-2:~#

@mvalente
Copy link

/var/log/xrdp.log

root@LS1710-2:~# cat /var/log/xrdp.log
[20171215-12:30:46] [INFO ] starting xrdp with pid 19810
[20171215-12:30:46] [INFO ] listening to port 3389 on 0.0.0.0
[20171215-12:33:39] [INFO ] Socket 12: AF_INET connection received from 172.24.27.178 port 60991
[20171215-12:33:39] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:33:39] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:33:39] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20171215-12:33:39] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20171215-12:33:39] [DEBUG] Security layer: requested 11, selected 1
[20171215-12:33:39] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:33:39] [ERROR] Listening socket is in wrong state, terminating listener
[20171215-12:33:39] [CORE ] shutting down log subsystem...
[20171215-12:33:41] [INFO ] Socket 12: AF_INET connection received from 172.24.27.178 port 60992
[20171215-12:33:41] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:33:41] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:33:41] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20171215-12:33:41] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20171215-12:33:41] [DEBUG] Security layer: requested 11, selected 1
[20171215-12:33:41] [INFO ] connected client computer name: BEP-V004
[20171215-12:33:41] [INFO ] TLS connection established from 172.24.27.178 port 60992: TLSv1.2 with cipher AES256-GCM-SHA384
[20171215-12:33:41] [DEBUG] xrdp_00004d88_wm_login_mode_event_00000001
[20171215-12:33:41] [INFO ] Loading keymap file /etc/xrdp/km-00000816.ini
[20171215-12:33:41] [WARN ] local keymap file for 0x00000816 found and doesn't match built in keymap, using local keymap file
[20171215-12:33:53] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20171215-12:33:54] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20171215-12:33:54] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20171215-12:33:54] [DEBUG] return value from xrdp_mm_connect 0
[20171215-12:33:56] [INFO ] xrdp_wm_log_msg: login successful for display 11
[20171215-12:33:56] [DEBUG] xrdp_wm_log_msg: started connecting
[20171215-12:34:00] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:07] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:11] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:14] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:18] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:21] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:25] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:28] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:32] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:35] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:39] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:42] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:46] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:49] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:53] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:34:56] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:00] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:07] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:10] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:14] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:17] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:21] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:24] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:28] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:31] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:35] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:38] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:42] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:49] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:52] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:56] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:35:59] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:03] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:06] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:10] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:13] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:17] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:20] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:24] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:27] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:31] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:34] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:38] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:41] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:45] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:48] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:52] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:55] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:36:59] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:02] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:06] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:09] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:13] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:16] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:20] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:23] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:26] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
[20171215-12:37:26] [DEBUG] Closed socket 19 (AF_UNIX)
[20171215-12:37:26] [DEBUG] xrdp_wm_log_msg: some problem
[20171215-12:37:26] [DEBUG] xrdp_mm_module_cleanup
[20171215-12:37:26] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:56578)
[20171215-12:52:28] [DEBUG] Closed socket 12 (AF_INET 172.24.22.35:3389)
[20171215-12:52:28] [DEBUG] xrdp_mm_module_cleanup
[20171215-12:52:28] [ERROR] Listening socket is in wrong state, terminating listener
[20171215-12:52:28] [CORE ] shutting down log subsystem...
[20171215-12:52:47] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171215-12:52:47] [CORE ] shutting down log subsystem...

@mvalente
Copy link

/var/log/xrdp-sesman.log

root@LS1710-2:~# cat /var/log/xrdp-sesman.log
[20171215-12:31:35] [DEBUG] libscp initialized
[20171215-12:31:35] [INFO ] starting xrdp-sesman with pid 19845
[20171215-12:31:35] [INFO ] listening to port 3350 on 127.0.0.1
[20171215-12:33:53] [INFO ] A connection received from 127.0.0.1 port 56578
[20171215-12:33:56] [INFO ] ++ created session (access granted): username fmvalente, ip 172.24.27.178:60992 - socket: 12
[20171215-12:33:56] [INFO ] starting Xorg session...
[20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:5911)
[20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:6011)
[20171215-12:33:56] [DEBUG] Closed socket 5 (AF_INET 0.0.0.0:6211)
[20171215-12:33:56] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20171215-12:33:56] [INFO ] calling auth_start_session from pid 20097
[20171215-12:33:56] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20171215-12:33:56] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20171215-12:33:57] [INFO ] Xorg :11 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20171215-12:33:57] [CORE ] waiting for window manager (pid 20100) to exit
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [INFO ] shutting down sesman 1
[20171215-12:52:37] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20171215-12:52:37] [CORE ] shutting down log subsystem...
[20171215-12:52:37] [CORE ] window manager (pid 20100) did exit, cleaning up session
[20171215-12:52:37] [INFO ] calling auth_stop_session and auth_end from pid 20097
[20171215-12:52:37] [DEBUG] cleanup_sockets:

@mvalente
Copy link

mvalente commented Dec 15, 2017

early version did that
sha1 should be 693016a

That should be the sha1 for which version? The early one supposedly with the problem? Or the one that I should be using? For the record I'm using the one with sha1 693016a

@mvalente
Copy link

Anyone? Any help on how to solve or further debug is appreciated.

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 20, 2017

maybe this is a problem
/etc/xrdp/startwm.sh: 2: [: x: unexpected operator
What do you have on line 2 of this file?

@mvalente
Copy link

Not a problem, its irrelevant.

#!/bin/sh
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi

Any other ideas?

@mvalente
Copy link

Back to the stock release, with replacement pcsclite. Any help on how to debug? How can I find out if card info is reaching xrdp/chanserv?

@jsorg71 jsorg71 requested review from metalefty and removed request for metalefty March 21, 2018 23:36
@metalefty metalefty self-requested a review March 22, 2018 00:14
@@ -1954,10 +1961,10 @@ scard_send_Transmit(IRP *irp, char *context, int context_bytes,
val = send_bytes > 0 ? 0x00020008 : 0;
out_uint32_le(s, val); /* map3 */

val = recv_ior->cbPciLength > 0 ? 0x0002000c : 0;
val = recv_ior_is_null ? 0 : 0x00020008;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this constant come from?

g_snprintf(g_pcsclite_ipc_dir, 255, "%s/.pcsc%d", home, disp);

if (g_directory_exist(g_pcsclite_ipc_dir))
csock_name = g_getenv("XRDP_PCSCLITE_CSOCK_NAME");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see this environment variable is defined anywhere. Defined constant in env.c is PCSCLITE_CSOCK_NAME. No XRDP_ prefix.

@metalefty
Copy link
Member

Coding style changes should be done in the separated commit. Excluding in the case when coding style changes are small enough.

@zorgluf
Copy link

zorgluf commented Dec 23, 2020

Hi,
I've made a few modifications on a fork to jsorg71's great work, to make it working with recent pcsclite releases (1.8.8) : https://github.com/zorgluf/xrdp/tree/pcsc.

Made it working on RHEL7.9 with a gemalto MD840 and omnikey reader.
I tried a merge on v0.9.14 : https://github.com/zorgluf/xrdp/tree/pssc_0.9.14. It works also for the smartcard part, but not 100% I didn't break any other functions.

How can I contribute to this ? Knowing that my skills in dev are low... Probably need help on that side.
Should I open a new feature request ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants