Hi,

The pam_pkcs11 module has been successfully ported to OpenSolaris recently and I would like to contribute some changes we made for Solaris port to OpenSC. Let me start with 2 small bug fixes first. These two small bugs are

1) tools/make_hash_link.sh

In line 57 and line 66, $is_ca needs be guarded with double-quotes. Without the double-quotes, this script gave an error as following:
   ./make_hash_link.sh: line 57: [: CA:TRUE,: binary operator expected.

2) src/mappers/ldap_mapper.c

The "defport" argument in line 187 and 189 should be changed to "ldapdefport", because "defport" is not defined in this file.

Attached is the patch file generated with "svn diff". Please let me know if you have any questions or comments.
Thanks,
Huie-Ying






Index: src/mappers/ldap_mapper.c
===================================================================
--- src/mappers/ldap_mapper.c   (revision 323)
+++ src/mappers/ldap_mapper.c   (working copy)
@@ -34,8 +34,6 @@
 #include <config.h>
 #endif
 
-/* FIXME do not use deprecated ldap_* functions */
-#define LDAP_DEPRECATED 1
 #include <ldap.h>
 #include <pwd.h>
 
@@ -186,9 +184,9 @@
        }
 
 # ifdef HAVE_LDAP_INIT
-       *ld = ldap_init (uri, defport);
+       *ld = ldap_init (uri, ldapdefport);
 # else
-       *ld = ldap_open (uri, defport);
+       *ld = ldap_open (uri, ldapdefport);
 # endif
        rc = (*ld == NULL) ? LDAP_SERVER_DOWN : LDAP_SUCCESS;
 
Index: tools/make_hash_link.sh
===================================================================
--- tools/make_hash_link.sh     (revision 323)
+++ tools/make_hash_link.sh     (working copy)
@@ -54,7 +54,7 @@
   hash=`$OPENSSL x509 -inform pem -in $file -noout -hash 2> /dev/null`
   if [ ! -z $hash ]; then
     is_ca=`$OPENSSL x509 -inform pem -in $file -noout -text | grep 'CA:TRUE'`
-    if [ ! -z $is_ca ]; then
+    if [ ! -z "$is_ca" ]; then
       hash=$hash.
       mk_link
     fi
@@ -63,7 +63,7 @@
   hash=`$OPENSSL x509 -inform der -in $file -noout -hash 2> /dev/null`
   if [ ! -z $hash ]; then
     is_ca=`$OPENSSL x509 -inform der -in $file -noout -text | grep 'CA:TRUE'`
-    if [ ! -z $is_ca ]; then
+    if [ ! -z "$is_ca" ]; then
       hash=$hash.
       mk_link
     fi
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to