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-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
1377ea55
Commit
1377ea55
authored
Jan 07, 2006
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the experiment archive is created with the proper group
permissions. Fixes one directory permission problem.
parent
be6545b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
tbsetup/libArchive.pm.in
tbsetup/libArchive.pm.in
+23
-3
No files found.
tbsetup/libArchive.pm.in
View file @
1377ea55
...
...
@@ -37,6 +37,7 @@ my $ELABINELAB = @ELABINELAB@;
my
$
MD5
=
"/sbin/md5"
;
my
$
MKDIR
=
"/bin/mkdir"
;
my
$
CHMOD
=
"/bin/chmod"
;
my
$
CHGRP
=
"/usr/bin/chgrp"
;
my
$
TAR
=
"/usr/bin/tar"
;
my
$
RSYNC
=
"/usr/local/bin/rsync"
;
my
$
RM
=
"/bin/rm"
;
...
...
@@ -78,9 +79,9 @@ sub setdebug($)
#
Create
a
new
archive
.
Returns
-
1
if
any
error
.
Otherwise
return
#
the
new
record
index
.
#
sub
ArchiveCreate
(;$$)
sub
ArchiveCreate
(;$$
$
)
{
my
($
tag
,
$
view
)
=
@
_
;
my
($
tag
,
$
view
,
$
unix_gid
)
=
@
_
;
my
$
idx
;
my
$
dir
;
...
...
@@ -115,6 +116,9 @@ sub ArchiveCreate(;$$)
#
mysystem
(
"$MKDIR $dir"
)
==
0
or
goto
bad
;
mysystem
(
"$CHMOD 775 $dir"
)
==
0
or
goto
bad
;
if
(
defined
($
unix_gid
))
{
mysystem
(
"$CHGRP $unix_gid $dir"
)
==
0
or
goto
bad
;
}
DBQueryWarn
(
"update archives set directory='$dir' where idx='$idx'"
)
or
goto
bad
;
...
...
@@ -1103,10 +1107,22 @@ sub TBCreateExperimentArchive($$)
my
($
exptidx
,$
rsrcidx
)
=
$
query_result
->
fetchrow_array
();
my
$
archive_tag
=
"T${rsrcidx}"
;
#
#
The
point
of
this
is
to
set
the
group
of
the
new
directory
.
#
my
$
gid
=
ExpGroup
($
pid
,
$
eid
);
if
(
! $gid) {
return
-
1
;
}
my
($
unix_gid
,
$
unix_name
);
if
(
!TBGroupUnixInfo($pid, $gid, \$unix_gid, \$unix_name)) {
return
-
1
;
}
#
#
Create
the
new
archive
and
get
back
the
new
index
.
#
my
$
archive_idx
=
ArchiveCreate
($
archive_tag
,
"$exptidx"
);
my
$
archive_idx
=
ArchiveCreate
($
archive_tag
,
"$exptidx"
,
$
unix_name
);
return
-
1
if
($
archive_idx
<
0
);
...
...
@@ -1121,6 +1137,10 @@ sub TBCreateExperimentArchive($$)
return
-
1
;
}
return
0
;
bad
:
ArchiveDestroy
($
archive_idx
,
1
);
return
-
1
;
}
#
...
...
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