summaryrefslogtreecommitdiff
path: root/src/db
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/db
parent1d262e93850e2be65a774da070600947f1b75153 (diff)
downloadsssd-5ff1c3c5a12930692cb6284d14f7fda3a974af8e.tar.gz
sssd-5ff1c3c5a12930692cb6284d14f7fda3a974af8e.tar.bz2
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/db')
-rw-r--r--src/db/sysdb_sudo.c6
-rw-r--r--src/db/sysdb_sudo.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 93dea85c..d6cc3eae 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -174,13 +174,13 @@ done:
}
errno_t sysdb_sudo_filter_rules_by_time(TALLOC_CTX *mem_ctx,
- size_t in_num_rules,
+ uint32_t in_num_rules,
struct sysdb_attrs **in_rules,
time_t now,
- size_t *_num_rules,
+ uint32_t *_num_rules,
struct sysdb_attrs ***_rules)
{
- size_t num_rules = 0;
+ uint32_t num_rules = 0;
struct sysdb_attrs **rules = NULL;
TALLOC_CTX *tmp_ctx = NULL;
bool allowed = false;
diff --git a/src/db/sysdb_sudo.h b/src/db/sysdb_sudo.h
index da019240..7a34591c 100644
--- a/src/db/sysdb_sudo.h
+++ b/src/db/sysdb_sudo.h
@@ -60,10 +60,10 @@
| SYSDB_SUDO_FILTER_NGRS
errno_t sysdb_sudo_filter_rules_by_time(TALLOC_CTX *mem_ctx,
- size_t in_num_rules,
+ uint32_t in_num_rules,
struct sysdb_attrs **in_rules,
time_t now,
- size_t *_num_rules,
+ uint32_t *_num_rules,
struct sysdb_attrs ***_rules);
errno_t