Khem Raj
d4e9b0f637
correct the location of errno.h
...
Fixes build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-22 23:11:50 -08:00
matt335672
0a1a8f40e5
Moved a lot of string funcs to string_calls module
2020-12-22 11:57:24 +00:00
matt335672
5523847540
Allow FuseMountName for chansrv to be absolute path
2020-12-21 12:36:31 +00:00
metalefty
785db575ca
Merge pull request #1751 from matt335672/address-minor-user-comments
...
Cosmetic fixes for minor issues
2020-12-21 16:12:58 +09:00
metalefty
61fd63f028
Merge pull request #1756 from metalefty/delete-socket-files
...
sesman: address the issue of socket file leftovers
2020-12-21 13:49:20 +09:00
metalefty
835536b406
Merge pull request #1741 from matt335672/sesrun-improvements
...
sesrun improvements and doc fixes
2020-12-21 13:45:57 +09:00
Koichiro IWAO
31214f15a6
sesman: reflect review suggestions on cleanup_sockets
...
* Use LOG_LEVEL_WARNING for the deletion failure
* Log the error condition when the deletion failed
2020-12-21 13:28:53 +09:00
metalefty
5b73fb9c31
Merge pull request #1755 from metalefty/man
...
man page fixes after neutrinolabs/xorgxrdp#175
2020-12-19 14:03:49 +09:00
Koichiro IWAO
5114d1ee64
sesman: address the issue of socket file leftovers
...
There are two points.
Make sure cleanup files happen after chansrv and Xserver exit. If these
child processes lock socket files, the deletion might fail.
Usually, cleanup of xorgxrdp related socket files is handled by
xorgxrdp. Just in case it failed, perform cleanup also in sesman.
Fixes #1740 . Thanks to @matt335672.
Sponsored by: Cybertrust Japan
Sponsored by: HAW International
2020-12-18 18:30:49 +09:00
Koichiro IWAO
6562c9d958
man page fixes after neutrinolabs/xorgxrdp#175
2020-12-18 15:21:21 +09:00
metalefty
87d710e89b
Merge pull request #1727 from RisingWater/devel
...
Update verify_user_pam.c
2020-12-17 16:15:43 +09:00
matt335672
7ddc43aeea
Cosmetic fixes for minor issues
2020-12-14 11:35:31 +00:00
matt335672
633716bbad
sesrun improvements and doc fixes
2020-12-09 11:44:17 +00:00
matt335672
e6c1df64d3
Added --config/-c to sesman
2020-12-09 10:19:14 +00:00
matt335672
8d994a547d
Add log_config_init_for_console() for utilities
2020-11-30 11:04:21 +00:00
Alexandre Quesnel
0c61a15fc5
Migrating logging to LOG() and LOG_DEVEL() in sesman/*
2020-11-30 00:36:20 +00:00
RisingWater
9efdd92c2a
Update verify_user_pam.c
...
change to g_memset
2020-11-19 11:03:43 +08:00
RisingWater
5d8f451a41
Update verify_user_pam.c
...
when a system give a tip message in function verify_pam_conv, authenticate will fail.
so it need skip this message to make sure authenticate success.
2020-11-17 11:48:26 +08:00
D.V.Yacenko
a6a785d7a4
Allow parameters for XRDP run bash script
...
Allows run bash script with parameters on xrdp. For example rdesktop -s "myscript.sh params"
2020-10-22 16:12:55 +01:00
metalefty
176b4b15a2
Merge pull request #1702 from yifanjiang/devel
...
startwm.sh: Additionally support /usr/etc/X11/xdm/Xsession
2020-10-19 14:33:53 +09:00
Alexandre Quesnel
a9ec1ebd99
Unifying logging in chanserv
...
This commit adds:
* replace multiple logging macros with LOG and LOG_DEVEL
* logging configuration for chanserv
* logging configuration for console output
* logging configuration for per file or method log level filtering for
debug builds
* file, line, and method name in log message for debug builds
2020-10-19 05:10:47 +00:00
Yifan J
31a910a275
startwm.sh: Additionally support /usr/etc/X11/xdm/Xsession in SUSE
...
distributions
https://lists.opensuse.org/opensuse-factory/2019-08/msg00113.html
2020-10-19 09:35:03 +08:00
Alexandre Quesnel
12a0266f1e
Use a single type for the fuse file handle callback context
2020-09-15 15:37:56 +00:00
matt335672
79b88d7f30
Merge pull request #1635 from matt335672/minus-c-option-chansrv
...
chansrv improved config support
2020-09-09 09:59:43 +01:00
Alexandre Quesnel
a7462404d5
Adding casts for narrowing to pointer width for issue #1678
2020-09-08 21:04:02 +00:00
matt335672
edda1b064d
chansrv improved config support
2020-09-08 16:58:03 +01:00
matt335672
8bd7309d72
Updated sesman.ini comment for Policy= in line with the manpage
2020-08-26 10:04:33 +01:00
bolkedebruin
5cd36c511c
Set max character buffer len to 512 per MS specification
...
The MS specs determine that the character buffer lenngths
for usernames, domains, passwords, alternate shells, etc
can be up to 512 characters including the mandatory null
terminator.
2020-08-17 10:35:35 +02:00
metalefty
f3e42fc209
Merge pull request #1640 from aquesnel/build_debug_werror
...
Fixing the build with --enable-xrdpdebug and CFLAGS=-Werror -Wall
2020-08-11 14:01:52 +09:00
Koichiro IWAO
00dca40bf8
sesman.ini: Update Xorg path for CentOS 8
...
Closes #1646 .
2020-08-03 10:39:04 +09:00
Alexandre Quesnel
7e58209b19
Fixing the build with --enable-xrdpdebug and CFLAGS=-Werror -Wall
2020-07-25 23:53:26 +00:00
matt335672
7384f6e574
Fixed CVE-2020-4044 CI errors
2020-06-29 11:38:24 +01:00
matt335672
e593f58a82
Fix for CVE-2020-4044
...
Reported by: Ashley Newson
2020-06-26 20:06:02 +09:00
matt335672
3c4b42b1aa
Implemented resize and multimon support for VNC backend
2020-06-04 15:10:35 +01:00
matt335672
aa0dbbae15
Added CHANNEL_NAME_LEN to ms-rdpbcgr.h
2020-04-27 15:01:56 +01:00
matt335672
617283eb34
Remove unnecessary g_malloc() call
2020-04-24 11:27:36 +01:00
matt335672
7ef01f7b0c
Address memory allocation overflow security issues
2020-04-23 17:29:06 +01:00
Koichiro IWAO
1adb3c7b33
Fix Xorg path for Arch Linux
...
It has been moved: https://www.archlinux.org/packages/extra/x86_64/xorg-server/
Fixes : #1448
2020-04-02 16:18:06 +09:00
matt335672
a2266f23f6
Allow a redirected drive device_id to be zero (Guacamole support)
2020-03-03 16:16:09 +00:00
matt335672
a3d429b4f7
Minor fixes to drive redirection
2020-03-03 16:14:24 +00:00
matt335672
77686bf832
Fix cppcheck 1.89+1.90 warnings
2020-01-30 10:36:23 +00:00
metalefty
6d7cce3d34
Merge pull request #1484 from matt335672/cppc-chansrv-pcsc
...
xrdp_pcsc: Fix cppcheck 1.82 + 1.90 warnings
2020-01-30 10:28:36 +09:00
Derek Schrock
72bece526b
return from xfs_delete_xfs_fs if NULL
2020-01-27 21:15:09 -05:00
matt335672
70d78dfb6f
Fix cppcheck 1.82 + 1.90 warnings
2020-01-17 11:18:46 +00:00
metalefty
627da8da3e
Merge pull request #1470 from matt335672/rename-includes
...
Move MS-defined constants into separate includes
2020-01-16 15:01:18 +09:00
matt335672
6f881d47d3
Rationalise ms- constants
...
Constants from MS documents (MS-RDPBCGR etc) moved out of
common/xrdp_constants.h into includes named after the documents.
Similar includes moved from sesman/chansrv to the common area.
2020-01-06 15:46:37 +00:00
Ilya Shipitsin
00f17c3ffc
sesman/chansrv/chansrv_fuse.c: resolve double free found by cppcheck
...
sesman/chansrv/chansrv_fuse.c:1719:9: error: Memory pointed to by 'full_path' is freed twice. [doubleFree]
2020-01-06 13:38:02 +05:00
matt335672
3820d279e2
Added includes for C/POSIX types referenced in chansrv_fuse.h to chansrv_fuse.h
2019-12-22 12:37:38 +00:00
matt335672
3ef2e7ce49
CI Fixes
2019-12-05 16:44:52 +00:00
matt335672
4d8f2b5a31
Significant remote file system improvements
...
- Reimplemented inode store in separate module chansrv_xfs.[hc]
- Allowed atimes and mtimes to be written to Windows side
- Mapped file user write bit to (inverted) Windows FILE_ATTRIBUTE_READONLY bit
- Mapped file user execute bit to Windows FILE_ATTRIBUTE_SYSTEM bit
- Implemented improved security for remotely mounted drives
- Implemented USB device removal, allowing hot-plug/remove of memory sticks
- Fixed pagefile.sys breaking Ubuntu file browser
- Fixed write offset bug
- Allowed renaming of open files
- Improved reported error codes
- Fixed various memory leaks
- Addressed valgrind errors related to struct fuse_file_info pointers.
2019-12-05 11:41:32 +00:00
Jay Sorg
d7b1f12d9b
default rdpsnd audin off, can enable with --enable-rdpsndaudin
2019-10-22 22:48:15 -07:00
Jay Sorg
351c92dfba
sesman: fix for sesman startup without startup script
2019-10-16 13:53:22 -07:00
Jay Sorg
cf67dd56bf
chansrv: no logic change, fix typo
2019-07-10 11:18:07 -07:00
Jay Sorg
417bb71abf
chansrv: env var to disable rdpsnd record
2019-07-08 22:45:58 -07:00
Jay Sorg
933394c6be
chansrv: remove excessive logging
2019-07-08 22:40:31 -07:00
Jay Sorg
8aedd31762
chansrv: use rdpsnd record if supported, else try AUDIO_INPUT(MS-RDPEAI)
2019-07-08 22:03:27 -07:00
Jay Sorg
c5798df0bd
chansrv: hook up audin
2019-07-08 18:25:59 -07:00
Jay Sorg
ae40ff27c8
chansrv: audin close should chose channel
2019-07-07 22:05:46 -07:00
Jay Sorg
a9a823b0da
chansrv: audio in partial working
2019-07-04 23:52:18 -07:00
Jay Sorg
3c9241022a
chansrv: add audin.c/h
2019-07-03 21:31:52 -07:00
Jay Sorg
e14ea4ff2e
chansrv: drop g_sent_flag, not very useful and some clients skip acks
2019-06-23 20:52:55 -07:00
Jay Sorg
4ad9e48ff5
chansrv: don't let audio fall behind
2019-06-22 23:01:13 -07:00
Koichiro IWAO
ae2cbbb2e0
Fix build after #1327
...
Fixes #1335 .
In file included from ./irp.h:27:
./chansrv_fuse.h:39:5: error: unknown type name 'time_t'
time_t atime; /* Time of last access. */
^
./chansrv_fuse.h:40:5: error: unknown type name 'time_t'
time_t mtime; /* Time of last modification. */
^
./chansrv_fuse.h:41:5: error: unknown type name 'time_t'
time_t ctime; /* Time of last status change. */
^
3 errors generated.
*** Error code 1
2019-04-18 14:25:46 +09:00
matt335672
fe97b983f5
Remove unnecessary reference from sesman/config.c
...
Following commit 81703c426f
, there are
no longer any references to g_cfg from within this file, and so the
external reference can be removed.
2019-04-11 11:28:33 +01:00
metalefty
006721fea8
Merge pull request #1327 from matt335672/implement-separate-lookup
...
XFuse file overwrite and lookup improvements
2019-04-11 15:56:24 +09:00
matt335672
6a6442e32f
Fix sing symbol link error when --disable-fuse is set
2019-04-02 13:08:47 +01:00
matt335672
d154df5059
Add remote drive lookup functionality to fuse
...
- Replace xfuse_cb_enum_dir() directory callback for adding files with
more general xfuse_devredir_add_file_or_dir() to be called from a
directory or a lookup operation.
- Moved XRDP_INODE out of public interface for chansrv_fuse, and replaced
with simpler struct file_attr to pass to
xfuse_devredir_add_file_or_dir()
- Allow a struct file_attr to be placed in an IRP for assembly of file
attributes over multiple IRP_MJ_QUERY_INFORMATION requats.
- Add dev_redir_lookup_entry() to public interface for devredir.c
- Add xfuse_devredir_cb_lookup_entry() callback to public interface for
chansrv-fuse.c
2019-04-01 14:15:12 +01:00
matt335672
ef9013b4d9
Implement O_WRONLY option for open file
...
Allows files to be overwritten on Linux without EIO
Logging improved on failed write
2019-04-01 14:14:46 +01:00
matt335672
c43c9cd551
Code tidyups
...
- Remove unused 'is_synced' member from struct xrdp_inode
- Move prototype for xfuse_devredir_cb_write_file() to correct file
- Add const correctness to dev_redir_strings_ends_with() function
- Add const correctness to fuse_reverse_pathname() function
- Moved devredir_proc_cid_* functions out of devredir.h and made static
- Added XFUSE_DUMP_ADDED_ENTRIES maro for debugging
- Removed duplicate code path in xfuse_remove_dir_or_file()
- Removed duplicate code path in xfuse_cb_rename()
- Removed duplicate code path in xfuse_create_dir_or_file()
- Removed duplicate code path in xfuse_cb_open()
- Removed duplicate code path in xfuse_proc_opendir_req()
2019-04-01 14:14:22 +01:00
matt335672
c31b3b0dc2
chansrv_fuse.c tidyups
...
- Remove unused USE_SYNC_FLAG macro
- Remove unused members invoke_fuse, off, dirbuf1 from XFUSE_INFO
- Clear f_fifo_opendir entries on deinit
- Added some comments and fixed some others
2019-04-01 14:13:57 +01:00
Koichiro IWAO
81703c426f
sesman: Fix default_wm and reconnect_sh refer wrong path after SIGHUP
...
Changes in #1147 had a bug. Fixes #1315 .
Reported by: Daniel Hoffend
2019-03-28 11:42:32 +09:00
metalefty
ec05d4208d
Merge pull request #1298 from jaroslaw-osmanski/restrict-outbound-clipboard
...
Restrict outbound clipboard
2019-03-20 10:37:40 +09:00
Jaroslaw Osmanski
56fe961349
Fixed style and format issues.
2019-03-08 08:42:18 +01:00
Jaroslaw Osmanski
7d7e8184ae
Use CHANSRV_RESTRICT_OUTBOUND_CLIPBOARD env between sesman -> chansrv
2019-03-02 16:53:15 +01:00
Jaroslaw Osmanski
1b6bfa682c
Log when outbound copy was rejected because RestrictOutboundClipboard was set
2019-03-01 14:49:57 +01:00
matt335672
d49f405130
Add implementation of xfuse_deinit_xrdp_fs()
2019-02-26 13:22:30 +00:00
Jaroslaw Osmanski
46c33ddaf4
Read sesman config in clipboard
2019-02-26 11:36:32 +01:00
Krzysztof Adamski
751cd97018
reapply outboud-resitrcted clipboard
2019-02-26 07:40:17 +01:00
Jaroslaw Osmanski
0d8a49ab13
astyle formatting for sesman config.h and chansrv clipboard
2019-02-26 07:40:10 +01:00
4680414@qq.com
e655fe6a1b
libscp v1 server set height twice,and not set width. so fix it.
2019-02-15 09:18:37 +08:00
Koichiro IWAO
88f0d3114d
Fix build with FDK AAC v2
...
Original fix provided by takefu. See also:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233556
2018-11-28 01:31:14 +09:00
Koichiro IWAO
a4b0aa9355
Remove x11rdp from config
...
as it is already deprecated. x11rdp is complicated to build and very few
people using it actually. However, some people still select "X11rdp"
session and get stuck despite not installing x11rdp.
https://github.com/neutrinolabs/xrdp/issues/962#issuecomment-430545526
People who really want to use x11rdp should revert this commit.
2018-10-18 11:19:38 +09:00
metalefty
c2ade7a1f7
Merge pull request #1225 from savisko/devel
...
Fix crash of xrdp-chansrv process, issue #1202 .
2018-10-18 10:49:09 +09:00
metalefty
a83400060b
Merge pull request #1227 from metalefty/idle-disc
...
Ressurect IdleTimeLimit
2018-10-18 10:40:12 +09:00
Koichiro IWAO
5ea403430a
Sort & reword description of IdleTimeLimit
2018-10-16 16:53:33 +09:00
jsorg71
ae1514c167
dynamic virtual channel improvements
...
remove not used chansrv <-> xrdp messages
move static channel disable control into libxrdp
remove some blocking read, write chansrv calls
add drdynvc calls to libxrdp
add drdynvc calls to chansrv
channel cleanup
2018-10-11 22:09:20 -07:00
Michael Savisko
47d8e03d3a
Fixed compilation warning in previous commit.
2018-10-11 13:51:59 +03:00
Michael Savisko
ba93badf73
Fix crash of xrdp-chansrv process, issue #1202 .
...
In xfuse_create_file_in_xrdp_fs insure that xfuse_fs is properly initialized.
2018-10-11 13:11:24 +03:00
Koichiro IWAO
f84f3de478
docs: ressurect IdleTimeLimit
...
This reverts commit 513f767996
.
2018-10-10 17:47:12 +09:00
Koichiro IWAO
2a85a65d08
show more helpful message if xrdp-dis failed
2018-09-11 11:58:44 +09:00
Koichiro IWAO
d6992cf62d
sesman: add XRDP_ prefix to xrdp related environment variable
...
and remove CHANSRV, use the shorter name
2018-09-04 16:01:40 +09:00
Koichiro IWAO
59f3a79fe4
sesman: pass pulse socket name via environment variable
2018-09-04 16:01:40 +09:00
Idan Freiberg
5d2c5b1410
chansrv: remove pulseaudio modules from xrdp source tree
...
its actually an independent code which is not part of xrdp
moved to its own repoistory: https://github.com/neutrinolabs/pulseaudio-modules
Signed-off-by: Idan Freiberg <speidy@gmail.com>
2018-08-03 06:12:53 +03:00
Koichiro IWAO
ff85cb4530
Merge branch 'wfix-pulsechansrv-makefile' into devel
2018-08-03 10:05:46 +09:00
Brandon Wooldridge
8427c3601b
Corrected spacing between arguments to `cc` for Pulseaudio chanserv Makefile
2018-08-02 15:24:46 -07:00
matt335672
c467ba6b04
Add handler for fatal X server conditions
...
Unless X server failures are caught, these can cause a premature
exit of chansrv, giving it no chance to clean up. This is currently a
particular problem for fuser mounts.
2018-07-19 08:16:29 +01:00
Koichiro IWAO
eda1842825
sesman: add comments, no logic change
2018-06-19 12:57:30 +09:00
Koichiro IWAO
6e16b38ecc
sesman: fix potential buffer over flow
2018-06-16 16:44:37 +09:00
Koichiro IWAO
9192e95c96
sesman: fix logging after default_wm change
2018-06-16 16:44:37 +09:00
Koichiro IWAO
6fb18cd5fa
docs: document configurable reconnect script path
2018-06-16 16:44:37 +09:00
Koichiro IWAO
a39b413746
sesman: make the path of reconnect script configurable
2018-06-16 16:44:37 +09:00
Koichiro IWAO
e82f212f34
sesman: accept full path for DefaultWindowManager
...
Solves: #1143
Also, this idea is inspired by Fedora's patch [1]. Some distro wants to
put all scripts in libexec directory due to SELinux. This enables
distros to put such scripts anywhere.
[1] https://src.fedoraproject.org/cgit/rpms/xrdp.git/tree/xrdp-0.9.6-scripts-libexec.patch?id=02f845c1b8cea781313cf3e9efcd6d7d50341824
2018-06-16 16:44:37 +09:00
Idan Freiberg
036c292120
Merge pull request #1146 from metalefty/sesman-leak
...
sesman: fix leak in struct config_sesman
2018-06-14 12:43:02 +03:00
metalefty
f83d967f46
Merge pull request #1120 from matt335672/set-env-on-reconnect
...
Copy the PAM session environment for the reconnect script
2018-06-14 11:04:43 +09:00
Koichiro IWAO
037d4eeece
sesman: fix leak in struct config_sesman
2018-06-13 17:20:03 +09:00
Koichiro IWAO
2262f1361f
sesman: close stdout/stderr earlier
...
not to spit on the console
2018-06-05 00:19:36 +09:00
Koichiro IWAO
6ae3052a0f
sesman: don't spit on the console when starting
...
As the Debian patch[1] expresses, spitting messages on the console when
a process starts in background is a bad idea. Everything should be
written to log file and daemon should start silently. This is a first
step to shut up daemons.
Got some idea from Debian Remote Maintainers and Thorsten Glaser,
thanks!
[1] 2751ad4d62/debian/patches/shutup-daemon.diff
2018-06-05 00:19:36 +09:00
Koichiro IWAO
19fa26a27e
sesman: don't print config in reader function
...
reader function should just read. Add config_dump function to print read
config.
2018-06-05 00:19:35 +09:00
Koichiro IWAO
de33a7832e
sesman: s/XOrg/Xorg/g, no logic change
...
X.Org is usually spelled X.Org or Xorg.
2018-06-05 00:19:35 +09:00
Koichiro IWAO
e4857b13fa
sesman: config_read_logging function no longer exists
2018-06-05 00:19:33 +09:00
matt335672
cde5b09129
Copy the PAM session environment for the reconnect script
...
This provides access to variables set at login which may be
required by the script (e.g. KRB5CCNAME)
2018-05-31 10:54:38 +01:00
metalefty
39b664fc27
Merge pull request #1108 from aiden0z/devel
...
sesrun support start other session based on session_code argument
2018-04-22 13:45:18 +09:00
Aiden Luo
7864f9d692
sesrun support start other session based on session_code argument
2018-04-20 18:11:27 +08:00
Koichiro IWAO
819c506d26
sesman: Update Xorg help comment for Arch Linux
...
As reported in #1106 , Arch Linux looks to me like using Xorg wrapper now.
2018-04-19 01:21:54 +09:00
Koichiro IWAO
a63c411772
sesman: rename vnc password file, just a cosmetic change
2018-03-23 19:16:10 +09:00
Jay Sorg
e40f0dc7e2
sesman: add hostname to vnc password file
2018-03-23 15:48:25 +09:00
Koichiro IWAO
780ba744f6
Revert "devredir: fix xinode leak"
...
This reverts commit 5daa09171e
.
Causes "double free". Fix #990 was not correct.
```
[1271363627]: DEV_REDIR dev_redir_proc_device_iocompletion: 738 : entered: IoStatus=0x0 CompletionId=1
[1271363627]: DEV_REDIR dev_redir_proc_device_iocompletion: 839 : got CID_DIRECTORY_CONTROL
[1271363627]: DEV_REDIR dev_redir_proc_query_dir_response: 933 : processing FILE_DIRECTORY_INFORMATION structs
[1271363627]: DEV_REDIR dev_redir_proc_query_dir_response: 968 : FileName: .
[1271363627]: DEV_REDIR devredir_fuse_data_peek: 1335 : returning 0x7f2a9c013410
*** Error in `/usr/sbin/xrdp-chansrv': double free or corruption (out): 0x00007f2a9c13a330 ***
```
Closes : #1025
2018-03-23 11:40:52 +09:00
Koichiro IWAO
97c21bc972
sesman: default startwm.sh should use bash
...
as it sources bash_profile. And add comments.
Closes #1009 .
2018-03-09 14:24:17 +09:00
Vraiment
fd37805ac0
Make sesman.ini dynamic for the location of the configuration file
2018-02-19 11:41:55 +09:00
Koichiro IWAO
c50015122c
FreeBSD: rework setsid code
...
Pull request #650 is not valid to avoid run session twice.
It certainly stops running session twice but causes #1016 .
In FreeBSD, sesman process will run like this. The intermediate
sesman is needed to detect session termination correctly.
xrdp-sesman (daemon)
|
+- xrdp-sesman (FreeBSD specific intermediate sesman)
|
+- xrdp-sesman (bsd sesion leader & each session)
|
+- Xorg
+- startwm.sh
+- xrdp-chansrv
To stop runninng session twice correctly, just exit before the
intermediate sesman executes Xorg, WM and chansrv.
2018-02-06 16:03:10 +09:00
Koichiro IWAO
e16029cbc2
fix leak of SCP_DISCONNECTED_SESSION
...
Pointed out by: #919
2018-01-23 11:16:26 +09:00
Koichiro IWAO
5daa09171e
devredir: fix xinode leak
...
Pointed out by: #919
2018-01-12 09:24:03 +09:00
Koichiro IWAO
08f847d74b
sesman: refactor, change variable names
...
session_variables1 -> env_names
session_variables2 -> env_values
Use the name used in callee function env_set_user(). The former names
are not clear.
2018-01-11 10:57:47 +09:00
Koichiro IWAO
dcf64e43ca
remove trailing space
2018-01-11 10:57:43 +09:00
Koichiro IWAO
f2db57afb0
fix indent
2018-01-09 14:09:13 +09:00
matt335672
3f2a017c97
Make listen check before daemon fork
2017-12-27 15:00:18 +00:00
Dominik George
53eccc93a2
Simplify pulseaudio module build instructions
2017-12-26 19:06:36 +09:00
Koichiro IWAO
93481365d1
pulse: replace old pulse notes with bran-new README
2017-12-26 09:26:51 +09:00
Dominik George
3244cb59d5
Fix memory corruption introduced by CVE-2017-16927 fix.
2017-12-21 14:07:51 +09:00
Koichiro IWAO
d8bb32541a
sesman: bring Xorg at the top in sesman.ini
...
as Xorg prefered recommended backend now. Add more comments.
2017-12-16 00:27:06 +09:00
Koichiro IWAO
64a0deb9cf
sesman: comment on non-suid Xorg in sesman.ini
...
Pointed out by: #923
2017-12-16 00:27:06 +09:00
speidy
d958d1f018
sesman: scpv0, accept variable length data fields
2017-11-28 09:04:25 +09:00
Koichiro IWAO
929a7c359d
chansrv: add LOG_LEVEL_TRACE here, too
2017-11-12 22:27:46 +09:00
Koichiro IWAO
3d29b6ec76
sound: g_bbuf_size should be determined after codec is determined
...
Fixes #910 , if both client and server support more than one codecs,
g_bbuf_size might be set to wrong value.
2017-11-08 08:57:52 +09:00
Koichiro IWAO
26394870e5
sesman: delete socket files when session exits
2017-09-13 09:04:58 +09:00
Jay Sorg
d9b929c185
chansrv: sound, fdk-aac, avoid 1 item array items
2017-08-04 17:24:57 -07:00
Jay Sorg
152318ad7c
use pkg-config to configure with fdk-aac
2017-08-04 17:24:57 -07:00
Jay Sorg
4f91a52109
chansrv: sound, remove a do not know and a comment
2017-08-04 17:24:57 -07:00
Jay Sorg
021a78f4c6
chansrv: sound, use WAVE_FORMAT_AAC not WAVE_FORMAT_AAC_MS
2017-08-04 17:24:57 -07:00
Jay Sorg
bf0d56c314
chansrv: sound, add aac
2017-08-04 17:24:57 -07:00
Jay Sorg
8ac35d7ed1
chansrv: sound, handle skips in audio acks
2017-08-04 17:24:57 -07:00
matt335672
4023aa7f1c
xfuse_create_share() called before xfuse_init()
...
* Initialise inode table in `xfuse_create_share()` if necessary
* Add guard to `xfuse_init_xrdp_fs()` to prevent double initialisation of the inode table
2017-08-03 11:50:31 +09:00
Koichiro IWAO
05ef6d104e
sesman: search pam files also in ${sysconfdir}/pam.d
...
as some operating system such as FreeBSD searches not only `/etc/pam.d`
but also `/usr/local/etc/pam.d` [1].
[1] https://www.freebsd.org/cgi/man.cgi?query=pam.d&sektion=5
2017-07-26 11:34:01 +09:00
Koichiro IWAO
e990dd4263
chansrv: remove trailing space
2017-07-25 11:40:04 +09:00
Koichiro IWAO
ca24572fd5
chansrv: use switch-case to support more codecs
2017-07-25 11:40:04 +09:00
Koichiro IWAO
dbaf23e93b
chansrv: constify wFormatTag
2017-07-25 11:40:04 +09:00
Ian Geiser
4b87548b71
Use g_create_path instead of g_create_dir
...
Rename g_mk_temp_dir to g_mk_socket_path
2017-07-14 20:52:38 +09:00
Koichiro IWAO
858e6149f0
fix typo
2017-07-13 13:41:26 +09:00
Koichiro IWAO
6f8eacd72b
sesman: make sure socket directory present
...
before try to create a domain socket.
Originally proposed by Ian Geiser (geiseri).
2017-07-13 13:41:26 +09:00
Jay Sorg
b6bd8acef1
sesman: move auth_start_session, auth_stop_session, and auth_end to child process
2017-07-12 17:58:36 +09:00
Ben Cohen
c7d08bd9e7
xrdp-sesadmin: fix error when there are no sessions
...
Test case: On a system running xrdp with no sessions running run:
xrdp-sesadmin -u=<user> -p=<password> -c=list
Expected result: "No sessions." (ignoring debug output)
Observed result: "Error getting session list."
In the SCP_SERVER_STATE_MNG_LISTREQ case in scp_v1_mng_process() if
there are no sessions it ends the scp session, which causes an error in
the client. In commit 0017081d
the client was changed to report errors,
giving the result above.
Fix by calling scp_v1s_mng_list_sessions() from scp_v1_mng_process()
even when there are no sessions, and if so sending a packet with a count
of zero so that the client gets what it expects.
2017-07-06 13:40:25 +09:00
Koichiro IWAO
9065964bd9
chansrv: include display number in chansrv log filename
...
since xrdp-chansrv may be run multiple instances per user. For example,
Xvnc backend creates one session per screen geometry.
2017-07-06 12:36:47 +09:00
Koichiro IWAO
5a7208a15b
sesman: exit with failure status if listen failed
2017-06-20 14:29:02 +09:00
Koichiro IWAO
6a860d4b02
sesman: install empty reconnectwm.sh as a template
...
as it was undocumented and few people know reconnectwm.sh is executed on
client reconnect. The behaviour of startwm.sh / reconnectwm.sh should
be documented. This is a first step of documenting them.
2017-06-20 13:40:05 +09:00
Koichiro IWAO
e1d11a74da
pulse: respect XRDP_SOCKET_PATH environment variable
2017-05-16 10:41:06 +09:00
Koichiro IWAO
1acef2567c
sesman: pass xrdp socket path to user session
...
via environment variable.
2017-05-16 10:41:06 +09:00
Fuminobu TAKEYAMA
1f27a4d850
startwm.sh: do not call pseudo shell code for /etc/X11/xdm/Xsession
...
Since /etc/X11/xdm/Xsession calls user's login shell, startwm.sh
should not execute the pseudo code; It causes to execute
~/.profile twice.
2017-05-09 16:26:38 +09:00
Koichiro IWAO
10fe699466
pulse: define default socket directory in Makefile
2017-04-06 09:29:16 +09:00
Koichiro IWAO
06ce0d7ee3
sesman: LOGNAME should be set to username
...
which is used to store login name. The login name shall be the string
that would be returned by the getlogin() function [1]. Some applications
only refers LOGNAME environment variable and don't fallback to other
variables such as USER.
Fixes #725 . Reported by @seidler2547.
[1] The Single UNIX Specification, Issue 7
2017-04-06 09:25:02 +09:00
Pavel Roskin
148afd1170
Rename file_loc.h to xrdp_sockets.h, install it
...
Include xrdp_sockets.h directly, not through headers.
2017-03-28 00:59:16 -07:00
Koichiro IWAO
8220afceab
pulse: refer correct path to file_loc.h
2017-03-24 13:49:21 +09:00
Koichiro IWAO
a20d88335f
pulse: use correct macro for audio in/out sockets
2017-03-24 13:49:21 +09:00
Jay Sorg
4b8a33e087
sesman: move auth/pam calls to main process
2017-03-21 21:56:28 -07:00
Pavel Roskin
b0c2f18521
xrdp-chansrv: default to INFO log level rather than ERROR
2017-03-20 19:11:06 -07:00
Jay Sorg
05c599666d
sesman: remove sessvc, one less process to manage
2017-03-19 17:16:36 -07:00
Pavel Roskin
58c9cb43e9
Make socket directory configurable, don't hardcode /tmp/.xrdp
...
Use XRDP_SOCKET_PATH in file_loc.h
Don't define any non-socket paths in file_loc.h, they should come from
the makefiles.
Define all paths unconditionally, they should not be defined elsewhere.
Pass XRDP_SOCKET_PATH as environment variable to the backends.
2017-03-17 22:25:05 -07:00
Pavel Roskin
fc2572f60b
Remove chansrv_cleanup(), it doesn't do anything useful
...
xrdp_chansrv_%8.8x_main_term and xrdp_chansrv_%8.8x_thread_done are both
wait objects, not sockets. They are created and cleaned up in chansrv.c
Wait objects are pairs of file descriptors on POSIX. They are closed
automatically when the process exits.
On Windows, wait objects are handles that are closed by CloseHandle().
Those handles should also be closed on the process exit.
In any case, there is no way for a parent process to clean up file
handles of the child process.
2017-03-17 22:25:05 -07:00
speidy
cfdbc2b4db
chansrv: dvc, check channel exists on get/remove api struct
2017-03-16 00:20:10 +02:00
Pavel Roskin
6ed4c969f4
Eliminate APP_CC and DEFAULT_CC
2017-03-14 00:21:48 -07:00
Pavel Roskin
30a7a947b1
Don't include config_ac.h from any header files
2017-03-04 00:52:34 -08:00
Pavel Roskin
b2d3dcf169
Include config_ac.h from all source files
2017-03-04 00:52:34 -08:00
Pavel Roskin
8a1de8dbc4
Remove trailing whitespace
2017-02-08 13:30:56 +09:00
Koichiro IWAO
f11eed3277
chansrv: fix warnings in pulse module
2017-02-02 21:46:49 -08:00
Pavel Roskin
99e4e4520a
xrdp-sesadmin: show sessions in human readable format
2017-02-02 21:24:50 -08:00
Pavel Roskin
ea6882fd4c
xrdp-sesadmin: refactor array access
2017-02-02 21:24:50 -08:00
Pavel Roskin
0017081d78
xrdp-sesadmin: fix crash on network or authentication error
...
If scp_v1c_mng_get_session_list() returns an error, report it to the
user and exit. Session list is not initialized in that case and should
not be freed.
g_free() already checks its argument for being to NULL, remove an extra
check.
2017-02-02 21:24:50 -08:00
Koichiro IWAO
021b79ba55
docs: remove IdleTimeLimit until it is actually implemented
...
it gives users false hope and finally disappoints them.
2017-01-31 05:07:06 -03:00
Jay Sorg
a1aff316dc
change log message to long long
2017-01-29 23:14:33 -08:00
Jay Sorg
b5029c2596
sesman: fix warning for 32 bit / 64 bit log entry, trunc to 32 bit
2017-01-29 23:14:33 -08:00
metalefty
cc48345f40
sesman: remove unnecessary fork for FreeBSD ( #650 )
...
it is not only unnecessary but causes another bug.
2017-01-28 21:14:55 +09:00
mirabilos
6257bae23f
Add GNU/kFreeBSD support ( #645 )
...
* GNU/kFreeBSD is a FreeBSD variant, for code purposes.
* GNU/kFreeBSD uses GNU/Linux-ish init scripts, however.
2017-01-26 23:02:41 -02:00
Pavel Roskin
e35b5a4708
Constify string arguments in xrdp-chansrv sources
2017-01-22 22:39:10 -08:00
Idan Freiberg
4a23b7939c
Merge pull request #630 from selu/devel
...
Fix calling XChangeProperty in clipboard provide
2017-01-23 08:16:18 +02:00
Pavel Roskin
0a9b586332
Improve xrdp-sesman help text
...
Don't document "-ns", as "-n" and "--nodaemon" should be enough. Always
refer to the program as xrdp-sesman, not sesman.
2017-01-17 18:09:47 -08:00
Szabolcs Seláf
bf4c32c862
Fix calling XChangeProperty in clipboard provide
...
XChangeProperty's last parameter is number of elements, not number of bytes as it's in https://tronche.com/gui/x/xlib/window-information/XChangeProperty.html
Because of this bug Paste did not work in any java applications.
2017-01-17 15:18:23 +01:00
Pavel Roskin
8ee886a5cc
Don't log device_data_len in the code where it may be uninitialized
...
Log device_data_len only in the code that reads it.
2017-01-11 23:25:42 -08:00
Pavel Roskin
f1a521204a
Remove redundant function declarations
2017-01-11 23:25:42 -08:00
Pavel Roskin
9a2e728396
Remove send_channel_data() from devredir.h, it's declared in chansrv.h
...
Include "chansrv.h" from devredir.c to have send_channel_data()
declaration.
2017-01-11 23:25:42 -08:00
Idan Freiberg
e08c85aa42
Merge pull request #618 from metalefty/max_disc_time
...
sesman: print max_disc_time as DisconnectedTimeLimit
2017-01-12 06:58:12 +02:00
Koichiro IWAO
c3fbd71513
sesman: print max_disc_time as DisconnectedTimeLimit
...
not max_idle_time.
2017-01-10 15:35:16 +09:00
Pavel Roskin
c049c3dfd0
rail: remove unneeded call to XGetWindowAttributes()
...
It is already called above "if" with the same arguments.
2017-01-06 11:24:17 -08:00
Pavel Roskin
6664aac00f
Use "void" for empty argument list in declarations
...
In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".
C++ treats void and empty list as "no arguments".
2017-01-05 17:27:20 -08:00
jsorg71
15a24ff1c4
Merge pull request #612 from proski/includes
...
Use <> for system includes, move system includes above local ones
2017-01-05 16:01:52 -08:00
Pavel Roskin
7ba3610787
Use <> for system includes, move system includes above local ones
2017-01-04 13:13:20 -08:00
volth
26a26ef906
fix build with --enable-xrdpdebug=yes
2017-01-04 19:20:44 +00:00
volth
37b4a14b54
fix build with --enable-xrdpdebug=yes
2017-01-04 13:00:01 +00:00
Pavel Roskin
a01aaa19b8
Fix help text to match the manual and the actual behavior
...
The help text mentions "LIST" and "KILL" commands, but the manual says
"list" and "kill", and the command line parser expects the later.
2016-12-19 23:58:13 -08:00
Idan Freiberg
a11af2bc95
Merge pull request #545 from moobyfr/fix-xauth
...
Fix xauth
2016-12-19 01:59:19 -05:00
Pavel Roskin
b1db87ea21
Use per-display VNC password files, remove old style password if found
...
Every session uses its own VNC password, so keep then in separate files.
The old style password file uses the user's password encrypted with a
known key. Since we are not replacing it anymore, we should remove it.
2016-12-18 09:24:11 -08:00
Pavel Roskin
c21b9a78f4
Distribute all files except git and github specific data
...
It is better to distribute a few useless file than not to distribute
needed files.
2016-12-18 00:00:11 -08:00
BLINDAUER Emmanuel
a2d7720887
Fix typo
2016-12-17 08:07:07 +01:00
BLINDAUER Emmanuel
1430c54c40
- Removed tailing space
...
- Fixed the copyright and year
2016-12-16 20:55:52 +01:00
BLINDAUER Emmanuel
2927eed74c
- Update copyright
...
- remove test on filename for xauth as we know what we send
- better names for variables in xauth
- if xauth fails, exit sesman
- g_bytes_to_hexstr returns a null-teminated string, don't set it twice.
2016-12-15 22:45:12 +01:00
BLINDAUER Emmanuel
480d6d37b7
use correct include
2016-12-15 18:49:07 +01:00
BLINDAUER Emmanuel
51759d3d84
remove unused include
2016-12-15 18:38:37 +01:00
BLINDAUER Emmanuel
b2f4f68ab8
- move function related to xauth in own file
...
- use of g_bytes_to_hexstr()
- correct typos and coding syntax
- don't create auth file, xauth can do that if needed
2016-12-15 18:06:35 +01:00
BLINDAUER Emmanuel
e72957b7c9
xauth: use the authfile if not using default value
2016-12-14 10:55:45 +01:00
BLINDAUER Emmanuel
7d1fdd04b5
Cosmetic change: follow coding standard
2016-12-14 08:28:25 +01:00
BLINDAUER Emmanuel
16b6471d88
use the correct size for snprintf
2016-12-14 07:16:06 +01:00
BLINDAUER Emmanuel
0aa4b85f81
Xauth: use snprintf for setting the filename and adjust the value of computed cookie
2016-12-14 00:29:22 +01:00
BLINDAUER Emmanuel
6875dbe860
use functions from os_call.h
2016-12-13 18:53:07 +01:00
BLINDAUER Emmanuel
7bd1823ceb
Add xauth support to get more security for all backends
2016-12-13 13:24:15 +01:00
Koichiro IWAO
35bc7c1d65
sesman: unbreak FreeBSD build after #523
2016-12-09 10:35:21 +09:00
metalefty
731d4be670
Merge pull request #521 from proski/xorg-log
...
Change default Xorg logfile to .xorgxrdp.%s.log
2016-12-09 09:45:47 +09:00
Pavel Roskin
9cbf3d1bb8
Change default Xorg logfile to .xorgxrdp.%s.log
...
The log file is created in the home directory, %s is replaced with the
display number (e.g. 10).
If Xorg is run setuid root, it can refuse to run if the log path is
absolute.
2016-12-06 15:10:01 -08:00
Pavel Roskin
04414e0fd4
Disable privilege elevation by setuid for the X server
2016-12-06 15:09:52 -08:00
Jay Sorg
f14e3dc8ac
sesman: must save guid in session data
2016-12-04 17:20:01 -08:00
Jay Sorg
9a517b34f0
vnc: code cleanup
2016-12-04 15:39:10 -08:00
Jay Sorg
57905d71ad
vnc: change password file to use guid hash
2016-12-03 23:12:48 -08:00
Pavel Roskin
e46d15ca84
Fix C++ errors and warnings in FUSE code
2016-11-26 09:17:51 -08:00
Pavel Roskin
2ab321a7c6
Use fuse_ino_t for FUSE inodes, not tui32 or int
2016-11-26 09:17:51 -08:00
Pavel Roskin
f622a17c75
Remove write-only FileId variable
2016-11-26 09:17:51 -08:00
Pavel Roskin
46f4025372
Cast pointer to uint64_t through tintptr to avoid warnings
...
Cast to long would damage a pointer on Win64.
2016-11-26 09:17:51 -08:00
Pavel Roskin
e92c4f3b40
Use constant strings to fix warnings
2016-11-26 09:17:51 -08:00
Pavel Roskin
662172012b
Call devredir_cvt_slash() on the path copy, it changes the argument
2016-11-26 09:17:51 -08:00
Pavel Roskin
a4e3952d65
Disable or remove dead code to prevent it from throwing warnings
2016-11-26 09:17:51 -08:00
Pavel Roskin
a547cc3784
Include needed files in chansrv_fuse.c, remove duplicate declarations
2016-11-26 09:17:51 -08:00
Pavel Roskin
bf39fed6e4
Fix misuse of NULL for arithmetic type
2016-11-26 09:17:51 -08:00
Pavel Roskin
4234ed278e
Use FUSE_CFLAGS and FUSE_LIBS from pkg-config
...
Include <fuse_lowlevel.h>, not <fuse/fuse_lowlevel.h>, the include path
should be set up for that.
Don't define _FILE_OFFSET_BITS in one file, FUSE_CFLAGS would enable it
for the whole xrdp-chansrv build if needed.
2016-11-26 09:17:51 -08:00
Pavel Roskin
15c4c47811
Remove "-ac" from X server parameters, it's insecure and unnecessary
...
Fedora patches sesman.ini to remove "-ac", and that doesn't cause any ill
effects.
2016-11-21 22:37:41 -08:00
Pavel Roskin
7fce469cbc
Fix format warnings if FUSE is enabled
2016-11-21 17:51:20 +00:00
Jay Sorg
25fd585d55
chansrv: some fixes to log file path
2016-11-19 07:31:36 +00:00
Itamar Reis Peixoto
f7b0b0d89c
Merge pull request #488 from metalefty/docs
...
Update man pages and config files
2016-11-17 23:12:49 -02:00
metalefty
9deaa078fc
Merge pull request #477 from proski/vnc-strerror
...
Improve error messages about VNC password file
2016-11-16 17:10:38 +09:00
metalefty
8516e6f97b
Merge pull request #476 from proski/auth
...
Fix compile warnings for non-default authentication methods
2016-11-16 17:08:15 +09:00
metalefty
b89956d06e
Merge pull request #485 from proski/code-standards
...
Code standards
2016-11-16 17:05:21 +09:00
metalefty
d335c93a75
Merge pull request #480 from proski/strncat
...
Fix potential buffer overflow in strncat() invocation
2016-11-16 17:02:33 +09:00
Pavel Roskin
35b336272b
Fix compilation with C++
2016-11-15 22:40:06 -08:00
Pavel Roskin
16c3bbdb8d
Remove all tabs in sources
2016-11-15 22:40:06 -08:00
Pavel Roskin
e9d064e390
Don't try to create .vnc directory if it exists
...
Report system error if it cannot be created.
2016-11-15 22:39:22 -08:00
Pavel Roskin
60029514a6
Report system error if the VNC password file cannot be created
2016-11-15 22:39:22 -08:00
Pavel Roskin
e9a0324cb3
Fix compile warnings for non-default authentication methods
...
Include string.h for strcmp(). Don't define _XOPEN_SOURCE, it conflicts
with libc headers and hides putpwent(). Make input strings constant. Fix
functions to match their declarations.
2016-11-15 22:38:56 -08:00
Pavel Roskin
92423a466e
Fix potential buffer overflow in strncat() invocation
...
strncat() will copy at most the specified number of characters and append
the null character on top of that. strlen() doesn't count the final null
character.
2016-11-15 22:38:21 -08:00
Koichiro IWAO
cb1960e0fc
config: use semicolon to comment out descriptions in config files
...
and use number sign to comment out actual configurations.
For example:
; if set to true, enables foobar
#foobar=true
2016-11-16 14:15:44 +09:00
Koichiro IWAO
4f2d94505a
config: unify all boolean values in config to true/false
2016-11-16 14:15:44 +09:00
Pavel Roskin
0d72cced46
Omit numbers from the "param" keys, they are not needed
...
Users assume that they need to renumber the parameters. That makes
parameter editing more involved than it needs to be.
2016-11-15 20:55:03 -08:00
metalefty
94901c9989
Merge pull request #454 from metalefty/change-chansrv-log-path
...
chansrv: change chansrv log path to ${XDG_DATA_HOME}/xrdp
2016-11-07 09:56:31 +09:00
Dominik George
c90bc13d39
Move -logfile /dev/null option for easier commenting in debug scenarios.
2016-10-28 16:45:05 +02:00
Koichiro IWAO
7d017482f6
chansrv: change chansrv log path to ${XDG_DATA_HOME}/xrdp
...
like Xorg's logfile is written to ${XDG_DATA_HOME}/xorg/Xorg.n.log.
If XDG_DATA_HOME is not defined, the log path will be
${HOME}/.local/share/xrdp.
2016-10-25 14:52:43 +09:00
Pavel Roskin
b28a986071
Fix memory leak in xrdp-sesman on config reload
2016-10-21 20:15:50 +00:00