- remove checking dest fd's smack rule.
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Change-Id: I9dea3830c41f628d3a4cde469421e979817a3104
# define S_MAGIC_RAMFS 0x858458f6
# define S_MAGIC_SQUASHFS 0x73717368
# define S_MAGIC_SYSFS 0x62656572
+# define S_MAGIC_SMACK 0x43415D53
#elif defined __GNU__
# include <hurd/hurd_types.h>
#endif
#include <sys/stat.h>
#include <sys/xattr.h>
#include <unistd.h>
+#include <errno.h>
#define SMACK_PATHTEXTSIZE 80
#define SMACK_LABELLEN 256
i = lgetxattr(path, SMACK_ATTRNAME, result->attr, rlen);
if (i < 0)
- return i;
+ {
+ if ((errno == ENODATA) || (errno == ENOTSUP))
+ return 0;
+ return i;
+ }
if (i < rlen)
result->attr[i] = '\0';
i = fgetxattr(fd, SMACK_ATTRNAME, result->attr, rlen);
if (i < 0)
- return i;
+ {
+ if ((errno == ENODATA) || (errno == ENOTSUP))
+ return 0;
+ return i;
+ }
if (i < rlen)
result->attr[i] = '\0';