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
1c3af685
Commit
1c3af685
authored
May 15, 2006
by
steven_carr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default to RFB 3.8, add command line option to specify the RFB version.
parent
ccdbe8f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
6 deletions
+40
-6
ChangeLog
ChangeLog
+6
-0
cargs.c
libvncserver/cargs.c
+12
-0
main.c
libvncserver/main.c
+4
-3
rfbserver.c
libvncserver/rfbserver.c
+14
-2
rfb.h
rfb/rfb.h
+3
-0
rfbproto.h
rfb/rfbproto.h
+1
-1
No files found.
ChangeLog
View file @
1c3af685
2006-05-15 Steven Carr <scarr@jsa-usa.com>
* Default to RFB 3.8
* Add command line options:
-rfbversion X.Y Sets the version thatthe server reports
-permitfiletransfer Permits File Transfer (Default is Deny)
2006-05-15 Steven Carr <scarr@jsa-usa.com>
* The great UltraVNC Compatibility Commit!
libvncserver now supports the following messages:
...
...
libvncserver/cargs.c
View file @
1c3af685
...
...
@@ -25,6 +25,8 @@ rfbUsage(void)
fprintf
(
stderr
,
"-rfbwait time max time in ms to wait for RFB client
\n
"
);
fprintf
(
stderr
,
"-rfbauth passwd-file use authentication on RFB protocol
\n
"
" (use 'storepasswd' to create a password file)
\n
"
);
fprintf
(
stderr
,
"-rfbversion 3.x Set the version of the RFB we choose to advertise
\n
"
);
fprintf
(
stderr
,
"-permitfiletransfer permit file transfer support
\n
"
);
fprintf
(
stderr
,
"-passwd plain-password use authentication
\n
"
" (use plain-password as password, USE AT YOUR RISK)
\n
"
);
fprintf
(
stderr
,
"-deferupdate time time in ms to defer updates "
...
...
@@ -90,6 +92,16 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
return
FALSE
;
}
rfbScreen
->
authPasswdData
=
argv
[
++
i
];
fprintf
(
stderr
,
"-permitfiletransfer permit file transfer support
\n
"
);
}
else
if
(
strcmp
(
argv
[
i
],
"-permitfiletransfer"
)
==
0
)
{
/* -permitfiletransfer */
rfbScreen
->
permitFileTransfer
=
TRUE
;
}
else
if
(
strcmp
(
argv
[
i
],
"-rfbversion"
)
==
0
)
{
/* -rfbversion 3.6 */
if
(
i
+
1
>=
*
argc
)
{
rfbUsage
();
return
FALSE
;
}
sscanf
(
argv
[
++
i
],
"%d.%d"
,
&
rfbScreen
->
protocolMajorVersion
,
&
rfbScreen
->
protocolMinorVersion
);
}
else
if
(
strcmp
(
argv
[
i
],
"-passwd"
)
==
0
)
{
/* -passwd password */
char
**
passwds
=
malloc
(
sizeof
(
char
**
)
*
2
);
if
(
i
+
1
>=
*
argc
)
{
...
...
libvncserver/main.c
View file @
1c3af685
...
...
@@ -836,9 +836,10 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
screen
->
handleEventsEagerly
=
FALSE
;
/* Emulate UltraVNC Server by default */
screen
->
protocolMajorVersion
=
3
;
screen
->
protocolMinorVersion
=
6
;
screen
->
protocolMajorVersion
=
rfbProtocolMajorVersion
;
screen
->
protocolMinorVersion
=
rfbProtocolMinorVersion
;
screen
->
permitFileTransfer
=
FALSE
;
if
(
!
rfbProcessArguments
(
screen
,
argc
,
argv
))
{
free
(
screen
);
...
...
libvncserver/rfbserver.c
View file @
1c3af685
...
...
@@ -1589,8 +1589,20 @@ rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t con
return
rfbSendFileTransferMessage
(
cl
,
rfbFileTransferAccess
,
0
,
-
1
,
0
,
""
);
/* Deny */
}
}
rfbLog
(
"rfbProcessFileTransfer() File Transfer Permission DENIED by default!
\n
"
);
return
rfbSendFileTransferMessage
(
cl
,
rfbFileTransferAccess
,
0
,
-
1
,
0
,
""
);
/* DEFAULT: DENY (for security) */
else
{
if
(
cl
->
screen
->
permitFileTransfer
)
{
rfbLog
(
"rfbProcessFileTransfer() File Transfer Permission Granted!
\n
"
);
return
rfbSendFileTransferMessage
(
cl
,
rfbFileTransferAccess
,
0
,
1
,
0
,
""
);
/* Permit */
}
else
{
rfbLog
(
"rfbProcessFileTransfer() File Transfer Permission DENIED by default!
\n
"
);
return
rfbSendFileTransferMessage
(
cl
,
rfbFileTransferAccess
,
0
,
-
1
,
0
,
""
);
/* DEFAULT: DENY (for security) */
}
}
}
break
;
...
...
rfb/rfb.h
View file @
1c3af685
...
...
@@ -348,6 +348,9 @@ typedef struct _rfbScreenInfo
/* What does the server tell the new clients which version it supports */
int
protocolMajorVersion
;
int
protocolMinorVersion
;
/* command line authorization of file transfers */
rfbBool
permitFileTransfer
;
}
rfbScreenInfo
,
*
rfbScreenInfoPtr
;
...
...
rfb/rfbproto.h
View file @
1c3af685
...
...
@@ -218,7 +218,7 @@ typedef struct {
#define rfbProtocolVersionFormat "RFB %03d.%03d\n"
#define rfbProtocolMajorVersion 3
#define rfbProtocolMinorVersion
6
#define rfbProtocolMinorVersion
8
/* UltraVNC Viewer examines rfbProtocolMinorVersion number (4, and 6)
* to identify if the server supports File Transfer
*/
...
...
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