mcstrans: remove unused getpeercon_raw() call
PATCH v2 1/1 mcstrans: remove unused getpeercon_raw() call
There is a call to getpeercon_raw() in mcstransd, but nothing is done with the context. The purpose of process_request() is to translate a context and we would like that to succeed even if, for some reason, getpeercon_raw() fails.
--- mcstrans/src/mcstransd.c | 10 ---------- 1 file changed, 10 deletions(-)
v2:
- Remove comment about MLS clearance check in peercon
mcstrans/src/mcstransd.c +0 -10
@@ -142,17 +142,8 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) {int32_t result;char *out =NULL ; -char *peercon =NULL ;int ret; - ret =getpeercon_raw (fd, &peercon); -if (ret <0 ) -return ret; - -/* TODO: Check if MLS clearance (in peercon) dominates the MLS label -* (in the request input). -*/ -switch (function) {case SETRANS_INIT : result =0 ;
@@ -184,7 +175,6 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) }free (out); -freecon (peercon);return ret; }
Signature · 1 line
2.19.0
Quoted 7 lines · Yuli Khodorkovskiy
There is a call to
getpeercon_raw()in mcstransd, but nothing is done with the context. The purpose ofprocess_request()is to translate a context and we would like that to succeed even if, for some reason,getpeercon_raw()fails.Signed-off-by Yuli Khodorkovskiy <[email protected]>Signed-off-by Joshua Brindle <[email protected]>
Quoted 38 lines
--- mcstrans/src/mcstransd.c | 10 ---------- 1 file changed, 10 deletions(-)v2:
- Remove comment about MLS clearance check in peerconmcstrans/src/mcstransd.c +0
-10@@ -142,17 +142,8 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) {int32_t result;char *out =NULL ; -char *peercon =NULL ;int ret; - ret =getpeercon_raw (fd, &peercon); -if (ret <0 ) -return ret; - -/* TODO: Check if MLS clearance (in peercon) dominates the MLS label -* (in the request input). -*/ -switch (function) {case SETRANS_INIT : result =0 ;@@ -184,7 +175,6 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) }free (out); -freecon (peercon);return ret; }
Stephen Smalley
AppliedQuoted 7 lines · Yuli Khodorkovskiy
There is a call to
getpeercon_raw()in mcstransd, but nothing is done with the context. The purpose ofprocess_request()is to translate a context and we would like that to succeed even if, for some reason,getpeercon_raw()fails.Signed-off-by Yuli Khodorkovskiy <[email protected]>Signed-off-by Joshua Brindle <[email protected]>
Thanks, applied.
Quoted 38 lines
--- mcstrans/src/mcstransd.c | 10 ---------- 1 file changed, 10 deletions(-)v2:
- Remove comment about MLS clearance check in peerconmcstrans/src/mcstransd.c +0
-10@@ -142,17 +142,8 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) {int32_t result;char *out =NULL ; -char *peercon =NULL ;int ret; - ret =getpeercon_raw (fd, &peercon); -if (ret <0 ) -return ret; - -/* TODO: Check if MLS clearance (in peercon) dominates the MLS label -* (in the request input). -*/ -switch (function) {case SETRANS_INIT : result =0 ;@@ -184,7 +175,6 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2)) }free (out); -freecon (peercon);return ret; }