Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
bf9b7702
Commit
bf9b7702
authored
Oct 07, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sort SSHFP records so that DNS updates don't trigger spurrious zone changes
parent
9210ebdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dns_update.py
management/dns_update.py
+4
-2
No files found.
management/dns_update.py
View file @
bf9b7702
...
@@ -332,9 +332,11 @@ def build_sshfp_records():
...
@@ -332,9 +332,11 @@ def build_sshfp_records():
}
}
# Get our local fingerprints by running ssh-keyscan. The output looks
# Get our local fingerprints by running ssh-keyscan. The output looks
# like the known_hosts file: hostname, keytype, fingerprint.
# like the known_hosts file: hostname, keytype, fingerprint. The order
# of the output is arbitrary, so sort it to prevent spurrious updates
# to the zone file (that trigger bumping the serial number).
keys
=
shell
(
"check_output"
,
[
"ssh-keyscan"
,
"localhost"
])
keys
=
shell
(
"check_output"
,
[
"ssh-keyscan"
,
"localhost"
])
for
key
in
keys
.
split
(
"
\n
"
):
for
key
in
sorted
(
keys
.
split
(
"
\n
"
)
):
if
key
.
strip
()
==
""
or
key
[
0
]
==
"#"
:
continue
if
key
.
strip
()
==
""
or
key
[
0
]
==
"#"
:
continue
try
:
try
:
host
,
keytype
,
pubkey
=
key
.
split
(
" "
)
host
,
keytype
,
pubkey
=
key
.
split
(
" "
)
...
...
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