Commit Graph

1106 Commits

Author SHA1 Message Date
PartialVolume
7fc4325d69 Merge pull request #481 from PartialVolume/PDFGen28
PDFGen28 Completed customer delete feature.
2023-08-03 00:15:57 +01:00
PartialVolume
c137736997 PDFGen28 Completed customer delete feature. 2023-08-02 23:54:35 +01:00
PartialVolume
1a3e7eb23e Merge pull request #480 from PartialVolume/PDFGen27
PDFGen27 Cleaned up customer selection list
2023-07-27 23:47:15 +01:00
PartialVolume
e6034cf94e PDFGen27 Cleaned up customer selection list
Removed the csv field double quotes from the customer
selection list as displayed on screen. The double quotes will
still obviously exist in the csv file and are required
for the code to work correctly in various places. However, for
human readable text they are removed before displaying the
customer details line on the selection screen as it makes the
list look less 'busy' on screen hopefully.

I also fixed a issue where spaces were incorrectly being removed
from the customer details when filtering for printable characters
only.
2023-07-27 23:36:11 +01:00
PartialVolume
ce628e5c17 Merge pull request #479 from PartialVolume/PDFGen26
PDFGen26 Completed the code that adds a customer
2023-07-27 02:51:00 +01:00
PartialVolume
3dcc40c0e7 PDFGen26 Completed the code that adds a customer
Completed the code that adds a customer and saves
in /etc/nwipe.customers.csv so they can be selected
for display on the PDF report.
2023-07-27 02:46:09 +01:00
PartialVolume
1582f8c224 Merge pull request #477 from PartialVolume/PDFGen25
PDFGen25 Continuation of add customer csv
2023-07-25 22:24:57 +01:00
PartialVolume
a3fd0b71ca PDFGen25 Continuation of add customer csv
Continuation of add a customer entry to the
customers.csv file.

Plus a few corrections to earlier code.
2023-07-25 22:16:42 +01:00
PartialVolume
580429a371 Merge pull request #476 from PartialVolume/PDFGen24
PDFGen24 Created dialogs for adding a customer
2023-07-24 23:09:46 +01:00
PartialVolume
b46575cd63 PDFGen24 Created dialogs for adding a customer 2023-07-24 22:56:42 +01:00
PartialVolume
0d403a20a3 Merge pull request #475 from PartialVolume/PDFGen23
Completed the code that writes the user selected customer to nwipe's config file
2023-07-19 01:12:05 +01:00
PartialVolume
baefd77605 Completed code that writes selected customer to nwipe's config file /etc/nwipe/nwipe.conf 2023-07-19 01:03:49 +01:00
PartialVolume
9f8aecaa52 Merge pull request #473 from PartialVolume/PDFGen22
PDFGen22 Further work completed on customer selection and deletion
2023-07-18 02:10:43 +01:00
PartialVolume
0948596559 PDFGen22 Further work completed on customer selection and deletion dialogs 2023-07-18 02:06:33 +01:00
PartialVolume
2630edbea1 Merge pull request #472 from PartialVolume/PDFGen21
PDFGen21 Completed all GUI dialog boxes for entering organisational data.
2023-07-14 23:12:33 +01:00
PartialVolume
e74ae252ef PDFGen21 Completed all GUI dialog boxes for entering organisational data. Confirmed the data is correctly saved to /etc/nwipe/nwipe.conf and read back for automatic entry into the PDF erasure report. Further work is required to create dialog entry screens for customer details.. to be continued. 2023-07-14 23:00:17 +01:00
PartialVolume
2ebea57008 Merge pull request #471 from PartialVolume/PDFGen20
PDFGen20 Started creating new GUI dialogs.  A Configuration dialog and sub dialogs for allowing the user to enter business and customer details. Further dialog windows and code to be added...
2023-07-13 22:34:31 +01:00
PartialVolume
247cf3031b PDFGen20 Started creating new GUI dialogs. A Configuration Dialog and sub dialogs for allowing the user to enter business and customer details. Further dialog windows and code to be added... 2023-07-13 22:28:23 +01:00
PartialVolume
a05784f05a Merge pull request #470 from PartialVolume/PDFGen19
PDFGen19 Completed data extraction from nwipe.conf
2023-07-12 20:45:09 +01:00
PartialVolume
6f453967f6 PDFGen19 Completed the code the extracts the organisation and selected customer details from the nwipe.conf configuration file and populates the business and customer details boxes on the PDF report. 2023-07-12 20:37:08 +01:00
PartialVolume
0649f1c606 Merge pull request #469 from PartialVolume/PDFGen18
PDFGen18 - further work on PDF certificate
2023-07-11 23:36:26 +01:00
PartialVolume
174072db2e PDFGen18 - further work on PDF certificate, basic construction & format of the nwipe.conf file for PDF organisation and customer details 2023-07-11 23:30:03 +01:00
PartialVolume
60385f479a Update README.md
Remove old 16.04 badge
2023-07-03 01:25:02 +01:00
PartialVolume
49d82eebc9 Merge pull request #467 from PartialVolume/Fix_intermittent_exit_when_sizing_console
Fix the premature exit when sizing konsole
2023-06-30 23:57:36 +01:00
PartialVolume
d7b1fdf2ce Fix the premature exit when sizing konsole
If you are running nwipe within the KDE konsole
terminal and you resize the window by pulling on
the corners, occasionally nwipe will exit with the
error message:

"GUI.c,nwipe_gui_select(), loop runaway,
did you close the terminal without exiting nwipe?
Initiating shutdown now"

The loop runaway detection has been made less sensitive,
i.e 32 iterations per second of the GUI update can now
be completed before a loop runaway is detected. previously
it was 8. In practise when sizing the konsole window,
anywhere between 1 and 17 iterations will occur.
2023-06-30 23:40:23 +01:00
PartialVolume
21ef97e355 Merge pull request #465 from PartialVolume/HPA_DCO_013
HPA_DCO_013 Continuation of HPA/DCO integration
2023-04-12 23:34:46 +01:00
PartialVolume
447c4eddf7 HPA_DCO_013 Continuation of HPA/DCO integration
Fixes to apparent and real disc size fields in PDF based on use
of c->Calculated_real_max_size_in_bytes.

Minor changes to HPA status messages for consistent messaging.

When HPA and DCO sector information cannot be obtained display the
message "HPA/DCO data unavailable, can not determine hidden sector
status" in the information field on the PDF.

Determine human readable size for the c->Calculated_real_max_size_in_bytes
as used in the PDF real disc size field.

Instead of >>FAILURE!<< -1 when a I/O error occurs display >>IOERROR!<< -1
in the GUI.
2023-04-12 23:29:13 +01:00
PartialVolume
3a9ff16d29 Merge pull request #464 from PartialVolume/HPA_DCO_012
HPA_DCO_012 Continuation of HPA/DCO integration
2023-04-11 22:47:31 +01:00
PartialVolume
d981159f04 HPA_DCO_012 Continuation of HPA/DCO integration
Simplified the code that determines whether a HPA/DCO
is present and in the process fixed some related bugs
to do with the HPA/DCO fields in the PDF document
displaying incorrect information in some drive specific
cases.
2023-04-11 22:42:16 +01:00
PartialVolume
3d2ba87967 Merge pull request #463 from PartialVolume/HPA_DCO_011
HPA_DCO_011 Continuation of HPA/DCO integration.
2023-04-05 22:58:02 +01:00
PartialVolume
e7fca73970 HPA_DCO_011 Continuation of HPA/DCO integration.
Fixed a issue that occurs when a drive is attached via a USB adapter
that doesn't correctly pass the ATA commands for HPA/DCO determination.

It incorrectly set the HPA_status as enabled when in fact it should
have determined that DCO was accessible and a comparison against
the size as returned by libata and the real max sectors which in this
particular adapters case worked, was sufficient to correctly determine
whether there were hidden sectors or not.

Now fixed, so HPA status is now determined correctly even on some
less than ideal USB adapters.
2023-04-05 22:50:39 +01:00
PartialVolume
dfa78567e0 Merge pull request #462 from PartialVolume/HPA_DCO_010
HPA_DCO_010 Continuation of HPA/DCO integration.
2023-04-05 18:12:16 +01:00
PartialVolume
30997876a5 HPA_DCO_010 Continuation of HPA/DCO integration.
The Seagate EXOS family of drives don't support the ATA
drive configuration overlay (DCO) command, however they do
support host protected area (HPA). Therefore these drives
can have hidden sectors.

The code was changed to accommodate the slightly different
way these drives respond to a hdparm -N, that is, the
response is accessible max address enabled or
accessible max address disabled. The new code correctly
determines a the status of a drive in regards to
whether it has hidden sectors or not and what it's
apparent and real size is.
2023-04-05 18:05:54 +01:00
PartialVolume
0c41d895e2 Merge pull request #461 from PartialVolume/HPA_DCO_009
HPA_DCO_009 Continuation of HPA/DCO integration.
2023-04-04 23:58:42 +01:00
PartialVolume
776717a729 HPA_DCO_009 Continuation of HPA/DCO integration.
Changed the way percentage is calculated. As we
are dealing with large numbers and for some reason
printf prints a double that is 99.99999999999 as
100.00 when a precision of two is specified I wrote
a function that creates a percentage string such that
99.99999999999 is displayed as 99.99%. This is important
in the report as a disc with one hidden sector will now
correctly show as 99.99% erased and not 100.00% erased.
2023-04-04 23:52:40 +01:00
PartialVolume
a1e607dc02 Merge pull request #460 from PartialVolume/HPA_DCO_008
HPA_DCO_008 continuation of HPA/DCO integration.
2023-04-03 23:19:20 +01:00
PartialVolume
0b720b155c HPA_DCO_008 continuation of HPA/DCO integration.
Many changes related to DCO real max sectors and HPA set and real
sectors and how they are processed and used in the PDF creation
function. More testing is required until I'm happy this works
correctly with lots of different hardware including USB adapters
that don't support DCO/HPA and also drives that don't support
DCO/HPA such as the Seagate Enterprise EXOS drives.
2023-04-03 23:11:41 +01:00
PartialVolume
4fc1806880 Merge pull request #459 from PartialVolume/Fix_very_obscure_incorrect_percentage_on_fill_ones_only
Fix obscure incorrect percentage on completion.
2023-03-20 19:51:34 +00:00
PartialVolume
bbfaa0e9f7 Fix obscure incorrect percentage on completion.
This bug only applies to ones wipe and one or zero's
verification.

A very rare occurrence of a incorrect percentage on
completion. The actual wipe was completed correctly it
was just that the percentage calculation was wrong.

This was due to a variable that was initialised for
all methods except ones, & ones & zeros verification.

For those three method's the uninitialised variable
would have had to have the value 1 or 6 for the
incorrect percentage to be calculated, this is why
it was so rare.

Corrected by initialising the variable with a -1 so
that if no method was found in the array then no
extra calculations as regards the percentage are
performed.
2023-03-20 19:39:16 +00:00
PartialVolume
4f5c15ffad Merge pull request #458 from PartialVolume/nwipe_conf_001
nwipe_conf_001 Add /etc/nwipe/nwipe.conf
2023-03-17 23:23:54 +00:00
PartialVolume
dbde867974 nwipe_conf_001 Add /etc/nwipe/nwipe.conf
1. Started constructing the code we will use to access
and write to /etc/nwipe/nwipe.conf. The initial use of
the nwipe.conf file will be to hold information such
as organisation and technician details that will be used
on the PDF report certificate. We are using the libconfig
library enable us to read and write the conf file. libconfig
is very well documented so editing the conf file manually
should be pretty straight forward. Nwipe will build a basic
conf file to give the user an idea how it should be edited.

2. Updated the README.md, showing the libconfig-dev, libconfig++-dev
needs to be installed.

3. Added some information about the use of hdparm to detect hidden
sectors and also noted that as from v0.35 nwipe will detect hidden
sectors, and may well have an extra method to expose those hidden#
sectors by restoring the DCO.
2023-03-17 23:18:39 +00:00
PartialVolume
a51a9b3e2a Merge pull request #457 from PartialVolume/HPA_DCO_007
HPA_DCO_007 - Add HPA/DCO capability
2023-03-16 21:12:24 +00:00
PartialVolume
3d5fdd3f11 HPA_DCO_007 - Add HPA/DCO capability
1. Fix issue in PDF certificate where a drive that doesn't
support device configuration overlay, shows 512 bytes as the
disc size in the "Size(Real)" area on the certificate.

2. Fix a comment in the log that suggests you might be using a USB
adapter or memory stick and those device can cause an indeterminate
HPA/DCO status. This is now corrected so that we check the bus
is USB before we issue that message.

3. Changes to some GUI text, replaced 'area' with 'sectors'.

4. Aligned "HPA/DCO No hidden sectors detected" to the drive
model/serial text that it alternates with. One character left.

5. Nwipe's version and operating system information that is always
printed to the console on exit, was not appearing in the optional
log file, as optionally specified on the command line. This was
caused because those nwipe_log() calls were happening before the
command line options had been parsed. Essentially there was no log file.
Comments were made in the nwipe.c as a reminder to use nwipe_log()
calls with caution, prior to the options parser.

6. Made changes to the logic in the HPA_dco functions such that
a device that does not appear to support device configuration
overlay and host protected area is classified as HPA_NOT APPLICABLE
in regards to the hpa_status which is important for the PDF
certificate code so that the fields in the certificate are updated
appropriately.
2023-03-16 20:57:07 +00:00
PartialVolume
5051e5c7bf Merge pull request #456 from PartialVolume/Validate_temperatures_before_using_to_change_temperature_text_color
Validate temperatures.
2023-03-16 00:54:20 +00:00
PartialVolume
5d8c0cc4bf Validate temperatures.
Now validates temperatures rather than assuming the data
is valid.

1. Checks for 0 in high critical and max.
2. Copes with missing critical or max min data or
partially missing data.
3. Checks the high critical and max are the right way round
4. Checks the low critical and min are the right way round
5. Temperature is displayed in 5 different ways
i. white text on blue - temperature with spec. (or no spec available)
ii. red text on blue - max temperature reached.
iii. white text on red - critical high temperature reached.
iv. black text on blue - minimum temperature reached.
v. white text on black - critical low temperature reached.
2023-03-16 00:43:19 +00:00
PartialVolume
c79c8ad8f7 Merge pull request #455 from PartialVolume/add_min_max_temperatures_to_log
Added max, min drive temperatures to log
2023-03-14 23:57:09 +00:00
PartialVolume
79cedf47fc Added max, min drive temperatures to log
Added the max and min drive temperatures to the nwipe
log. We now have upto six temperatures that may be reported
for each drive. Whether all these fields are populated is
down to each drive manufacturer.
2023-03-14 23:53:21 +00:00
PartialVolume
08cba2ee5e Merge pull request #454 from PartialVolume/Fix_anomaly_when_temperature_changes_color
Fix anomaly with color change of temperature
2023-03-14 22:30:19 +00:00
PartialVolume
4368092d11 Fix anomaly with color change of temperature
Temperature text now changes red when it's exceeded
the high critical temperature and black when it's dropped below the low
critical temperature. See nwipes log for what those values actually are
as those critical temperature values are obtained from each drive.

When the drive temperature is within the drives specification the temperature
text will be white text on blue background.

The temperature text no longer flashes red or black.
2023-03-14 22:27:34 +00:00
PartialVolume
ac96c51120 Merge pull request #453 from PartialVolume/add_temperature_limits_to_log_info
Add temperature limits to nwipe log
2023-03-14 20:42:37 +00:00