Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
ac32a443
Commit
ac32a443
authored
Mar 31, 2009
by
tbrehm
Browse files
Improved user delete code for non jailkit users.
parent
396f0e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/shelluser_base_plugin.inc.php
View file @
ac32a443
...
...
@@ -148,11 +148,14 @@ class shelluser_base_plugin {
// Get the UID of the user
$userid
=
intval
(
$app
->
system
->
getuid
(
$data
[
'old'
][
'username'
]));
if
(
$userid
>
$this
->
min_uid
)
{
$command
=
'userdel -f'
;
$command
.
=
' '
.
escapeshellcmd
(
$data
[
'old'
][
'username'
]);
// We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin.
if
(
$data
[
'old'
][
'chroot'
]
!=
"jailkit"
)
{
$command
=
'userdel -f'
;
$command
.
=
' '
.
escapeshellcmd
(
$data
[
'old'
][
'username'
]);
exec
(
$command
);
$app
->
log
(
"Deleted shelluser: "
.
$data
[
'old'
][
'username'
],
LOGLEVEL_DEBUG
);
exec
(
$command
);
$app
->
log
(
"Deleted shelluser: "
.
$data
[
'old'
][
'username'
],
LOGLEVEL_DEBUG
);
}
}
else
{
$app
->
log
(
"UID =
$userid
for shelluser:"
.
$data
[
'old'
][
'username'
]
.
" not allowed."
,
LOGLEVEL_ERROR
);
...
...
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