Skip to content

Commit

Permalink
mcstrans: remove unused getpeercon_raw() call
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Yuli Khodorkovskiy <[email protected]>
Signed-off-by: Joshua Brindle <[email protected]>
  • Loading branch information
gitstashpop authored and stephensmalley committed Oct 26, 2018
1 parent 94ebccf commit 95b3552
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions mcstrans/src/mcstransd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -184,7 +175,6 @@ process_request(int fd, uint32_t function, char *data1, char *UNUSED(data2))
}

free(out);
freecon(peercon);

return ret;
}
Expand Down

0 comments on commit 95b3552

Please sign in to comment.