summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-05-15 14:08:40 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-05-22 12:30:46 +0200
commit390de028b3130ae564059101c662fe74e0e85a45 (patch)
treef9fb9c6e22c3d6f098b914f9ec68fe2077e38df3
parent75e4a7753c44e9f2a7a65fad77d95e394f81c125 (diff)
downloadsssd-390de028b3130ae564059101c662fe74e0e85a45.tar.gz
sssd-390de028b3130ae564059101c662fe74e0e85a45.tar.xz
sssd-390de028b3130ae564059101c662fe74e0e85a45.zip
test_nss_srv: Use right function for storing time_t
The size of time_t can be 8 bytes on some platforms. It is because of year 2038 problem. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
-rw-r--r--src/tests/cmocka/test_nss_srv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c
index e8947174f..86b2dd69f 100644
--- a/src/tests/cmocka/test_nss_srv.c
+++ b/src/tests/cmocka/test_nss_srv.c
@@ -2233,7 +2233,7 @@ void test_nss_initgroups(void **state)
attrs = sysdb_new_attrs(nss_test_ctx);
assert_non_null(attrs);
- ret = sysdb_attrs_add_uint32(attrs, SYSDB_INITGR_EXPIRE,
+ ret = sysdb_attrs_add_time_t(attrs, SYSDB_INITGR_EXPIRE,
time(NULL) + 300);
assert_int_equal(ret, EOK);
@@ -2335,7 +2335,7 @@ static int test_nss_initgr_search_acct_cb(void *pvt)
attrs = sysdb_new_attrs(nss_test_ctx);
assert_non_null(attrs);
- ret = sysdb_attrs_add_uint32(attrs, SYSDB_INITGR_EXPIRE,
+ ret = sysdb_attrs_add_time_t(attrs, SYSDB_INITGR_EXPIRE,
time(NULL) + 300);
assert_int_equal(ret, EOK);
@@ -2418,7 +2418,7 @@ static int test_nss_initgr_update_acct_cb(void *pvt)
attrs = sysdb_new_attrs(nss_test_ctx);
assert_non_null(attrs);
- ret = sysdb_attrs_add_uint32(attrs, SYSDB_INITGR_EXPIRE,
+ ret = sysdb_attrs_add_time_t(attrs, SYSDB_INITGR_EXPIRE,
time(NULL) + 300);
assert_int_equal(ret, EOK);
@@ -2458,7 +2458,7 @@ void test_nss_initgr_update(void **state)
attrs = sysdb_new_attrs(nss_test_ctx);
assert_non_null(attrs);
- ret = sysdb_attrs_add_uint32(attrs, SYSDB_INITGR_EXPIRE,
+ ret = sysdb_attrs_add_time_t(attrs, SYSDB_INITGR_EXPIRE,
time(NULL) - 1);
assert_int_equal(ret, EOK);