openpam_set_option.c (107937) | openpam_set_option.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_set_option.c#6 $ | 34 * $P4: //depot/projects/openpam/lib/openpam_set_option.c#7 $ |
35 */ 36 37#include <sys/param.h> 38 39#include <stdio.h> 40#include <stdlib.h> 41#include <string.h> 42 --- 13 unchanged lines hidden (view full) --- 56 const char *option, 57 const char *value) 58{ 59 pam_chain_t *cur; 60 char *opt, **optv; 61 size_t len; 62 int i; 63 | 35 */ 36 37#include <sys/param.h> 38 39#include <stdio.h> 40#include <stdlib.h> 41#include <string.h> 42 --- 13 unchanged lines hidden (view full) --- 56 const char *option, 57 const char *value) 58{ 59 pam_chain_t *cur; 60 char *opt, **optv; 61 size_t len; 62 int i; 63 |
64 ENTER(); | 64 ENTERS(option); |
65 if (pamh == NULL || pamh->current == NULL || option == NULL) 66 RETURNC(PAM_SYSTEM_ERR); 67 cur = pamh->current; 68 for (len = 0; option[len] != '\0'; ++len) 69 if (option[len] == '=') 70 break; 71 for (i = 0; i < cur->optc; ++i) { 72 if (strncmp(cur->optv[i], option, len) == 0 && --- 47 unchanged lines hidden --- | 65 if (pamh == NULL || pamh->current == NULL || option == NULL) 66 RETURNC(PAM_SYSTEM_ERR); 67 cur = pamh->current; 68 for (len = 0; option[len] != '\0'; ++len) 69 if (option[len] == '=') 70 break; 71 for (i = 0; i < cur->optc; ++i) { 72 if (strncmp(cur->optv[i], option, len) == 0 && --- 47 unchanged lines hidden --- |