summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-05-03 12:51:55 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-04 13:36:42 -0400
commit9fd2775fe1ced6ff6a9a3ff7db124fcb52dade5d (patch)
tree28bcaa849b1140d7e12de2c0ef8ec82531a712e7 /src/util
parentaef21bb77289a61796436eff7a08f64480f813ce (diff)
downloadsssd_unused-9fd2775fe1ced6ff6a9a3ff7db124fcb52dade5d.tar.gz
sssd_unused-9fd2775fe1ced6ff6a9a3ff7db124fcb52dade5d.tar.xz
sssd_unused-9fd2775fe1ced6ff6a9a3ff7db124fcb52dade5d.zip
Fix endian issue in SID conversion
Since the byte-order is only important when dealing with the binary SID the sub-auth values are stored in host order and are only converted while reading or writing the binary SID.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/util.h b/src/util/util.h
index bfa05464..2912f899 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -546,8 +546,10 @@ struct sss_domain_info *copy_subdomain(TALLOC_CTX *mem_ctx,
/* Conversion interfaces. */
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define le32toh(x) (x)
+# define htole32(x) (x)
# else
# define le32toh(x) __bswap_32 (x)
+# define htole32(x) __bswap_32 (x)
# endif
#endif /* __USE_BSD */