Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
c2799eb4
Commit
c2799eb4
authored
Jun 02, 2021
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
varnishtest: Give disable_aslr a normal treatment
Only the special cases get special handling.
parent
8e0c6264
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
vtc_misc.c
bin/varnishtest/vtc_misc.c
+16
-10
No files found.
bin/varnishtest/vtc_misc.c
View file @
c2799eb4
...
...
@@ -387,6 +387,20 @@ ipvx_works(const char *target)
return
(
0
);
}
/**********************************************************************/
static
int
addr_no_randomize_works
(
void
)
{
int
r
=
0
;
#ifdef HAVE_SYS_PERSONALITY_H
r
=
personality
(
0xffffffff
);
r
=
personality
(
r
|
ADDR_NO_RANDOMIZE
);
#endif
return
(
r
>=
0
);
}
/* SECTION: feature feature
*
* Test that the required feature(s) for a test are available, and skip
...
...
@@ -488,6 +502,7 @@ cmd_feature(CMD_ARGS)
FEATURE
(
"ipv6"
,
ipvx_works
(
"[::1]"
));
FEATURE
(
"pcre_jit"
,
VRE_has_jit
);
FEATURE
(
"64bit"
,
sizeof
(
void
*
)
==
8
);
FEATURE
(
"disable_aslr"
,
addr_no_randomize_works
());
FEATURE
(
"dns"
,
dns_works
());
FEATURE
(
"topbuild"
,
iflg
);
FEATURE
(
"root"
,
!
geteuid
());
...
...
@@ -498,16 +513,7 @@ cmd_feature(CMD_ARGS)
FEATURE
(
"sanitizer"
,
sanitizer
);
FEATURE
(
"SO_RCVTIMEO_WORKS"
,
so_rcvtimeo_works
);
if
(
!
strcmp
(
feat
,
"disable_aslr"
))
{
good
=
1
;
skip
=
neg
;
#ifdef HAVE_SYS_PERSONALITY_H
r
=
personality
(
0xffffffff
);
r
=
personality
(
r
|
ADDR_NO_RANDOMIZE
);
if
(
r
<
0
)
skip
=
!
neg
;
#endif
}
else
if
(
!
strcmp
(
feat
,
"cmd"
))
{
if
(
!
strcmp
(
feat
,
"cmd"
))
{
good
=
1
;
skip
=
neg
;
av
++
;
...
...
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