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
8de6262f
Commit
8de6262f
authored
May 25, 2020
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing files and directories needs Jail attention
Add VJ_unlink() and VJ_rmdir() to do so.
parent
e4fb2a94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
mgt.h
bin/varnishd/mgt/mgt.h
+2
-0
mgt_jail.c
bin/varnishd/mgt/mgt_jail.c
+22
-0
No files found.
bin/varnishd/mgt/mgt.h
View file @
8de6262f
...
...
@@ -147,6 +147,8 @@ void VJ_subproc(enum jail_subproc_e);
int
VJ_make_workdir
(
const
char
*
);
int
VJ_make_subdir
(
const
char
*
,
const
char
*
,
struct
vsb
*
);
void
VJ_fix_fd
(
int
,
enum
jail_fixfd_e
);
void
VJ_unlink
(
const
char
*
);
void
VJ_rmdir
(
const
char
*
);
extern
const
struct
jail_tech
jail_tech_unix
;
extern
const
struct
jail_tech
jail_tech_solaris
;
...
...
bin/varnishd/mgt/mgt_jail.c
View file @
8de6262f
...
...
@@ -196,6 +196,28 @@ VJ_make_subdir(const char *dname, const char *what, struct vsb *vsb)
return
(
0
);
}
void
VJ_unlink
(
const
char
*
fname
)
{
VJ_master
(
JAIL_MASTER_FILE
);
if
(
unlink
(
fname
))
{
fprintf
(
stderr
,
"Could not delete '%s': %s
\n
"
,
fname
,
strerror
(
errno
));
}
VJ_master
(
JAIL_MASTER_LOW
);
}
void
VJ_rmdir
(
const
char
*
dname
)
{
VJ_master
(
JAIL_MASTER_FILE
);
if
(
rmdir
(
dname
))
{
fprintf
(
stderr
,
"Could not rmdir '%s': %s
\n
"
,
dname
,
strerror
(
errno
));
}
VJ_master
(
JAIL_MASTER_LOW
);
}
void
VJ_fix_fd
(
int
fd
,
enum
jail_fixfd_e
what
)
{
...
...
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