libselinux: Use ENOTSUP instead of EOPNOTSUPP for getfilecon functions

EOPNOTSUPP means "operation not supoorted on socket", and ENOTSUP means
"not supported", although per POSIX they can be alised to the same
value and on Linux they do, ENOTSUP seems the more correct error code.
In addition these function are documented as returning ENOTSUP, and
given that they are implemented in means of getxattr(2) which does
return ENOTSUP too, this just consolidates their behaviour.

Signed-off-by: Guillem Jover <guillem@debian.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Guillem Jover 2012-11-13 21:17:11 +01:00 committed by Eric Paris
parent 9acdd37989
commit be2d728599
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ int fgetfilecon_raw(int fd, security_context_t * context)
out:
if (ret == 0) {
/* Re-map empty attribute values to errors. */
errno = EOPNOTSUPP;
errno = ENOTSUP;
ret = -1;
}
if (ret < 0)

View File

@ -39,7 +39,7 @@ int getfilecon_raw(const char *path, security_context_t * context)
out:
if (ret == 0) {
/* Re-map empty attribute values to errors. */
errno = EOPNOTSUPP;
errno = ENOTSUP;
ret = -1;
}
if (ret < 0)

View File

@ -39,7 +39,7 @@ int lgetfilecon_raw(const char *path, security_context_t * context)
out:
if (ret == 0) {
/* Re-map empty attribute values to errors. */
errno = EOPNOTSUPP;
errno = ENOTSUP;
ret = -1;
}
if (ret < 0)