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
3f0c3934
Commit
3f0c3934
authored
Sep 13, 2014
by
Leigh B Stoller
Browse files
Add flag to mark key as internal, as for sslcert derived key.
parent
007faed8
Changes
1
Hide whitespace changes
Inline
Side-by-side
account/addpubkey.in
View file @
3f0c3934
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-201
2
University of Utah and the Flux Group.
# Copyright (c) 2000-201
4
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -48,7 +48,7 @@ sub usage()
print
"
-r Force a regenerate of initial key for user
\n
";
exit
(
-
1
);
}
my
$optlist
=
"
dkniwfu:rX:sRNC:S:
";
my
$optlist
=
"
dkniwfu:rX:sRNC:S:
I
";
my
$iskey
=
0
;
my
$verify
=
0
;
my
$initmode
=
0
;
...
...
@@ -58,6 +58,7 @@ my $nobody = 0;
my
$noemail
=
0
;
my
$remove
=
0
;
my
$nodelete
=
0
;
my
$internal
=
0
;
my
$Comment
;
my
$xmlfile
;
...
...
@@ -170,6 +171,9 @@ if (defined($options{"i"})) {
if
(
defined
(
$options
{"
N
"}))
{
$nodelete
=
1
;
}
if
(
defined
(
$options
{"
I
"}))
{
$internal
=
1
;
}
if
(
defined
(
$options
{"
r
"}))
{
$force
=
1
;
}
...
...
@@ -426,7 +430,7 @@ sub ParseKey($) {
}
DBQueryFatal
("
replace into user_pubkeys set
"
.
"
uid='
$user_uid
', uid_idx='
$user_dbid
',
"
.
"
internal='
0
', nodelete='
$nodelete
',
"
.
"
internal='
$internal
', nodelete='
$nodelete
',
"
.
"
idx=NULL, stamp=now(),
"
.
"
pubkey=
$safe_key
, comment=
$safe_comment
");
...
...
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