svn commit: r458890 - in head/security/cyrus-sasl2: . files
Hajimu UMEMOTO
ume at FreeBSD.org
Sat Jan 13 05:57:27 UTC 2018
Author: ume
Date: Sat Jan 13 05:57:26 2018
New Revision: 458890
URL: https://svnweb.freebsd.org/changeset/ports/458890
Log:
Make local DB-errors more descriptive.
This patch will be included into comming 2.1.27.
PR: 198323
Submitted by: Mikhail Teterin
Added:
head/security/cyrus-sasl2/files/patch-sasldb_db__ndbm.c (contents, props changed)
Modified:
head/security/cyrus-sasl2/Makefile
Modified: head/security/cyrus-sasl2/Makefile
==============================================================================
--- head/security/cyrus-sasl2/Makefile Sat Jan 13 03:55:00 2018 (r458889)
+++ head/security/cyrus-sasl2/Makefile Sat Jan 13 05:57:26 2018 (r458890)
@@ -1,6 +1,6 @@
# $FreeBSD$
-PORTREVISION= 12
+PORTREVISION= 13
COMMENT= RFC 2222 SASL (Simple Authentication and Security Layer)
Added: head/security/cyrus-sasl2/files/patch-sasldb_db__ndbm.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/cyrus-sasl2/files/patch-sasldb_db__ndbm.c Sat Jan 13 05:57:26 2018 (r458890)
@@ -0,0 +1,43 @@
+--- sasldb/db_ndbm.c.orig 2012-01-27 23:31:36 UTC
++++ sasldb/db_ndbm.c
+@@ -44,6 +44,7 @@
+ */
+
+ #include <config.h>
++#include <errno.h>
+ #include <stdio.h>
+ #include <ndbm.h>
+ #include <fcntl.h>
+@@ -101,7 +102,8 @@ int _sasldb_getdata(const sasl_utils_t *
+ }
+ db = dbm_open(path, O_RDONLY, S_IRUSR | S_IWUSR);
+ if (! db) {
+- utils->seterror(cntxt, 0, "Could not open db");
++ utils->seterror(cntxt, 0, "Could not open db `%s': %s",
++ path, strerror(errno));
+ result = SASL_FAIL;
+ goto cleanup;
+ }
+@@ -182,10 +184,11 @@ int _sasldb_putdata(const sasl_utils_t *
+ O_RDWR | O_CREAT,
+ S_IRUSR | S_IWUSR);
+ if (! db) {
++ utils->seterror(conn, 0, "Could not open db `%s' for writing: %s",
++ path, strerror(errno));
+ utils->log(conn, SASL_LOG_ERR,
+ "SASL error opening password file. "
+ "Do you have write permissions?\n");
+- utils->seterror(conn, 0, "Could not open db for write");
+ goto cleanup;
+ }
+ dkey.dptr = key;
+@@ -322,7 +325,8 @@ sasldb_handle _sasldb_getkeyhandle(const
+ db = dbm_open(path, O_RDONLY, S_IRUSR | S_IWUSR);
+
+ if(!db) {
+- utils->seterror(conn, 0, "Could not open db");
++ utils->seterror(conn, 0, "Could not open db `%s': %s",
++ path, strerror(errno));
+ return NULL;
+ }
+
More information about the svn-ports-head
mailing list