openpam_findenv.c (107937) | openpam_findenv.c (110503) |
---|---|
1/*- 2 * Copyright (c) 2002 Networks Associates Technology, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * Network Associates Laboratories, the Security Research Division of 7 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (c) 2002 Networks Associates Technology, Inc. 3 * All rights reserved. 4 * 5 * This software was developed for the FreeBSD Project by ThinkSec AS and 6 * Network Associates Laboratories, the Security Research Division of 7 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 8 * ("CBOSS"), as part of the DARPA CHATS research program. --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $P4: //depot/projects/openpam/lib/openpam_findenv.c#9 $ | 34 * $P4: //depot/projects/openpam/lib/openpam_findenv.c#10 $ |
35 */ 36 37#include <string.h> 38 39#include <security/pam_appl.h> 40 41#include "openpam_impl.h" 42 --- 7 unchanged lines hidden (view full) --- 50openpam_findenv(pam_handle_t *pamh, 51 const char *name, 52 size_t len) 53{ 54 int i; 55 56 ENTER(); 57 if (pamh == NULL) | 35 */ 36 37#include <string.h> 38 39#include <security/pam_appl.h> 40 41#include "openpam_impl.h" 42 --- 7 unchanged lines hidden (view full) --- 50openpam_findenv(pam_handle_t *pamh, 51 const char *name, 52 size_t len) 53{ 54 int i; 55 56 ENTER(); 57 if (pamh == NULL) |
58 RETURNI(-1); | 58 RETURNN(-1); |
59 for (i = 0; i < pamh->env_count; ++i) 60 if (strncmp(pamh->env[i], name, len) == 0 && 61 pamh->env[i][len] == '=') | 59 for (i = 0; i < pamh->env_count; ++i) 60 if (strncmp(pamh->env[i], name, len) == 0 && 61 pamh->env[i][len] == '=') |
62 RETURNI(i); 63 RETURNI(-1); | 62 RETURNN(i); 63 RETURNN(-1); |
64} 65 66/* 67 * NODOC 68 */ | 64} 65 66/* 67 * NODOC 68 */ |