CVS commit: src/external/bsd/openpam/dist/lib/libpam

2021-08-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 11 09:11:05 UTC 2021

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: pam_putenv.c

Log Message:
use const for strchr assignment.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/pam_putenv.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/lib/libpam/pam_putenv.c
diff -u src/external/bsd/openpam/dist/lib/libpam/pam_putenv.c:1.3 src/external/bsd/openpam/dist/lib/libpam/pam_putenv.c:1.4
--- src/external/bsd/openpam/dist/lib/libpam/pam_putenv.c:1.3	Sat May  6 15:50:10 2017
+++ src/external/bsd/openpam/dist/lib/libpam/pam_putenv.c	Wed Aug 11 05:11:04 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_putenv.c,v 1.3 2017/05/06 19:50:10 christos Exp $	*/
+/*	$NetBSD: pam_putenv.c,v 1.4 2021/08/11 09:11:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: pam_putenv.c,v 1.3 2017/05/06 19:50:10 christos Exp $");
+__RCSID("$NetBSD: pam_putenv.c,v 1.4 2021/08/11 09:11:04 christos Exp $");
 
 #include 
 #include 
@@ -63,7 +63,8 @@ int
 pam_putenv(pam_handle_t *pamh,
 	const char *namevalue)
 {
-	char **env, *p;
+	char **env; 
+	const char *p;
 	size_t env_size;
 	int i;
 
@@ -78,10 +79,11 @@ pam_putenv(pam_handle_t *pamh,
 	/* see if the variable is already in the environment */
 	if ((i = openpam_findenv(pamh, namevalue,
 	(size_t)(p - namevalue))) >= 0) {
-		if ((p = strdup(namevalue)) == NULL)
+		char *q;
+		if ((q = strdup(namevalue)) == NULL)
 			RETURNC(PAM_BUF_ERR);
 		FREE(pamh->env[i]);
-		pamh->env[i] = p;
+		pamh->env[i] = q;
 		RETURNC(PAM_SUCCESS);
 	}
 



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:21 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_borrow_cred.c

Log Message:
the uid is not a pam item!


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.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/lib/libpam/openpam_borrow_cred.c
diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.4
--- src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c:1.3	Sat May  6 15:50:09 2017
+++ src/external/bsd/openpam/dist/lib/libpam/openpam_borrow_cred.c	Mon Mar  2 19:45:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_borrow_cred.c,v 1.3 2017/05/06 19:50:09 christos Exp $	*/
+/*	$NetBSD: openpam_borrow_cred.c,v 1.4 2020/03/03 00:45:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: openpam_borrow_cred.c,v 1.3 2017/05/06 19:50:09 christos Exp $");
+__RCSID("$NetBSD: openpam_borrow_cred.c,v 1.4 2020/03/03 00:45:21 christos Exp $");
 
 #include 
 
@@ -71,7 +71,7 @@ openpam_borrow_cred(pam_handle_t *pamh,
 	const void *scredp;
 	int r;
 
-	ENTERI(pwd->pw_uid);
+	ENTERN(pwd->pw_uid);
 	r = pam_get_data(pamh, PAM_SAVED_CRED, );
 	if (r == PAM_SUCCESS && scredp != NULL) {
 		openpam_log(PAM_LOG_LIBDEBUG,



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2020-03-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  3 00:45:38 UTC 2020

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_debug.h

Log Message:
print the widest int


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h

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/lib/libpam/openpam_debug.h
diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.4
--- src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h:1.3	Sat May  6 15:50:09 2017
+++ src/external/bsd/openpam/dist/lib/libpam/openpam_debug.h	Mon Mar  2 19:45:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_debug.h,v 1.3 2017/05/06 19:50:09 christos Exp $	*/
+/*	$NetBSD: openpam_debug.h,v 1.4 2020/03/03 00:45:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -50,8 +50,8 @@
 		openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", i_); \
 } while (/*CONSTCOND*/0)
 #define ENTERN(n) do { \
-	int n_ = (n); \
-	openpam_log(PAM_LOG_LIBDEBUG, "entering: %d", n_); \
+	intmax_t n_ = (n); \
+	openpam_log(PAM_LOG_LIBDEBUG, "entering: %jd", n_); \
 } while (/*CONSTCOND*/0)
 #define ENTERS(s) do { \
 	const char *s_ = (s); \



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2018-05-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May 16 13:54:03 UTC 2018

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: openpam_configure.c

Log Message:
Cast enum explicitly to different type.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/openpam_configure.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/lib/libpam/openpam_configure.c
diff -u src/external/bsd/openpam/dist/lib/libpam/openpam_configure.c:1.3 src/external/bsd/openpam/dist/lib/libpam/openpam_configure.c:1.4
--- src/external/bsd/openpam/dist/lib/libpam/openpam_configure.c:1.3	Sat May  6 19:50:09 2017
+++ src/external/bsd/openpam/dist/lib/libpam/openpam_configure.c	Wed May 16 13:54:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: openpam_configure.c,v 1.3 2017/05/06 19:50:09 christos Exp $	*/
+/*	$NetBSD: openpam_configure.c,v 1.4 2018/05/16 13:54:03 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: openpam_configure.c,v 1.3 2017/05/06 19:50:09 christos Exp $");
+__RCSID("$NetBSD: openpam_configure.c,v 1.4 2018/05/16 13:54:03 joerg Exp $");
 
 #include 
 
@@ -262,7 +262,7 @@ openpam_parse_chain(pam_handle_t *pamh,
 		/* allocate new entry */
 		if ((this = calloc((size_t)1, sizeof *this)) == NULL)
 			goto syserr;
-		this->flag = ctlf;
+		this->flag = (int)ctlf;
 
 		/* load module */
 		if ((this->module = openpam_load_module(modulename)) == NULL) {



CVS commit: src/external/bsd/openpam/dist/lib/libpam

2018-02-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Feb 11 00:25:12 UTC 2018

Modified Files:
src/external/bsd/openpam/dist/lib/libpam: pam_getenvlist.c

Log Message:
non-null arg.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/openpam/dist/lib/libpam/pam_getenvlist.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/lib/libpam/pam_getenvlist.c
diff -u src/external/bsd/openpam/dist/lib/libpam/pam_getenvlist.c:1.3 src/external/bsd/openpam/dist/lib/libpam/pam_getenvlist.c:1.4
--- src/external/bsd/openpam/dist/lib/libpam/pam_getenvlist.c:1.3	Sat May  6 15:50:10 2017
+++ src/external/bsd/openpam/dist/lib/libpam/pam_getenvlist.c	Sat Feb 10 19:25:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pam_getenvlist.c,v 1.3 2017/05/06 19:50:10 christos Exp $	*/
+/*	$NetBSD: pam_getenvlist.c,v 1.4 2018/02/11 00:25:12 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -42,7 +42,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: pam_getenvlist.c,v 1.3 2017/05/06 19:50:10 christos Exp $");
+__RCSID("$NetBSD: pam_getenvlist.c,v 1.4 2018/02/11 00:25:12 christos Exp $");
 
 #include 
 #include 
@@ -65,8 +65,10 @@ pam_getenvlist(pam_handle_t *pamh)
 	size_t i;
 
 	ENTER();
+#ifdef notdef
 	if (pamh == NULL)
 		RETURNP(NULL);
+#endif
 	envlist = malloc(sizeof(*envlist) * ((size_t)pamh->env_count + 1));
 	if (envlist == NULL) {
 		openpam_log(PAM_LOG_ERROR, "%s",