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
emulab
emulab-devel
Commits
18e75b3d
Commit
18e75b3d
authored
Aug 10, 2005
by
Leigh B. Stoller
Browse files
Make sure creator gets admin bit set in inner elab so he gets a shell
and other privs.
parent
481787cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/elabinelab.in
View file @
18e75b3d
...
...
@@ -613,15 +613,29 @@ sub DumpDBGoo()
foreach
my
$table
(
@USERTABLES
)
{
unlink
("
$statedir
/
$table
");
DBQueryWarn
("
select t.* from group_membership as gm
"
.
DBQueryWarn
("
create temporary table temp_
$table
"
.
"
select t.* from group_membership as gm
"
.
"
left join users as u on u.uid=gm.uid
"
.
"
left join
$table
as t on t.uid=u.uid
"
.
"
where gm.pid='
$pid
' and gm.gid=gm.pid
"
.
"
and t.uid is not NULL and
"
.
"
u.status='
"
.
USERSTATUS_ACTIVE
()
.
"
'
"
.
"
u.status='
"
.
USERSTATUS_ACTIVE
()
.
"
'
")
or
die
("
*** $0:
\n
"
.
"
Could not create table temp_
$table
\n
");
if
(
$table
eq
"
users
")
{
$creator
=
ExpLeader
(
$pid
,
$eid
);
DBQueryFatal
("
update temp_
${table}
set
"
.
"
admin=1
"
.
"
where uid='
$creator
'
");
}
DBQueryWarn
("
select * from temp_
$table
"
.
"
into outfile '
$statedir
/
$table
'
")
or
die
("
*** $0:
\n
"
.
"
Could not dump table
$table
\n
");
"
Could not dump table
temp_
$table
\n
");
}
# The group_membership is also special.
...
...
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