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
5671ec0c
Commit
5671ec0c
authored
Dec 28, 2016
by
Leigh B Stoller
Browse files
Need to add TBAMDINGROUP to group list, to get into the repo dir.
parent
ec86d19e
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/manage_gitrepo.in
View file @
5671ec0c
...
@@ -51,6 +51,7 @@ my $TB = "@prefix@";
...
@@ -51,6 +51,7 @@ my $TB = "@prefix@";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$OURDOMAIN
=
"
@OURDOMAIN
@
";
my
$OURDOMAIN
=
"
@OURDOMAIN
@
";
my
$CONTROL
=
"
@USERNODE
@
";
my
$CONTROL
=
"
@USERNODE
@
";
my
$TBADMINGROUP
=
"
@TBADMINGROUP
@
";
my
$MAINSITE
=
@TBMAINSITE@
;
my
$MAINSITE
=
@TBMAINSITE@
;
my
$REPODIR
=
"
$TB
/opsdir/repositories
";
my
$REPODIR
=
"
$TB
/opsdir/repositories
";
my
$PROXY
=
"
$TB
/libexec/gitrepo.proxy
";
my
$PROXY
=
"
$TB
/libexec/gitrepo.proxy
";
...
@@ -146,6 +147,13 @@ my $this_user = User->ThisUser();
...
@@ -146,6 +147,13 @@ my $this_user = User->ThisUser();
if
(
!
defined
(
$this_user
))
{
if
(
!
defined
(
$this_user
))
{
fatal
("
You (
$UID
) do not exist!
");
fatal
("
You (
$UID
) do not exist!
");
}
}
# We have to add the admin group so we can get into the repositories
my
$unix_gid
=
getgrnam
(
$TBADMINGROUP
);
if
(
!
defined
(
$unix_gid
))
{
fatal
("
No such group
$TBADMINGROUP
");
}
$GID
=
$unix_gid
;
$EGID
=
"
$unix_gid
$unix_gid
";
# Run as the user for most of this script.
# Run as the user for most of this script.
$EUID
=
$UID
;
$EUID
=
$UID
;
...
@@ -492,7 +500,7 @@ sub GetRepoSource($;$)
...
@@ -492,7 +500,7 @@ sub GetRepoSource($;$)
if
(
!
defined
(
$refspec
));
if
(
!
defined
(
$refspec
));
chdir
("
$repodir
")
or
chdir
("
$repodir
")
or
fatal
("
Could not chdir to
$repodir
");
fatal
("
Could not chdir to
$repodir
: $!
");
if
(
system
("
$GIT
cat-file -e
$refspec
:profile.py
")
==
0
)
{
if
(
system
("
$GIT
cat-file -e
$refspec
:profile.py
")
==
0
)
{
$source
=
"
profile.py
";
$source
=
"
profile.py
";
...
...
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