Re: [PATCH] semanage: swap tcp and udp protocol numbers

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

 



On 08/10/16 04:39, Miroslav Vadkerti wrote:
The tcp/udp protocol numbers were accidentaly swapped in
the original patch 'semanage: add auditing of changes in records'.

Signed-off-by: Miroslav Vadkerti <mvadkert@xxxxxxxxxx>
---
 policycoreutils/semanage/seobject.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py
index 317b421..786ed0e 100644
--- a/policycoreutils/semanage/seobject.py
+++ b/policycoreutils/semanage/seobject.py
@@ -88,8 +88,8 @@ file_type_str_to_option = {"all files": "a",
                            "symbolic link": "l",
                            "named pipe": "p"}

-proto_to_audit = {"tcp": 17,
-                  "udp": 6,
+proto_to_audit = {"tcp": 6,
+                  "udp": 17,
                   "ipv4": 4,
                   "ipv6": 41}

I realize this has already been merged, but why not use existing constants such as socket.IPPROTO_TCP and socket.AF_INET rather than hard coding the protocol numbers?

--
Chris PeBenito
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux