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
fac01a55
Commit
fac01a55
authored
Mar 13, 2015
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
differenciate JAIL_MASTER_HIGH into _PRIVPORT and _STORAGE
parent
6d039769
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
7 deletions
+10
-7
mgt.h
bin/varnishd/mgt/mgt.h
+2
-1
mgt_acceptor.c
bin/varnishd/mgt/mgt_acceptor.c
+1
-1
mgt_cli.c
bin/varnishd/mgt/mgt_cli.c
+1
-1
mgt_jail_solaris.c
bin/varnishd/mgt/mgt_jail_solaris.c
+2
-1
mgt_jail_unix.c
bin/varnishd/mgt/mgt_jail_unix.c
+3
-2
stevedore_utils.c
bin/varnishd/storage/stevedore_utils.c
+1
-1
No files found.
bin/varnishd/mgt/mgt.h
View file @
fac01a55
...
...
@@ -73,7 +73,8 @@ enum jail_subproc_e {
enum
jail_master_e
{
JAIL_MASTER_LOW
,
JAIL_MASTER_HIGH
,
JAIL_MASTER_STORAGE
,
JAIL_MASTER_PRIVPORT
,
};
typedef
int
jail_init_f
(
char
**
);
...
...
bin/varnishd/mgt/mgt_acceptor.c
View file @
fac01a55
...
...
@@ -62,7 +62,7 @@ MAC_open_sockets(void)
struct
listen_sock
*
ls
;
int
good
=
0
;
VJ_master
(
JAIL_MASTER_
HIGH
);
VJ_master
(
JAIL_MASTER_
PRIVPORT
);
VTAILQ_FOREACH
(
ls
,
&
heritage
.
socks
,
list
)
{
if
(
ls
->
sock
>=
0
)
{
good
++
;
...
...
bin/varnishd/mgt/mgt_cli.c
View file @
fac01a55
...
...
@@ -522,7 +522,7 @@ mct_callback(void *priv, const struct suckaddr *sa)
char
pbuf
[
VTCP_PORTBUFSIZE
];
struct
telnet
*
tn
;
VJ_master
(
JAIL_MASTER_
HIGH
);
VJ_master
(
JAIL_MASTER_
PRIVPORT
);
sock
=
VTCP_listen
(
sa
,
10
,
&
err
);
VJ_master
(
JAIL_MASTER_LOW
);
assert
(
sock
!=
0
);
// We know where stdin is
...
...
bin/varnishd/mgt/mgt_jail_solaris.c
View file @
fac01a55
...
...
@@ -236,7 +236,8 @@ enum jail_gen_e {
JAILG_SUBPROC_WORKER
=
JAIL_SUBPROC_WORKER
,
JAILG_MASTER_LOW
=
JAIL_MASTER_LOW
<<
JAILG_SHIFT
,
JAILG_MASTER_HIGH
=
JAIL_MASTER_HIGH
<<
JAILG_SHIFT
JAILG_MASTER_STORAGE
=
JAIL_MASTER_STORAGE
<<
JAILG_SHIFT
JAILG_MASTER_PRIVPORT
=
JAIL_MASTER_PRIVPORT
<<
JAILG_SHIFT
};
static
inline
enum
jail_gen_e
...
...
bin/varnishd/mgt/mgt_jail_unix.c
View file @
fac01a55
...
...
@@ -138,7 +138,8 @@ vju_init(char **args)
static
void
__match_proto__
(
jail_master_f
)
vju_master
(
enum
jail_master_e
jme
)
{
if
(
jme
==
JAIL_MASTER_HIGH
)
if
(
jme
==
JAIL_MASTER_STORAGE
||
jme
==
JAIL_MASTER_PRIVPORT
)
AZ
(
seteuid
(
0
));
else
AZ
(
seteuid
(
vju_uid
));
...
...
@@ -209,7 +210,7 @@ vju_make_workdir(const char *dname)
static
void
vju_storage_file
(
int
fd
)
{
/* Called under JAIL_MASTER_
HIGH
*/
/* Called under JAIL_MASTER_
STORAGE
*/
AZ
(
fchmod
(
fd
,
0600
));
AZ
(
fchown
(
fd
,
vju_uid
,
vju_gid
));
...
...
bin/varnishd/storage/stevedore_utils.c
View file @
fac01a55
...
...
@@ -91,7 +91,7 @@ STV_GetFile(const char *fn, int *fdp, const char **fnp, const char *ctx)
*
fdp
=
-
1
;
/* try to create a new file of this name */
VJ_master
(
JAIL_MASTER_
HIGH
);
VJ_master
(
JAIL_MASTER_
STORAGE
);
fd
=
open
(
fn
,
O_RDWR
|
O_CREAT
|
O_EXCL
|
O_LARGEFILE
,
0600
);
if
(
fd
>=
0
)
{
VJ_storage_file
(
fd
);
...
...
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