The fifteen lines of code that creates the header
and footer text in the PDF appear in two separate
places. The first occurrence in the create_pdf(..)
function and once in the create_header_and_footer(..)
function.
This duplicated code was combined into a third
function pdf_header_footer_text(..) and is now called
from the other functions.
This was done as I need to add some user selectable
changes to the header text that will include host
identification such as system tag, UUID, hostname
without creating further duplicated code.
The purpose of this commit is to add an additional
identifying piece of information to the pdf filename.
This was found to be necessary in the case of a user
wiping partitions as opposed to the whole disc. Currently
when wiping a partition the model name and serial number
is missing from the pdf content and pdf filename so by adding
the device name, it make it less likely that an existing pdf
will get overwritten. This is a stop gap fix as preferably
the disk model and serial no needs to be retrieved even
wiping just one partition.
Additional functions were added including retrieval of UUID,
however UUID was found to not be available for some USB
devices when wiping partitions. The UUID function remains
in the code and the UUID if available is output to the log
but is not used anywhere else at the moment.
- Added a new wiping method following the Bruce Schneier 7-Pass standard.
- Overwrites the device with:
- Pass 1: All ones (0xFF)
- Pass 2: All zeroes (0x00)
- Pass 3-7: Five passes of PRNG-generated random data.
- Updated method.h with the function prototype for `nwipe_bruce7`.
- Added `nwipe_bruce7()` implementation in method.c.
- Registered method label in `nwipe_method_label()`.
- Updated UI in options.c to display security level and details.
The s shift s bug is reported here
https://github.com/PartialVolume/shredos.x86_64/issues/301
To summarize, if no drives are selected and then the user presses
s (lower case) a warning appears indicating that the user
should press S (upper case) to start the wipe. This
warning appears for about 3 seconds but during this time if the
user presses S (upper case) nwipe would immediately complete,
having wiped no drives and requesting the user to press the
spacebar to exit. The is incorrect behaviour.
The bug doesn't appear if the user pressed S after the 3
seconds elapsed and the warning message disappeared.
This patch fixes this so that it does not exit but displays the
warning for 3 seconds and then waits for input.
This is only relevant to ShredOS and is disabled
for other distros, as doubling font size is controlled
within the terminal or window manaegment of the distro.
When nwipe detects ShredOS it makes an additional
command available to the GUI in the drive selection window and
progress window (after the wipe has started) This command
is 'f'. Pressing the f key whether in drive selection or
progress windows will double the size of the font. Pressing 'f'
again will toggle the font size back to it's original size.
In addition and depending on whether ShredOS is detected it will
add an additional item to the help footer of both the
drive selection and progress windows. e.g. f=Font size
Fixes a buffer overflow in the last commit. That
commit added additional model names to the endian model
swap code but did not calloc suffient storage for the
termination character.
This patch fixes model names for Hitachi,
Toshiba, WDC Western Digital Corporation and Seagate/ST
drives when used with some USB adapters that get the
endian incorrect. Mainly older adapters.