[Fedora-directory-commits] coolkey/src/libckyapplet cky_applet.c, 1.1, 1.2 cky_applet.h, 1.1, 1.2 cky_factory.c, 1.1, 1.2 cky_factory.h, 1.1, 1.2
by Jack Magne
Author: jmagne
Update of /cvs/dirsec/coolkey/src/libckyapplet
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29025
Modified Files:
cky_applet.c cky_applet.h cky_factory.c cky_factory.h
Log Message:
Add support for 2048 bit keys, #485829.
Index: cky_applet.c
===================================================================
RCS file: /cvs/dirsec/coolkey/src/libckyapplet/cky_applet.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cky_applet.c 9 Jun 2006 18:44:17 -0000 1.1
+++ cky_applet.c 19 Feb 2009 02:03:08 -0000 1.2
@@ -134,6 +134,13 @@
/* Future add WriteObject */
CKYStatus
+CKYAppletFactory_WriteObject(CKYAPDU *apdu, const void *param)
+{
+ const CKYAppletArgWriteObject *wos = (const CKYAppletArgWriteObject *)param;
+ return CKYAPDUFactory_WriteObject(apdu,wos->objectID,wos->offset,wos->size,wos->data);
+}
+
+CKYStatus
CKYAppletFactory_CreateObject(CKYAPDU *apdu, const void *param)
{
const CKYAppletArgCreateObject *cos=(const CKYAppletArgCreateObject *)param;
@@ -192,7 +199,6 @@
{
return CKYAPDUFactory_GetLifeCycleV2(apdu);
}
-
CKYStatus
CKYAppletFactory_GetRandom(CKYAPDU *apdu, const void *param)
{
@@ -725,24 +731,48 @@
CKYAppletArgComputeCrypt ccd;
CKYBuffer empty;
CKYISOStatus status;
+ short dataSize = 0;
int use2APDUs = 0;
+ int use_dl_object = CKYBuffer_Size(data) > 200 ;
CKYBuffer_InitEmpty(&empty);
ccd.keyNumber = keyNumber;
ccd.mode = mode;
ccd.direction = direction;
- ccd.location = CKY_DL_APDU;
+ ccd.location = use_dl_object ? CKY_DL_OBJECT : CKY_DL_APDU;
if (!apduRC)
apduRC = &status;
+ if (use_dl_object) {
+ CKYBuffer sizeBuf;
+
+ CKYBuffer_InitEmpty(&sizeBuf);
+ CKYBuffer_AppendShort(&sizeBuf, CKYBuffer_Size(data));
+
+ ret = CKYApplet_WriteObjectFull(conn, 0xffffffff,
+ 0, CKYBuffer_Size(&sizeBuf), nonce,
+ &sizeBuf, apduRC);
+
+ CKYBuffer_FreeData(&sizeBuf);
+ if( ret != CKYSUCCESS)
+ goto fail;
+
+ ret = CKYApplet_WriteObjectFull(conn, 0xffffffff,
+ 2, CKYBuffer_Size(data), nonce,
+ data, apduRC);
+
+ if(ret != CKYSUCCESS)
+ goto fail;
+ }
+
if (mode == CKY_RSA_NO_PAD) {
- ccd.data = data;
+ ccd.data = use_dl_object ? &empty : data;
ccd.sig = sig;
ret = CKYApplet_HandleAPDU(conn,
CKYAppletFactory_ComputeCryptOneStep, &ccd, nonce,
CKY_SIZE_UNKNOWN, ckyAppletFill_ComputeCryptFinal,
- result, apduRC);
+ use_dl_object ? NULL : result, apduRC);
if (ret == CKYAPDUFAIL && *apduRC == CKYISO_INCORRECT_P2) {
use2APDUs = 1; /* maybe it's an old applet */
}
@@ -759,13 +789,38 @@
CKYAppletFactory_ComputeCryptInit, &ccd, nonce,
0, CKYAppletFill_Null, NULL, apduRC);
if (ret == CKYSUCCESS) {
- ccd.data = data;
+ ccd.data = use_dl_object ? &empty : data;
ret = CKYApplet_HandleAPDU(conn,
CKYAppletFactory_ComputeCryptFinal, &ccd, nonce,
CKY_SIZE_UNKNOWN, ckyAppletFill_ComputeCryptFinal,
- result, apduRC);
+ use_dl_object ? NULL : result, apduRC);
}
}
+
+ if (use_dl_object && ret == CKYSUCCESS) {
+ CKYBuffer sizeOutBuf;
+ CKYBuffer_InitEmpty(&sizeOutBuf);
+
+ ret = CKYApplet_ReadObjectFull(conn,0xffffffff,
+ 0, 2,
+ nonce,&sizeOutBuf,apduRC);
+
+ if(ret != CKYSUCCESS) {
+ CKYBuffer_FreeData(&sizeOutBuf);
+ goto fail;
+ }
+
+ dataSize = CKYBuffer_GetShort(&sizeOutBuf, 0);
+
+ CKYBuffer_FreeData(&sizeOutBuf);
+
+ ret = CKYApplet_ReadObjectFull(conn,0xffffffff,
+ 2, dataSize,
+ nonce,result,apduRC);
+ }
+
+fail:
+
return ret;
}
@@ -1036,6 +1091,44 @@
}
/*
+ * Write Object
+ * This makes multiple APDU calls to write the entire object.
+ *
+ */
+
+CKYStatus
+CKYApplet_WriteObjectFull(CKYCardConnection *conn, unsigned long objectID,
+ CKYOffset offset, CKYSize size, const CKYBuffer *nonce,
+ const CKYBuffer *data, CKYISOStatus *apduRC)
+{
+
+ CKYBuffer chunk;
+ CKYOffset srcOffset = 0;
+ CKYAppletArgWriteObject wod;
+ CKYStatus ret = CKYSUCCESS;
+
+ wod.objectID = objectID;
+ wod.offset = offset;
+ do {
+ wod.size = (CKYByte) MIN(size, 220);
+ ret = CKYBuffer_InitFromBuffer(&chunk, data,
+ srcOffset, wod.size);
+ if(ret == CKYSUCCESS) {
+ wod.data = &chunk;
+ ret = CKYApplet_HandleAPDU(conn, CKYAppletFactory_WriteObject, &wod,
+ nonce, 0, CKYAppletFill_Null, NULL, apduRC);
+ size -= wod.size;
+ wod.offset += wod.size;
+ srcOffset += wod.size;
+ CKYBuffer_FreeData(&chunk);
+ }
+
+ } while ((size > 0) && (ret == CKYSUCCESS));
+
+ return ret;
+}
+
+/*
* List Object cluster
*/
static CKYStatus
Index: cky_applet.h
===================================================================
RCS file: /cvs/dirsec/coolkey/src/libckyapplet/cky_applet.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cky_applet.h 9 Jun 2006 18:44:17 -0000 1.1
+++ cky_applet.h 19 Feb 2009 02:03:08 -0000 1.2
@@ -192,6 +192,14 @@
CKYByte size;
} CKYAppletArgReadObject;
+typedef struct _CKYAppletArgWriteObject {
+ unsigned long objectID;
+ CKYOffset offset;
+ CKYByte size;
+ CKYBuffer *data;
+
+} CKYAppletArgWriteObject;
+
typedef struct _CKYAppletArgComputeCrypt {
CKYByte keyNumber;
CKYByte mode;
@@ -250,6 +258,8 @@
/* param == CKYByte * (pointer to pinNumber) */
CKYStatus CKYAppletFactory_Logout(CKYAPDU *apdu, const void *param);
/* Future add WriteObject */
+/* parm == CKYAppletArgWriteObject */
+CKYStatus CKYAppletFactory_WriteObject(CKYAPDU *apdu, const void *param);
/* param == CKYAppletArgCreateObject */
CKYStatus CKYAppletFactory_CreateObject(CKYAPDU *apdu, const void *param);
/* param == CKYAppletArgDeleteObject */
@@ -482,6 +492,17 @@
CKYStatus CKYApplet_ReadObjectFull(CKYCardConnection *conn,
unsigned long objectID, CKYOffset offset, CKYSize size,
const CKYBuffer *nonce, CKYBuffer *data, CKYISOStatus *apduRC);
+/*
+ * There is 1 write command:
+ * CKYApplet_WriteObjectFull can write an entire data object. It makes multiple
+ * apdu calls in order to write the full amount into the buffer. The buffer is
+ * overwritten.
+*/
+
+CKYStatus CKYApplet_WriteObjectFull(CKYCardConnection *conn,
+ unsigned long objectID, CKYOffset offset, CKYSize size,
+ const CKYBuffer *nonce, const CKYBuffer *data, CKYISOStatus *apduRC);
+
CKYStatus CKYApplet_ListObjects(CKYCardConnection *conn, CKYByte seq,
CKYAppletRespListObjects *lop, CKYISOStatus *apduRC);
CKYStatus CKYApplet_GetStatus(CKYCardConnection *conn,
Index: cky_factory.c
===================================================================
RCS file: /cvs/dirsec/coolkey/src/libckyapplet/cky_factory.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cky_factory.c 9 Jun 2006 18:44:17 -0000 1.1
+++ cky_factory.c 19 Feb 2009 02:03:08 -0000 1.2
@@ -190,8 +190,11 @@
CKYSize len;
CKYBuffer buf;
- if (!idata || !(len = CKYBuffer_Size(idata)) || location != CKY_DL_APDU)
- return ret;
+ if (!idata)
+ return ret;
+
+ if (!(len = CKYBuffer_Size(idata)) && location != CKY_DL_OBJECT)
+ return ret;
CKYAPDU_SetCLA(apdu, CKY_CLASS_COOLKEY);
CKYAPDU_SetINS(apdu, CKY_INS_COMPUTE_CRYPT);
@@ -314,8 +317,6 @@
return CKYSUCCESS;
}
-/* Future add WriteObject */
-
CKYStatus
CKYAPDUFactory_CreateObject(CKYAPDU *apdu, unsigned long objectID, CKYSize size,
unsigned short readACL, unsigned short writeACL, unsigned short deleteACL)
@@ -419,6 +420,58 @@
}
CKYStatus
+CKYAPDUFactory_WriteObject(CKYAPDU *apdu, unsigned long objectID,
+ CKYOffset offset,CKYSize size,CKYBuffer *data)
+{
+ CKYBuffer buf;
+ CKYStatus ret = CKYSUCCESS;
+ unsigned short dataSize = 0;
+
+ CKYAPDU_SetCLA(apdu, CKY_CLASS_COOLKEY);
+ CKYAPDU_SetINS(apdu, CKY_INS_WRITE_OBJ);
+ CKYAPDU_SetP1(apdu, 0x00);
+ CKYAPDU_SetP2(apdu, 0x00);
+ CKYBuffer_InitEmpty(&buf);
+
+ dataSize = (unsigned short) CKYBuffer_Size(data);
+
+ if(!dataSize) {
+ ret = CKYINVALIDARGS;
+ goto fail;
+ }
+
+ ret = CKYBuffer_AppendLong(&buf,objectID);
+ if (ret != CKYSUCCESS) {
+ goto fail;
+ }
+ ret = CKYBuffer_AppendLong(&buf,offset);
+ if (ret != CKYSUCCESS) {
+ goto fail;
+ }
+ ret = CKYBuffer_AppendChar(&buf, size);
+ if (ret != CKYSUCCESS) {
+ goto fail;
+ }
+
+ ret = CKYAPDU_SetSendDataBuffer(apdu,&buf);
+
+ if (ret != CKYSUCCESS) {
+ goto fail;
+ }
+
+ ret = CKYAPDU_AppendSendDataBuffer(apdu, data);
+
+ if (ret != CKYSUCCESS) {
+ goto fail;
+ }
+
+fail:
+ CKYBuffer_FreeData(&buf);
+ return ret;
+
+}
+
+CKYStatus
CKYAPDUFactory_ListObjects(CKYAPDU *apdu, CKYByte sequence)
{
CKYAPDU_SetCLA(apdu, CKY_CLASS_COOLKEY);
Index: cky_factory.h
===================================================================
RCS file: /cvs/dirsec/coolkey/src/libckyapplet/cky_factory.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cky_factory.h 9 Jun 2006 18:44:17 -0000 1.1
+++ cky_factory.h 19 Feb 2009 02:03:08 -0000 1.2
@@ -190,7 +190,8 @@
const char *oldPin, const char *newPin);
CKYStatus CKYAPDUFactory_ListPINs(CKYAPDU *apdu);
CKYStatus CKYAPDUFactory_Logout(CKYAPDU *apdu, CKYByte pinNumber);
-
+CKYStatus CKYAPDUFactory_WriteObject(CKYAPDU *apdu, unsigned long objectID,
+ CKYOffset offset,CKYSize size,CKYBuffer *data);
/* Future add WriteObject */
CKYStatus CKYAPDUFactory_CreateObject(CKYAPDU *apdu, unsigned long objectID,
CKYSize size, unsigned short readACL, unsigned short writeACL,
15 years, 2 months
[Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.11, 1.12
by Nathan Kinder
Author: nkinder
Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23924/wrappers
Modified Files:
initscript.in
Log Message:
Resolves: 245894
Summary: Make init script verify that existing pidfile refers to a ns-slapd process.
Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- initscript.in 29 Jan 2009 23:41:35 -0000 1.11
+++ initscript.in 17 Feb 2009 23:21:05 -0000 1.12
@@ -138,7 +138,10 @@
server_running=0
if [ -f $pidfile ]; then
pid=`cat $pidfile`
- if kill -0 $pid > /dev/null 2>&1 ; then
+ instlockfile="@localstatedir@/lock/@package_name@/slapd-$instance/server/$pid"
+ if kill -0 $pid && \
+ [ $(awk '{print $2}' /proc/$pid/stat) = "(ns-slapd)" ] \
+ > /dev/null 2>&1 ; then
echo_n " already running"
success; echo
successes=`expr $successes + 1`
@@ -146,7 +149,9 @@
else
echo " not running, but pid file exists"
echo_n " $instance... attempting to start anyway"
- rm -f $pidfile
+ # Clean up the instance lockfile since we know the pid. The
+ # pidfiles will get cleaned up below.
+ rm -f $instlockfile
fi
fi
server_started=0
15 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.25, 1.26
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28764/ldapserver/ldap/admin/src/scripts
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 485694
Bug Description: Cross Platform Migration Fails with: Unable to access
nsslapd-rundir: Bad address
Reviewed by: nkinder (Thanks!)
Fix Description: Need to add any new attributes added in 8.0 and 8.1 to
the ignoreOld hash table in the migration script. The way migration
works, it assumes an attribute is supported in both the old version and
the new version. So if the attribute is absent in the old entry and
present in the new entry, it assumes the user removed the attribute in
the old entry, so removes it in the new entry. The ignoreOld hash table
holds the list of attributes that we should ignore for the purposes of
attribute comparison. These are the attributes we just want to pass
through.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- DSMigration.pm.in 13 Dec 2007 22:01:46 -0000 1.25
+++ DSMigration.pm.in 17 Feb 2009 15:47:48 -0000 1.26
@@ -79,6 +79,16 @@
# these are the attributes for which we will always use
# the new value, or which do not apply anymore
+# for the next major release e.g. when we support migration from the
+# current release 1.1.x to 1.2 or 2.0, the old version number will
+# become quite important for migration - for example, when migrating
+# from older than 1.1 to 1.1.x, we need to add the attributes in the
+# table below to the new entry because the attribute didn't exist
+# at all in the old server version - however, when migrating from
+# e.g. 1.1.x to 2.0, we must preserve the old value - this means
+# if the user has deleted the attribute from the entry, we must
+# "migrate" that deletion by removing the attribute from the new
+# entry
my %ignoreOld =
(
'nsslapd-errorlog' => 'nsslapd-errorlog',
@@ -91,6 +101,9 @@
'nsslapd-pluginversion' => 'nsslapd-pluginVersion',
'nsslapd-plugin-depends-on-named' => 'nsslapd-plugin-depends-on-named',
# these are new attrs that we should just pass through
+ 'nsslapd-allow-unauthenticated-binds' => 'nsslapd-allow-unauthenticated-binds',
+ 'nsslapd-saslpath' => 'nsslapd-saslpath',
+ 'nsslapd-rundir' => 'nsslapd-rundir',
'nsslapd-schemadir' => 'nsslapd-schemadir',
'nsslapd-lockdir' => 'nsslapd-lockdir',
'nsslapd-tmpdir' => 'nsslapd-tmpdir',
15 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/admin/src initconfig.in, 1.3, 1.4
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2018
Modified Files:
initconfig.in
Log Message:
Resolves: bug 477009
Description: RFE change default place for kerberos keytabs
Fix Description: changed to
# KRB5_KTNAME=@instconfigdir(a)/myname.keytab ; export KRB5_KTNAME
Where @instconfigdir@ will usually expand to /etc/dirsrv
Index: initconfig.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/initconfig.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- initconfig.in 27 Aug 2008 21:24:46 -0000 1.3
+++ initconfig.in 16 Feb 2009 22:54:28 -0000 1.4
@@ -13,11 +13,21 @@
# desired value
# ulimit -n 8192
-# In order to use SASL/GSSAPI the directory
+# A per instance keytab does not make much sense for servers.
+# Kerberos clients use the machine FQDN to obtain a ticket like ldap/FQDN, there
+# is nothing that can make a client understand how to get a per-instance ticket.
+# Therefore by default a keytab should be considered a per server option.
+
+# Also this file is sourced for all instances, so again all
+# instances would ultimately get the same keytab.
+
+# Finally a keytab is normally named either krb5.keytab or <service>.keytab
+
+# In order to use SASL/GSSAPI (Kerberos) the directory
# server needs to know where to find its keytab
# file - uncomment the following line and set
# the path and filename appropriately
-# KRB5_KTNAME=@instconfigdir@/slapd-instance/keytab ; export KRB5_KTNAME
+# KRB5_KTNAME=@instconfigdir(a)/myname.keytab ; export KRB5_KTNAME
# other environment settings can be added here too
OS=`uname -s`
15 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd libglobs.c, 1.35, 1.36
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32539/ldapserver/ldap/servers/slapd
Modified Files:
libglobs.c
Log Message:
Resolves: bug 481052
Bug Description: some cn=config options show up with incorrect value on 64-bit
Reviewed by: nkinder (Thanks!)
Fix Description: The get functions return a specific sized type (e.g. an int). We were assigning this to a void *. We cannot do this. We must assign the return value from the get function to the correct size and type variable. I changed the config code to do this. I also had a look at the database and chaining database config code which does similar things with void *, but that code works a little bit differently and appears to be ok.
Platforms tested: RHEL5 x86_64 (need to test on HP-UX)
Flag Day: no
Doc impact: no
Index: libglobs.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- libglobs.c 5 Feb 2009 17:34:56 -0000 1.35
+++ libglobs.c 16 Feb 2009 22:40:13 -0000 1.36
@@ -130,6 +130,12 @@
return type == CONFIG_INT || type == CONFIG_LONG || type == CONFIG_ON_OFF;
}
+static int
+isInt(ConfigVarType type)
+{
+ return type == CONFIG_INT || type == CONFIG_ON_OFF || type == CONFIG_SPECIAL_SSLCLIENTAUTH || type == CONFIG_SPECIAL_ERRORLOGLEVEL;
+}
+
/* the caller will typically have to cast the result based on the ConfigVarType */
typedef void *(*ConfigGetFunc)(void);
@@ -5459,8 +5465,10 @@
*/
for (ii = 0; ii < tablesize; ++ii) {
struct config_get_and_set *cgas = &ConfigList[ii];
- void **value = 0;
- void *alloc_val;
+ int ival = 0;
+ long lval = 0;
+ void **value = NULL;
+ void *alloc_val = NULL;
int needs_free = 0;
PR_ASSERT(cgas);
@@ -5472,19 +5480,30 @@
continue;
}
- alloc_val = (cgas->getfunc)();
-
- value = &alloc_val; /* value must be address of pointer */
- if (!isIntegralType(cgas->config_var_type))
+ /* must cast return of getfunc and store in variable of correct sized type */
+ /* otherwise endianness problems will ensue */
+ if (isInt(cgas->config_var_type)) {
+ ival = (int)(intptr_t)(cgas->getfunc)();
+ value = (void **)&ival; /* value must be address of int */
+ } else if (cgas->config_var_type == CONFIG_LONG) {
+ lval = (long)(intptr_t)(cgas->getfunc)();
+ value = (void **)&lval; /* value must be address of long */
+ } else {
+ alloc_val = (cgas->getfunc)();
+ value = &alloc_val; /* value must be address of pointer */
needs_free = 1; /* get funcs must return alloc'd memory except for get
funcs which return a simple integral type e.g. int */
+ }
config_set_value(e, cgas, value);
if (needs_free && value) { /* assumes memory allocated by slapi_ch_Xalloc */
if (CONFIG_CHARRAY == cgas->config_var_type) {
charray_free(*((char ***)value));
- } else {
+ } else if (CONFIG_SPECIAL_REFERRALLIST == cgas->config_var_type) {
+ ber_bvecfree(*((struct berval ***)value));
+ } else if ((CONFIG_CONSTANT_INT != cgas->config_var_type) && /* do not free constants */
+ (CONFIG_CONSTANT_STRING != cgas->config_var_type)) {
slapi_ch_free(value);
}
}
15 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_instance.c, 1.14, 1.15
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32539/ldapserver/ldap/servers/plugins/chainingdb
Modified Files:
cb_instance.c
Log Message:
Resolves: bug 481052
Bug Description: some cn=config options show up with incorrect value on 64-bit
Reviewed by: nkinder (Thanks!)
Fix Description: The get functions return a specific sized type (e.g. an int). We were assigning this to a void *. We cannot do this. We must assign the return value from the get function to the correct size and type variable. I changed the config code to do this. I also had a look at the database and chaining database config code which does similar things with void *, but that code works a little bit differently and appears to be ok.
Platforms tested: RHEL5 x86_64 (need to test on HP-UX)
Flag Day: no
Doc impact: no
Index: cb_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cb_instance.c 27 Jan 2009 22:37:17 -0000 1.14
+++ cb_instance.c 16 Feb 2009 22:40:13 -0000 1.15
@@ -1546,7 +1546,7 @@
sprintf(buf, "%o", (int) ((uintptr_t)config->config_get_fn(arg)));
break;
case CB_CONFIG_TYPE_LONG:
- sprintf(buf, "%ld", (long) config->config_get_fn(arg));
+ sprintf(buf, "%ld", (long) ((uintptr_t)config->config_get_fn(arg)));
break;
case CB_CONFIG_TYPE_STRING:
/* Remember the get function for strings returns memory
15 years, 2 months
[Fedora-directory-commits] winsync/passwordsync/wix PassSync.wxs, 1.13, 1.14
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/winsync/passwordsync/wix
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32256/passwordsync/wix
Modified Files:
PassSync.wxs
Log Message:
Resolves: bug 426421 245630 476095
Description: Windows Console uses nss libraries from \windows\system32
Fix Description: Windows Console still uses nss libraries from system32, but now passsync uses the same NSS version as Windows Console, so there should be no conflict
Description: install LDAP SDK DLLs in sync service dir, not system32
Fix Description: only files that need to go in system32 are installed there - everything else is installed in the passync home directory
Description: upgrade/build components bug
Fix Description: Now using NSPR 4.7.3, NSS 3.12.2, Mozldap 6.0.5
In addition, you can now build passsync in a Windows only environmnet - uses bitsadmin instead of wget for downloading, and uses unzip.vbs instead of unzip - this should simplify the build environment so that you don't have to figure out which combination of mks/cygwin/msys needs to be installed.
I also upgraded to the latest version of wix and had to upgrade a couple of wxs elements.
I also added the ability to upgrade passsync in the future with the use of the Upgrade element.
Platforms tested: Windows Server 2003
Index: PassSync.wxs
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/wix/PassSync.wxs,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- PassSync.wxs 18 Mar 2006 00:36:57 -0000 1.13
+++ PassSync.wxs 16 Feb 2009 22:37:32 -0000 1.14
@@ -36,42 +36,59 @@
All rights reserved.
END COPYRIGHT BLOCK -->
<Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
- <Product Name='Fedora Directory Password Sync' Id='C1842CD5-4659-4E7C-A53C-37083B0CB59F'
- Language='1033' Codepage='1252'
- Version='1.0.2' Manufacturer='Fedora Project'>
+ <Product Name='Fedora Directory Password Sync'
+ Id='D9C09AE2-F504-4875-8C7E-70BF2D791CEB'
+ Language='1033' Codepage='1252' UpgradeCode='698B3A4E-17D4-449f-9ACB-DE8BF43394C1'
+ Version='1.1.0' Manufacturer='Fedora Project'>
<Package Id='????????-????-????-????-????????????' Keywords='Installer'
Description="Fedora Directory Password Synchronization Installer"
Manufacturer='Fedora Project'
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+<!-- this upgrade element is for 1.1.0 and later
+ if we are upgrading the same version that is already installed,
+ we just want to allow the user to modify the configuration
+ if we are upgrading to a newer version, we want to allow the
+ user to modify the configuration, and install the new software
+-->
+ <Upgrade Id='698B3A4E-17D4-449f-9ACB-DE8BF43394C1'>
+ <UpgradeVersion OnlyDetect='no' Property='PATCHFOUND'
+ IncludeMinimum='yes' Minimum='1.0.0' Maximum='1.1.0' IncludeMaximum='no' />
+ <UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
+ Minimum='1.1.0' IncludeMinimum='no' />
+ </Upgrade>
+
<Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
<Property Id='DiskPrompt' Value="Password Sync Installation [1]" />
<Property Id="HOSTNAME">
<RegistrySearch Id="HostName" Root="HKLM" Key="Software\PasswordSync"
- Name="Host Name" Type="registry" />
+ Name="Host Name" Type="raw" />
</Property>
<Property Id="PORTNUM">
<RegistrySearch Id="PortNum" Root="HKLM" Key="Software\PasswordSync"
- Name="Port Number" Type="registry" />
+ Name="Port Number" Type="raw" />
</Property>
<Property Id="USER">
<RegistrySearch Id="UserName" Root="HKLM" Key="Software\PasswordSync"
- Name="User Name" Type="registry" />
+ Name="User Name" Type="raw" />
</Property>
<Property Id="PASSWORD">
<RegistrySearch Id="Password" Root="HKLM" Key="Software\PasswordSync"
- Name="Password" Type="registry" />
+ Name="Password" Type="raw" />
</Property>
<Property Id="CERTTOKEN">
<RegistrySearch Id="Certtkn" Root="HKLM" Key="Software\PasswordSync"
- Name="Cert Token" Type="registry" />
+ Name="Cert Token" Type="raw" />
</Property>
<Property Id="SRCHBASE">
<RegistrySearch Id="SrchBase" Root="HKLM" Key="Software\PasswordSync"
- Name="Search Base" Type="registry" />
+ Name="Search Base" Type="raw" />
</Property>
+ <CustomAction Id='AlreadyUpdated' Error='[ProductName] [ProductVersion] is already installed.' />
+ <CustomAction Id='NoDowngrade' Error='A later version of [ProductName] is already installed.' />
+
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='SystemFolder' Name='SysDir'>
@@ -79,18 +96,6 @@
<File Id='PasshookDLL' Name='passhook.dll' DiskId='1' src='passhook.dll' Vital='yes' />
</Component>
- <Component Id='NSLDAPLibrary' Guid='E3B9046B-1B9B-4E19-81F3-0A8D14CF72B2'>
- <File Id='NSLDAP' LongName='nsldap32v50.dll' Name='nsldap.dll' DiskId='1' src='nsldap32v50.dll' Vital='yes' />
- </Component>
-
- <Component Id='NSLDAPSSLLibrary' Guid='794345C6-74B8-4917-A2E6-4DC9DCCFECD2'>
- <File Id='NSLDAPSSL' LongName='nsldapssl32v50.dll' Name='nsldapss.dll' DiskId='1' src='nsldapssl32v50.dll' Vital='yes' />
- </Component>
-
- <Component Id='NSLDAPPRLibrary' Guid='D6ABE406-7663-4E27-81F3-482860FD6375'>
- <File Id='NSLDAPRP' LongName='nsldappr32v50.dll' Name='nsldappr.dll' DiskId='1' src='nsldappr32v50.dll' Vital='yes' />
- </Component>
-
<Component Id='NSPRLibrary' Guid='7DFF5449-F38C-4C3B-9876-E32A123F1EA5'>
<File Id='NSPR' LongName='libnspr4.dll' Name='libnspr4.dll' DiskId='1' src='libnspr4.dll' Vital='yes' />
</Component>
@@ -118,6 +123,23 @@
<Component Id='NSSsmimeLibrary' Guid='E1030203-0A43-4767-BF5F-C7A51C687040'>
<File Id='NSSSMIME' LongName='smime3.dll' Name='smime3.dll' DiskId='1' src='smime3.dll' Vital='yes' />
</Component>
+
+ <Component Id='NSSfreeblLibrary' Guid='405D9E74-1B7C-41e2-A9CC-DC8F0CEA1565'>
+ <File Id='NSSFREEBL' LongName='freebl3.dll' Name='freebl3.dll' DiskId='1' src='freebl3.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSSutilLibrary' Guid='2740AA9B-888A-4967-80A5-9CA222582816'>
+ <File Id='NSSUTIL' LongName='nssutil3.dll' Name='nssutil3.dll' DiskId='1' src='nssutil3.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSSsqliteLibrary' Guid='C2EE5C29-0588-4ec8-B1AB-324FF878DB7D'>
+ <File Id='NSSSQLITE' LongName='sqlite3.dll' Name='sqlite3.dll' DiskId='1' src='sqlite3.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSSdbmLibrary' Guid='F4B8B7FA-11A5-43af-B471-0C71AFC2CAB9'>
+ <File Id='NSSDBM' LongName='nssdbm3.dll' Name='nssdbm3.dll' DiskId='1' src='nssdbm3.dll' Vital='yes' />
+ </Component>
+
</Directory>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
@@ -161,6 +183,26 @@
<File Id='NSSPK12UTIL' LongName='pk12util.exe' Name='pk12util.exe' DiskId='1' src='pk12util.exe' Vital='yes' />
</Component>
+ <Component Id='NSSrootcertsLibrary' Guid='783828BA-5B72-4320-92CA-127C42E2179E'>
+ <File Id='NSSROOTCERTS' LongName='nssckbi.dll' Name='nssckbi.dll' DiskId='1' src='nssckbi.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSLDAPLibrary' Guid='205B568A-F46D-4e80-AF5D-F5EDFC478046'>
+ <File Id='NSLDAP' LongName='nsldap32v60.dll' Name='nsldap.dll' DiskId='1' src='nsldap32v60.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSLDAPSSLLibrary' Guid='EFB4852A-7135-468b-A454-E61864BF2ECA'>
+ <File Id='NSLDAPSSL' LongName='nsldapssl32v60.dll' Name='nsldapss.dll' DiskId='1' src='nsldapssl32v60.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSLDAPPRLibrary' Guid='66390300-D732-4983-B933-A3709F99F6AB'>
+ <File Id='NSLDAPRP' LongName='nsldappr32v60.dll' Name='nsldappr.dll' DiskId='1' src='nsldappr32v60.dll' Vital='yes' />
+ </Component>
+
+ <Component Id='NSLDIFLibrary' Guid='38004143-EB9B-4dec-851A-2E34E8B3249E'>
+ <File Id='NSLDIF' LongName='nsldif32v60.dll' Name='nsldif.dll' DiskId='1' src='nsldif32v60.dll' Vital='yes' />
+ </Component>
+
</Directory>
</Directory>
@@ -182,6 +224,7 @@
<ComponentRef Id='NSLDAPLibrary' />
<ComponentRef Id='NSLDAPSSLLibrary' />
<ComponentRef Id='NSLDAPPRLibrary' />
+ <ComponentRef Id='NSLDIFLibrary' />
<ComponentRef Id='NSPRLibrary' />
<ComponentRef Id='NSPRpldsLibrary' />
<ComponentRef Id='NSPRplcLibrary' />
@@ -189,6 +232,11 @@
<ComponentRef Id='NSSsslLibrary' />
<ComponentRef Id='NSSsoftoknLibrary' />
<ComponentRef Id='NSSsmimeLibrary' />
+ <ComponentRef Id='NSSfreeblLibrary' />
+ <ComponentRef Id='NSSutilLibrary' />
+ <ComponentRef Id='NSSsqliteLibrary' />
+ <ComponentRef Id='NSSdbmLibrary' />
+ <ComponentRef Id='NSSrootcertsLibrary' />
<ComponentRef Id='NSScertutil' />
<ComponentRef Id='NSSpk12util' />
</Feature>
@@ -1316,6 +1364,7 @@
<AdminExecuteSequence />
<InstallExecuteSequence>
+ <Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND</Custom>
<RemoveExistingProducts After='InstallFinalize' />
</InstallExecuteSequence>
15 years, 2 months
[Fedora-directory-commits] winsync/passwordsync unzip.vbs, NONE, 1.1 build.bat, 1.10, 1.11 package.mak, 1.1, 1.2
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/winsync/passwordsync
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32256/passwordsync
Modified Files:
build.bat package.mak
Added Files:
unzip.vbs
Log Message:
Resolves: bug 426421 245630 476095
Description: Windows Console uses nss libraries from \windows\system32
Fix Description: Windows Console still uses nss libraries from system32, but now passsync uses the same NSS version as Windows Console, so there should be no conflict
Description: install LDAP SDK DLLs in sync service dir, not system32
Fix Description: only files that need to go in system32 are installed there - everything else is installed in the passync home directory
Description: upgrade/build components bug
Fix Description: Now using NSPR 4.7.3, NSS 3.12.2, Mozldap 6.0.5
In addition, you can now build passsync in a Windows only environmnet - uses bitsadmin instead of wget for downloading, and uses unzip.vbs instead of unzip - this should simplify the build environment so that you don't have to figure out which combination of mks/cygwin/msys needs to be installed.
I also upgraded to the latest version of wix and had to upgrade a couple of wxs elements.
I also added the ability to upgrade passsync in the future with the use of the Upgrade element.
Platforms tested: Windows Server 2003
--- NEW FILE unzip.vbs ---
' unzip a zip file
Sub Usage()
WScript.Echo "Usage: cscript unzip.vbs \path\to\file.zip [destinationfolder]"
WScript.Echo "Example: cscript unzip.vbs ..\src\foo.zip ..\dest"
WScript.Echo "NOTE: The .zip file must have a .zip extension, so if"
WScript.Echo "you are trying to unzip a .jar file, you must copy or rename it"
WScript.Echo "to have a .zip extension"
WScript.Echo "If the destinationfolder does not exist, it will be created"
WScript.Echo "Use '.' for the current directory"
WScript.Echo "If the destinationfolder is not specified, '.' will be used"
End Sub
' see if args are correct
Set objArgs = WScript.Arguments
If objArgs.Count < 1 then
Usage
WScript.Quit(1)
End If
' get our FSO object
Set objFSO = CreateObject("Scripting.FileSystemObject")
' src zip file is arg 0
SRC = objFSO.GetAbsolutePathName(objArgs(0))
' dest folder is arg 1 or "."
If objArgs.Count < 2 then
DEST = objFSO.GetAbsolutePathName(".")
Else
DEST = objFSO.GetAbsolutePathName(objArgs(1))
End If
' debugging - print args
' For I = 0 to objArgs.Count - 1
' WScript.Echo "arg ", I, " ", objArgs(I)
' Next
' create dest folder if it does not exist
If not objFSO.FolderExists(DEST) Then
objFSO.CreateFolder(DEST)
WScript.Echo "Created new folder", DEST
End If
Set objShell = CreateObject("Shell.Application")
Set objSrc = objShell.Namespace(SRC)
Set objDest = objShell.Namespace(DEST)
' For Each item in objSrc.Items
' WScript.Echo "item = ", item
' Next
objDest.CopyHere(objSrc.Items)
WScript.Echo "Done. Copied contents of " & SRC & " to " & DEST
' Set WshShell = WScript.CreateObject("WScript.Shell")
' WScript.Echo "CD =", WshShell.CurrentDirectory
' Set objFolder = objFSO.GetFolder(".")
' WScript.Echo "name = ", objFolder.Name
Index: build.bat
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/build.bat,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- build.bat 10 Nov 2005 00:04:05 -0000 1.10
+++ build.bat 16 Feb 2009 22:37:32 -0000 1.11
@@ -39,10 +39,20 @@
@echo off
+rem set DOWNLOAD=echo DOWNLOAD
+set DOWNLOAD="c:\program files\support tools\bitsadmin" /wrap /transfer passsyncbuild /download /priority normal
+set UNZIP=cscript //nologo "%CD%\unzip.vbs"
+@rem set DOWNLOAD=wget --no-directories
+@rem set UNZIP=unzip -q
+
if [%BUILD_DEBUG%] == [optimize] (
set FLAVOR=WINNT5.0_OPT.OBJ
+ set CFG1="passsync - Win32 Release"
+ set CFG2="passhook - Win32 Release"
) else (
set FLAVOR=WINNT5.0_DBG.OBJ
+ set CFG1="passsync - Win32 Debug"
+ set CFG2="passhook - Win32 Debug"
)
rem ======== Set Various Build Directories ========
@@ -53,70 +63,91 @@
set LIBROOT=..\components\%FLAVOR%
rem ------ Convert LIBROOT to absolute ------
call :relative %LIBROOT% LIBROOT
-mkdir %LIBROOT%
+mkdir "%LIBROOT%"
set PKGDIR=%OBJDEST%\package\passsync
-mkdir %PKGDIR%
+mkdir "%PKGDIR%"
set DISTDIR=..\dist\%FLAVOR%
rem ------ Convert DISTDIR to absolute ------
call :relative %DISTDIR% DISTDIR
-mkdir %DISTDIR%
+mkdir "%DISTDIR%"
+
+set WIXVER=2.0.5805.0
+set WIXDIR=..\wix
+rem ------ Convert WIXDIR to absolute ------
+call :relative %WIXDIR% WIXDIR
set WXSDIR=%CD%\wix
rem ======== Fetch Components ========
if [%INTERNAL_BUILD%] == [1] (
- set COMPONENT_URL=http://ftp-rel.sfbay.redhat.com/share/builds/components
+ set COMPONENT_URL=http://tsunami.dsdev.sjc.redhat.com/share/builds/components
+ set COMPONENT_URL2=http://tsunami.dsdev.sjc.redhat.com/share/builds/verification
) else (
- set COMPONENT_URL=http://directory.fedora.redhat.com/built/components
+ set COMPONENT_URL=http://directory.fedoraproject.org/built/components
)
rem ------ NSPR ------
-set NSPR_LOCATION=%COMPONENT_URL%/nspr/v4.6
-if NOT EXIST %LIBROOT%\nspr (
- pushd %CD%
- mkdir %LIBROOT%\nspr
- cd %LIBROOT%\nspr
+set NSPR_LOCATION=%COMPONENT_URL%/nspr/v4.7.3
+if NOT EXIST "%LIBROOT%\nspr" (
+ mkdir "%LIBROOT%\nspr"
+ mkdir "%LIBROOT%\nspr\include"
+ pushd "%LIBROOT%\nspr"
echo %NSPR_LOCATION%/%FLAVOR% > version.txt
- wget --no-directories %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar
- wget --no-directories -Pinclude %NSPR_LOCATION%/%FLAVOR%/mdheader.jar
- unzip -q mdbinary.jar
+ %DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar "%LIBROOT%\nspr\mdbinary.jar"
+ %DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdheader.jar "%LIBROOT%\nspr\mdheader.jar"
+
+ ren mdbinary.jar mdbinary.zip
+ ren mdheader.jar mdheader.zip
+ %UNZIP% mdbinary.zip
cd include
- unzip -q mdheader.jar
+ %UNZIP% ..\mdheader.zip
popd
)
rem ------ NSS ------
-set NSS_LOCATION=%COMPONENT_URL%/nss/NSS_3_10_2_RTM
-if NOT EXIST %LIBROOT%\nss (
- pushd %CD%
- mkdir %LIBROOT%\nss
- cd %LIBROOT%\nss
+set NSS_LOCATION=%COMPONENT_URL%/nss/NSS_3_12_2_RTM
+if NOT EXIST "%LIBROOT%\nss" (
+ mkdir "%LIBROOT%\nss"
+ mkdir "%LIBROOT%\nss\include"
+ pushd "%LIBROOT%\nss"
echo %NSS_LOCATION%/%FLAVOR% > version.txt
- wget --no-directories %NSS_LOCATION%/%FLAVOR%/mdbinary.jar
- wget --no-directories -Pinclude %NSS_LOCATION%/xpheader.jar
- unzip -q mdbinary.jar
+ %DOWNLOAD% %NSS_LOCATION%/%FLAVOR%/mdbinary.jar "%LIBROOT%\nss\mdbinary.jar"
+ %DOWNLOAD% %NSS_LOCATION%/include/xpheader.jar "%LIBROOT%\nss\xpheader.jar"
+ ren mdbinary.jar mdbinary.zip
+ ren xpheader.jar xpheader.zip
+ %UNZIP% mdbinary.zip
cd include
- unzip -q xpheader.jar
+ %UNZIP% ..\xpheader.zip
popd
)
rem ------ LDAPSDK ------
-set LDAPSDK_LOCATION=%COMPONENT_URL%/ldapsdk50/v5.16
-if NOT EXIST %LIBROOT%\ldapsdk (
- pushd %CD%
- mkdir %LIBROOT%\ldapsdk
- cd %LIBROOT%\ldapsdk
+set LDAPSDK_LOCATION=%COMPONENT_URL2%/ldapcsdk/v6.0.5/20090128.1
+if NOT EXIST "%LIBROOT%\ldapsdk" (
+ mkdir "%LIBROOT%\ldapsdk"
+ pushd "%LIBROOT%\ldapsdk"
echo %LDAPSDK_LOCATION%/%FLAVOR% > version.txt
- wget --no-directories %LDAPSDK_LOCATION%/%FLAVOR%/ldapcsdk516.zip
- unzip -q ldapcsdk516.zip
+ %DOWNLOAD% %LDAPSDK_LOCATION%/%FLAVOR%/ldapcsdk.zip "%LIBROOT%\ldapsdk\ldapcsdk.zip"
+ %UNZIP% ldapcsdk.zip
+ popd
+)
+
+rem ------ WIX ------
+set WIX_LOCATION=%COMPONENT_URL%/wix
+if NOT EXIST "%WIXDIR%" (
+ mkdir "%WIXDIR%"
+ pushd "%WIXDIR%"
+ echo %WIX_LOCATION% > version.txt
+ %DOWNLOAD% %WIX_LOCATION%/wix-%WIXVER%.zip "%WIXDIR%\wix-%WIXVER%.zip"
+ %UNZIP% wix-%WIXVER%.zip
popd
)
set OK=0
-pushd %CD%
+pushd "%CD%"
rem ======== Build ========
rem ------ Set Build Paths ------
@@ -127,7 +158,10 @@
cd passsync
echo -------- Beginning PassSync Build --------
-nmake /f passsync.mak
+rem nmake CFG=%CFG1% /nologo /d /p /g /f passsync.mak
+rem /d /p /g are debugging flags
+rem /nologo is the shut up flag
+nmake CFG=%CFG1% /nologo /f passsync.mak
set /a OK=%OK% + %ERRORLEVEL%
if [%OK%] GTR [1] (
@@ -141,7 +175,7 @@
cd ..\passhook
echo -------- Beginning Passhook Build --------
-nmake /f passhook.mak
+nmake /nologo CFG=%CFG2% /f passhook.mak
set /a OK=%OK% + %ERRORLEVEL%
if [%OK%] GTR [1] (
@@ -155,11 +189,11 @@
cd ..
echo -------- Beginning Packaging --------
-nmake /f package.mak
+nmake /nologo CFG=%CFG1% /f package.mak
set /a OK=%OK% + %ERRORLEVEL%
-if EXIST %PKGDIR%\PassSync.msi (
- copy /Y %PKGDIR%\PassSync.msi %DISTDIR%
+if EXIST "%PKGDIR%\PassSync.msi" (
+ copy /Y "%PKGDIR%\PassSync.msi" "%DISTDIR%"
set /a OK=%OK% + %ERRORLEVEL%
)
Index: package.mak
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/package.mak,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- package.mak 10 Nov 2005 19:28:45 -0000 1.1
+++ package.mak 16 Feb 2009 22:37:32 -0000 1.2
@@ -38,28 +38,23 @@
# END COPYRIGHT BLOCK
#
# Packaging nmake Makefile for PassSync.msi
+CANDLE=$(WIXDIR)\candle
+LIGHT=$(WIXDIR)\light
ALL : PassSync.msi
LAYOUT :
copy /Y "$(OBJDEST)\passsync\passsync.exe" "$(PKGDIR)"
copy /Y "$(OBJDEST)\passhook\passhook.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\ldapsdk\lib\nsldap32v50.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\ldapsdk\lib\nsldapssl32v50.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\ldapsdk\lib\nsldappr32v50.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nspr\lib\libnspr4.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nspr\lib\libplds4.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nspr\lib\libplc4.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nss\lib\nss3.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nss\lib\ssl3.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nss\lib\softokn3.dll" "$(PKGDIR)"
- copy /Y "$(LIBROOT)\nss\lib\smime3.dll" "$(PKGDIR)"
+ copy /Y "$(LIBROOT)\ldapsdk\lib\*.dll" "$(PKGDIR)"
+ copy /Y "$(LIBROOT)\nspr\lib\*.dll" "$(PKGDIR)"
+ copy /Y "$(LIBROOT)\nss\lib\*.dll" "$(PKGDIR)"
copy /Y "$(LIBROOT)\nss\bin\certutil.exe" "$(PKGDIR)"
copy /Y "$(LIBROOT)\nss\bin\pk12util.exe" "$(PKGDIR)"
PassSync.msi : LAYOUT
- mkdir "$(PKGDIR)\Binary"
+ if not exist "$(PKGDIR)\Binary" mkdir "$(PKGDIR)\Binary"
copy /Y wix\Binary "$(PKGDIR)\Binary"
cd "$(PKGDIR)"
- candle "$(WXSDIR)\PassSync.wxs"
- light PassSync.wixobj
+ "$(CANDLE)" "$(WXSDIR)\PassSync.wxs"
+ "$(LIGHT)" PassSync.wixobj
15 years, 2 months
[Fedora-directory-commits] winsync/passwordsync/passhook passhook.mak, 1.10, 1.11
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/winsync/passwordsync/passhook
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32256/passwordsync/passhook
Modified Files:
passhook.mak
Log Message:
Resolves: bug 426421 245630 476095
Description: Windows Console uses nss libraries from \windows\system32
Fix Description: Windows Console still uses nss libraries from system32, but now passsync uses the same NSS version as Windows Console, so there should be no conflict
Description: install LDAP SDK DLLs in sync service dir, not system32
Fix Description: only files that need to go in system32 are installed there - everything else is installed in the passync home directory
Description: upgrade/build components bug
Fix Description: Now using NSPR 4.7.3, NSS 3.12.2, Mozldap 6.0.5
In addition, you can now build passsync in a Windows only environmnet - uses bitsadmin instead of wget for downloading, and uses unzip.vbs instead of unzip - this should simplify the build environment so that you don't have to figure out which combination of mks/cygwin/msys needs to be installed.
I also upgraded to the latest version of wix and had to upgrade a couple of wxs elements.
I also added the ability to upgrade passsync in the future with the use of the Upgrade element.
Platforms tested: Windows Server 2003
Index: passhook.mak
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/passhook/passhook.mak,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- passhook.mak 10 Nov 2005 04:18:04 -0000 1.10
+++ passhook.mak 16 Feb 2009 22:37:32 -0000 1.11
@@ -127,7 +127,7 @@
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\passhook.pdb" /machine:I386 /def:".\passhook.def" /out:"$(OUTDIR)\passhook.dll" /implib:"$(OUTDIR)\passhook.lib"
+LINK32_FLAGS=nss3.lib nssutil3.lib libnspr4.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\passhook.pdb" /machine:I386 /def:".\passhook.def" /out:"$(OUTDIR)\passhook.dll" /implib:"$(OUTDIR)\passhook.lib"
DEF_FILE= \
".\passhook.def"
LINK32_OBJS= \
@@ -205,7 +205,7 @@
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=nss3.lib libnspr4.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\passhook.pdb" /debug /machine:I386 /def:".\passhook.def" /out:"$(OUTDIR)\passhook.dll" /implib:"$(OUTDIR)\passhook.lib"
+LINK32_FLAGS=nss3.lib nssutil3.lib libnspr4.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\passhook.pdb" /debug /machine:I386 /def:".\passhook.def" /out:"$(OUTDIR)\passhook.dll" /implib:"$(OUTDIR)\passhook.lib"
DEF_FILE= \
".\passhook.def"
LINK32_OBJS= \
15 years, 2 months
[Fedora-directory-commits] winsync/passwordsync/passsync dssynchmsg.res, NONE, 1.1 ntservice.cpp, 1.5, 1.6 passsync.mak, 1.7, 1.8 service.cpp, 1.6, 1.7
by Richard Allen Megginson
Author: rmeggins
Update of /cvs/dirsec/winsync/passwordsync/passsync
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29691/passwordsync/passsync
Modified Files:
ntservice.cpp passsync.mak service.cpp
Added Files:
dssynchmsg.res
Log Message:
Resolves: bug 482892
Description: Passsync service start and stop messages in Windows event viewer are not logged correctly
Reviewed by: nkinder (Thanks!)
Fix Description: Looks like someone had started to tie in the message
catalog/resources, but didn't get far enough.
1) I used rc to compile the .rc file into a .res file - this new .res file is
being added to CVS (cvs add -kb)
2) I added dssynchmsg.res to the link line
3) I made sure the passsync.exe main called the Install() method which installs
the message catalog where the Event Viewer can find it. I had to make that
code smarter, so it would not attempt to create/install something that was
already there.
Platforms tested: Windows 2003 Server
Flag Day: no
Doc impact: no
--- NEW FILE dssynchmsg.res ---
Notification-based monitoring of user changes has terminated.
Index: ntservice.cpp
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/passsync/ntservice.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ntservice.cpp 19 Apr 2005 22:07:44 -0000 1.5
+++ ntservice.cpp 16 Feb 2009 22:20:21 -0000 1.6
@@ -196,34 +196,40 @@
BOOL CNTService::Install()
{
- // Open the Service Control Manager
- SC_HANDLE hSCM = ::OpenSCManager(NULL, // local machine
- NULL, // ServicesActive database
- SC_MANAGER_ALL_ACCESS); // full access
- if (!hSCM) return FALSE;
-
// Get the executable file path
TCHAR szFilePath[_MAX_PATH];
::GetModuleFileName(NULL, szFilePath, sizeof(szFilePath)/sizeof(*szFilePath));
- // Create the service
- SC_HANDLE hService = ::CreateService(hSCM,
- m_szServiceName,
- m_szServiceName,
- SERVICE_ALL_ACCESS,
- SERVICE_WIN32_OWN_PROCESS,
- SERVICE_DEMAND_START, // start condition
- SERVICE_ERROR_NORMAL,
- szFilePath,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL);
- if (!hService) {
- ::CloseServiceHandle(hSCM);
- return FALSE;
- }
+ // install if not already installed
+ if (!IsInstalled()) {
+ // Open the Service Control Manager
+ SC_HANDLE hSCM = ::OpenSCManager(NULL, // local machine
+ NULL, // ServicesActive database
+ SC_MANAGER_ALL_ACCESS); // full access
+ if (!hSCM) return FALSE;
+
+ // Create the service
+ SC_HANDLE hService = ::CreateService(hSCM,
+ m_szServiceName,
+ m_szServiceName,
+ SERVICE_ALL_ACCESS,
+ SERVICE_WIN32_OWN_PROCESS,
+ SERVICE_DEMAND_START, // start condition
+ SERVICE_ERROR_NORMAL,
+ szFilePath,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ if (!hService) {
+ ::CloseServiceHandle(hSCM);
+ return FALSE;
+ }
+ // clean up
+ ::CloseServiceHandle(hService);
+ ::CloseServiceHandle(hSCM);
+ }
// make registry entries to support logging messages
// Add the source name as a subkey under the Application
@@ -232,12 +238,16 @@
HKEY hKey = NULL;
_tcscpy(szKey, _T("SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\"));
_tcscat(szKey, GetEventName());
- if (::RegCreateKey(HKEY_LOCAL_MACHINE, szKey, &hKey) != ERROR_SUCCESS) {
- ::CloseServiceHandle(hService);
- ::CloseServiceHandle(hSCM);
- return FALSE;
- }
-
+ // see if key exists
+ int result = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKey, 0, KEY_ALL_ACCESS, &hKey);
+ if (result == ERROR_FILE_NOT_FOUND) { // create it
+ if (::RegCreateKey(HKEY_LOCAL_MACHINE, szKey, &hKey) != ERROR_SUCCESS) {
+ return FALSE;
+ }
+ } else if (result != ERROR_SUCCESS) {
+ // punt
+ return FALSE;
+ }
// Add the Event ID message-file name to the 'EventMessageFile' subkey.
::RegSetValueEx(hKey,
_T("EventMessageFile"),
@@ -258,9 +268,6 @@
LogEvent(EVENTLOG_INFORMATION_TYPE, EVMSG_INSTALLED, m_szServiceName);
- // tidy up
- ::CloseServiceHandle(hService);
- ::CloseServiceHandle(hSCM);
return TRUE;
}
Index: passsync.mak
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/passsync/passsync.mak,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- passsync.mak 10 Nov 2005 04:18:09 -0000 1.7
+++ passsync.mak 16 Feb 2009 22:20:21 -0000 1.8
@@ -56,6 +56,8 @@
!MESSAGE "passsync - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
+!ELSE
+!MESSAGE Build flavor is $(CFG)
!ENDIF
!IF "$(OS)" == "Windows_NT"
@@ -126,7 +128,7 @@
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\passsync.pdb" /machine:I386 /out:"$(OUTDIR)\passsync.exe"
+LINK32_FLAGS=nss3.lib nssutil3.lib libplc4.lib libnspr4.lib nsldappr32v60.lib nsldapssl32v60.lib nsldap32v60.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\passsync.pdb" /machine:I386 /out:"$(OUTDIR)\passsync.exe" dssynchmsg.res
LINK32_OBJS= \
"$(INTDIR)\ntservice.obj" \
"$(INTDIR)\passhand.obj" \
@@ -135,8 +137,7 @@
"$(INTDIR)\syncserv.obj"
"$(OUTDIR)\passsync.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
+ $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "passsync - Win32 Debug"
@@ -204,7 +205,7 @@
BSC32_SBRS= \
LINK32=link.exe
-LINK32_FLAGS=nss3.lib libplc4.lib libnspr4.lib nsldappr32v50.lib nsldapssl32v50.lib nsldap32v50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\passsync.pdb" /debug /machine:I386 /out:"$(OUTDIR)\passsync.exe"
+LINK32_FLAGS=nss3.lib nssutil3.lib libplc4.lib libnspr4.lib nsldappr32v60.lib nsldapssl32v60.lib nsldap32v60.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\passsync.pdb" /debug /machine:I386 /out:"$(OUTDIR)\passsync.exe" dssynchmsg.res
LINK32_OBJS= \
"$(INTDIR)\ntservice.obj" \
"$(INTDIR)\passhand.obj" \
Index: service.cpp
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/passsync/service.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- service.cpp 19 Apr 2005 22:07:44 -0000 1.6
+++ service.cpp 16 Feb 2009 22:20:21 -0000 1.7
@@ -245,6 +245,12 @@
break;
}
}
+
+ if ((result == OPT_START) && (argc == 1)) {
+ // started from SCM - make sure all installation
+ // stuff is done, like registering our event messages
+ pSynch->Install();
+ }
return result;
}
15 years, 2 months