nss_mc_group.c revision 8bf65dbab8703697c85b033beb5c189fce17b036
214N/A * System Security Services Daemon. NSS client interface 214N/A * Copyright (C) Simo Sorce 2011 919N/A * This program is free software; you can redistribute it and/or modify 919N/A * it under the terms of the GNU Lesser General Public License as 919N/A * published by the Free Software Foundation; either version 2.1 of the 919N/A * License, or (at your option) any later version. 919N/A * This program is distributed in the hope that it will be useful, 919N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 919N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 919N/A * GNU Lesser General Public License for more details. 919N/A * You should have received a copy of the GNU Lesser General Public License 919N/A/* GROUP database NSS interface using mmap cache */ /* additional checks before filling result*/ /* entry is now invalid */ /* fill in glibc provided structs */ /* The address &buffer[0] must be aligned to sizeof(char *) */ /* The buffer is not properly aligned. */ /* Get max address of data table. */ /* hashes are calculated including the NULL terminator */ /* If slot is not within the bounds of mmaped region and * it's value is not MC_INVALID_VAL, then the cache is * probbably corrupted. */ /* check record matches what we are searching for */ /* if name hash does not match we can skip this immediately */ * - name_len cannot be longer than all strings * - data->name cannot point outside strings * - all strings must be within data_table */ /* hashes are calculated including the NULL terminator */ /* If slot is not within the bounds of mmaped region and * it's value is not MC_INVALID_VAL, then the cache is * probbably corrupted. */ /* check record matches what we are searching for */ /* if uid hash does not match we can skip this immediately */