Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Allow overriding of NEW requirement by key
· dc82728e
Bastian Blank
authored
May 17, 2018
and
Joerg Jaspert
committed
Jun 27, 2018
dc82728e
Allow accepting sources with untrusted sigs by key
· 9ed8622f
Bastian Blank
authored
May 17, 2018
and
Joerg Jaspert
committed
Jun 27, 2018
9ed8622f
Merge branch 'overrides-for-security' into 'master'
· eb3cff21
Joerg Jaspert
authored
Jun 27, 2018
Allow some check overrides for security sync See merge request
!29
eb3cff21
Show whitespace changes
Inline
Side-by-side
daklib/archive.py
View file @
eb3cff21
...
...
@@ -1022,6 +1022,7 @@ class ArchiveUpload(object):
for
chk
in
(
checks
.
TransitionCheck
,
checks
.
ACLCheck
,
checks
.
NewOverrideCheck
,
checks
.
NoSourceOnlyCheck
,
checks
.
LintianCheck
,
):
...
...
daklib/checks.py
View file @
eb3cff21
...
...
@@ -137,6 +137,8 @@ class SignatureAndHashesCheck(Check):
"""
def
check
(
self
,
upload
):
allow_source_untrusted_sig_keys
=
Config
().
value_list
(
'
Dinstall::AllowSourceUntrustedSigKeys
'
)
changes
=
upload
.
changes
if
not
changes
.
valid_signature
:
raise
Reject
(
"
Signature for .changes not valid.
"
)
...
...
@@ -149,6 +151,7 @@ class SignatureAndHashesCheck(Check):
except
Exception
as
e
:
raise
Reject
(
"
Invalid dsc file: {0}
"
.
format
(
e
))
if
source
is
not
None
:
if
changes
.
primary_fingerprint
not
in
allow_source_untrusted_sig_keys
:
if
not
source
.
valid_signature
:
raise
Reject
(
"
Signature for .dsc not valid.
"
)
if
source
.
primary_fingerprint
!=
changes
.
primary_fingerprint
:
...
...
@@ -833,6 +836,22 @@ class NoSourceOnlyCheck(Check):
return
True
class
NewOverrideCheck
(
Check
):
"""
Override NEW requirement
"""
def
check
(
self
,
upload
):
if
not
upload
.
new
:
return
True
new_override_keys
=
Config
().
value_list
(
'
Dinstall::NewOverrideKeys
'
)
changes
=
upload
.
changes
if
changes
.
primary_fingerprint
in
new_override_keys
:
upload
.
new
=
False
return
True
class
ArchAllBinNMUCheck
(
Check
):
"""
Check for arch:all binNMUs
"""
...
...