pam_vprompt.c (115619) | pam_vprompt.c (125647) |
---|---|
1/*- 2 * Copyright (c) 2002-2003 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-2003 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/pam_vprompt.c#12 $ | 34 * $P4: //depot/projects/openpam/lib/pam_vprompt.c#13 $ |
35 */ 36 37#include <stdarg.h> 38#include <stdio.h> 39#include <stdlib.h> 40 41#include <security/pam_appl.h> 42 --- 11 unchanged lines hidden (view full) --- 54 char **resp, 55 const char *fmt, 56 va_list ap) 57{ 58 char msgbuf[PAM_MAX_MSG_SIZE]; 59 struct pam_message msg; 60 const struct pam_message *msgp; 61 struct pam_response *rsp; | 35 */ 36 37#include <stdarg.h> 38#include <stdio.h> 39#include <stdlib.h> 40 41#include <security/pam_appl.h> 42 --- 11 unchanged lines hidden (view full) --- 54 char **resp, 55 const char *fmt, 56 va_list ap) 57{ 58 char msgbuf[PAM_MAX_MSG_SIZE]; 59 struct pam_message msg; 60 const struct pam_message *msgp; 61 struct pam_response *rsp; |
62 struct pam_conv *conv; | 62 const struct pam_conv *conv; 63 const void *convp; |
63 int r; 64 65 ENTER(); | 64 int r; 65 66 ENTER(); |
66 r = pam_get_item(pamh, PAM_CONV, (const void **)&conv); | 67 r = pam_get_item(pamh, PAM_CONV, &convp); |
67 if (r != PAM_SUCCESS) 68 RETURNC(r); | 68 if (r != PAM_SUCCESS) 69 RETURNC(r); |
70 conv = convp; |
|
69 if (conv == NULL || conv->conv == NULL) { 70 openpam_log(PAM_LOG_ERROR, "no conversation function"); 71 RETURNC(PAM_SYSTEM_ERR); 72 } 73 vsnprintf(msgbuf, PAM_MAX_MSG_SIZE, fmt, ap); 74 msg.msg_style = style; 75 msg.msg = msgbuf; 76 msgp = &msg; --- 50 unchanged lines hidden --- | 71 if (conv == NULL || conv->conv == NULL) { 72 openpam_log(PAM_LOG_ERROR, "no conversation function"); 73 RETURNC(PAM_SYSTEM_ERR); 74 } 75 vsnprintf(msgbuf, PAM_MAX_MSG_SIZE, fmt, ap); 76 msg.msg_style = style; 77 msg.msg = msgbuf; 78 msgp = &msg; --- 50 unchanged lines hidden --- |