Commit Graph

62 Commits

Author SHA1 Message Date
matt335672
8e9fb8008f Addressed review comments 2021-09-08 11:51:21 +01:00
matt335672
d32953c405 Parse DEVICE_ANNOUNCE header correctly 2021-09-08 11:33:43 +01:00
matt335672
eda01f0853 Fix chansrv unterminated streams 2021-05-28 10:57:12 +01:00
matt335672
0a1a8f40e5 Moved a lot of string funcs to string_calls module 2020-12-22 11:57:24 +00:00
Alexandre Quesnel
0c61a15fc5 Migrating logging to LOG() and LOG_DEVEL() in sesman/* 2020-11-30 00:36:20 +00: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
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
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
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
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
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
5daa09171e
devredir: fix xinode leak
Pointed out by: #919
2018-01-12 09:24:03 +09:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08: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
Pavel Roskin
e35b5a4708 Constify string arguments in xrdp-chansrv sources 2017-01-22 22:39:10 -08: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
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
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
cbe413bd8b Fix return type of devredir_fuse_data_peek and devredir_fuse_data_dequeue 2016-07-08 04:29:56 +00:00
Pavel Roskin
d1efb0d5ba Fix signed to unsigned comparisons reported by g++ 6.1.0 2016-07-08 04:29:51 +00:00
Pavel Roskin
5829323ad8 Use g_new or g_new0 when C++ compiler would complain about implicit cast 2016-07-08 04:29:49 +00:00
Pavel Roskin
1403652c72 Remove unused variable in devredir_cvt_from_unicode_len() 2016-05-06 18:58:16 -07:00
Pavel Roskin
f2d326cbed Remove unused variables from dev_redir_proc_query_dir_response() 2016-05-06 18:58:16 -07:00
Pavel Roskin
92a6833e9b Fix typos 2016-02-13 20:41:07 -08:00
Laxmikant Rashinkar
1c423dadf4 coverity: copy into fixed sized buffer 2014-07-26 16:33:36 -07:00
Laxmikant Rashinkar
fde7be5151 coverity: fixed issue argument cannot be negative 2014-07-23 19:07:38 -07:00
Laxmikant Rashinkar
0c63a8feb3 coverity: Dereference after null check 2014-07-20 16:36:33 -07:00
Laxmikant Rashinkar
3bb31876e7 coverity: fixed resolution leak issues 2014-07-19 11:56:00 -07:00
Laxmikant Rashinkar
06f01f6c37 Merge branch 'master' of github.com:neutrinolabs/xrdp 2013-09-24 17:19:43 -07:00
Laxmikant Rashinkar
379685bfca FUSE: we now process only one opendir command at a time 2013-09-24 17:19:10 -07:00
Jay Sorg
2d112bac8f chansrv: work on smart card 2013-09-09 12:30:58 -07:00
Jay Sorg
a9f37229ac chansrv: work on smartcard 2013-09-08 14:22:53 -07:00
Laxmikant Rashinkar
6381941c78 FUSE: changed architecture to use opendir/readdir instead of just readdir 2013-08-11 18:06:39 -07:00
Jay Sorg
e427113fa8 chansrv: work on smartcard redir 2013-08-05 01:10:57 -07:00
Jay Sorg
17bf2abe30 xorg driver, include cleanup 2013-07-23 20:57:38 -07:00
Jay Sorg
29420b3134 chansrv: no logic change, work on warning 2013-07-02 00:45:40 -07:00
Laxmikant Rashinkar
6ad1d7f78d folder redirection: fixed language issues 2013-06-08 18:44:21 -07:00
Laxmikant Rashinkar
2029867510 folder redirection: made changes to read/write routines to avoid race conditions 2013-06-02 15:33:51 -07:00
Laxmikant Rashinkar
652bacf07f file system redirection:
o vi now works with freerdp and rdesktop
2013-05-21 12:57:06 -07:00
Laxmikant Rashinkar
315ef8ad71 file system redirection:
o touch <file> was not working - fixed
    o echo "this is a string" > filename was not working - fixed
    o echo "this is a string" >> filename was not working - fixed
    o vi was not working - working now but swap files are not
      being deleted automatically - work in progress
2013-05-18 19:44:16 -07:00
Laxmikant Rashinkar
89b7cd269e smartcard: developer checkin for smartcard support 2013-05-15 17:06:05 -07:00
Laxmikant Rashinkar
ca61050b74 file system redirection: resolved merge conflicts 2013-05-05 19:38:32 -07:00
Laxmikant Rashinkar
771e2248b2 file system redirection: made changes to support rdesktop 2013-05-05 18:42:17 -07:00