Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
c659b284
Commit
c659b284
authored
Jun 05, 2003
by
Leigh B. Stoller
Browse files
Add setgroups code (or Perl silly equivalent) so that startup commands
run with the user group set. Bug reported by Eric.
parent
a8955488
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/common/runstartup
View file @
c659b284
...
...
@@ -97,9 +97,15 @@ if ($mypid) {
}
else
{
#
# The child becomes the user and runs the command.
# The child becomes the user and runs the command. Maybe cleaner to
# just use sudo instead, so we get the entire group list of the
# target user?
#
$EGID
=
$GID
=
$gid
;
my
$glist
=
`
id -G
$login
`;
chomp
(
$glist
);
$GID
=
$gid
;
$EGID
=
$glist
;
$EUID
=
$UID
=
$uid
;
exec
(
$runcmd
);
...
...
Write
Preview
Supports
Markdown
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