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
7a3e2363
Commit
7a3e2363
authored
Jun 09, 2006
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: make -display WAIT + -unixpw work on Solaris.
parent
1776a3a5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
18 deletions
+45
-18
ChangeLog
x11vnc/ChangeLog
+3
-0
README
x11vnc/README
+9
-9
unixpw.c
x11vnc/unixpw.c
+7
-1
user.c
x11vnc/user.c
+26
-8
No files found.
x11vnc/ChangeLog
View file @
7a3e2363
2006-06-09 Karl Runge <runge@karlrunge.com>
* x11vnc: make -display WAIT + -unixpw work on Solaris.
2006-06-08 Karl Runge <runge@karlrunge.com>
* x11vnc: XOpenDisplay wrapper for raw xauth data, -unixpw
su_verify() to run any cmd, -users unixpw= mode. -display WAIT:...
...
...
x11vnc/README
View file @
7a3e2363
x11vnc
README
file
Date
:
Thu
Jun
8
18
:
47
:
4
5
EDT
2006
x11vnc
README
file
Date
:
Thu
Jun
8
23
:
48
:
3
5
EDT
2006
The
following
information
is
taken
from
these
URLs
:
...
...
@@ -3329,9 +3329,9 @@ service x11vncservice
x11vnc'
s
(
see
[
392
]
this
example
).
The
[
393
]-
display
WAIT
option
waits
until
a
VNC
viewer
is
connected
before
connect
ing
to
the
X
display
,
and
can
also
be
used
to
run
a
before
attach
ing
to
the
X
display
,
and
can
also
be
used
to
run
a
command
that
returns
the
DISPLAY
and
XAUTHORITY
data
.
So
one
could
supply
"-display WAIT:find_display"
where
the
script
find_display
supply
"-display WAIT:
cmd=
find_display"
where
the
script
find_display
might
look
something
like
:
#
!/bin/sh
...
...
@@ -3367,7 +3367,7 @@ xauth extract - "$display" 2>/dev/null
exit
0
A
some
point
a
standard
script
created
and
will
be
used
by
default
A
t
some
point
a
standard
script
like
the
above
will
be
used
by
default
under
"-display WAIT:cmd=FINDDISPLAY"
.
The
format
the
script
returns
is
the
first
line
is
DISPLAY
=:
disp
and
any
remaining
lines
are
either
XAUTHORITY
=
file
or
raw
xauth
data
(
the
above
example
does
the
latter
).
...
...
@@ -3396,10 +3396,10 @@ exit 0
Note
that
[
397
]
SSL
is
required
for
this
mode
because
otherwise
the
unix
password
would
be
passed
in
clear
text
.
In
general
-
unixpw
is
not
required
for
this
s
cheme
,
but
it
is
convenient
because
it
determines
who
the
user
is
whose
display
should
be
sought
.
Otherwise
the
find_display
script
would
have
to
use
some
scheme
to
work
all
of
this
out
.
required
for
this
s
ort
of
scheme
,
but
it
is
convenient
because
it
determines
exactly
who
the
user
is
whose
display
should
be
sought
.
Otherwise
the
find_display
script
would
have
to
use
some
method
to
work
out
DISPLAY
,
XAUTHORITY
,
etc
.
Q
-
52
:
Can
I
have
x11vnc
restart
itself
after
it
terminates
?
...
...
@@ -3436,7 +3436,7 @@ exit 0
free
to
customize
the
default
index
.
vnc
file
in
the
classes
directory
.
As
of
May
/
2005
the
[
400
]-
http
option
will
try
to
guess
where
the
Java
classes
jar
file
is
by
looking
a
expected
locations
.
classes
jar
file
is
by
looking
in
expected
locations
.
Also
note
that
if
you
wanted
to
,
you
could
also
start
the
Java
viewer
entirely
from
the
viewer
-
side
by
having
the
jar
file
there
and
using
...
...
x11vnc/unixpw.c
View file @
7a3e2363
...
...
@@ -546,7 +546,13 @@ if (db) fprintf(stderr, "slave is: %s fd=%d\n", slave, fd);
/* synchronize with parent: */
write
(
2
,
"C"
,
1
);
execlp
(
bin_su
,
bin_su
,
user
,
"-c"
,
bin_true
,
(
char
*
)
NULL
);
if
(
cmd
)
{
execlp
(
bin_su
,
bin_su
,
"-"
,
user
,
"-c"
,
bin_true
,
(
char
*
)
NULL
);
}
else
{
execlp
(
bin_su
,
bin_su
,
user
,
"-c"
,
bin_true
,
(
char
*
)
NULL
);
}
exit
(
1
);
}
/* parent */
...
...
x11vnc/user.c
View file @
7a3e2363
...
...
@@ -1082,15 +1082,15 @@ int wait_for_client(int *argc, char** argv, int http) {
memset
(
line2
,
0
,
16384
);
if
(
unixpw
)
{
int
res
=
0
,
k
,
j
;
int
res
=
0
,
k
,
j
,
i
;
char
line
[
18000
];
memset
(
line
,
0
,
18000
);
if
(
keep_unixpw_user
&&
keep_unixpw_pass
)
{
n
=
18000
;
res
=
su_verify
(
keep_unixpw_user
,
keep_unixpw_pass
,
cmd
,
line
,
&
n
);
res
=
su_verify
(
keep_unixpw_user
,
keep_unixpw_pass
,
cmd
,
line
,
&
n
);
strzero
(
keep_unixpw_user
);
strzero
(
keep_unixpw_pass
);
}
...
...
@@ -1100,17 +1100,35 @@ int wait_for_client(int *argc, char** argv, int http) {
rfbLog
(
"wait_for_client: cmd failed: %s
\n
"
,
cmd
);
clean_up_exit
(
1
);
}
/*
* we need to hunt for DISPLAY= since there may be
* a login banner or something at the beginning.
*/
q
=
strstr
(
line
,
"DISPLAY="
);
if
(
!
q
)
{
q
=
line
;
}
n
-=
(
q
-
line
);
for
(
k
=
0
;
k
<
1024
;
k
++
)
{
line1
[
k
]
=
line
[
k
];
if
(
line
[
k
]
==
'\n'
)
{
line1
[
k
]
=
q
[
k
];
if
(
q
[
k
]
==
'\n'
)
{
k
++
;
break
;
}
}
n
-=
k
;
while
(
j
<
16384
)
{
line2
[
j
]
=
line
[
k
+
j
];
j
++
;
i
=
0
;
for
(
j
=
0
;
j
<
16384
;
j
++
)
{
if
(
j
<
16384
-
1
)
{
/* xauth data, assume pty added CR */
if
(
q
[
k
+
j
]
==
'\r'
&&
q
[
k
+
j
+
1
]
==
'\n'
)
{
continue
;
}
}
line2
[
i
]
=
q
[
k
+
j
];
i
++
;
}
}
else
{
FILE
*
p
=
popen
(
cmd
,
"r"
);
...
...
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