Also use hdb_error_to_cs() as expected. (won't change behavior but will better match the other uses of it).
Signed-off-by: Angus Salkeld <[email protected]> --- exec/coroipcs.c | 6 +++--- exec/util.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exec/coroipcs.c b/exec/coroipcs.c index 703802a..b38a418 100644 --- a/exec/coroipcs.c +++ b/exec/coroipcs.c @@ -846,7 +846,7 @@ retry_recv: if (api->security_valid (euid, egid)) { auth_res = CS_OK; } else { - auth_res = hdb_error_to_cs(errno); + auth_res = hdb_error_to_cs(-1); } ucred_free(uc); } @@ -870,7 +870,7 @@ retry_recv: if (api->security_valid (euid, egid)) { auth_res = CS_OK; } else { - auth_res = hdb_error_to_cs(errno); + auth_res = hdb_error_to_cs(-1); } } } @@ -887,7 +887,7 @@ retry_recv: if (api->security_valid (cred->uid, cred->gid)) { auth_res = CS_OK; } else { - auth_res = hdb_error_to_cs(errno); + auth_res = hdb_error_to_cs(-1); } } diff --git a/exec/util.h b/exec/util.h index f04794e..2257fd3 100644 --- a/exec/util.h +++ b/exec/util.h @@ -80,7 +80,7 @@ static inline cs_error_t hdb_error_to_cs (int res) \ return (CS_ERR_NO_RESOURCES); \ } else \ if (errno == EACCES) { \ - return (CS_ERR_SECURITY); \ + return (CS_ERR_ACCESS); \ } \ return (CS_ERR_LIBRARY); \ } \ -- 1.7.3.1 _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
