Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Context Sensitive Group
freedombone
Commits
ca7b84be
Commit
ca7b84be
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Optionally specify master password
parent
807d6055
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-pass
+10
-2
10 additions, 2 deletions
src/freedombone-pass
with
10 additions
and
2 deletions
src/freedombone-pass
+
10
−
2
View file @
ca7b84be
...
...
@@ -51,6 +51,8 @@ CURR_PASSWORD=""
TESTS
=
EXPORT_FILENAME
=
MASTER_PASSWORD
=
''
# If this file is present then don't store passwords
NO_PASSWORD_STORE_FILE
=
~/.nostore
...
...
@@ -224,6 +226,10 @@ do
shift
EXPORT_FILENAME
=
"
${
1
}
"
;;
--master
)
shift
MASTER_PASSWORD
=
"
${
1
}
"
;;
-p
|
--pass
|
--password
|
--passphrase
)
shift
CURR_PASSWORD
=
"
${
1
}
"
...
...
@@ -244,8 +250,10 @@ fi
get_backup_key_id
# Use the backups private key as a symmetric passphrase
MASTER_PASSWORD
=
$(
gpg
-q
--armor
--export-secret-key
$MY_BACKUP_KEY_ID
|
sed
'/---/d'
|
sed
'/Version/d'
|
sed
'/^$/d'
)
if
[
${#
MASTER_PASSWORD
}
-eq
0
]
;
then
# Use the backups private key as a symmetric passphrase
MASTER_PASSWORD
=
$(
gpg
-q
--armor
--export-secret-key
$MY_BACKUP_KEY_ID
|
sed
'/---/d'
|
sed
'/Version/d'
|
sed
'/^$/d'
)
fi
if
[
$TESTS
]
;
then
run_tests
...
...
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