diff options
-rw-r--r-- | source3/lib/idmap_cache.c | 5 | ||||
-rw-r--r-- | source3/winbindd/wb_xids2sids.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/source3/lib/idmap_cache.c b/source3/lib/idmap_cache.c index 0ec23df6a05..cf63a229da5 100644 --- a/source3/lib/idmap_cache.c +++ b/source3/lib/idmap_cache.c @@ -201,13 +201,11 @@ static void idmap_cache_xid2sid_parser(time_t timeout, DATA_BLOB blob, (struct idmap_cache_xid2sid_state *)private_data; char *value; - ZERO_STRUCTP(state->sid); - state->ret = false; - if ((blob.length == 0) || (blob.data[blob.length-1] != 0)) { /* * Not a string, can't be a valid mapping */ + state->ret = false; return; } @@ -217,6 +215,7 @@ static void idmap_cache_xid2sid_parser(time_t timeout, DATA_BLOB blob, /* * Return NULL SID, see comment to uid2sid */ + *state->sid = (struct dom_sid) {0}; state->ret = true; } else { state->ret = string_to_sid(state->sid, value); diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index 1e251d8cbeb..766092b2664 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -462,7 +462,7 @@ struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx, uint32_t i; for (i=0; i<num_xids; i++) { - struct dom_sid sid; + struct dom_sid sid = {0}; bool ok, expired; switch (xids[i].type) { |