[PATCH 2/2] sign-file: Fix inplace signing when src and dst names are both specified

2016-12-13 Thread David Howells
From: Alex Yashchenko When src and dst both are specified and they point to the same file the sign-file utility will write only signature to the dst file and the module (.ko file) body will not be written. That happens because we open the same file with "rb" and "wb" flags, from fopen man: w

[PATCH 2/2] sign-file: Fix inplace signing when src and dst names are both specified

2016-12-12 Thread David Howells
From: Alex Yashchenko When src and dst both are specified and they point to the same file the sign-file utility will write only signature to the dst file and the module (.ko file) body will not be written. That happens because we open the same file with "rb" and "wb" flags, from fopen man: w