summaryrefslogtreecommitdiffstats
path: root/src/responder/sudo/sudosrv_query.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-01-22 14:31:37 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-22 18:21:39 +0100
commit5ff1c3c5a12930692cb6284d14f7fda3a974af8e (patch)
tree68f7d53b9fb9054bb20a58e052634e6b96a98f4a /src/responder/sudo/sudosrv_query.c
parent1d262e93850e2be65a774da070600947f1b75153 (diff)
downloadsssd-5ff1c3c5a12930692cb6284d14f7fda3a974af8e.tar.gz
sssd-5ff1c3c5a12930692cb6284d14f7fda3a974af8e.tar.xz
sssd-5ff1c3c5a12930692cb6284d14f7fda3a974af8e.zip
sudo responder: change num_rules type from size_t to uint32_t
https://fedorahosted.org/sssd/ticket/1779 2^32 should be enough to store sudo rules. size_t type was causing troubles on big endian architectures, because it wasn't used correctly in combination with D-Bus.
Diffstat (limited to 'src/responder/sudo/sudosrv_query.c')
-rw-r--r--src/responder/sudo/sudosrv_query.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/responder/sudo/sudosrv_query.c b/src/responder/sudo/sudosrv_query.c
index 1574104cb..a8501df56 100644
--- a/src/responder/sudo/sudosrv_query.c
+++ b/src/responder/sudo/sudosrv_query.c
@@ -188,7 +188,7 @@ done:
*/
errno_t sudosrv_build_response(TALLOC_CTX *mem_ctx,
uint32_t error,
- int rules_num,
+ uint32_t rules_num,
struct sysdb_attrs **rules,
uint8_t **_response_body,
size_t *_response_len)
@@ -196,7 +196,7 @@ errno_t sudosrv_build_response(TALLOC_CTX *mem_ctx,
uint8_t *response_body = NULL;
size_t response_len = 0;
TALLOC_CTX *tmp_ctx = NULL;
- int i = 0;
+ uint32_t i = 0;
errno_t ret = EOK;
tmp_ctx = talloc_new(NULL);
@@ -225,7 +225,7 @@ errno_t sudosrv_build_response(TALLOC_CTX *mem_ctx,
}
/* rules count */
- ret = sudosrv_response_append_uint32(tmp_ctx, (uint32_t)rules_num,
+ ret = sudosrv_response_append_uint32(tmp_ctx, rules_num,
&response_body, &response_len);
if (ret != EOK) {
goto fail;