mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-13 08:50:53 +00:00
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:
parent
9acdd37989
commit
be2d728599
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user