3 # This function and its data should move into daklib/extensions.py
7 def replace_dak_function(module,name):
11 f(replaced_funcs[name], *a, **kw)
12 myfunc.__name__ = f.__name__
13 myfunc.__doc__ = f.__doc__
14 myfunc.__dict__.update(f.__dict__)
16 replace_funcs["%s:%s" % (module,name)] = myfunc
20 @replace_dak_function("process-unchecked", "check_signed_by_key")
21 def check_signed_by_key(oldfn):
22 changes = dak_module.changes
23 reject = dak_module.reject
25 if changes["source"] == "dpkg":
26 fpr = changes["fingerprint"]
27 (uid, uid_name) = dak_module.lookup_uid_from_fingerprint(fpr)
28 if fpr == "5906F687BD03ACAD0D8E602EFCF37657" or uid == "iwj":
29 reject("Upload blocked due to hijack attempt 2008/03/19")
31 # NB: 1.15.0, 1.15.2 signed by this key targetted at unstable
32 # have been made available in the wild, and should remain
33 # blocked until Debian's dpkg has revved past those version
41 # This bit should be done automatically too
43 for f,newfunc in replace_funcs.iteritems():
45 if len(f) > 0 and m == name:
46 replaced_funcs[f] = dak_module.__dict__[f]
47 dak_module.__dict__[f] = newfunc