Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
dimbor
nx-libs
Commits
da5da209
Commit
da5da209
authored
Jun 13, 2008
by
Eamon Walsh
Committed by
Ulrich Sibiller
Oct 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multiple warnings in os/xdmauth.c.
v1: Eamon Walsh v2: backport to nx-libs 3.6.x (Ulrich Sibiller)
parent
b60f66bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
xdmauth.c
nx-X11/programs/Xserver/os/xdmauth.c
+12
-10
No files found.
nx-X11/programs/Xserver/os/xdmauth.c
View file @
da5da209
...
...
@@ -69,8 +69,8 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
{
XdmAuthKeyPtr
incoming
;
XdmcpUnwrap
(
incomingData
->
data
,
&
privateKey
,
incomingData
->
data
,
incomingData
->
length
);
XdmcpUnwrap
(
incomingData
->
data
,
(
unsigned
char
*
)
&
privateKey
,
incomingData
->
data
,
incomingData
->
length
);
if
(
packet_type
==
ACCEPT
)
{
if
(
incomingData
->
length
!=
8
)
return
FALSE
;
...
...
@@ -89,7 +89,8 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
outgoingData
->
data
=
0
;
if
(
packet_type
==
REQUEST
)
{
if
(
XdmcpAllocARRAY8
(
outgoingData
,
8
))
XdmcpWrap
(
&
rho
,
&
privateKey
,
outgoingData
->
data
,
8
);
XdmcpWrap
((
unsigned
char
*
)
&
rho
,
(
unsigned
char
*
)
&
privateKey
,
outgoingData
->
data
,
8
);
}
return
TRUE
;
}
...
...
@@ -99,7 +100,8 @@ XdmAuthenticationAddAuth (int name_len, char *name,
int
data_len
,
char
*
data
)
{
Bool
ret
;
XdmcpUnwrap
(
data
,
(
unsigned
char
*
)
&
privateKey
,
data
,
data_len
);
XdmcpUnwrap
((
unsigned
char
*
)
data
,
(
unsigned
char
*
)
&
privateKey
,
(
unsigned
char
*
)
data
,
data_len
);
authFromXDMCP
=
TRUE
;
ret
=
AddAuthorization
(
name_len
,
name
,
data_len
,
data
);
authFromXDMCP
=
FALSE
;
...
...
@@ -152,11 +154,11 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
}
XdmcpGenerateKey
(
&
rho
);
XdmcpRegisterAuthentication
(
XdmAuthenticationName
,
XdmAuthenticationNameLen
,
(
unsigned
char
*
)
&
rho
,
(
char
*
)
&
rho
,
sizeof
(
rho
),
XdmAuthenticationValidator
,
XdmAuthenticationGenerator
,
XdmAuthenticationAddAuth
);
(
ValidatorFunc
)
XdmAuthenticationValidator
,
(
GeneratorFunc
)
XdmAuthenticationGenerator
,
(
AddAuthorFunc
)
XdmAuthenticationAddAuth
);
}
#endif
/* XDMCP */
...
...
@@ -387,7 +389,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie,
if
(
!
plain
)
return
(
XID
)
-
1
;
for
(
auth
=
xdmAuth
;
auth
;
auth
=
auth
->
next
)
{
XdmcpUnwrap
(
cookie
,
(
unsigned
char
*
)
&
auth
->
key
,
plain
,
cookie_length
);
XdmcpUnwrap
((
unsigned
char
*
)
cookie
,
(
unsigned
char
*
)
&
auth
->
key
,
plain
,
cookie_length
);
if
((
client
=
XdmAuthorizationValidate
(
plain
,
cookie_length
,
&
auth
->
rho
,
xclient
,
reason
))
!=
NULL
)
{
client
->
next
=
xdmClients
;
...
...
@@ -432,7 +434,7 @@ XdmToID (unsigned short cookie_length, char *cookie)
if
(
!
plain
)
return
(
XID
)
-
1
;
for
(
auth
=
xdmAuth
;
auth
;
auth
=
auth
->
next
)
{
XdmcpUnwrap
(
cookie
,
(
unsigned
char
*
)
&
auth
->
key
,
plain
,
cookie_length
);
XdmcpUnwrap
((
unsigned
char
*
)
cookie
,
(
unsigned
char
*
)
&
auth
->
key
,
plain
,
cookie_length
);
if
((
client
=
XdmAuthorizationValidate
(
plain
,
cookie_length
,
&
auth
->
rho
,
NULL
,
NULL
))
!=
NULL
)
{
free
(
client
);
...
...
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