diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2016-07-04 14:08:46 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-12 14:23:27 +0200 |
commit | 35567de112cd5d82acb582cbdb44c8652bbdfda1 (patch) | |
tree | d8579869a3305df713954a28a8596fcf15c48add | |
parent | 26a3d4f2ef35a088e4c5fc928290052c89a2ff43 (diff) | |
download | sssd-35567de112cd5d82acb582cbdb44c8652bbdfda1.tar.gz sssd-35567de112cd5d82acb582cbdb44c8652bbdfda1.tar.xz sssd-35567de112cd5d82acb582cbdb44c8652bbdfda1.zip |
nss-srv-tests: Fix prototype of wrapped ncache functions
The argument ttl was recently removed from negative cache functions
(sss_ncache_check_user, sss_ncache_check_uid, sss_ncache_check_sid,
sss_ncache_check_cert) but it was not removed from wrapped versions
in nss-srv-tests. It caused a crash on machine with big endian
and when configure wih --coverage.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
-rw-r--r-- | src/tests/cmocka/test_nss_srv.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c index 5e0398f20..4137e9151 100644 --- a/src/tests/cmocka/test_nss_srv.c +++ b/src/tests/cmocka/test_nss_srv.c @@ -151,60 +151,56 @@ int __wrap_sss_cmd_send_empty(struct cli_ctx *cctx, TALLOC_CTX *freectx) } /* Intercept negative cache lookups */ -int __real_sss_ncache_check_user(struct sss_nc_ctx *ctx, int ttl, +int __real_sss_ncache_check_user(struct sss_nc_ctx *ctx, struct sss_domain_info *dom, const char *name); -int __wrap_sss_ncache_check_user(struct sss_nc_ctx *ctx, int ttl, +int __wrap_sss_ncache_check_user(struct sss_nc_ctx *ctx, struct sss_domain_info *dom, const char *name) { int ret; - ret = __real_sss_ncache_check_user(ctx, ttl, dom, name); + ret = __real_sss_ncache_check_user(ctx, dom, name); if (ret == EEXIST) { nss_test_ctx->ncache_hits++; } return ret; } -int __real_sss_ncache_check_uid(struct sss_nc_ctx *ctx, int ttl, +int __real_sss_ncache_check_uid(struct sss_nc_ctx *ctx, struct sss_domain_info *dom, uid_t uid); -int __wrap_sss_ncache_check_uid(struct sss_nc_ctx *ctx, int ttl, +int __wrap_sss_ncache_check_uid(struct sss_nc_ctx *ctx, struct sss_domain_info *dom, uid_t uid) { int ret; - ret = __real_sss_ncache_check_uid(ctx, ttl, dom, uid); + ret = __real_sss_ncache_check_uid(ctx, dom, uid); if (ret == EEXIST) { nss_test_ctx->ncache_hits++; } return ret; } -int __real_sss_ncache_check_sid(struct sss_nc_ctx *ctx, - int ttl, const char *sid); +int __real_sss_ncache_check_sid(struct sss_nc_ctx *ctx, const char *sid); -int __wrap_sss_ncache_check_sid(struct sss_nc_ctx *ctx, - int ttl, const char *sid) +int __wrap_sss_ncache_check_sid(struct sss_nc_ctx *ctx, const char *sid) { int ret; - ret = __real_sss_ncache_check_sid(ctx, ttl, sid); + ret = __real_sss_ncache_check_sid(ctx, sid); if (ret == EEXIST) { nss_test_ctx->ncache_hits++; } return ret; } -int __real_sss_ncache_check_cert(struct sss_nc_ctx *ctx, - int ttl, const char *cert); +int __real_sss_ncache_check_cert(struct sss_nc_ctx *ctx, const char *cert); -int __wrap_sss_ncache_check_cert(struct sss_nc_ctx *ctx, - int ttl, const char *cert) +int __wrap_sss_ncache_check_cert(struct sss_nc_ctx *ctx, const char *cert) { int ret; - ret = __real_sss_ncache_check_cert(ctx, ttl, cert); + ret = __real_sss_ncache_check_cert(ctx, cert); if (ret == EEXIST) { nss_test_ctx->ncache_hits++; } |