Deleted Added
full compact
getpwent.c (289925) getpwent.c (298120)
1/*-
2 * Copyright (c) 2003 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by
6 * Jacques A. Vidrine, Safeport Network Services, and Network
7 * Associates Laboratories, the Security Research Division of Network
8 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by
6 * Jacques A. Vidrine, Safeport Network Services, and Network
7 * Associates Laboratories, the Security Research Division of Network
8 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/lib/libc/gen/getpwent.c 289925 2015-10-25 07:42:56Z ngie $");
34__FBSDID("$FreeBSD: head/lib/libc/gen/getpwent.c 298120 2016-04-16 17:52:00Z pfg $");
35
36#include "namespace.h"
37#include <sys/param.h>
38#ifdef YP
39#include <rpc/rpc.h>
40#include <rpcsvc/yp_prot.h>
41#include <rpcsvc/ypclnt.h>
42#endif

--- 700 unchanged lines hidden (view full) ---

743 key.data = _PWD_VERSION_KEY;
744 key.size = strlen(_PWD_VERSION_KEY);
745 rv = res->get(res, &key, &entry, 0);
746 if (rv == 0)
747 *version = *(unsigned char *)entry.data;
748 else
749 *version = 3;
750 if (*version < 3 ||
35
36#include "namespace.h"
37#include <sys/param.h>
38#ifdef YP
39#include <rpc/rpc.h>
40#include <rpcsvc/yp_prot.h>
41#include <rpcsvc/ypclnt.h>
42#endif

--- 700 unchanged lines hidden (view full) ---

743 key.data = _PWD_VERSION_KEY;
744 key.size = strlen(_PWD_VERSION_KEY);
745 rv = res->get(res, &key, &entry, 0);
746 if (rv == 0)
747 *version = *(unsigned char *)entry.data;
748 else
749 *version = 3;
750 if (*version < 3 ||
751 *version >= sizeof(pwdb_versions)/sizeof(pwdb_versions[0])) {
751 *version >= nitems(pwdb_versions)) {
752 syslog(LOG_CRIT, "Unsupported password database version %d",
753 *version);
754 res->close(res);
755 res = NULL;
756 }
757 return (res);
758}
759

--- 1251 unchanged lines hidden ---
752 syslog(LOG_CRIT, "Unsupported password database version %d",
753 *version);
754 res->close(res);
755 res = NULL;
756 }
757 return (res);
758}
759

--- 1251 unchanged lines hidden ---