summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2015-07-16 16:54:00 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-08-05 11:28:11 +0200
commit39b31427e2d11ca318df11fd48db33a7cc610aa7 (patch)
tree28615111908877d4ab883326066601d333dd7c01 /src/responder
parent872aa0d01d1642f9c8fc204d4c33e5c5640c3352 (diff)
downloadsssd-39b31427e2d11ca318df11fd48db33a7cc610aa7.tar.gz
sssd-39b31427e2d11ca318df11fd48db33a7cc610aa7.tar.xz
sssd-39b31427e2d11ca318df11fd48db33a7cc610aa7.zip
mmap_cache: Rename variables
Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/nss/nsssrv_mmap_cache.c16
-rw-r--r--src/responder/nss/nsssrv_mmap_cache.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/responder/nss/nsssrv_mmap_cache.c b/src/responder/nss/nsssrv_mmap_cache.c
index ebda8ac6f..16bc926f3 100644
--- a/src/responder/nss/nsssrv_mmap_cache.c
+++ b/src/responder/nss/nsssrv_mmap_cache.c
@@ -959,8 +959,8 @@ done:
errno_t sss_mmap_cache_initgr_store(struct sss_mc_ctx **_mcc,
struct sized_string *name,
- uint32_t memnum,
- uint8_t *membuf)
+ uint32_t num_groups,
+ uint8_t *gids_buf)
{
struct sss_mc_ctx *mcc = *_mcc;
struct sss_mc_rec *rec;
@@ -974,8 +974,8 @@ errno_t sss_mmap_cache_initgr_store(struct sss_mc_ctx **_mcc,
return EINVAL;
}
- /* memnum + reserved + array of members + name*/
- data_len = (2 + memnum) * sizeof(uint32_t) + name->len;
+ /* num_groups + reserved + array of gids + name*/
+ data_len = (2 + num_groups) * sizeof(uint32_t) + name->len;
rec_len = sizeof(struct sss_mc_rec) + sizeof(struct sss_mc_initgr_data)
+ data_len;
if (rec_len > mcc->dt_size) {
@@ -998,10 +998,10 @@ errno_t sss_mmap_cache_initgr_store(struct sss_mc_ctx **_mcc,
name->str, name->len, name->str, name->len);
/* initgroups struct */
- data->members = memnum;
- memcpy(data->gids, membuf, memnum * sizeof(uint32_t));
- memcpy(&data->gids[memnum], name->str, name->len);
- data->name = MC_PTR_DIFF(&data->gids[memnum], data);
+ data->num_groups = num_groups;
+ memcpy(data->gids, gids_buf, num_groups * sizeof(uint32_t));
+ memcpy(&data->gids[num_groups], name->str, name->len);
+ data->name = MC_PTR_DIFF(&data->gids[num_groups], data);
MC_LOWER_BARRIER(rec);
diff --git a/src/responder/nss/nsssrv_mmap_cache.h b/src/responder/nss/nsssrv_mmap_cache.h
index 3a6764dd3..b09e4a6f8 100644
--- a/src/responder/nss/nsssrv_mmap_cache.h
+++ b/src/responder/nss/nsssrv_mmap_cache.h
@@ -53,8 +53,8 @@ errno_t sss_mmap_cache_gr_store(struct sss_mc_ctx **_mcc,
errno_t sss_mmap_cache_initgr_store(struct sss_mc_ctx **_mcc,
struct sized_string *name,
- uint32_t memnum,
- uint8_t *membuf);
+ uint32_t num_groups,
+ uint8_t *gids_buf);
errno_t sss_mmap_cache_pw_invalidate(struct sss_mc_ctx *mcc,
struct sized_string *name);