Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
89f83d2e
Commit
89f83d2e
authored
Jan 26, 2015
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix to previous revision.
parent
1e0a3310
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
account/addpubkey.in
account/addpubkey.in
+13
-9
No files found.
account/addpubkey.in
View file @
89f83d2e
...
...
@@ -90,6 +90,7 @@ my $user_name;
my
$user_email
;
my
$user_dbid
;
my
$user_uid
;
my
$user_gid
;
my
$debug
=
0
;
#
...
...
@@ -261,6 +262,18 @@ if (defined($user)) {
$user_dbid
=
$target_user
->
dbid
();
$user_uid
=
$target_user
->
uid
();
$USERUID
=
$target_user
->
unix_uid
();
my
$firstproject
;
if
(
$target_user
->
FirstApprovedProject
(
\
$firstproject
)
<
0
)
{
fatal
("
Could not determine first approved project
");
}
if
(
defined
(
$firstproject
))
{
$user_gid
=
$firstproject
->
unix_gid
();
}
else
{
$user_gid
=
"
guest
";
}
}
#
...
...
@@ -289,15 +302,6 @@ else {
# Initmode or genmode, do it and exit.
#
if
(
$initmode
||
$genmode
)
{
my
$firstproject
;
my
$default_groupgid
;
if
(
$target_user
->
FirstApprovedProject
(
\
$firstproject
)
<
0
||
!
defined
(
$firstproject
))
{
fatal
("
Could not determine first approved project
");
}
$user_gid
=
$firstproject
->
unix_gid
();
if
(
$initmode
)
{
exit
(
InitUser
());
}
...
...
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