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
ee439631
Commit
ee439631
authored
Dec 19, 2011
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force file permissions 0755 on compiled vcl .so file to make sure it
is readable by the unprivileged user. Fixes: #1072
parent
0d036490
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
mgt_vcc.c
bin/varnishd/mgt/mgt_vcc.c
+9
-0
No files found.
bin/varnishd/mgt/mgt_vcc.c
View file @
ee439631
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#include <sys/stat.h>
#include "mgt/mgt.h"
#include "mgt/mgt.h"
...
@@ -272,6 +273,14 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag)
...
@@ -272,6 +273,14 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag)
if
(
!
i
)
if
(
!
i
)
i
=
VSUB_run
(
sb
,
run_dlopen
,
of
,
"dlopen"
,
10
);
i
=
VSUB_run
(
sb
,
run_dlopen
,
of
,
"dlopen"
,
10
);
/* Ensure the file is readable to the unprivileged user */
if
(
!
i
)
{
i
=
chmod
(
of
,
0755
);
if
(
i
)
VSB_printf
(
sb
,
"Failed to set permissions on %s: %s"
,
of
,
strerror
(
errno
));
}
if
(
i
)
{
if
(
i
)
{
(
void
)
unlink
(
of
);
(
void
)
unlink
(
of
);
return
(
NULL
);
return
(
NULL
);
...
...
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