NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/52512: Duplicate files prevent veriexecctl from loading signature file



The following reply was made to PR bin/52512; it has been noted by GNATS.

From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/52512: Duplicate files prevent veriexecctl from loading
 signature file
Date: Tue, 29 Aug 2017 18:38:45 +0800 (+08)

   This message is in MIME format.  The first part should be readable text,
   while the remaining parts are likely unreadable without MIME-aware tools.
 
 --0-1754746076-1504003125=:22778
 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
 
 >> It is unclear whether we should modify veriexecctl to not set the error for 
 >> EEXIST, or if we should modify veriexecgen to not generate multiple entries 
 >> (with different names) for the same file.  (It seems to me unreasonable to 
 >> expect the user to remove the duplicates.)
 >
 > A third option would be to modify the kernel code to not complain when 
 > attempting to add a new entry, as long as the new fingerprint type and value 
 > match the existing values.
 
 The attached patch implements this option.
 
 
 --0-1754746076-1504003125=:22778
 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=kern_veriexec.c.diff
 Content-Transfer-Encoding: BASE64
 Content-ID: <Pine.NEB.4.64.1708291838450.22778%speedy.whooppee.com@localhost>
 Content-Description: 
 Content-Disposition: attachment; filename=kern_veriexec.c.diff
 
 SW5kZXg6IGtlcm5fdmVyaWV4ZWMuYw0KPT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PQ0KUkNTIGZpbGU6IC9jdnNyb290L3NyYy9zeXMva2Vybi9rZXJuX3Zlcmll
 eGVjLmMsdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjE0DQpkaWZmIC11IC1w
 IC1yMS4xNCBrZXJuX3ZlcmlleGVjLmMNCi0tLSBrZXJuX3ZlcmlleGVjLmMJ
 MjkgQXVnIDIwMTcgMTA6MjM6MTIgLTAwMDAJMS4xNA0KKysrIGtl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