Deleted Added
sdiff udiff text old ( 91094 ) new ( 91100 )
full compact
1/*-
2 * Copyright (c) 2002 Networks Associates Technologies, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by ThinkSec AS and
6 * NAI Labs, the Security Research Division of Network Associates, Inc.
7 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
8 * DARPA CHATS research program.

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

36
37#include <string.h>
38
39#include <security/pam_appl.h>
40
41#include "openpam_impl.h"
42
43/*
44 * Locate an environment variable
45 */
46
47int
48openpam_findenv(pam_handle_t *pamh,
49 const char *name,
50 size_t len)
51{
52 int i;
53
54 if (pamh == NULL)
55 return (-1);
56
57 for (i = 0; i < pamh->env_count; ++i)
58 if (strncmp(pamh->env[i], name, len) == 0 &&
59 pamh->env[i][len] == '=')
60 return (i);
61 return (-1);
62}