Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emulab-devel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
emulab
emulab-devel
Commits
15b00725
Commit
15b00725
authored
22 years ago
by
Leigh B. Stoller
Browse files
Options
Downloads
Patches
Plain Diff
Oops, forgot to transfer usr_modified=now() from old webpage to new
perl script that does this.
parent
8ba5c120
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
account/addpubkey.in
+10
-0
10 additions, 0 deletions
account/addpubkey.in
utils/addpubkey.in
+10
-0
10 additions, 0 deletions
utils/addpubkey.in
with
20 additions
and
0 deletions
account/addpubkey.in
+
10
−
0
View file @
15b00725
...
@@ -27,6 +27,7 @@ my $optlist = "kna";
...
@@ -27,6 +27,7 @@ my $optlist = "kna";
my
$iskey
=
0
;
my
$iskey
=
0
;
my
$verify
=
0
;
my
$verify
=
0
;
my
$auditmode
=
0
;
my
$auditmode
=
0
;
my
$anonmode
=
0
;
#
#
# Configure variables
# Configure variables
...
@@ -136,6 +137,8 @@ if (getpwuid($UID) eq "nobody") {
...
@@ -136,6 +137,8 @@ if (getpwuid($UID) eq "nobody") {
fatal
("
*** $0:
\n
"
.
fatal
("
*** $0:
\n
"
.
"
Attempt to insert first key for existing user!
\n
");
"
Attempt to insert first key for existing user!
\n
");
}
}
# Make sure we do not mess with user table.
$anonmode
=
1
;
}
}
elsif
(
!
$verify
)
{
elsif
(
!
$verify
)
{
if
(
!
UNIX2DBUID
(
$UID
,
\
$db_uid
))
{
if
(
!
UNIX2DBUID
(
$UID
,
\
$db_uid
))
{
...
@@ -245,6 +248,13 @@ sub ParseKey($) {
...
@@ -245,6 +248,13 @@ sub ParseKey($) {
DBQueryFatal
("
replace into user_pubkeys
"
.
DBQueryFatal
("
replace into user_pubkeys
"
.
"
values ('
$user
', '
$comment
', '
$key
', now())
");
"
values ('
$user
', '
$comment
', '
$key
', now())
");
#
# Mark user record as modified so nodes are updated.
#
if
(
!
$anonmode
)
{
DBQueryFatal
("
update users set usr_modified=now() where uid='
$user
'
");
}
return
1
;
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
utils/addpubkey.in
+
10
−
0
View file @
15b00725
...
@@ -27,6 +27,7 @@ my $optlist = "kna";
...
@@ -27,6 +27,7 @@ my $optlist = "kna";
my
$iskey
=
0
;
my
$iskey
=
0
;
my
$verify
=
0
;
my
$verify
=
0
;
my
$auditmode
=
0
;
my
$auditmode
=
0
;
my
$anonmode
=
0
;
#
#
# Configure variables
# Configure variables
...
@@ -136,6 +137,8 @@ if (getpwuid($UID) eq "nobody") {
...
@@ -136,6 +137,8 @@ if (getpwuid($UID) eq "nobody") {
fatal
("
*** $0:
\n
"
.
fatal
("
*** $0:
\n
"
.
"
Attempt to insert first key for existing user!
\n
");
"
Attempt to insert first key for existing user!
\n
");
}
}
# Make sure we do not mess with user table.
$anonmode
=
1
;
}
}
elsif
(
!
$verify
)
{
elsif
(
!
$verify
)
{
if
(
!
UNIX2DBUID
(
$UID
,
\
$db_uid
))
{
if
(
!
UNIX2DBUID
(
$UID
,
\
$db_uid
))
{
...
@@ -245,6 +248,13 @@ sub ParseKey($) {
...
@@ -245,6 +248,13 @@ sub ParseKey($) {
DBQueryFatal
("
replace into user_pubkeys
"
.
DBQueryFatal
("
replace into user_pubkeys
"
.
"
values ('
$user
', '
$comment
', '
$key
', now())
");
"
values ('
$user
', '
$comment
', '
$key
', now())
");
#
# Mark user record as modified so nodes are updated.
#
if
(
!
$anonmode
)
{
DBQueryFatal
("
update users set usr_modified=now() where uid='
$user
'
");
}
return
1
;
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment