Module Name: src Committed By: christos Date: Mon Mar 8 19:38:10 UTC 2021
Modified Files: src/external/bsd/openpam/dist/include/security: openpam.h pam_constants.h src/external/bsd/openpam/dist/lib/libpam: openpam_dispatch.c openpam_log.c openpam_ttyconv.c pam_get_authtok.c pam_get_item.c pam_set_item.c Log Message: Appease new lint enum errors To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/bsd/openpam/dist/include/security/openpam.h cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/openpam/dist/include/security/pam_constants.h cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c \ src/external/bsd/openpam/dist/lib/libpam/openpam_log.c \ src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c \ src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c \ src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c \ src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/openpam/dist/include/security/openpam.h diff -u src/external/bsd/openpam/dist/include/security/openpam.h:1.10 src/external/bsd/openpam/dist/include/security/openpam.h:1.11 --- src/external/bsd/openpam/dist/include/security/openpam.h:1.10 Tue Apr 28 22:16:56 2020 +++ src/external/bsd/openpam/dist/include/security/openpam.h Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam.h,v 1.10 2020/04/29 02:16:56 riastradh Exp $ */ +/* $NetBSD: openpam.h,v 1.11 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -201,7 +201,7 @@ openpam_get_feature(int _feature, int *_ /* * Log levels */ -enum { +enum openpam_log_primitives { PAM_LOG_LIBDEBUG = -1, PAM_LOG_DEBUG, PAM_LOG_VERBOSE, @@ -264,7 +264,7 @@ int openpam_nullconv(int _n, /* * PAM primitives */ -enum { +enum openpam_sm_primitives { PAM_SM_AUTHENTICATE, PAM_SM_SETCRED, PAM_SM_ACCT_MGMT, Index: src/external/bsd/openpam/dist/include/security/pam_constants.h diff -u src/external/bsd/openpam/dist/include/security/pam_constants.h:1.6 src/external/bsd/openpam/dist/include/security/pam_constants.h:1.7 --- src/external/bsd/openpam/dist/include/security/pam_constants.h:1.6 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/include/security/pam_constants.h Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_constants.h,v 1.6 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: pam_constants.h,v 1.7 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -90,7 +90,7 @@ enum { /* * XSSO 5.3 */ -enum { +enum openpam_message_items { PAM_PROMPT_ECHO_OFF = 1, PAM_PROMPT_ECHO_ON = 2, PAM_ERROR_MSG = 3, @@ -119,7 +119,7 @@ enum { /* * XSSO 5.5 */ -enum { +enum openpam_item_primitives { PAM_SERVICE = 1, PAM_USER = 2, PAM_TTY = 3, Index: src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c:1.3 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/lib/libpam/openpam_dispatch.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam_dispatch.c,v 1.3 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: openpam_dispatch.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: openpam_dispatch.c,v 1.3 2017/05/06 19:50:09 christos Exp $"); +__RCSID("$NetBSD: openpam_dispatch.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <sys/param.h> @@ -86,7 +86,7 @@ openpam_dispatch(pam_handle_t *pamh, } /* pick a chain */ - switch (primitive) { + switch ((enum openpam_sm_primitives)primitive) { case PAM_SM_AUTHENTICATE: case PAM_SM_SETCRED: chain = pamh->chains[PAM_AUTH]; @@ -101,6 +101,7 @@ openpam_dispatch(pam_handle_t *pamh, case PAM_SM_CHAUTHTOK: chain = pamh->chains[PAM_PASSWORD]; break; + case PAM_NUM_PRIMITIVES: default: RETURNC(PAM_SYSTEM_ERR); } @@ -208,7 +209,7 @@ openpam_check_error_code(int primitive, return; /* specific error codes */ - switch (primitive) { + switch ((enum openpam_sm_primitives)primitive) { case PAM_SM_AUTHENTICATE: if (r == PAM_AUTH_ERR || r == PAM_CRED_INSUFFICIENT || @@ -245,6 +246,8 @@ openpam_check_error_code(int primitive, r == PAM_TRY_AGAIN) return; break; + case PAM_NUM_PRIMITIVES: + break; } openpam_log(PAM_LOG_ERROR, "%s(): unexpected return value %d", Index: src/external/bsd/openpam/dist/lib/libpam/openpam_log.c diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_log.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_log.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/openpam_log.c:1.3 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/lib/libpam/openpam_log.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam_log.c,v 1.3 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: openpam_log.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: openpam_log.c,v 1.3 2017/05/06 19:50:09 christos Exp $"); +__RCSID("$NetBSD: openpam_log.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <errno.h> #include <stdarg.h> @@ -110,7 +110,7 @@ _openpam_log(int level, const char *func int priority; int serrno; - switch (level) { + switch ((enum openpam_log_primitives)level) { case PAM_LOG_LIBDEBUG: case PAM_LOG_DEBUG: if (!openpam_debug) Index: src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c:1.3 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/lib/libpam/openpam_ttyconv.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: openpam_ttyconv.c,v 1.3 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: openpam_ttyconv.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: openpam_ttyconv.c,v 1.3 2017/05/06 19:50:09 christos Exp $"); +__RCSID("$NetBSD: openpam_ttyconv.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <sys/types.h> #include <sys/poll.h> @@ -372,7 +372,7 @@ openpam_ttyconv(int n, for (i = 0; i < n; ++i) { aresp[i].resp_retcode = 0; aresp[i].resp = NULL; - switch (msg[i]->msg_style) { + switch ((enum openpam_message_items)msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: if (prompt(msg[i]->msg, respbuf, 0) < 0 || (aresp[i].resp = strdup(respbuf)) == NULL) Index: src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c diff -u src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c:1.3 src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c:1.3 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/lib/libpam/pam_get_authtok.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_get_authtok.c,v 1.3 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: pam_get_authtok.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: pam_get_authtok.c,v 1.3 2017/05/06 19:50:09 christos Exp $"); +__RCSID("$NetBSD: pam_get_authtok.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <sys/param.h> @@ -83,7 +83,7 @@ pam_get_authtok(pam_handle_t *pamh, ENTER(); *authtok = NULL; twice = 0; - switch (item) { + switch ((enum openpam_item_primitives)item) { case PAM_AUTHTOK: pitem = PAM_AUTHTOK_PROMPT; prompt_option = "authtok_prompt"; Index: src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c diff -u src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c:1.3 src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c:1.3 Sat May 6 15:50:09 2017 +++ src/external/bsd/openpam/dist/lib/libpam/pam_get_item.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_get_item.c,v 1.3 2017/05/06 19:50:09 christos Exp $ */ +/* $NetBSD: pam_get_item.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: pam_get_item.c,v 1.3 2017/05/06 19:50:09 christos Exp $"); +__RCSID("$NetBSD: pam_get_item.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <sys/param.h> @@ -64,7 +64,7 @@ pam_get_item(const pam_handle_t *pamh, { ENTERI(item_type); - switch (item_type) { + switch ((enum openpam_item_primitives)item_type) { case PAM_SERVICE: case PAM_USER: case PAM_AUTHTOK: Index: src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c diff -u src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c:1.3 src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c:1.4 --- src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c:1.3 Sat May 6 15:50:10 2017 +++ src/external/bsd/openpam/dist/lib/libpam/pam_set_item.c Mon Mar 8 14:38:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_set_item.c,v 1.3 2017/05/06 19:50:10 christos Exp $ */ +/* $NetBSD: pam_set_item.c,v 1.4 2021/03/08 19:38:10 christos Exp $ */ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. @@ -42,7 +42,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: pam_set_item.c,v 1.3 2017/05/06 19:50:10 christos Exp $"); +__RCSID("$NetBSD: pam_set_item.c,v 1.4 2021/03/08 19:38:10 christos Exp $"); #include <sys/param.h> #include <sys/socket.h> @@ -72,7 +72,7 @@ pam_set_item(pam_handle_t *pamh, ENTERI(item_type); slot = &pamh->item[item_type]; osize = nsize = 0; - switch (item_type) { + switch ((enum openpam_item_primitives)item_type) { case PAM_SERVICE: /* set once only, by pam_start() */ if (*slot != NULL && item != NULL)