diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-01-22 14:31:37 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-22 18:21:39 +0100 |
commit | 5ff1c3c5a12930692cb6284d14f7fda3a974af8e (patch) | |
tree | 68f7d53b9fb9054bb20a58e052634e6b96a98f4a /src/responder/sudo/sudosrv_dp.c | |
parent | 1d262e93850e2be65a774da070600947f1b75153 (diff) | |
download | sssd-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_dp.c')
-rw-r--r-- | src/responder/sudo/sudosrv_dp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/responder/sudo/sudosrv_dp.c b/src/responder/sudo/sudosrv_dp.c index 208606c26..3cd8fe8d8 100644 --- a/src/responder/sudo/sudosrv_dp.c +++ b/src/responder/sudo/sudosrv_dp.c @@ -37,7 +37,7 @@ struct sss_dp_get_sudoers_info { bool fast_reply; enum sss_dp_sudo_type type; const char *name; - size_t num_rules; + uint32_t num_rules; struct sysdb_attrs **rules; }; @@ -51,7 +51,7 @@ sss_dp_get_sudoers_send(TALLOC_CTX *mem_ctx, bool fast_reply, enum sss_dp_sudo_type type, const char *name, - size_t num_rules, + uint32_t num_rules, struct sysdb_attrs **rules) { struct tevent_req *req; @@ -82,7 +82,7 @@ sss_dp_get_sudoers_send(TALLOC_CTX *mem_ctx, switch (info->type) { case SSS_DP_SUDO_REFRESH_RULES: key = talloc_asprintf(state, "%d:%u:%s@%s", type, - (unsigned int)num_rules, name, dom->name); + num_rules, name, dom->name); break; case SSS_DP_SUDO_FULL_REFRESH: key = talloc_asprintf(state, "%d:%s", type, dom->name); @@ -122,7 +122,7 @@ sss_dp_get_sudoers_msg(void *pvt) struct sss_dp_get_sudoers_info *info; uint32_t be_type = 0; const char *rule_name = NULL; - int i; + uint32_t i; info = talloc_get_type(pvt, struct sss_dp_get_sudoers_info); @@ -151,7 +151,7 @@ sss_dp_get_sudoers_msg(void *pvt) /* create the message */ DEBUG(SSSDBG_TRACE_FUNC, ("Creating SUDOers request for [%s][%u][%s][%u]\n", - info->dom->name, be_type, info->name, (unsigned int)info->num_rules)); + info->dom->name, be_type, info->name, info->num_rules)); dbus_message_iter_init_append(msg, &iter); |