Skip to content

Commit

Permalink
[backend] added info on drop_privs to log
Browse files Browse the repository at this point in the history
  • Loading branch information
lethliel committed Sep 30, 2016
1 parent a235959 commit 89ded23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/BSUtil.pm
Expand Up @@ -219,6 +219,7 @@ sub drop_privs_to {
my ($user, $group) = @_;

if (defined($group)) {
BSUtil::printlog("Drop privileges to group '$group'");
$group = getgrnam($group) unless $group =~ /^\d+$/;
die("unknown group\n") unless defined $group;
if ($) != $group || $( != $group) {
Expand All @@ -227,6 +228,7 @@ sub drop_privs_to {
}
}
if (defined($user)) {
BSUtil::printlog("Drop privileges to user '$user'");
$user = getpwnam($user) unless $user =~ /^\d+$/;
die("unknown user\n") unless defined $user;
if ($> != $user || $< != $user) {
Expand Down

0 comments on commit 89ded23

Please sign in to comment.