Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jozef Sroka
ISPConfig 3
Commits
96541d1f
Commit
96541d1f
authored
Oct 06, 2016
by
Marius Burkard
Browse files
- Invalid XFS quota argument, fixes #4257
- Added missing shell escaping
parent
659b5a40
Changes
2
Show whitespace changes
Inline
Side-by-side
server/plugins-available/apache2_plugin.inc.php
View file @
96541d1f
...
...
@@ -890,10 +890,10 @@ class apache2_plugin {
$primitive_root
=
$df_output
[
1
];
if
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c
'
limit -u bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
exec
(
"xfs_quota -x -c
"
.
escapeshellarg
(
"
limit -u bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
"
.
$data
[
'new'
][
'system_group'
])
.
" "
.
escapeshellarg
(
$primitive_root
)
);
// xfs only supports timers globally, not per user.
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'
$primitive_root
"
);
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'
"
.
escapeshellarg
(
$primitive_root
)
);
unset
(
$project_uid
,
$username_position
,
$xfs_projects
);
unset
(
$primitive_root
,
$df_output
,
$mb_hard
,
$mb_soft
);
...
...
server/plugins-available/nginx_plugin.inc.php
View file @
96541d1f
...
...
@@ -743,15 +743,15 @@ class nginx_plugin {
}
// get the primitive folder for document_root and the filesystem, will need it later.
$df_output
=
explode
(
" "
,
exec
(
"df -T
$
document_root
|awk 'END{print
\$
2,
\$
NF}'"
));
$df_output
=
explode
(
" "
,
exec
(
"df -T
"
.
escapeshellarg
(
$data
[
'new'
][
'
document_root
'
])
.
"
|awk 'END{print
\$
2,
\$
NF}'"
));
$file_system
=
$df_output
[
0
];
$primitive_root
=
$df_output
[
1
];
if
(
$file_system
==
'xfs'
)
{
exec
(
"xfs_quota -x -c
'
limit -u bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
$username
'
$primitive_root
"
);
exec
(
"xfs_quota -x -c
"
.
escapeshellarg
(
"
limit -u bsoft=
$mb_soft
"
.
'm'
.
" bhard=
$mb_hard
"
.
'm'
.
"
"
.
$data
[
'new'
][
'system_group'
])
.
" "
.
escapeshellarg
(
$primitive_root
)
);
// xfs only supports timers globally, not per user.
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'
$primitive_root
"
);
exec
(
"xfs_quota -x -c 'timer -bir -i 604800'
"
.
escapeshellarg
(
$primitive_root
)
);
unset
(
$project_uid
,
$username_position
,
$xfs_projects
);
unset
(
$primitive_root
,
$df_output
,
$mb_hard
,
$mb_soft
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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