Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
5d077adb
Commit
5d077adb
authored
Jan 14, 2015
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes based on first testing.
parent
896f4089
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
11 deletions
+28
-11
account/accountsetup.in
account/accountsetup.in
+26
-10
tbsetup/rmproj.in
tbsetup/rmproj.in
+1
-0
tbsetup/setgroups.in
tbsetup/setgroups.in
+1
-1
No files found.
account/accountsetup.in
View file @
5d077adb
...
...
@@ -286,7 +286,7 @@ sub ModifyUser()
}
if
(
mysystem
("
$USERMOD
$user
-g
$pgroup
$grouplist
"))
{
fatal
("
Could not modify user
$u
nix_name
to add groups!
\n
");
fatal
("
Could not modify user
$u
ser
to add groups!
\n
");
}
#
...
...
@@ -420,7 +420,7 @@ sub AddGroup()
}
# Create the /groups/gid directory
$path
=
"
$GROUPROOT
/
$projname
/
$name
";
my
$path
=
"
$GROUPROOT
/
$projname
/
$name
";
# XXX note that this is always a regular directory, not a filesystem
if
(
!
-
d
"
$path
"
&&
!
mkdir
("
$path
",
0770
))
{
fatal
("
Could not make directory '
$path
': $!
");
...
...
@@ -508,13 +508,6 @@ sub DelGroup()
return
0
;
}
sub
fatal
($)
{
my
(
$msg
)
=
@_
;
print
STDERR
"
$msg
\n
";
exit
(
-
1
);
}
#
# Check for ZFS existence.
#
...
...
@@ -586,7 +579,17 @@ sub WhackDir($$)
if
(
mysystem
("
$cmd
$path
$npath
"))
{
return
$?
;
}
}
else
{
# Since we reuse uid/gids let's make the dir root/0700
if
(
!
chown
(
0
,
-
1
,
$npath
)
||
!
chmod
(
0700
,
$npath
))
{
print
STDERR
"
WARNING: could not chown/chmod '
$npath
'!
\n
";
}
}
#
# XXX maybe we should do this in the background since it could
# take a really long time!
#
else
{
my
(
$cmd
,
$path
);
if
(
$zfsfs
)
{
...
...
@@ -632,5 +635,18 @@ sub mysystem($)
my
$cmd
=
shift
;
print
STDERR
"
accountsetup: '
$cmd
'
\n
";
if
(
open
(
FD
,
"
>>/usr/testbed/log/accountsetup.log
"))
{
my
$tstamp
=
POSIX::
strftime
("
%b %e %H:%M:%S
",
localtime
());
print
FD
"
$tstamp
:
$cmd
\n
";
close
(
FD
);
}
return
system
(
$cmd
);
}
sub
fatal
($)
{
my
(
$msg
)
=
@_
;
print
STDERR
"
$msg
\n
";
exit
(
-
1
);
}
tbsetup/rmproj.in
View file @
5d077adb
...
...
@@ -146,6 +146,7 @@ if (AuditStart(0)) {
# Remove/rename the experiment working directory.
#
my
$workdir
=
TBDB_EXPT_WORKDIR
()
.
"
/
$pid
";
my
$savename
=
"
_ARCHIVED-
${pid}
-
${pid_idx}
";
if
(
-
d
$workdir
)
{
my
$newname
=
TBDB_EXPT_WORKDIR
()
.
"
/
$savename
";
...
...
tbsetup/setgroups.in
View file @
5d077adb
...
...
@@ -425,7 +425,7 @@ foreach my $token (@userlist) {
if
(
$control_node
ne
$BOSSNODE
)
{
$groupargument
=
join
('
',
@groupnames
);
if
(
system
("
$SSH
-host
$control_node
"
.
"
$ACCOUNTPROXY
$uid
$project
$groupargument
"))
{
"
$ACCOUNTPROXY
moduser
$uid
$project
$groupargument
"))
{
fatal
("
Could not modify user
$uid
record on
$control_node
.
");
}
}
...
...
Write
Preview
Markdown
is supported
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