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
fec25970
Unverified
Commit
fec25970
authored
May 27, 2024
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix worker_tmpdir when the unix jail is active
I misread the code and did not try running varnishtest as root :|
parent
77110d7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
mgt.h
bin/varnishd/mgt/mgt.h
+1
-0
mgt_jail_unix.c
bin/varnishd/mgt/mgt_jail_unix.c
+1
-0
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+6
-0
No files found.
bin/varnishd/mgt/mgt.h
View file @
fec25970
...
...
@@ -131,6 +131,7 @@ enum jail_fixfd_e {
JAIL_FIXFD_FILE
,
JAIL_FIXFD_VSMMGT
,
JAIL_FIXFD_VSMWRK
,
JAIL_FIXFD_WRKTMP
,
};
typedef
int
jail_init_f
(
char
**
);
...
...
bin/varnishd/mgt/mgt_jail_unix.c
View file @
fec25970
...
...
@@ -304,6 +304,7 @@ vju_fixfd(int fd, enum jail_fixfd_e what)
AZ
(
fchown
(
fd
,
vju_uid
,
vju_gid
));
break
;
case
JAIL_FIXFD_VSMWRK
:
case
JAIL_FIXFD_WRKTMP
:
AZ
(
fchmod
(
fd
,
0750
));
AZ
(
fchown
(
fd
,
vju_wrkuid
,
vju_wrkgid
));
break
;
...
...
bin/varnishd/mgt/mgt_main.c
View file @
fec25970
...
...
@@ -889,6 +889,12 @@ main(int argc, char * const *argv)
workdir
,
VAS_errtxt
(
errno
));
}
o
=
open
(
"worker_tmpdir"
,
O_RDONLY
);
VJ_master
(
JAIL_MASTER_SYSTEM
);
VJ_fix_fd
(
o
,
JAIL_FIXFD_WRKTMP
);
VJ_master
(
JAIL_MASTER_LOW
);
closefd
(
&
o
);
if
(
C_flag
)
AZ
(
atexit
(
mgt_Cflag_atexit
));
...
...
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