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
eb08d83d
Commit
eb08d83d
authored
Feb 24, 2006
by
rohit_99129
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added method to get extension specific client data
parent
d3599be1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
34 deletions
+42
-34
ChangeLog
ChangeLog
+4
-0
main.c
libvncserver/main.c
+16
-0
rfbtightserver.c
libvncserver/tightvnc-filetransfer/rfbtightserver.c
+21
-34
rfb.h
rfb/rfb.h
+1
-0
No files found.
ChangeLog
View file @
eb08d83d
2006-02-24 Rohit Kumar <rokumar@novell.com>
* main.c, rfbtightserver.c, rfb.h: added method to get
extension specific client data.
2006-02-22 Rohit Kumar <rokumar@novell.com>
* auth.c, main.c, rfbtightserver.c, rfb.h: add methods to
unregister extensions and security types.
...
...
libvncserver/main.c
View file @
eb08d83d
...
...
@@ -194,6 +194,22 @@ rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension)
return
FALSE
;
}
void
*
rfbGetExtensionClientData
(
rfbClientPtr
cl
,
rfbExtensionData
*
extension
)
{
rfbExtensionData
*
data
=
cl
->
extensions
;
while
(
data
&&
data
->
extension
!=
extension
)
data
=
data
->
next
;
if
(
data
==
NULL
)
{
rfbLog
(
"Extension is not enabled !
\n
"
);
/* rfbCloseClient(cl); */
return
NULL
;
}
return
data
->
data
;
}
/*
* Logging
*/
...
...
libvncserver/tightvnc-filetransfer/rfbtightserver.c
View file @
eb08d83d
...
...
@@ -37,20 +37,18 @@
extern
rfbProtocolExtension
tightVncFileTransferExtension
;
rfbTightClientPtr
rfbGetTightClientData
(
rfbClientPtr
cl
)
rfbTightClientPtr
rfbGetTightClientData
(
rfbClientPtr
cl
)
{
rfbExtensionData
*
data
=
cl
->
extensions
;
while
(
data
&&
data
->
extension
!=
&
tightVncFileTransferExtension
)
data
=
data
->
next
;
if
(
data
==
NULL
)
{
rfbLog
(
"TightVNC enabled, but client data missing?!
\n
"
);
rfbTightClientPtr
rtcp
=
(
rfbTightClientPtr
)
rfbGetExtensionClientData
(
cl
,
&
tightVncFileTransferExtension
);
if
(
rtcp
==
NULL
)
{
rfbLog
(
"Extension client data is null, closing the connection !
\n
"
);
rfbCloseClient
(
cl
);
return
NULL
;
}
return
(
rfbTightClientPtr
)
data
->
data
;
return
rtcp
;
}
/*
...
...
@@ -58,8 +56,7 @@ rfbTightClientPtr rfbGetTightClientData(rfbClientPtr cl)
*/
static
void
rfbVncAuthSendChallenge
(
cl
)
rfbClientPtr
cl
;
rfbVncAuthSendChallenge
(
rfbClientPtr
cl
)
{
/* 4 byte header is alreay sent. Which is rfbSecTypeVncAuth (same as rfbVncAuth). Just send the challenge. */
...
...
@@ -81,8 +78,7 @@ rfbVncAuthSendChallenge(cl)
*/
void
rfbProcessClientAuthType
(
cl
)
rfbClientPtr
cl
;
rfbProcessClientAuthType
(
rfbClientPtr
cl
)
{
uint32_t
auth_type
;
int
n
,
i
;
...
...
@@ -137,8 +133,7 @@ rfbProcessClientAuthType(cl)
*/
void
rfbProcessClientTunnelingType
(
cl
)
rfbClientPtr
cl
;
rfbProcessClientTunnelingType
(
rfbClientPtr
cl
)
{
/* If we were called, then something's really wrong. */
rfbLog
(
"rfbProcessClientTunnelingType: not implemented
\n
"
);
...
...
@@ -153,8 +148,7 @@ rfbProcessClientTunnelingType(cl)
*/
static
void
rfbSendAuthCaps
(
cl
)
rfbClientPtr
cl
;
rfbSendAuthCaps
(
rfbClientPtr
cl
)
{
rfbAuthenticationCapsMsg
caps
;
rfbCapabilityInfo
caplist
[
MAX_AUTH_CAPS
];
...
...
@@ -195,16 +189,12 @@ rfbSendAuthCaps(cl)
}
/*
* Send the list of our tunneling capabilities (protocol 3.7t).
*/
static
void
rfbSendTunnelingCaps
(
cl
)
rfbClientPtr
cl
;
rfbSendTunnelingCaps
(
rfbClientPtr
cl
)
{
rfbTunnelingCapsMsg
caps
;
uint32_t
nTypes
=
0
;
/* we don't support tunneling yet */
...
...
@@ -241,8 +231,7 @@ rfbSendTunnelingCaps(cl)
#define N_ENC_CAPS 12
void
rfbSendInteractionCaps
(
cl
)
rfbClientPtr
cl
;
rfbSendInteractionCaps
(
rfbClientPtr
cl
)
{
rfbInteractionCapsMsg
intr_caps
;
rfbCapabilityInfo
smsg_list
[
N_SMSG_CAPS
];
...
...
@@ -331,9 +320,7 @@ rfbSendInteractionCaps(cl)
rfbBool
rfbTightExtensionInit
(
cl
,
data
)
rfbClientPtr
cl
;
void
**
data
;
rfbTightExtensionInit
(
rfbClientPtr
cl
,
void
**
data
)
{
rfbSendInteractionCaps
(
cl
);
...
...
@@ -364,10 +351,8 @@ handleMessage(rfbClientPtr cl,
}
rfbBool
rfbTightExtensionMsgHandler
(
cl
,
data
,
msg
)
struct
_rfbClientRec
*
cl
;
void
*
data
;
const
rfbClientToServerMsg
*
msg
;
rfbTightExtensionMsgHandler
(
struct
_rfbClientRec
*
cl
,
void
*
data
,
const
rfbClientToServerMsg
*
msg
)
{
switch
(
msg
->
type
)
{
...
...
@@ -406,7 +391,8 @@ const rfbClientToServerMsg* msg;
/*
We shouldn't close the connection here for unhandled msg, it should be left to libvncserver.
We shouldn't close the connection here for unhandled msg,
it should be left to libvncserver.
rfbLog(" ... closing connection\n");
rfbCloseClient(cl);
...
...
@@ -469,7 +455,8 @@ rfbHandleSecTypeTight(rfbClientPtr cl) {
if
(
rtcp
==
NULL
)
{
/* Error condition close socket */
rfbLog
(
"Memory error has occured while handling Tight security type... closing connection.
\n
"
);
rfbLog
(
"Memory error has occured while handling "
"Tight security type... closing connection.
\n
"
);
rfbCloseClient
(
cl
);
return
;
}
...
...
rfb/rfb.h
View file @
eb08d83d
...
...
@@ -799,6 +799,7 @@ void rfbReleaseExtensionIterator();
rfbBool
rfbEnableExtension
(
rfbClientPtr
cl
,
rfbProtocolExtension
*
extension
,
void
*
data
);
rfbBool
rfbDisableExtension
(
rfbClientPtr
cl
,
rfbProtocolExtension
*
extension
);
void
*
rfbGetExtensionClientData
(
rfbClientPtr
cl
,
rfbExtensionData
*
extension
);
/* to check against plain passwords */
rfbBool
rfbCheckPasswordByList
(
rfbClientPtr
cl
,
const
char
*
response
,
int
len
);
...
...
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