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
8f609404
Commit
8f609404
authored
Jul 24, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXproperty.c: prevent deletion of NX_AGENT_VERSION property
Fixes ArcticaProject/nx-libs#825
parent
9dca2c59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
property.c
nx-X11/programs/Xserver/dix/property.c
+2
-0
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+47
-0
No files found.
nx-X11/programs/Xserver/dix/property.c
View file @
8f609404
...
...
@@ -655,6 +655,7 @@ ProcListProperties(ClientPtr client)
return
(
client
->
noClientException
);
}
#ifndef NXAGENT_SERVER
int
ProcDeleteProperty
(
register
ClientPtr
client
)
{
...
...
@@ -692,3 +693,4 @@ ProcDeleteProperty(register ClientPtr client)
else
return
(
result
);
}
#endif
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
8f609404
...
...
@@ -682,3 +682,50 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
return
(
Success
);
}
#endif
int
ProcDeleteProperty
(
register
ClientPtr
client
)
{
WindowPtr
pWin
;
REQUEST
(
xDeletePropertyReq
);
int
result
;
REQUEST_SIZE_MATCH
(
xDeletePropertyReq
);
UpdateCurrentTime
();
pWin
=
(
WindowPtr
)
SecurityLookupWindow
(
stuff
->
window
,
client
,
DixWriteAccess
);
if
(
!
pWin
)
return
(
BadWindow
);
if
(
!
ValidAtom
(
stuff
->
property
))
{
client
->
errorValue
=
stuff
->
property
;
return
(
BadAtom
);
}
#ifdef XCSECURITY
switch
(
SecurityCheckPropertyAccess
(
client
,
pWin
,
stuff
->
property
,
DixDestroyAccess
))
{
case
SecurityErrorOperation
:
client
->
errorValue
=
stuff
->
property
;
return
BadAtom
;;
case
SecurityIgnoreOperation
:
return
Success
;
}
#endif
#ifdef NXAGENT_SERVER
/* prevent clients from deleting the NX_AGENT_VERSION property */
{
Atom
prop
=
MakeAtom
(
"NX_AGENT_VERSION"
,
strlen
(
"NX_AGENT_VERSION"
),
True
);
if
(
stuff
->
property
==
prop
)
return
client
->
noClientException
;
}
#endif
result
=
DeleteProperty
(
pWin
,
stuff
->
property
);
if
(
client
->
noClientException
!=
Success
)
return
(
client
->
noClientException
);
else
return
(
result
);
}
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