aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2016-02-05 14:20:19 -0600
committerPeter Seebach <peter.seebach@windriver.com>2016-02-05 14:22:21 -0600
commit4c56d54337251049ca6fbc248d1e364fa8184fba (patch)
tree7a88cc59ad49dd13b9fb162ed3df72422d99431d
parent2045939c076a48a48252aeb92280ebd8739b18de (diff)
downloadpseudo-4c56d54337251049ca6fbc248d1e364fa8184fba.tar.gz
pseudo-4c56d54337251049ca6fbc248d1e364fa8184fba.tar.bz2
pseudo-4c56d54337251049ca6fbc248d1e364fa8184fba.zip
pseudo_db.c: sort xattrs
Apparently some things rely on the assumption that listxattr returns extended attributes in sorted orders.
-rw-r--r--ChangeLog.txt1
-rw-r--r--pseudo_db.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 919b928..d76bd0b 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,7 @@
2016-02-05:
* (seebs) don't abort search for server on first try.
* (seebs) new clients cancel a shutdown request.
+ * (seebs) sort xattrs when returning list.
2016-01-22:
* (seebs) Mask in S_IFREG when mknod called with no S_IFMT bits.
diff --git a/pseudo_db.c b/pseudo_db.c
index f60f0ab..c387cb5 100644
--- a/pseudo_db.c
+++ b/pseudo_db.c
@@ -2235,7 +2235,7 @@ pdb_list_xattr(long long file_id, char **value, size_t *len) {
size_t used = 0;
char *buffer = 0;
int rc;
- char *sql = "SELECT name FROM xattrs WHERE file_id = ?;";
+ char *sql = "SELECT name FROM xattrs WHERE file_id = ? ORDER BY name;";
/* if we don't have a record of the file, it must not have
* any extended attributes...