summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv
diff options
context:
space:
mode:
authorMichael Savisko <savisko@yahoo.com>2018-10-11 13:11:24 +0300
committerMichael Savisko <savisko@yahoo.com>2018-10-11 13:11:24 +0300
commitba93badf7398d18619c16d2ac2b35b543c268cd6 (patch)
treefea9d032870009df44492caafb0e39a83037a0b7 /sesman/chansrv
parent6049cf8dad919ded363c0dd5ac53a56e4c82b5ad (diff)
downloadxrdp-proprietary-ba93badf7398d18619c16d2ac2b35b543c268cd6.tar.gz
xrdp-proprietary-ba93badf7398d18619c16d2ac2b35b543c268cd6.zip
Fix crash of xrdp-chansrv process, issue #1202.
In xfuse_create_file_in_xrdp_fs insure that xfuse_fs is properly initialized.
Diffstat (limited to 'sesman/chansrv')
-rw-r--r--sesman/chansrv/chansrv_fuse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c
index ff50f136..3c227a53 100644
--- a/sesman/chansrv/chansrv_fuse.c
+++ b/sesman/chansrv/chansrv_fuse.c
@@ -1228,10 +1228,17 @@ xfuse_create_file_in_xrdp_fs(tui32 device_id, int pinode, const char *name,
{
XRDP_INODE *xinode;
XRDP_INODE *xinodep;
+ time_t cur_time;
if ((name == NULL) || (strlen(name) == 0))
return NULL;
+ /* Do we have an inode table yet? */
+ if (xfuse_init_xrdp_fs())
+ {
+ return NULL;
+ }
+
xinode = g_new0(XRDP_INODE, 1);
if (xinode == NULL)
{
@@ -1239,6 +1246,8 @@ xfuse_create_file_in_xrdp_fs(tui32 device_id, int pinode, const char *name,
return NULL;
}
+ cur_time = time(0);
+
xinode->parent_inode = pinode;
xinode->inode = g_xrdp_fs.next_node++;
xinode->nlink = 1;