Hello community,
here is the log from the commit of package nss-shared-helper
checked in at Mon Oct 27 17:04:06 CET 2008.
--------
--- nss-shared-helper/nss-shared-helper.changes 2008-08-30 01:02:42.000000000 +0200
+++ /mounts/work_src_done/STABLE/nss-shared-helper/nss-shared-helper.changes 2008-10-27 06:43:31.000000000 +0100
@@ -0,0 +1,11 @@
+Sun Oct 26 23:42:49 CST 2008 - hpj@suse.de
+
+- Update to version 1.0.2, which makes debug output during
+ open/merge more verbose.
+
+-------------------------------------------------------------------
+Sat Oct 25 23:25:41 CDT 2008 - hpj@suse.de
+
+- Update to version 1.0.1, which has new database open/merge code
+ that we need.
+
calling whatdependson for head-i586
Old:
----
nss-shared-helper-1.0.0.tar.bz2
New:
----
nss-shared-helper-1.0.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nss-shared-helper.spec ++++++
--- /var/tmp/diff_new_pack.E32533/_old 2008-10-27 17:03:47.000000000 +0100
+++ /var/tmp/diff_new_pack.E32533/_new 2008-10-27 17:03:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package nss-shared-helper (Version 1.0.0)
+# spec file for package nss-shared-helper (Version 1.0.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@
Name: nss-shared-helper
BuildRequires: mozilla-nspr-devel mozilla-nss-devel pkg-config
-Version: 1.0.0
-Release: 2
+Version: 1.0.2
+Release: 1
Summary: Helper functions for sharing NSS database
Group: Development/Libraries/C and C++
License: LGPL v2.0 or later
@@ -102,5 +102,11 @@
%postun -n libnsssharedhelper0 -p /sbin/ldconfig
%changelog
+* Mon Oct 27 2008 hpj@suse.de
+- Update to version 1.0.2, which makes debug output during
+ open/merge more verbose.
+* Sun Oct 26 2008 hpj@suse.de
+- Update to version 1.0.1, which has new database open/merge code
+ that we need.
* Thu Aug 28 2008 hpj@suse.de
- Initial package.
++++++ nss-shared-helper-1.0.0.tar.bz2 -> nss-shared-helper-1.0.2.tar.bz2 ++++++
++++ 53705 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/nss-shared-helper-1.0.0/config.h.in new/nss-shared-helper-1.0.2/config.h.in
--- old/nss-shared-helper-1.0.0/config.h.in 2008-08-30 00:23:42.000000000 +0200
+++ new/nss-shared-helper-1.0.2/config.h.in 2008-10-27 00:30:40.000000000 +0100
@@ -30,6 +30,10 @@
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Package name */
#undef PACKAGE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/nss-shared-helper-1.0.0/configure.ac new/nss-shared-helper-1.0.2/configure.ac
--- old/nss-shared-helper-1.0.0/configure.ac 2008-08-30 00:23:16.000000000 +0200
+++ new/nss-shared-helper-1.0.2/configure.ac 2008-10-27 01:08:09.000000000 +0100
@@ -8,7 +8,7 @@
dnl --- Package configuration ---
-AM_INIT_AUTOMAKE(nss-shared-helper, 1.0.0)
+AM_INIT_AUTOMAKE(nss-shared-helper, 1.0.2)
AM_CONFIG_HEADER(config.h)
AC_SUBST(VERSION)
@@ -39,10 +39,12 @@
dnl --- Set compiler flags ---
-BASE_CFLAGS="$BASE_CFLAGS -Wall"
+BASE_LIBS=""
+BASE_CFLAGS="-Wall"
PROJECT_LIBS="$BASE_LIBS `pkg-config --libs nss`"
PROJECT_CFLAGS="$BASE_CFLAGS `pkg-config --cflags nss`"
+AC_SUBST(BASE_LIBS)
AC_SUBST(PROJECT_LIBS)
AC_SUBST(PROJECT_CFLAGS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/nss-shared-helper-1.0.0/nss-shared-helper/db.c new/nss-shared-helper-1.0.2/nss-shared-helper/db.c
--- old/nss-shared-helper-1.0.0/nss-shared-helper/db.c 2008-08-30 00:21:50.000000000 +0200
+++ new/nss-shared-helper-1.0.2/nss-shared-helper/db.c 2008-10-27 06:35:07.000000000 +0100
@@ -27,10 +27,26 @@
#include
#include
#include
+
+#include
+#include
+#include
+#include
+
#include "nss-shared-helper.h"
#define DEFAULT_RELATIVE_PATH ".local/var/pki/nssdb"
+typedef struct {
+ enum {
+ PW_NONE = 0,
+ PW_FROMFILE = 1,
+ PW_PLAINTEXT = 2,
+ PW_EXTERNAL = 3
+ } source;
+ char *data;
+} secuPWData;
+
char *
nsshelp_get_user_db_path (void)
{
@@ -99,5 +115,92 @@
if (result == 0 && S_ISDIR (sbuf.st_mode))
return path;
+ free (path);
return NULL;
}
+
+SECStatus
+nsshelp_open_db (const char *app_id, const char *old_path, PRUint32 flags)
+{
+ char *new_path;
+ char *temp;
+ SECStatus rv;
+ PK11SlotInfo *slot;
+ secuPWData pwdata = { PW_NONE, 0 };
+
+ new_path = nsshelp_get_user_db_path ();
+ if (!new_path)
+ return SECFailure;
+
+ temp = PR_smprintf ("sql:%s", new_path);
+ free (new_path);
+ new_path = temp;
+
+ /* simple update (application does not care about the
+ * underlying state machine). */
+
+ /* STEP 1: Signal that update/merge may be needed */
+
+ rv = NSS_InitWithMerge (new_path,
+ "", "", "secmod.db",
+ old_path, "", "",
+ app_id, app_id /* prompt name */,
+ flags);
+
+ if (rv == SECFailure)
+ {
+ /* Don't migrate anything */
+
+ fprintf (stderr, "*** nss-shared-helper: NSS_InitWithMerge failed. Trying NSS_Initialize.\n");
+
+ rv = NSS_Initialize (new_path,
+ "", "", "secmod.db",
+ flags);
+ free (new_path);
+
+ if (rv == SECFailure)
+ fprintf (stderr, "*** nss-shared-helper: NSS_Initialize failed.\n");
+
+ return rv;
+ }
+
+ slot = PK11_GetInternalKeySlot ();
+
+ /* Step 2: Determine if update/merge is needed. */
+
+ if (PK11_IsRemovable (slot))
+ {
+ /* need to update/Merge the database */
+
+ /* Step 3: Authenticate to the token */
+
+ rv = PK11_Authenticate (slot, PR_FALSE, &pwdata);
+ if (rv == SECSuccess)
+ {
+ /* just update the state machine */
+
+ /* Step 4: */
+ PK11_IsLoggedIn (slot, &pwdata);
+ /* Step 5: */
+ PK11_IsPresent (slot);
+
+ /* Step 6: */
+ rv = PK11_Authenticate (slot, PR_FALSE, &pwdata);
+ if (rv != SECSuccess)
+ {
+ fprintf (stderr, "*** nss-shared-helper: Second auth call failed: %u.\n",
+ PORT_GetError ());
+ }
+ }
+ else
+ {
+ fprintf (stderr, "*** nss-shared-helper: First auth call failed: %u.\n",
+ PORT_GetError ());
+ }
+ }
+
+ /* Step 7: NSS is initialized and (possibly) merged, start using it */
+
+ free (new_path);
+ return SECSuccess;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/nss-shared-helper-1.0.0/nss-shared-helper/nss-shared-helper.h new/nss-shared-helper-1.0.2/nss-shared-helper/nss-shared-helper.h
--- old/nss-shared-helper-1.0.0/nss-shared-helper/nss-shared-helper.h 2008-08-30 00:04:14.000000000 +0200
+++ new/nss-shared-helper-1.0.2/nss-shared-helper/nss-shared-helper.h 2008-10-27 00:29:43.000000000 +0100
@@ -24,6 +24,9 @@
#ifndef NSS_SHARED_HELPER_H
#define NSS_SHARED_HELPER_H
-char *nsshelp_get_user_db_path (void);
+#include
+
+char *nsshelp_get_user_db_path (void);
+SECStatus nsshelp_open_db (const char *app_id, const char *old_path, PRUint32 flags);
#endif /* NSS_SHARED_HELPER_H */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org