aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-10-06 16:16:22 -0500
committerPeter Seebach <seebs@laptop-seebs-net.local>2010-10-06 16:31:26 -0500
commitb8e2778c1bb5654df478efe7d3861ed30529409b (patch)
tree763dfa74dc41fa4abe6545929d5749bf469dabe8
parente1e57ddf2cdddeea6f684127dfce56d5494dcd1e (diff)
downloadpseudo-b8e2778c1bb5654df478efe7d3861ed30529409b.tar.gz
pseudo-b8e2778c1bb5654df478efe7d3861ed30529409b.tar.bz2
pseudo-b8e2778c1bb5654df478efe7d3861ed30529409b.zip
Add the fsetxattr wrapper to return ENOTSUP
Current versions of gnu coreutils 'cp' were attempting to set permissions using fsetxattr. As a workaround, we need to return ENOTSUP so that it falls back to using fchmod, which pseudo does know how to wrap. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--ChangeLog.txt4
-rw-r--r--guts/fsetxattr.c15
-rw-r--r--wrapfuncs.in1
3 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8c65ee9..f961e2a 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2010-10-06:
+ * (mhatle) Add the fsetxattr wrapper to return ENOTSUP
+ (note: workaround gnu coreutils 'cp')
+
2010-09-16:
* (seebs) change exec*() to use file, rather than path or filename,
also add OP_EXEC where it was missing.
diff --git a/guts/fsetxattr.c b/guts/fsetxattr.c
new file mode 100644
index 0000000..95cb64c
--- /dev/null
+++ b/guts/fsetxattr.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2008-2010 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * static int
+ * wrap_fsetxattr (int filedes, const char *name, const void *value, size_t size, int flags) {
+ * int rc = -1;
+ */
+
+ errno = ENOTSUP;
+ rc = -1;
+
+/* return rc;
+ * }
+ */
diff --git a/wrapfuncs.in b/wrapfuncs.in
index eab7804..586d828 100644
--- a/wrapfuncs.in
+++ b/wrapfuncs.in
@@ -118,3 +118,4 @@ int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups);
int getgroups(int size, gid_t *list);
ssize_t getxattr(const char *path, const char *name, void *value, size_t size);
ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW */
+int fsetxattr(int filedes, const char *name, const void *value, size_t size, int flags);