Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
f7d48515
Commit
f7d48515
authored
May 16, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging output to know when inside tightvnc-filetransfer functions.
parent
3110c0e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
handlefiletransferrequest.c
...cserver/tightvnc-filetransfer/handlefiletransferrequest.c
+4
-0
rfbtightserver.c
libvncserver/tightvnc-filetransfer/rfbtightserver.c
+14
-1
No files found.
libvncserver/tightvnc-filetransfer/handlefiletransferrequest.c
View file @
f7d48515
...
@@ -71,6 +71,8 @@ InitFileTransfer()
...
@@ -71,6 +71,8 @@ InitFileTransfer()
if
(
fileTransferInitted
)
if
(
fileTransferInitted
)
return
;
return
;
rfbLog
(
"tightvnc-filetransfer/InitFileTransfer
\n
"
);
memset
(
ftproot
,
0
,
sizeof
(
ftproot
));
memset
(
ftproot
,
0
,
sizeof
(
ftproot
));
userHome
=
GetHomeDir
(
uid
);
userHome
=
GetHomeDir
(
uid
);
...
@@ -98,6 +100,8 @@ SetFtpRoot(char* path)
...
@@ -98,6 +100,8 @@ SetFtpRoot(char* path)
struct
stat
stat_buf
;
struct
stat
stat_buf
;
DIR
*
dir
=
NULL
;
DIR
*
dir
=
NULL
;
rfbLog
(
"tightvnc-filetransfer/SetFtpRoot
\n
"
);
if
((
path
==
NULL
)
||
(
strlen
(
path
)
==
0
)
||
(
strlen
(
path
)
>
(
PATH_MAX
-
1
)))
{
if
((
path
==
NULL
)
||
(
strlen
(
path
)
==
0
)
||
(
strlen
(
path
)
>
(
PATH_MAX
-
1
)))
{
rfbLog
(
"File [%s]: Method [%s]: parameter passed is improper, ftproot"
rfbLog
(
"File [%s]: Method [%s]: parameter passed is improper, ftproot"
" not changed
\n
"
,
__FILE__
,
__FUNCTION__
);
" not changed
\n
"
,
__FILE__
,
__FUNCTION__
);
...
...
libvncserver/tightvnc-filetransfer/rfbtightserver.c
View file @
f7d48515
...
@@ -59,6 +59,7 @@ static void
...
@@ -59,6 +59,7 @@ static void
rfbVncAuthSendChallenge
(
rfbClientPtr
cl
)
rfbVncAuthSendChallenge
(
rfbClientPtr
cl
)
{
{
rfbLog
(
"tightvnc-filetransfer/rfbVncAuthSendChallenge
\n
"
);
/* 4 byte header is alreay sent. Which is rfbSecTypeVncAuth (same as rfbVncAuth). Just send the challenge. */
/* 4 byte header is alreay sent. Which is rfbSecTypeVncAuth (same as rfbVncAuth). Just send the challenge. */
rfbRandomBytes
(
cl
->
authChallenge
);
rfbRandomBytes
(
cl
->
authChallenge
);
if
(
rfbWriteExact
(
cl
,
(
char
*
)
cl
->
authChallenge
,
CHALLENGESIZE
)
<
0
)
{
if
(
rfbWriteExact
(
cl
,
(
char
*
)
cl
->
authChallenge
,
CHALLENGESIZE
)
<
0
)
{
...
@@ -84,6 +85,8 @@ rfbProcessClientAuthType(rfbClientPtr cl)
...
@@ -84,6 +85,8 @@ rfbProcessClientAuthType(rfbClientPtr cl)
int
n
,
i
;
int
n
,
i
;
rfbTightClientPtr
rtcp
=
rfbGetTightClientData
(
cl
);
rfbTightClientPtr
rtcp
=
rfbGetTightClientData
(
cl
);
rfbLog
(
"tightvnc-filetransfer/rfbProcessClientAuthType
\n
"
);
if
(
rtcp
==
NULL
)
if
(
rtcp
==
NULL
)
return
;
return
;
...
@@ -155,6 +158,8 @@ rfbSendAuthCaps(rfbClientPtr cl)
...
@@ -155,6 +158,8 @@ rfbSendAuthCaps(rfbClientPtr cl)
int
count
=
0
;
int
count
=
0
;
rfbTightClientPtr
rtcp
=
rfbGetTightClientData
(
cl
);
rfbTightClientPtr
rtcp
=
rfbGetTightClientData
(
cl
);
rfbLog
(
"tightvnc-filetransfer/rfbSendAuthCaps
\n
"
);
if
(
rtcp
==
NULL
)
if
(
rtcp
==
NULL
)
return
;
return
;
...
@@ -199,6 +204,8 @@ rfbSendTunnelingCaps(rfbClientPtr cl)
...
@@ -199,6 +204,8 @@ rfbSendTunnelingCaps(rfbClientPtr cl)
rfbTunnelingCapsMsg
caps
;
rfbTunnelingCapsMsg
caps
;
uint32_t
nTypes
=
0
;
/* we don't support tunneling yet */
uint32_t
nTypes
=
0
;
/* we don't support tunneling yet */
rfbLog
(
"tightvnc-filetransfer/rfbSendTunnelingCaps
\n
"
);
caps
.
nTunnelTypes
=
Swap32IfLE
(
nTypes
);
caps
.
nTunnelTypes
=
Swap32IfLE
(
nTypes
);
if
(
rfbWriteExact
(
cl
,
(
char
*
)
&
caps
,
sz_rfbTunnelingCapsMsg
)
<
0
)
{
if
(
rfbWriteExact
(
cl
,
(
char
*
)
&
caps
,
sz_rfbTunnelingCapsMsg
)
<
0
)
{
rfbLogPerror
(
"rfbSendTunnelingCaps: write"
);
rfbLogPerror
(
"rfbSendTunnelingCaps: write"
);
...
@@ -245,6 +252,8 @@ rfbSendInteractionCaps(rfbClientPtr cl)
...
@@ -245,6 +252,8 @@ rfbSendInteractionCaps(rfbClientPtr cl)
intr_caps
.
nEncodingTypes
=
Swap16IfLE
(
N_ENC_CAPS
);
intr_caps
.
nEncodingTypes
=
Swap16IfLE
(
N_ENC_CAPS
);
intr_caps
.
pad
=
0
;
intr_caps
.
pad
=
0
;
rfbLog
(
"tightvnc-filetransfer/rfbSendInteractionCaps
\n
"
);
/* Supported server->client message types. */
/* Supported server->client message types. */
/* For file transfer support: */
/* For file transfer support: */
i
=
0
;
i
=
0
;
...
@@ -337,7 +346,7 @@ handleMessage(rfbClientPtr cl,
...
@@ -337,7 +346,7 @@ handleMessage(rfbClientPtr cl,
{
{
rfbTightClientPtr
data
;
rfbTightClientPtr
data
;
rfbLog
(
"%s message received
\n
"
,
messageName
);
rfbLog
(
"
tightvnc-filetransfer:
%s message received
\n
"
,
messageName
);
if
((
IsFileTransferEnabled
()
==
FALSE
)
||
(
cl
->
viewOnly
==
TRUE
))
{
if
((
IsFileTransferEnabled
()
==
FALSE
)
||
(
cl
->
viewOnly
==
TRUE
))
{
rfbCloseClient
(
cl
);
rfbCloseClient
(
cl
);
...
@@ -425,6 +434,8 @@ rfbTightUsage(void) {
...
@@ -425,6 +434,8 @@ rfbTightUsage(void) {
int
int
rfbTightProcessArg
(
int
argc
,
char
*
argv
[])
{
rfbTightProcessArg
(
int
argc
,
char
*
argv
[])
{
rfbLog
(
"tightvnc-filetransfer/rfbTightProcessArg
\n
"
);
InitFileTransfer
();
InitFileTransfer
();
if
(
argc
<
1
)
if
(
argc
<
1
)
...
@@ -453,6 +464,8 @@ rfbTightProcessArg(int argc, char *argv[]) {
...
@@ -453,6 +464,8 @@ rfbTightProcessArg(int argc, char *argv[]) {
void
void
rfbHandleSecTypeTight
(
rfbClientPtr
cl
)
{
rfbHandleSecTypeTight
(
rfbClientPtr
cl
)
{
rfbLog
(
"tightvnc-filetransfer/rfbHandleSecTypeTight
\n
"
);
rfbTightClientPtr
rtcp
=
(
rfbTightClientPtr
)
malloc
(
sizeof
(
rfbTightClientRec
));
rfbTightClientPtr
rtcp
=
(
rfbTightClientPtr
)
malloc
(
sizeof
(
rfbTightClientRec
));
if
(
rtcp
==
NULL
)
{
if
(
rtcp
==
NULL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment