DL6ER
|
6fcbce6c34
|
Improve code based on a full static analysis of our code. There are no real bugs, nowever, we use the obtained knowledge to improve the code such as unify declarations and function definitions, reduce the scope of local variables, mark many function arguments and local variables const when they are, fix the type expected by %x and fix one if-condition
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-04-15 22:35:14 +02:00 |
|
DL6ER
|
09f0727e04
|
Type of capabilityIDs is const unsigned int
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-19 07:35:50 +01:00 |
|
DL6ER
|
9461e0c9b0
|
Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-19 06:55:19 +01:00 |
|
DL6ER
|
dbf6e0831e
|
Prettify capabilities debugging output
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 12:02:40 +01:00 |
|
DL6ER
|
f7af506ab5
|
Print message that we received SIGHUP into pihole-FTL.log when this happens
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 11:51:57 +01:00 |
|
DL6ER
|
526ec7e27b
|
Missing CAP_SETUID is not a problem as we only need it when we start as root (which has all capabiltites).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 11:43:15 +01:00 |
|
DL6ER
|
f48fa15040
|
Use actual values for capsize as the macros are not available on all CI machines, causing the jobs to fail.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 07:48:56 +01:00 |
|
DL6ER
|
efbe69cdf2
|
Declare array only to be used within capabilitites.c as static
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 07:42:04 +01:00 |
|
DL6ER
|
91beeec824
|
Free allocated memory
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-18 06:57:48 +01:00 |
|
DL6ER
|
4a15b93fea
|
Explicitly check availability of capability in current kernel before printing its value. Accessing a capability that is not valid can never lead to a crash, however, it is also no a menaingful thing to do so we don't do it.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-17 15:33:04 +01:00 |
|
DL6ER
|
73cbb911ae
|
Change caps sorting in debug messages. The prefered order seems to be PIE.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-17 15:30:05 +01:00 |
|
DL6ER
|
8d615d6011
|
Add capabilities debug mode that prints all capabilities which are enabled when pihole-FTL is started.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-17 14:53:27 +01:00 |
|
DL6ER
|
6186cd1cf6
|
Check capabilities with kernel methods. Removes the need for libcap on the target system.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-03-17 10:57:48 +01:00 |
|
DL6ER
|
724ab54aa3
|
Just complain loudly instead of failing badly if capabilities are not available
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-02 18:07:05 +01:00 |
|
DL6ER
|
070feb630a
|
Add check for required Linux capabilities.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-02 17:56:12 +01:00 |
|