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
d9214f99
Commit
d9214f99
authored
Nov 19, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmdline arg -passwd added
parent
c301d627
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
cargs.c
cargs.c
+9
-0
main.c
main.c
+3
-2
rfb.h
rfb.h
+3
-0
No files found.
cargs.c
View file @
d9214f99
...
...
@@ -21,6 +21,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
,
"-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 "
"(default 40)
\n
"
);
fprintf
(
stderr
,
"-desktop name VNC desktop name (default
\"
LibVNCServer
\"
)
\n
"
);
...
...
@@ -51,6 +53,13 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
}
else
if
(
strcmp
(
argv
[
i
],
"-rfbauth"
)
==
0
)
{
/* -rfbauth passwd-file */
if
(
i
+
1
>=
*
argc
)
rfbUsage
();
rfbScreen
->
rfbAuthPasswdData
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-passwd"
)
==
0
)
{
/* -passwd password */
char
**
passwds
=
malloc
(
sizeof
(
char
**
)
*
2
);
if
(
i
+
1
>=
*
argc
)
rfbUsage
();
passwds
[
0
]
=
argv
[
++
i
];
passwds
[
1
]
=
0
;
rfbScreen
->
rfbAuthPasswdData
=
passwds
;
rfbScreen
->
passwordCheck
=
rfbCheckPasswordByList
;
}
else
if
(
strcmp
(
argv
[
i
],
"-deferupdate"
)
==
0
)
{
/* -desktop desktop-name */
if
(
i
+
1
>=
*
argc
)
rfbUsage
();
rfbScreen
->
rfbDeferUpdateTime
=
atoi
(
argv
[
++
i
]);
...
...
main.c
View file @
d9214f99
...
...
@@ -401,7 +401,7 @@ Bool defaultPasswordCheck(rfbClientPtr cl,char* response,int len)
/* for this method, rfbAuthPasswdData is really a pointer to an array
of char*'s, where the last pointer is 0. */
Bool
c
heckPasswordByList
(
rfbClientPtr
cl
,
char
*
response
,
int
len
)
Bool
rfbC
heckPasswordByList
(
rfbClientPtr
cl
,
char
*
response
,
int
len
)
{
char
**
passwds
;
...
...
@@ -465,6 +465,8 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
rfbScreen
->
height
=
height
;
rfbScreen
->
bitsPerPixel
=
rfbScreen
->
depth
=
8
*
bytesPerPixel
;
rfbScreen
->
passwordCheck
=
defaultPasswordCheck
;
rfbProcessArguments
(
rfbScreen
,
argc
,
argv
);
#ifdef WIN32
...
...
@@ -532,7 +534,6 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
rfbScreen
->
setXCutText
=
defaultSetXCutText
;
rfbScreen
->
getCursorPtr
=
defaultGetCursorPtr
;
rfbScreen
->
setTranslateFunction
=
rfbSetTranslateFunction
;
rfbScreen
->
passwordCheck
=
defaultPasswordCheck
;
rfbScreen
->
newClientHook
=
doNothingWithClient
;
rfbScreen
->
displayHook
=
0
;
...
...
rfb.h
View file @
d9214f99
...
...
@@ -748,6 +748,9 @@ void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y
void
rfbMarkRegionAsModified
(
rfbScreenInfoPtr
rfbScreen
,
sraRegionPtr
modRegion
);
void
doNothingWithClient
(
rfbClientPtr
cl
);
/* to check against plain passwords */
Bool
rfbCheckPasswordByList
(
rfbClientPtr
cl
,
char
*
response
,
int
len
);
/* functions to make a vnc server */
extern
rfbScreenInfoPtr
rfbGetScreen
(
int
*
argc
,
char
**
argv
,
int
width
,
int
height
,
int
bitsPerSample
,
int
samplesPerPixel
,
...
...
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