..... */
void print_ruv(unsigned char *buff)
{
- char *pos = buff;
+ char *pos = (char *)buff;
uint32 i;
uint32 val_count;
@@ -942,7 +946,7 @@
} while (0 == ret);
key.size = 0;
key.data = NULL;
- } else if (entry_id != -1) {
+ } else if (entry_id != 0xffffffff) {
key.size = sizeof(entry_id);
key.data = &entry_id;
ret = db->get(db, NULL, &key, &data, 0);
Index: mmldif.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/mmldif.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mmldif.c 10 Nov 2006 23:45:51 -0000 1.7
+++ mmldif.c 18 Oct 2007 00:08:34 -0000 1.8
@@ -290,7 +290,6 @@
static char seed;
static int hashmask;
static entry_t **hashtable;
-static int maxcount;
static int emitchanges;
static int readrec(edfFILE * edf1, attrib1_t ** attrib);
@@ -641,7 +640,6 @@
time(&tl);
seed = (char)tl;
- maxcount = 10;
ndirectories = 0;
emitchanges = 0;
ofp = NULL;
From fedora-directory-commits at redhat.com Thu Oct 18 00:08:36 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 17 Oct 2007 20:08:36 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm
dbhelp.c, 1.8, 1.9 dblayer.c, 1.24, 1.25 dbverify.c, 1.1,
1.2 import.c, 1.9, 1.10 ldbm_attr.c, 1.8, 1.9 ldbm_attrcrypt.c,
1.9, 1.10 sort.c, 1.10, 1.11
Message-ID: <200710180009.l9I096Nv026613@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/back-ldbm
Modified Files:
dbhelp.c dblayer.c dbverify.c import.c ldbm_attr.c
ldbm_attrcrypt.c sort.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: dbhelp.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbhelp.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dbhelp.c 16 Aug 2007 19:28:58 -0000 1.8
+++ dbhelp.c 18 Oct 2007 00:08:34 -0000 1.9
@@ -57,8 +57,8 @@
DB *destination_file = NULL;
DBC *source_cursor = NULL;
DBTYPE dbtype = 0;
- int dbflags = 0;
- int dbpagesize = 0;
+ PRUint32 dbflags = 0;
+ PRUint32 dbpagesize = 0;
int cursor_flag = 0;
int finished = 0;
int mode = 0;
@@ -187,14 +187,11 @@
int dblayer_copy_file_resetlsns(char *home_dir ,char *source_file_name, char *destination_file_name, int overwrite, dblayer_private *priv)
{
int retval = 0;
- int mode = 0;
DB_ENV *env = NULL;
LDAPDebug( LDAP_DEBUG_TRACE, "=> dblayer_copy_file_resetlsns\n", 0, 0, 0 );
/* Make the environment */
- if (priv->dblayer_file_mode)
- mode = priv->dblayer_file_mode;
retval = dblayer_make_private_simple_env(home_dir,&env);
if (retval) {
LDAPDebug(LDAP_DEBUG_ANY, "dblayer_copy_file_resetlsns: Call to dblayer_make_private_simple_env failed!\n"
Index: dblayer.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dblayer.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- dblayer.c 16 Oct 2007 17:30:58 -0000 1.24
+++ dblayer.c 18 Oct 2007 00:08:34 -0000 1.25
@@ -478,6 +478,7 @@
return (ret < 0) ? errno : 0;
}
+#if 1000*DB_VERSION_MAJOR + 100*DB_VERSION_MINOR >= 4300
/* Helper function for large seeks, db4.3 */
static int dblayer_seek43_large(int fd, off64_t offset, int whence)
{
@@ -487,6 +488,7 @@
return (ret < 0) ? errno : 0;
}
+#endif
/* helper function for large fstat -- this depends on 'struct stat64' having
* the following members:
@@ -5828,7 +5830,6 @@
int dblayer_update_db_ext(ldbm_instance *inst, char *oldext, char *newext)
{
struct attrinfo *a = NULL;
- backend *be = NULL;
struct ldbminfo *li = NULL;
dblayer_private *priv = NULL;
DB *thisdb = NULL;
@@ -5844,7 +5845,6 @@
"update_db_ext: Null instance is passed\n", 0, 0, 0);
return -1; /* non zero */
}
- be = inst->inst_be;
li = inst->inst_li;
priv = (dblayer_private*)li->li_dblayer_private;
inst_dirp = dblayer_get_full_inst_dir(li, inst, inst_dir, MAXPATHLEN);
Index: dbverify.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/dbverify.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dbverify.c 7 Sep 2007 19:08:45 -0000 1.1
+++ dbverify.c 18 Oct 2007 00:08:34 -0000 1.2
@@ -169,7 +169,7 @@
slapi_log_error(SLAPI_LOG_TRACE, "verify DB", "Verifying db files...\n");
slapi_pblock_get(pb, SLAPI_BACKEND_INSTANCE_NAME, &instance_names);
- slapi_pblock_get(pb, SLAPI_SEQ_VAL, &verbose);
+ slapi_pblock_get(pb, SLAPI_SEQ_TYPE, &verbose);
slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &li);
ldbm_config_load_dse_info(li);
ldbm_config_internal_set(li, CONFIG_DB_TRANSACTION_LOGGING, "off");
Index: import.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/import.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- import.c 19 Sep 2007 19:32:03 -0000 1.9
+++ import.c 18 Oct 2007 00:08:34 -0000 1.10
@@ -173,8 +173,6 @@
static void import_log_status_done(ImportJob *job)
{
if (job->task) {
- int len = 0;
- len = strlen(job->task_status);
slapi_task_log_status(job->task, "%s", job->task_status);
}
}
Index: ldbm_attr.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attr.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ldbm_attr.c 2 Oct 2007 18:39:51 -0000 1.8
+++ ldbm_attr.c 18 Oct 2007 00:08:34 -0000 1.9
@@ -572,7 +572,7 @@
rhs = f->f_ava.ava_value.bv_val;
/* is the value zero ? */
rhs_num = atoi(rhs);
- if (0 == rhs) {
+ if (0 == rhs_num) {
/* If so, rewrite to same as numsubordinates=* */
free_the_filter_bits(f);
replace_filter(f,"(objectclass=*)");
Index: ldbm_attrcrypt.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ldbm_attrcrypt.c 10 Nov 2006 23:45:39 -0000 1.9
+++ ldbm_attrcrypt.c 18 Oct 2007 00:08:34 -0000 1.10
@@ -200,7 +200,7 @@
char *entry_string = slapi_ch_smprintf(entry_template,acs->ace->cipher_display_name,instance_name,acs->ace->cipher_display_name);
e = slapi_str2entry(entry_string, 0);
/* Add the key as a binary attribute */
- key_as_berval.bv_val = wrapped_symmetric_key.data;
+ key_as_berval.bv_val = (char *)wrapped_symmetric_key.data;
key_as_berval.bv_len = wrapped_symmetric_key.len;
key_value = slapi_value_new_berval(&key_as_berval);
/* key_value is now a copy of key_as_berval - free wrapped_symmetric_key */
@@ -236,7 +236,7 @@
CK_MECHANISM_TYPE wrap_mechanism = CKM_RSA_PKCS;
SECKEYPublicKey *wrapping_key = public_key;
wrapped_symmetric_key->len = slapd_SECKEY_PublicKeyStrength(public_key);
- wrapped_symmetric_key->data = slapi_ch_malloc(wrapped_symmetric_key->len);
+ wrapped_symmetric_key->data = (unsigned char *)slapi_ch_malloc(wrapped_symmetric_key->len);
LDAPDebug(LDAP_DEBUG_TRACE,"-> attrcrypt_wrap_key\n", 0, 0, 0);
s = slapd_pk11_PubWrapSymKey(wrap_mechanism, wrapping_key, symmetric_key, wrapped_symmetric_key);
if (SECSuccess != s) {
@@ -567,7 +567,7 @@
SECItem *security_parameter = NULL;
int output_buffer_length = 0;
int output_buffer_size1 = 0;
- int output_buffer_size2 = 0;
+ unsigned int output_buffer_size2 = 0;
unsigned char *output_buffer = NULL;
attrcrypt_cipher_state *acs = NULL;
@@ -586,7 +586,7 @@
#endif
/* Allocate the output buffer */
output_buffer_length = in_size + 16;
- output_buffer = slapi_ch_malloc(output_buffer_length);
+ output_buffer = (unsigned char *)slapi_ch_malloc(output_buffer_length);
/* Now call NSS to do the cipher op */
iv_item.data = "aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */
iv_item.len = acs->ace->iv_length; /* length of the array of IV bytes */
@@ -602,7 +602,7 @@
LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_crypto_op failed on cipher %s : %d - %s\n", acs->ace->cipher_display_name, errorCode, slapd_pr_strerror(errorCode));
goto error;
}
- secret = slapd_pk11_cipherOp(sec_context, output_buffer, &output_buffer_size1, output_buffer_length, in_data, in_size);
+ secret = slapd_pk11_cipherOp(sec_context, output_buffer, &output_buffer_size1, output_buffer_length, (unsigned char *)in_data, in_size);
if (SECSuccess != secret) {
int errorCode = PR_GetError();
LDAPDebug(LDAP_DEBUG_ANY,"attrcrypt_crypto_op failed on cipher %s : %d - %s\n", acs->ace->cipher_display_name, errorCode, slapd_pr_strerror(errorCode));
@@ -621,11 +621,11 @@
if (encrypt) {
log_bytes("slapd_pk11_DigestFinal '%s' (%d)\n", output_buffer, output_buffer_size1 + output_buffer_size2);
} else {
- LDAPDebug(LDAP_DEBUG_ANY,"slapd_pk11_DigestFinal '%s', %d\n", output_buffer, output_buffer_size2, 0);
+ LDAPDebug(LDAP_DEBUG_ANY,"slapd_pk11_DigestFinal '%s', %u\n", output_buffer, output_buffer_size2, 0);
}
#endif
*out_size = output_buffer_size1 + output_buffer_size2;
- *out_data = output_buffer;
+ *out_data = (char *)output_buffer;
}
error:
if (sec_context) {
Index: sort.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/sort.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sort.c 1 Dec 2006 21:57:57 -0000 1.10
+++ sort.c 18 Oct 2007 00:08:34 -0000 1.11
@@ -673,7 +673,6 @@
struct backentry *b = NULL;
int result = 0;
sort_spec_thing *this_one = NULL;
- int return_value = -1;
backend *be = bc->be;
ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
int err;
@@ -706,8 +705,8 @@
struct berval **value_b = NULL;
/* Get the two attribute values from the entries */
- return_value = slapi_entry_attr_find(a->ep_entry,type,&attr_a);
- return_value = slapi_entry_attr_find(b->ep_entry,type,&attr_b);
+ slapi_entry_attr_find(a->ep_entry,type,&attr_a);
+ slapi_entry_attr_find(b->ep_entry,type,&attr_b);
/* What do we do if one or more of the entries lacks this attribute ? */
/* if one lacks the attribute */
if (NULL == attr_a) {
From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 17 Oct 2007 20:08:37 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.6,
1.7 scalab01.c, 1.4, 1.5
Message-ID: <200710180009.l9I097HU026625@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/tools/ldclt
Modified Files:
ldapfct.c scalab01.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: ldapfct.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/ldapfct.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ldapfct.c 19 Sep 2007 18:08:12 -0000 1.6
+++ ldapfct.c 18 Oct 2007 00:08:35 -0000 1.7
@@ -629,7 +629,7 @@
if (close ((int)fd) < 0)
{
perror ("ldctx");
- printf ("ldclt[%d]: T%03d: cannot close(fd=%d), error=%d (%s)\n",
+ printf ("ldclt[%d]: T%03d: cannot close(fd=%ld), error=%d (%s)\n",
mctx.pid, tttctx->thrdNum, fd, errno, strerror (errno));
return (-1);
}
Index: scalab01.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/ldclt/scalab01.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- scalab01.c 19 Sep 2007 18:08:12 -0000 1.4
+++ scalab01.c 18 Oct 2007 00:08:35 -0000 1.5
@@ -1019,7 +1019,6 @@
/*
* End of thread
*/
- return (arg);
}
From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 17 Oct 2007 20:08:37 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.3, 1.4
Message-ID: <200710180009.l9I097H6026628@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/slapd/tools/rsearch
Modified Files:
infadd.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: infadd.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- infadd.c 10 Nov 2006 23:45:51 -0000 1.3
+++ infadd.c 18 Oct 2007 00:08:35 -0000 1.4
@@ -223,8 +223,7 @@
exit(1);
}
- if (use_random < 0 || sampleInterval <= 0 || thread_count <= 0 ||
- lmtCount < 0 || blobsize < 0 || firstUID < 0) {
+ if ( sampleInterval <= 0 || thread_count <= 0 || lmtCount < 0 ) {
printf("infadd: invalid option value\n");
usage();
exit(-1);
From fedora-directory-commits at redhat.com Thu Oct 18 00:08:37 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 17 Oct 2007 20:08:37 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/snmp
ldap-agent.c, 1.11, 1.12
Message-ID: <200710180009.l9I097YW026631@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/snmp
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/servers/snmp
Modified Files:
ldap-agent.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: ldap-agent.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/ldap-agent.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ldap-agent.c 10 Nov 2006 23:45:53 -0000 1.11
+++ ldap-agent.c 18 Oct 2007 00:08:35 -0000 1.12
@@ -277,7 +277,6 @@
time_t previous_start;
int previous_state;
int stats_hdl = -1;
- int err;
snmp_log(LOG_INFO, "Reloading stats.\n");
@@ -293,7 +292,7 @@
serv_p->stats_file, serv_p->port);
/* Open the stats file */
- if ((err = agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl)) != 0) {
+ if ( agt_mopen_stats(serv_p->stats_file, O_RDONLY, &stats_hdl) != 0 ) {
/* Server must be down */
serv_p->server_state = SERVER_DOWN;
/* Zero out the ops and entries tables */
@@ -304,13 +303,13 @@
serv_p->stats_file, serv_p->port);
} else {
/* Initialize ops table */
- if ((err = agt_mread_stats(stats_hdl, &ctx->hdr_tbl, &ctx->ops_tbl,
- &ctx->entries_tbl)) != 0)
+ if ( agt_mread_stats(stats_hdl, &ctx->hdr_tbl, &ctx->ops_tbl,
+ &ctx->entries_tbl) != 0 )
snmp_log(LOG_ERR, "Unable to read stats file: %s\n",
serv_p->stats_file);
/* Close stats file */
- if ((err = agt_mclose_stats(stats_hdl)) != 0)
+ if ( agt_mclose_stats(stats_hdl) != 0 )
snmp_log(LOG_ERR, "Error closing stats file: %s\n",
serv_p->stats_file);
From fedora-directory-commits at redhat.com Thu Oct 18 00:08:38 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 17 Oct 2007 20:08:38 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/systools idsktune.c, 1.15, 1.16
Message-ID: <200710180009.l9I098m0026634@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/systools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25950/ldap/systools
Modified Files:
idsktune.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler
Index: idsktune.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/systools/idsktune.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- idsktune.c 9 Aug 2007 15:40:11 -0000 1.15
+++ idsktune.c 18 Oct 2007 00:08:35 -0000 1.16
@@ -1418,20 +1418,20 @@
} else {
if (flag_debug) {
printf("DEBUG : Static info\n");
- printf("DEBUG : Physical memory size %d\n",pst_stt.physical_memory);
- printf("DEBUG : Page size %d\n",pst_stt.page_size);
- printf("DEBUG : Max nfile %d\n",pst_stt.pst_max_nfile);
+ printf("DEBUG : Physical memory size %lu\n",pst_stt.physical_memory);
+ printf("DEBUG : Page size %lu\n",pst_stt.page_size);
+ printf("DEBUG : Max nfile %lu\n",pst_stt.pst_max_nfile);
printf("DEBUG : Dynamic info\n");
- printf("DEBUG : Physical memory size %d\n",pst_dyn.psd_rm);
- printf("DEBUG : Virtual Memory size %d\n",pst_dyn.psd_vm);
- printf("DEBUG : Physical memory size %d active\n",pst_dyn.psd_arm);
- printf("DEBUG : Virtual Memory size %d active\n",pst_dyn.psd_avm);
- printf("DEBUG : Processors %d\n",pst_dyn.psd_proc_cnt);
+ printf("DEBUG : Physical memory size %lu\n",pst_dyn.psd_rm);
+ printf("DEBUG : Virtual Memory size %lu\n",pst_dyn.psd_vm);
+ printf("DEBUG : Physical memory size %lu active\n",pst_dyn.psd_arm);
+ printf("DEBUG : Virtual Memory size %lu active\n",pst_dyn.psd_avm);
+ printf("DEBUG : Processors %lu\n",pst_dyn.psd_proc_cnt);
printf("DEBUG : VM Info\n");
- printf("DEBUG : Pages on disk backing %d\n",pst_vmm.psv_swapspc_cnt);
- printf("DEBUG : Max pages on disk backing %d\n",pst_vmm.psv_swapspc_max);
+ printf("DEBUG : Pages on disk backing %lu\n",pst_vmm.psv_swapspc_cnt);
+ printf("DEBUG : Max pages on disk backing %lu\n",pst_vmm.psv_swapspc_max);
}
phys_mb = pst_stt.page_size / 1024;
phys_mb = phys_mb * (pst_stt.physical_memory / 1024);
@@ -1828,6 +1828,7 @@
if (!strcmp(month, mo_lookup[i]))
return i+1;
}
+ return 0; /* error */
}
static void hp_check_index(char *index_path, char *desc, int yr, int mo)
@@ -1920,7 +1921,6 @@
{
char fbuf[MAXPATHLEN];
int i,pm= 0;
- int not_su = 0;
int found = 0;
DIR *prod_dir = NULL;
@@ -1928,7 +1928,6 @@
if (access(HP_PATCH_DIR,X_OK) == -1) {
printf("\nWARNING : Only the superuser can check which patches are installed. You must\nrun dsktune as root to ensure the necessary patches are present. If required\npatches are not present, the server may not function correctly.\n\n");
- not_su = 1;
return;
}
@@ -1978,17 +1977,17 @@
if (_SYSTEM_SUPPORTS_LP64OS(cpu64) == 0) {
printf("WARNING: This system does not support 64 bit operating systems.\n\n");
} else {
- if (flag_debug) printf("DEBUG : _SC_HW_32_64_CAPABLE 0x%x\n",cpu64);
+ if (flag_debug) printf("DEBUG : _SC_HW_32_64_CAPABLE 0x%lx\n",cpu64);
}
tmax = sysconf(_SC_THREAD_THREADS_MAX);
if (tmax < 128) {
- printf("WARNING: only %d threads are available in a process.\n", tmax);
+ printf("WARNING: only %lu threads are available in a process.\n", tmax);
printf("NOTICE : use kmtune or sam Kernel Configuration Parameters to change max_thread_proc\n");
printf("and nkthreads as needed.\n\n");
} else {
- if (flag_debug) printf("DEBUG : HP-UX max threads %ld\n", tmax);
+ if (flag_debug) printf("DEBUG : HP-UX max threads %lu\n", tmax);
}
/* XXX set ncallout (max number of pending timeouts ) to 128 + NPROC */
@@ -1998,7 +1997,7 @@
omax = sysconf(_SC_OPEN_MAX);
if (omax < 120) {
- printf("WARNING: only %d files can be opened at once in a process.\n",omax);
+ printf("WARNING: only %lu files can be opened at once in a process.\n",omax);
printf("NOTICE : use kmtune or sam Kernel Configuration Parameters to change maxfiles.\n");
} else {
if (flag_debug) printf("DEBUG : HP-UX maxfiles %ld\n", omax);
@@ -2076,7 +2075,7 @@
if (ndd_get_tcp(name_tcp_time_wait_interval, &ndd_tcp_time_wait_interval) == 0) {
if (ndd_tcp_time_wait_interval >= 240000) {
if (flag_html) printf("\n");
- printf("%s: The %s is set to %d milliseconds (%d seconds).\n"
+ printf("%s: The %s is set to %ld milliseconds (%ld seconds).\n"
"This value should be reduced to allow for more simultaneous connections\n"
"to the server.\n",
flag_carrier ? "ERROR " : "WARNING",
@@ -2094,12 +2093,12 @@
if (flag_carrier) flag_os_bad = 1;
} else if (ndd_tcp_time_wait_interval < 10000) {
if (flag_html) printf("
\n");
- printf("WARNING: The %s is set to %d milliseconds. Values below\n30000 may cause problems.\n\n",
+ printf("WARNING: The %s is set to %ld milliseconds. Values below\n30000 may cause problems.\n\n",
name_tcp_time_wait_interval, ndd_tcp_time_wait_interval);
if (flag_html) printf("
\n");
} else {
if (flag_debug) {
- printf("DEBUG : %s %d\n", name_tcp_time_wait_interval, ndd_tcp_time_wait_interval);
+ printf("DEBUG : %s %ld\n", name_tcp_time_wait_interval, ndd_tcp_time_wait_interval);
}
}
}
@@ -2163,7 +2162,7 @@
if (ndd_get_tcp(NAME_TCP_CONN_REQ_MAX_Q, &ndd_tcp_conn_req_max_q) == 0) {
if (flag_html) printf("\n");
if (ndd_tcp_conn_req_max_q < recommended_tcp_conn_req_max) {
- printf("ERROR : The NDD %s value %d is lower than the recommended minimum, %d.\n\n",
+ printf("ERROR : The NDD %s value %ld is lower than the recommended minimum, %d.\n\n",
NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q, recommended_tcp_conn_req_max);
if (flag_solaris_251) {
printf("ERROR : Patches %s and %s may need to be applied.\n\n",
@@ -2172,17 +2171,17 @@
}
} else if (ndd_tcp_conn_req_max_q >= ndd_tcp_conn_req_max_q0) {
if (flag_debug) {
- printf("DEBUG : %s %d\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q);
+ printf("DEBUG : %s %ld\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q);
}
} else {
- printf("NOTICE : The %s value is currently %d, which will limit the\nvalue of listen backlog which can be configured. ",
+ printf("NOTICE : The %s value is currently %ld, which will limit the\nvalue of listen backlog which can be configured. ",
NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q);
#ifdef NAME_NDD_CFG_FILE
printf("It can be raised by adding\nto %s, after any adb command, an entry similar to:\n", NAME_NDD_CFG_FILE);
if (flag_html) printf("
\n");
printf("TRANSPORT_NAME[10]=tcp\n");
printf("NDD_NAME[10]=%s\n", NAME_TCP_CONN_REQ_MAX_Q);
- printf("NDD_VALUE[10]=%d\n\n", ndd_tcp_conn_req_max_q0);
+ printf("NDD_VALUE[10]=%ld\n\n", ndd_tcp_conn_req_max_q0);
if (flag_html) printf("
\n");
#endif
if (tcp_max_listen == 1024) {
@@ -2193,7 +2192,7 @@
if (flag_html) printf("
\n");
if (tcp_max_listen && ndd_tcp_conn_req_max_q > tcp_max_listen) {
- printf("WARNING: %s (value %d) is larger than the kernel will allow.\n\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q);
+ printf("WARNING: %s (value %ld) is larger than the kernel will allow.\n\n", NAME_TCP_CONN_REQ_MAX_Q, ndd_tcp_conn_req_max_q);
}
if (flag_html) printf("
\n");
@@ -2784,7 +2783,7 @@
#if defined(RLIMIT_CORE)
getrlimit(RLIMIT_CORE,&r);
if (flag_debug) printf("DEBUG : RLIMIT_CORE is %ld, %ld\n", r.rlim_cur, r.rlim_max);
- if (r.rlim_cur == -1 || r.rlim_cur >= 2147483647) {
+ if (r.rlim_cur == (unsigned long)-1 || r.rlim_cur >= 2147483647) {
if (swap_mb <2048) {
max_core = swap_mb;
} else {
@@ -3121,24 +3120,24 @@
switch(cpuvers) {
case CPU_PA_RISC1_0:
- sprintf(procstr,"hppa1.0/%d",cputype);
+ sprintf(procstr,"hppa1.0/%ld",cputype);
break;
case CPU_PA_RISC1_1:
- sprintf(procstr,"hppa1.1/%d",cputype);
+ sprintf(procstr,"hppa1.1/%ld",cputype);
break;
case CPU_PA_RISC1_2:
- sprintf(procstr,"hppa1.2/%d",cputype);
+ sprintf(procstr,"hppa1.2/%ld",cputype);
break;
case CPU_PA_RISC2_0:
- sprintf(procstr,"hppa2.0/%d",cputype);
+ sprintf(procstr,"hppa2.0/%ld",cputype);
break;
#if defined(__ia64)
case CPU_IA64_ARCHREV_0:
- sprintf(procstr,"hpia0/%d",cputype);
+ sprintf(procstr,"hpia0/%ld",cputype);
break;
#endif
default:
- sprintf(procstr,"hppa_0x%x/%d",cpuvers,cputype);
+ sprintf(procstr,"hppa_0x%lx/%ld",cpuvers,cputype);
break;
}
From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Wed, 17 Oct 2007 21:22:31 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
dscreate.map.in, 1.1, 1.2
Message-ID: <200710180122.l9I1MVaP004017@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/admin/src/scripts
Modified Files:
dscreate.map.in
Log Message:
Resolves: bug 250179
Description: tmpwatch whacks stats
Reviewed by: nkinder (Thanks!)
Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it.
Doc: Yes, we need to document the new attribute nsslapd-rundir.
Index: dscreate.map.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/dscreate.map.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dscreate.map.in 13 Jul 2007 18:35:32 -0000 1.1
+++ dscreate.map.in 18 Oct 2007 01:22:28 -0000 1.2
@@ -65,3 +65,4 @@
log_dir = log_dir
config_dir = config_dir
db_dir = db_dir
+run_dir = run_dir
From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Wed, 17 Oct 2007 21:22:31 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/ldif
template-dse.ldif.in, 1.4, 1.5
Message-ID: <200710180122.l9I1MVgp004023@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/ldif
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/ldif
Modified Files:
template-dse.ldif.in
Log Message:
Resolves: bug 250179
Description: tmpwatch whacks stats
Reviewed by: nkinder (Thanks!)
Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it.
Doc: Yes, we need to document the new attribute nsslapd-rundir.
Index: template-dse.ldif.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- template-dse.ldif.in 25 Jul 2007 15:20:01 -0000 1.4
+++ template-dse.ldif.in 18 Oct 2007 01:22:29 -0000 1.5
@@ -9,6 +9,7 @@
nsslapd-certdir: %cert_dir%
nsslapd-ldifdir: %ldif_dir%
nsslapd-bakdir: %bak_dir%
+nsslapd-rundir: %run_dir%
nsslapd-instancedir: %inst_dir%
nsslapd-accesslog-logging-enabled: on
nsslapd-accesslog-maxlogsperdir: 10
From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Wed, 17 Oct 2007 21:22:31 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd agtmmap.h,
1.10, 1.11 libglobs.c, 1.22, 1.23 proto-slap.h, 1.30,
1.31 slap.h, 1.29, 1.30 snmp_collator.c, 1.11, 1.12
Message-ID: <200710180122.l9I1MVta004032@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/servers/slapd
Modified Files:
agtmmap.h libglobs.c proto-slap.h slap.h snmp_collator.c
Log Message:
Resolves: bug 250179
Description: tmpwatch whacks stats
Reviewed by: nkinder (Thanks!)
Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it.
Doc: Yes, we need to document the new attribute nsslapd-rundir.
Index: agtmmap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- agtmmap.h 10 Nov 2006 23:45:40 -0000 1.10
+++ agtmmap.h 18 Oct 2007 01:22:29 -0000 1.11
@@ -79,7 +79,8 @@
#if !defined(_MAX_PATH)
#define _MAX_PATH 256
#endif
-#define AGT_STATS_FILE "slapd.stats"
+#define AGT_STATS_EXTENSION ".stats"
+#define AGT_STATS_FILE "slapd" AGT_STATS_EXTENSION
#define AGT_MJR_VERSION 1
#define AGT_MNR_VERSION 0
Index: libglobs.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- libglobs.c 5 Oct 2007 17:00:04 -0000 1.22
+++ libglobs.c 18 Oct 2007 01:22:29 -0000 1.23
@@ -573,6 +573,10 @@
{CONFIG_SASLPATH_ATTRIBUTE, config_set_saslpath,
NULL, 0,
(void**)&global_slapdFrontendConfig.saslpath, CONFIG_STRING, (ConfigGetFunc)config_get_saslpath},
+ /* parameterizing run dir */
+ {CONFIG_RUNDIR_ATTRIBUTE, config_set_rundir,
+ NULL, 0,
+ (void**)&global_slapdFrontendConfig.rundir, CONFIG_STRING, (ConfigGetFunc)config_get_rundir},
{CONFIG_REWRITE_RFC1274_ATTRIBUTE, config_set_rewrite_rfc1274,
NULL, 0,
(void**)&global_slapdFrontendConfig.rewrite_rfc1274, CONFIG_ON_OFF, NULL},
@@ -4728,6 +4732,43 @@
CFG_UNLOCK_WRITE(slapdFrontendConfig);
return retVal;
}
+
+char *
+config_get_rundir()
+{
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+ char *retVal;
+
+ CFG_LOCK_READ(slapdFrontendConfig);
+ retVal = config_copy_strval(slapdFrontendConfig->rundir);
+ CFG_UNLOCK_READ(slapdFrontendConfig);
+
+ return retVal;
+}
+
+int
+config_set_rundir(const char *attrname, char *value, char *errorbuf, int apply)
+{
+ int retVal = LDAP_SUCCESS;
+ slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
+
+ if ( config_value_is_null( attrname, value, errorbuf, 0 )) {
+ return LDAP_OPERATIONS_ERROR;
+ }
+
+ if (!apply) {
+ return retVal;
+ }
+
+ CFG_LOCK_WRITE(slapdFrontendConfig);
+ slapi_ch_free((void **)&slapdFrontendConfig->rundir);
+
+ slapdFrontendConfig->rundir = slapi_ch_strdup(value);
+
+ CFG_UNLOCK_WRITE(slapdFrontendConfig);
+ return retVal;
+}
+
char *
config_get_saslpath()
{
Index: proto-slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- proto-slap.h 18 Oct 2007 00:08:34 -0000 1.30
+++ proto-slap.h 18 Oct 2007 01:22:29 -0000 1.31
@@ -326,6 +326,7 @@
int config_set_certdir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_ldifdir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_bakdir( const char *attrname, char *value, char *errorbuf, int apply );
+int config_set_rundir( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_saslpath( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_attrname_exceptions( const char *attrname, char *value, char *errorbuf, int apply );
int config_set_hash_filters( const char *attrname, char *value, char *errorbuf, int apply );
@@ -438,6 +439,7 @@
char *config_get_certdir();
char *config_get_ldifdir();
char *config_get_bakdir();
+char *config_get_rundir();
char *config_get_saslpath();
char **config_get_errorlog_list();
char **config_get_accesslog_list();
Index: slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- slap.h 18 Oct 2007 00:08:34 -0000 1.29
+++ slap.h 18 Oct 2007 01:22:29 -0000 1.30
@@ -1727,6 +1727,7 @@
#define CONFIG_LDIFDIR_ATTRIBUTE "nsslapd-ldifdir"
#define CONFIG_BAKDIR_ATTRIBUTE "nsslapd-bakdir"
#define CONFIG_SASLPATH_ATTRIBUTE "nsslapd-saslpath"
+#define CONFIG_RUNDIR_ATTRIBUTE "nsslapd-rundir"
#define CONFIG_SSLCLIENTAUTH_ATTRIBUTE "nsslapd-SSLclientAuth"
#define CONFIG_SSL_CHECK_HOSTNAME_ATTRIBUTE "nsslapd-ssl-check-hostname"
#define CONFIG_HASH_FILTERS_ATTRIBUTE "nsslapd-hash-filters"
@@ -1906,6 +1907,7 @@
char *certdir; /* full path name of directory containing cert files */
char *ldifdir; /* full path name of directory containing ldif files */
char *bakdir; /* full path name of directory containing bakup files */
+ char *rundir; /* where pid, snmp stats, and ldapi files go */
char *saslpath; /* full path name of directory containing sasl plugins */
int attrname_exceptions; /* if true, allow questionable attribute names */
int rewrite_rfc1274; /* return attrs for both v2 and v3 names */
Index: snmp_collator.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- snmp_collator.c 18 Oct 2007 00:08:34 -0000 1.11
+++ snmp_collator.c 18 Oct 2007 01:22:29 -0000 1.12
@@ -60,6 +60,7 @@
#include "prlock.h"
#include "prerror.h"
#include "prcvar.h"
+#include "plstr.h"
#include "snmp_collator.h"
#include "../snmp/ntagt/nslagtcom_nt.h"
@@ -397,8 +398,10 @@
{
int err;
- char *statspath = config_get_tmpdir();
+ char *statspath = config_get_rundir();
char *lp = NULL;
+ char *instdir = config_get_configdir();
+ char *instname = NULL;
/*
* Get directory for our stats file
@@ -407,10 +410,18 @@
statspath = slapi_ch_strdup("/tmp");
}
- PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s",
- statspath, AGT_STATS_FILE);
+ instname = PL_strrstr(instdir, "slapd-");
+ if (!instname) {
+ instname = PL_strrstr(instdir, "/");
+ if (instname) {
+ instname++;
+ }
+ }
+ PR_snprintf(szStatsFile, sizeof(szStatsFile), "%s/%s%s",
+ statspath, instname, AGT_STATS_EXTENSION);
tmpstatsfile = szStatsFile;
- slapi_ch_free((void **) &statspath);
+ slapi_ch_free_string(&statspath);
+ slapi_ch_free_string(&instname);
/* open the memory map */
if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0))
From fedora-directory-commits at redhat.com Thu Oct 18 01:22:31 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Wed, 17 Oct 2007 21:22:31 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/snmp main.c, 1.12, 1.13
Message-ID: <200710180122.l9I1MVK8004040@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/snmp
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3959/ldapserver/ldap/servers/snmp
Modified Files:
main.c
Log Message:
Resolves: bug 250179
Description: tmpwatch whacks stats
Reviewed by: nkinder (Thanks!)
Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it.
Doc: Yes, we need to document the new attribute nsslapd-rundir.
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- main.c 15 Oct 2007 19:19:32 -0000 1.12
+++ main.c 18 Oct 2007 01:22:29 -0000 1.13
@@ -318,6 +318,7 @@
int got_tmpdir = 0;
int lineno = 0;
char *entry = NULL;
+ char *instancename = NULL;
/* Allocate a server_instance */
if ((serv_p = malloc(sizeof(server_instance))) == NULL) {
@@ -330,6 +331,7 @@
p = p + 6;
if ((p = strtok(p, " \t\n")) != NULL) {
/* first token is the instance name */
+ instancename = strdup(p);
serv_p->dse_ldif = malloc(strlen(p) + strlen(SYSCONFDIR) +
strlen(PACKAGE_NAME) + 12);
if (serv_p->dse_ldif != NULL) {
@@ -341,6 +343,8 @@
} else {
printf("ldap-agent: malloc error processing config file\n");
error = 1;
+ free(instancename);
+ instancename = NULL;
goto close_and_exit;
}
}
@@ -350,6 +354,8 @@
printf("ldap-agent: Error opening server config file: %s\n",
serv_p->dse_ldif);
error = 1;
+ free(instancename);
+ instancename = NULL;
goto close_and_exit;
}
@@ -376,16 +382,18 @@
if (strcmp(attr, "nsslapd-port") == 0) {
serv_p->port = atol(val);
got_port = 1;
- } else if (strcmp(attr, "nsslapd-tmpdir") == 0) {
+ } else if (strcmp(attr, "nsslapd-rundir") == 0) {
serv_p->stats_file = malloc(vlen + 13);
if (serv_p->stats_file != NULL) {
snprintf(serv_p->stats_file, vlen + 13,
- "%s/slapd.stats", val);
+ "%s/%s.stats", instancename, val);
serv_p->stats_file[(vlen + 12)] = (char)0;
} else {
printf("ldap-agent: malloc error processing config file\n");
free(entry);
error = 1;
+ free(instancename);
+ instancename = NULL;
goto close_and_exit;
}
got_tmpdir = 1;
@@ -404,6 +412,8 @@
}
}
+ free(instancename);
+ instancename = NULL;
/* We're done reading entries from dse_ldif now, so
* we can free entry */
free(entry);
From fedora-directory-commits at redhat.com Thu Oct 18 01:41:16 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Wed, 17 Oct 2007 21:41:16 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
DSCreate.pm.in, 1.7, 1.8
Message-ID: <200710180141.l9I1fGEm004523@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4506/ldapserver/ldap/admin/src/scripts
Modified Files:
DSCreate.pm.in
Log Message:
Resolves: bug 250179
Description: tmpwatch whacks stats
Fix Description: Move the default nsslapd-tmpdir to /tmp.
Index: DSCreate.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DSCreate.pm.in 28 Sep 2007 23:34:55 -0000 1.7
+++ DSCreate.pm.in 18 Oct 2007 01:41:13 -0000 1.8
@@ -774,9 +774,9 @@
if (!defined($inf->{slapd}->{tmp_dir})) {
if ("@with_fhs_opt@") {
- $inf->{slapd}->{tmp_dir} = "$localstatedir/@PACKAGE_NAME@/slapd-$servid/tmp";
+ $inf->{slapd}->{tmp_dir} = "/tmp";
} else {
- $inf->{slapd}->{tmp_dir} = "$localstatedir/tmp/@PACKAGE_NAME@/slapd-$servid";
+ $inf->{slapd}->{tmp_dir} = "/tmp";
}
}
$ENV{DS_TMP_DIR} = $inf->{slapd}->{tmp_dir};
From fedora-directory-commits at redhat.com Thu Oct 18 14:05:27 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 10:05:27 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd
snmp_collator.c, 1.12, 1.13
Message-ID: <200710181405.l9IE5R8X024662@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24642
Modified Files:
snmp_collator.c
Log Message:
Have to free instdir not instname
Index: snmp_collator.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- snmp_collator.c 18 Oct 2007 01:22:29 -0000 1.12
+++ snmp_collator.c 18 Oct 2007 14:05:24 -0000 1.13
@@ -421,7 +421,7 @@
statspath, instname, AGT_STATS_EXTENSION);
tmpstatsfile = szStatsFile;
slapi_ch_free_string(&statspath);
- slapi_ch_free_string(&instname);
+ slapi_ch_free_string(&instdir);
/* open the memory map */
if ((err = agt_mopen_stats(tmpstatsfile, O_RDWR, &hdl) != 0))
From fedora-directory-commits at redhat.com Thu Oct 18 18:26:23 2007
From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten))
Date: Thu, 18 Oct 2007 14:26:23 -0400
Subject: [Fedora-directory-commits] mod_nss mod_nss.c, 1.16, 1.17 mod_nss.h,
1.18, 1.19 nss_engine_vars.c, 1.9, 1.10
Message-ID: <200710181826.l9IIQNfs030808@cvs-int.fedora.redhat.com>
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30785
Modified Files:
mod_nss.c mod_nss.h nss_engine_vars.c
Log Message:
If mod_ssl isn't loaded then register the hooks to mod_proxy so we can
do at least secure proxy in front of an unsecure host.
Index: mod_nss.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mod_nss.c 31 May 2007 21:36:03 -0000 1.16
+++ mod_nss.c 18 Oct 2007 18:26:21 -0000 1.17
@@ -200,6 +200,10 @@
return 1;
}
+int ssl_proxy_enable(conn_rec *c) {
+ return nss_proxy_enable(c);
+}
+
int nss_engine_disable(conn_rec *c)
{
SSLSrvConfigRec *sc = mySrvConfig(c->base_server);
@@ -217,6 +221,10 @@
return 1;
}
+int ssl_engine_disable(conn_rec *c) {
+ return nss_engine_disable(c);
+}
+
/* Callback for an incoming certificate that is not valid */
SECStatus NSSBadCertHandler(void *arg, PRFileDesc * socket)
@@ -430,6 +438,12 @@
APR_REGISTER_OPTIONAL_FN(nss_proxy_enable);
APR_REGISTER_OPTIONAL_FN(nss_engine_disable);
+
+ /* If mod_ssl is not loaded then mod_nss can work with mod_proxy */
+ if (APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable) == NULL)
+ APR_REGISTER_OPTIONAL_FN(ssl_proxy_enable);
+ if (APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable) == NULL)
+ APR_REGISTER_OPTIONAL_FN(ssl_engine_disable);
}
module AP_MODULE_DECLARE_DATA nss_module = {
Index: mod_nss.h
===================================================================
RCS file: /cvs/dirsec/mod_nss/mod_nss.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mod_nss.h 31 May 2007 21:36:03 -0000 1.18
+++ mod_nss.h 18 Oct 2007 18:26:21 -0000 1.19
@@ -419,24 +419,34 @@
/* Variables */
void nss_var_register(void);
char *nss_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *);
+char *ssl_var_lookup(apr_pool_t *, server_rec *, conn_rec *, request_rec *, char *);
void nss_var_log_config_register(apr_pool_t *p);
APR_DECLARE_OPTIONAL_FN(char *, nss_var_lookup,
(apr_pool_t *, server_rec *,
conn_rec *, request_rec *,
char *));
+APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
+ (apr_pool_t *, server_rec *,
+ conn_rec *, request_rec *,
+ char *));
/* An optional function which returns non-zero if the given connection
* is using SSL/TLS. */
APR_DECLARE_OPTIONAL_FN(int, nss_is_https, (conn_rec *));
+APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
/* Proxy Support */
int nss_proxy_enable(conn_rec *c);
int nss_engine_disable(conn_rec *c);
+int ssl_proxy_enable(conn_rec *c);
+int ssl_engine_disable(conn_rec *c);
APR_DECLARE_OPTIONAL_FN(int, nss_proxy_enable, (conn_rec *));
+APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));
APR_DECLARE_OPTIONAL_FN(int, nss_engine_disable, (conn_rec *));
+APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
/* I/O */
PRFileDesc * nss_io_new_fd();
Index: nss_engine_vars.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_vars.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- nss_engine_vars.c 31 May 2007 21:36:03 -0000 1.9
+++ nss_engine_vars.c 18 Oct 2007 18:26:21 -0000 1.10
@@ -46,10 +46,21 @@
return sslconn && sslconn->ssl;
}
+static int ssl_is_https(conn_rec *c) {
+ return nss_is_https(c);
+}
+
void nss_var_register(void)
{
APR_REGISTER_OPTIONAL_FN(nss_is_https);
APR_REGISTER_OPTIONAL_FN(nss_var_lookup);
+
+ /* These can only be registered if mod_ssl is not loaded */
+ if (APR_RETRIEVE_OPTIONAL_FN(ssl_is_https) == NULL)
+ APR_REGISTER_OPTIONAL_FN(ssl_is_https);
+ if (APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup) == NULL)
+ APR_REGISTER_OPTIONAL_FN(ssl_var_lookup);
+
return;
}
@@ -241,6 +252,10 @@
return result;
}
+char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, char *var) {
+ return nss_var_lookup(p, s, c, r, var);
+}
+
static char *nss_var_lookup_header(apr_pool_t *p, request_rec *r, const char *name)
{
char *hdr = NULL;
From fedora-directory-commits at redhat.com Thu Oct 18 19:20:18 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Thu, 18 Oct 2007 15:20:18 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/snmp main.c, 1.13, 1.14
Message-ID: <200710181920.l9IJKIIK009053@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/snmp
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9009/ldap/servers/snmp
Modified Files:
main.c
Log Message:
Resolves: 338611
Summary: Sleep longer when waiting for ldap-agent to start.
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- main.c 18 Oct 2007 01:22:29 -0000 1.13
+++ main.c 18 Oct 2007 19:20:16 -0000 1.14
@@ -172,15 +172,23 @@
/* run as a daemon */
if (netsnmp_daemonize(0, 0)) {
+ int i;
+
/* sleep to allow pidfile to be created by child */
- sleep(5);
- if((pid_fp = fopen(pidfile,"r")) == NULL) {
- printf("ldap-agent: Not started! Check log file for details.\n");
+ for (i=0; i < 3; i++) {
+ sleep(5);
+ if((pid_fp = fopen(pidfile,"r")) != NULL) {
+ break;
+ }
+ }
+
+ if(!pid_fp) {
+ printf("ldap-agent: Not started after 15 seconds! Check log file for details.\n");
exit(1);
- } else {
- fscanf(pid_fp, "%d", &child_pid);
- fclose(pid_fp);
}
+
+ fscanf(pid_fp, "%d", &child_pid);
+ fclose(pid_fp);
printf("ldap-agent: Started as pid %d\n", child_pid);
exit(1);
}
@@ -315,7 +323,7 @@
}
} else if ((p = strstr(line, "server")) != NULL) {
int got_port = 0;
- int got_tmpdir = 0;
+ int got_rundir = 0;
int lineno = 0;
char *entry = NULL;
char *instancename = NULL;
@@ -376,7 +384,7 @@
if ((strcmp(attr, "dn") == 0) &&
(strcmp(val, "cn=config") == 0)) {
char *dse_line = NULL;
- /* Look for port and tmpdir attributes */
+ /* Look for port and rundir attributes */
while ((dse_line = ldif_getline(&entryp)) != NULL) {
ldif_parse_line(dse_line, &attr, &val, &vlen);
if (strcmp(attr, "nsslapd-port") == 0) {
@@ -396,16 +404,16 @@
instancename = NULL;
goto close_and_exit;
}
- got_tmpdir = 1;
+ got_rundir = 1;
}
/* Stop processing this entry if we found the
- * port and tmpdir settings */
- if (got_port && got_tmpdir) {
+ * port and rundir settings */
+ if (got_port && got_rundir) {
break;
}
}
- /* The port and tmpdir settings must be in the
+ /* The port and rundir settings must be in the
* cn=config entry, so we can stop reading through
* the dse.ldif now. */
break;
@@ -425,8 +433,8 @@
"server config file: %s\n", serv_p->dse_ldif);
error = 1;
goto close_and_exit;
- } else if (!got_tmpdir) {
- printf("ldap-agent: Error reading nsslapd-tmpdir from "
+ } else if (!got_rundir) {
+ printf("ldap-agent: Error reading nsslapd-rundir from "
"server config file: %s\n", serv_p->dse_ldif);
error = 1;
goto close_and_exit;
From fedora-directory-commits at redhat.com Thu Oct 18 19:20:19 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Thu, 18 Oct 2007 15:20:19 -0400
Subject: [Fedora-directory-commits] ldapserver/wrappers ldap-agent.in, 1.4,
1.5
Message-ID: <200710181920.l9IJKJEx009059@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9009/wrappers
Modified Files:
ldap-agent.in
Log Message:
Resolves: 338611
Summary: Sleep longer when waiting for ldap-agent to start.
Index: ldap-agent.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/ldap-agent.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ldap-agent.in 9 Aug 2007 23:59:23 -0000 1.4
+++ ldap-agent.in 18 Oct 2007 19:20:16 -0000 1.5
@@ -8,6 +8,9 @@
BIN_DIR=@bindir@
COMMAND=ldap-agent-bin
+# We don't need to load any mibs, so set MIBS to nothing.
+MIBS=
+export MIBS
###############################################################################
## (2) Set the LD_LIBRARY_PATH environment variable to determine the ##
From fedora-directory-commits at redhat.com Thu Oct 18 20:27:00 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Thu, 18 Oct 2007 16:27:00 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.4, 1.5
Message-ID: <200710182027.l9IKR0hf018300@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18274
Modified Files:
infadd.c
Log Message:
Resolves: 336871
Summary: Look for infadd data files in TEMPLATEDIR.
Index: infadd.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- infadd.c 18 Oct 2007 00:08:35 -0000 1.4
+++ infadd.c 18 Oct 2007 20:26:58 -0000 1.5
@@ -157,7 +157,7 @@
AddThread **threads;
PRUint32 total = 0, ntotal = 0;
int counter;
- char familynames[35], givennames[35];
+ char familynames[strlen(TEMPLATEDIR) + 19], givennames[strlen(TEMPLATEDIR) + 18];
srand(time(NULL));
if (argc < 2) {
@@ -241,14 +241,8 @@
fill_table(family_names, use_random);
}
else {
- if (!access("../data/dbgen-FamilyNames", R_OK)) {
- strcpy(familynames, "../data/dbgen-FamilyNames");
- strcpy(givennames, "../data/dbgen-GivenNames");
- }
- else {
- strcpy(familynames, "../../data/dbgen-FamilyNames");
- strcpy(givennames, "../../data/dbgen-GivenNames");
- }
+ strcpy(familynames, TEMPLATEDIR "/dbgen-FamilyNames");
+ strcpy(givennames, TEMPLATEDIR "/dbgen-GivenNames");
fprintf(stdout, "Loading Given-Names ...\n");
if (!nt_load(given_names, givennames)) {
fprintf(stdout, "*** Failed to read name table\n");
From fedora-directory-commits at redhat.com Thu Oct 18 20:49:03 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 16:49:03 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd pblock.c,
1.11, 1.12
Message-ID: <200710182049.l9IKn3qV019426@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19310
Modified Files:
pblock.c
Log Message:
Resolves: #193724
Summary: "nested" filtered roles result in deadlock (comment #16)
Description: fixed a memory leak introduced in the previous checkins (comment #12)
Index: pblock.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- pblock.c 5 Oct 2007 23:31:07 -0000 1.11
+++ pblock.c 18 Oct 2007 20:49:01 -0000 1.12
@@ -102,6 +102,7 @@
{
operation_free(&pb->pb_op,pb->pb_conn);
}
+ slapi_ch_free((void**)&(pb->pb_vattr_context));
slapi_ch_free((void**)&(pb->pb_result_text));
}
From fedora-directory-commits at redhat.com Thu Oct 18 20:55:13 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 16:55:13 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
aclparse.c, 1.7, 1.8
Message-ID: <200710182055.l9IKtD73019807@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19790/ldapserver/ldap/servers/plugins/acl
Modified Files:
aclparse.c
Log Message:
Resolves: bug 232910
Bug Description: ACI targetattr list parser is whitespace sensitive
Reviewed by: nkinder, nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Need to trim trailing whitespace from the targetattr clause. I noticed that targetattrfilters had the same problem, except it returned ACL_SYNTAX_ERR in that case, so I changed targetattr to do the same.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: aclparse.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- aclparse.c 18 Oct 2007 00:08:27 -0000 1.7
+++ aclparse.c 18 Oct 2007 20:55:10 -0000 1.8
@@ -1232,10 +1232,16 @@
s = strchr (attr_val, '=');
s++;
__acl_strip_leading_space(&s);
+ __acl_strip_trailing_space(s);
len = strlen(s);
if (*s == '"' && s[len-1] == '"') {
s[len-1] = '\0';
s++;
+ } else {
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n",
+ s);
+ return ACL_SYNTAX_ERR;
}
str = s;
@@ -1635,12 +1641,15 @@
s = strchr (input_str, '=');
s++; /* skip the = */
__acl_strip_leading_space(&s); /* skip to next significant character */
+ __acl_strip_trailing_space(s);
len = strlen(s); /* Knock off the " and trailing ) */
if (*s == '"' && s[len-1] == '"') {
s[len-1] = '\0';
s++; /* skip the first " */
} else { /* No matching quotes */
-
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "__aclp__init_targetattrfilters: Error: The statement does not begin and end with a \": [%s]\n",
+ s);
return (ACL_SYNTAX_ERR);
}
From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 18:25:16 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
acllas.c, 1.8, 1.9
Message-ID: <200710182225.l9IMPG8c003960@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/acl
Modified Files:
acllas.c
Log Message:
Resolves: bug 297221
Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places.
I added an initialization of a buffer to null, as suggested by nhosoi.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: acllas.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- acllas.c 18 Oct 2007 00:08:27 -0000 1.8
+++ acllas.c 18 Oct 2007 22:25:13 -0000 1.9
@@ -3027,6 +3027,14 @@
/* Convert the filter string */
f = slapi_str2filter ( ludp->lud_filter );
+ if (f == NULL) { /* bogus filter */
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "DS_LASUserAttrEval: The member URL search filter in entry [%s] is not valid: [%s]\n",
+ n_clientdn, ludp->lud_filter);
+ ldap_free_urldesc( ludp );
+ return ACL_FALSE;
+ }
+
rc = ACL_TRUE;
if (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock,
aclpb->aclpb_client_entry, f, 0 /* no acces chk */ ))
From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 18:25:16 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/dna
dna.c, 1.2, 1.3
Message-ID: <200710182225.l9IMPGhU003966@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/dna
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/dna
Modified Files:
dna.c
Log Message:
Resolves: bug 297221
Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places.
I added an initialization of a buffer to null, as suggested by nhosoi.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: dna.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/dna/dna.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dna.c 18 Oct 2007 00:08:28 -0000 1.2
+++ dna.c 18 Oct 2007 22:25:14 -0000 1.3
@@ -512,7 +512,12 @@
value = slapi_entry_attr_get_charptr(e, DNA_FILTER);
if (value) {
- entry->filter = slapi_str2filter(value);
+ if (NULL == (entry->filter = slapi_str2filter(value))) {
+ slapi_log_error(SLAPI_LOG_FATAL, DNA_PLUGIN_SUBSYSTEM ,
+ "Error: Invalid search filter in entry [%s]: [%s]\n",
+ entry->dn, value);
+ goto bail;
+ }
}
else
goto bail;
@@ -1170,6 +1175,7 @@
printf("<---- prefix ---------> %s\n", entry->prefix);
printf("<---- next value -----> %lu\n", entry->nextval);
printf("<---- interval -------> %lu\n", entry->interval);
+ buffer[0] = '\0';
printf("<---- filter ---------> %s\n",
slapi_filter_to_string_internal((const struct slapi_filter *)entry->filter, buffer, &bufsiz));
printf("<---- generate flag --> %s\n", entry->generate);
From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 18:25:16 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/plugins/statechange statechange.c, 1.6, 1.7
Message-ID: <200710182225.l9IMPGBE003973@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/plugins/statechange
Modified Files:
statechange.c
Log Message:
Resolves: bug 297221
Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places.
I added an initialization of a buffer to null, as suggested by nhosoi.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: statechange.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange/statechange.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- statechange.c 10 Nov 2006 23:45:30 -0000 1.6
+++ statechange.c 18 Oct 2007 22:25:14 -0000 1.7
@@ -331,7 +331,17 @@
item->dn = 0;
item->filter = slapi_ch_strdup(filter);
item->caller_data = caller_data;
- item->realfilter = slapi_str2filter(writable_filter);
+ if (NULL == (item->realfilter = slapi_str2filter(writable_filter))) {
+ slapi_log_error(SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM,
+ "Error: invalid filter in statechange entry [%s]: [%s]\n",
+ dn, filter);
+ slapi_ch_free_string(&item->caller_id);
+ slapi_ch_free_string(&item->dn);
+ slapi_ch_free_string(&item->filter);
+ slapi_ch_free_string(&writable_filter);
+ slapi_ch_free((void **)&item);
+ return -1;
+ }
item->func = func;
slapi_lock_mutex(buffer_lock);
From fedora-directory-commits at redhat.com Thu Oct 18 22:25:16 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 18:25:16 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd
index_subsystem.c, 1.7, 1.8
Message-ID: <200710182225.l9IMPGst003980@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3904/ldapserver/ldap/servers/slapd
Modified Files:
index_subsystem.c
Log Message:
Resolves: bug 297221
Bug Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: nhosoi (Thanks!)
Fix Description: The problem was that we were not checking the return value of slapi_str2filter(). I added a check at the crash site, and it will not print out a helpful error message. I did a search through the code looking for other similar places and found a couple. I added similar code in those places.
I added an initialization of a buffer to null, as suggested by nhosoi.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Index: index_subsystem.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/index_subsystem.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- index_subsystem.c 18 Oct 2007 00:08:34 -0000 1.7
+++ index_subsystem.c 18 Oct 2007 22:25:14 -0000 1.8
@@ -1030,7 +1030,7 @@
Slapi_Filter *tmp_f = slapi_str2filter(registration_item->index_filter);
Slapi_Backend *be;
- if(!theCache)
+ if(!theCache || !tmp_f)
return -1;
index_subsys_write_lock();
From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 18:40:20 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/plugins/replication repl5_plugins.c,
1.9, 1.10 repl5_replica.c, 1.15, 1.16
Message-ID: <200710182240.l9IMeK42004948@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/plugins/replication
Modified Files:
repl5_plugins.c repl5_replica.c
Log Message:
Resolves #329951
Summary: MMR: Supplier does not respond anymore after many operations (deletes)
Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the
entry is RUV. The operation should not be blocked at the backend SERIAL lock
(this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag).
But updating RUV has nothing to do with VLV, thus if the flag is set, it skips
the VLV indexing.
Index: repl5_plugins.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- repl5_plugins.c 18 Oct 2007 00:08:31 -0000 1.9
+++ repl5_plugins.c 18 Oct 2007 22:40:17 -0000 1.10
@@ -846,39 +846,39 @@
static void
copy_operation_parameters(Slapi_PBlock *pb)
{
- Slapi_Operation *op = NULL;
- struct slapi_operation_parameters *op_params;
- supplier_operation_extension *opext;
+ Slapi_Operation *op = NULL;
+ struct slapi_operation_parameters *op_params;
+ supplier_operation_extension *opext;
Object *repl_obj;
Replica *replica;
-
+
repl_obj = replica_get_replica_for_op (pb);
/* we are only interested in the updates to replicas */
if (repl_obj)
{
/* we only save the original operation parameters for replicated operations
- since client operations don't go through urp engine and pblock data can be logged */
- slapi_pblock_get( pb, SLAPI_OPERATION, &op );
- PR_ASSERT (op);
+ since client operations don't go through urp engine and pblock data can be logged */
+ slapi_pblock_get( pb, SLAPI_OPERATION, &op );
+ PR_ASSERT (op);
replica = (Replica*)object_get_data (repl_obj);
- PR_ASSERT (replica);
+ PR_ASSERT (replica);
opext = (supplier_operation_extension*) repl_sup_get_ext (REPL_SUP_EXT_OP, op);
- if (operation_is_flag_set(op,OP_FLAG_REPLICATED) &&
+ if (operation_is_flag_set(op,OP_FLAG_REPLICATED) &&
!operation_is_flag_set(op, OP_FLAG_REPL_FIXUP))
- {
- slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params);
- opext->operation_parameters= operation_parameters_dup(op_params);
- }
-
- /* this condition is needed to avoid re-entering lock when
- ruv state is updated */
+ {
+ slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params);
+ opext->operation_parameters= operation_parameters_dup(op_params);
+ }
+
+ /* this condition is needed to avoid re-entering backend serial lock
+ when ruv state is updated */
if (!operation_is_flag_set(op, OP_FLAG_REPL_FIXUP))
{
- /* save replica generation in case it changes */
- opext->repl_gen = replica_get_generation (replica);
+ /* save replica generation in case it changes */
+ opext->repl_gen = replica_get_generation (replica);
}
object_release (repl_obj);
Index: repl5_replica.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- repl5_replica.c 18 Oct 2007 00:08:31 -0000 1.15
+++ repl5_replica.c 18 Oct 2007 22:40:17 -0000 1.16
@@ -2258,7 +2258,8 @@
RUV_STORAGE_ENTRY_UNIQUEID,
repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION),
/* Add OP_FLAG_TOMBSTONE_ENTRY so that this doesn't get logged in the Retro ChangeLog */
- OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY);
+ OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY |
+ OP_FLAG_REPL_RUV );
slapi_modify_internal_pb (pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
@@ -2732,7 +2733,8 @@
e,
NULL /* controls */,
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION),
- OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP);
+ OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP |
+ OP_FLAG_REPL_RUV);
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
if (return_value == LDAP_SUCCESS)
@@ -3064,7 +3066,7 @@
NULL, /* controls */
RUV_STORAGE_ENTRY_UNIQUEID,
repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION),
- OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP);
+ OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_REPL_RUV);
slapi_modify_internal_pb (pb);
From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 18:40:20 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd
slapi-private.h, 1.19, 1.20
Message-ID: <200710182240.l9IMeKEh004954@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/slapd
Modified Files:
slapi-private.h
Log Message:
Resolves #329951
Summary: MMR: Supplier does not respond anymore after many operations (deletes)
Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the
entry is RUV. The operation should not be blocked at the backend SERIAL lock
(this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag).
But updating RUV has nothing to do with VLV, thus if the flag is set, it skips
the VLV indexing.
Index: slapi-private.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- slapi-private.h 18 Oct 2007 00:08:34 -0000 1.19
+++ slapi-private.h 18 Oct 2007 22:40:18 -0000 1.20
@@ -382,27 +382,43 @@
/* operation.c */
-#define OP_FLAG_PS 0x00001
-#define OP_FLAG_PS_CHANGESONLY 0x00002
-#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004
-#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */
-#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, generated as a
- * consequence of a Replicated Operation. */
-#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by the core
- * server or a plugin. */
-#define OP_FLAG_ACTION_LOG_ACCESS 0x00040
-#define OP_FLAG_ACTION_LOG_AUDIT 0x00080
-#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100
-#define OP_FLAG_ACTION_LOG_CHANGES 0x00200
-#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400
-#define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */
-#define OP_FLAG_TOMBSTONE_ENTRY 0x01000
-#define OP_FLAG_RESURECT_ENTRY 0x02000
-#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy replication DN */
-#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in audit log or
- * change log */
-#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the modifiersname,
- * modifiedtimestamp, etc. attributes */
+#define OP_FLAG_PS 0x00001
+#define OP_FLAG_PS_CHANGESONLY 0x00002
+#define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004
+#define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */
+#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation,
+ * generated as a consequence
+ * of a Replicated Operation.
+ */
+#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by
+ * the core server or a plugin.
+ */
+#define OP_FLAG_ACTION_LOG_ACCESS 0x00040
+#define OP_FLAG_ACTION_LOG_AUDIT 0x00080
+#define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100
+#define OP_FLAG_ACTION_LOG_CHANGES 0x00200
+#define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400
+#define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */
+#define OP_FLAG_TOMBSTONE_ENTRY 0x01000
+#define OP_FLAG_RESURECT_ENTRY 0x02000
+#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy
+ * replication DN
+ */
+#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in
+ * audit log or change log
+ */
+#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the
+ * modifiersname,
+ * modifiedtimestamp, etc.
+ * attributes
+ */
+#define OP_FLAG_REPL_RUV 0x20000 /* Flag to tell to the backend
+ * that the entry to be added/
+ * modified is RUV. This info
+ * is used to skip VLV op.
+ * (see #329951)
+ */
+
CSN *operation_get_csn(Slapi_Operation *op);
void operation_set_csn(Slapi_Operation *op,CSN *csn);
From fedora-directory-commits at redhat.com Thu Oct 18 22:40:20 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 18:40:20 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm
ldbm_add.c, 1.7, 1.8 ldbm_delete.c, 1.7, 1.8 ldbm_modify.c,
1.5, 1.6 ldbm_modrdn.c, 1.6, 1.7
Message-ID: <200710182240.l9IMeKpS004960@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/slapd/back-ldbm
Modified Files:
ldbm_add.c ldbm_delete.c ldbm_modify.c ldbm_modrdn.c
Log Message:
Resolves #329951
Summary: MMR: Supplier does not respond anymore after many operations (deletes)
Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the
entry is RUV. The operation should not be blocked at the backend SERIAL lock
(this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag).
But updating RUV has nothing to do with VLV, thus if the flag is set, it skips
the VLV indexing.
Index: ldbm_add.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_add.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldbm_add.c 1 Oct 2007 18:52:35 -0000 1.7
+++ ldbm_add.c 18 Oct 2007 22:40:18 -0000 1.8
@@ -104,6 +104,7 @@
int is_resurect_operation= 0;
int is_tombstone_operation= 0;
int is_fixup_operation= 0;
+ int is_ruv = 0; /* True if the current entry is RUV */
CSN *opcsn = NULL;
entry_address addr;
@@ -118,12 +119,13 @@
is_resurect_operation= operation_is_flag_set(operation,OP_FLAG_RESURECT_ENTRY);
is_tombstone_operation= operation_is_flag_set(operation,OP_FLAG_TOMBSTONE_ENTRY);
- is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP);
+ is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
-
- slapi_sdn_init(&sdn);
- slapi_sdn_init(&parentsdn);
+
+ slapi_sdn_init(&sdn);
+ slapi_sdn_init(&parentsdn);
/* Get rid of ldbm backend attributes that you are not allowed to specify yourself */
slapi_entry_delete_values( e, hassubordinates, NULL );
@@ -145,7 +147,7 @@
dblock_acquired= 1;
}
- rc= 0;
+ rc= 0;
/*
* We are about to pass the last abandon test, so from now on we are
@@ -166,8 +168,8 @@
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY);
}
rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY);
- rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_PARENT_ENTRY);
- while(rc!=0)
+ rc= slapi_setbit_int(rc,SLAPI_RTN_BIT_FETCH_PARENT_ENTRY);
+ while(rc!=0)
{
/* JCM - copying entries can be expensive... should optimize */
/*
@@ -175,20 +177,20 @@
* backend pre-op plugin. To ensure a consistent snapshot of this state
* we wrap the reading of the entry with the dblock.
*/
- if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY))
+ if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_UNIQUEID_ENTRY))
{
- /* Check if an entry with the intended uniqueid already exists. */
+ /* Check if an entry with the intended uniqueid already exists. */
done_with_pblock_entry(pb,SLAPI_ADD_EXISTING_UNIQUEID_ENTRY); /* Could be through this multiple times */
addr.dn = NULL;
addr.uniqueid = (char*)slapi_entry_get_uniqueid(e); /* jcm - cast away const */
ldap_result_code= get_copy_of_entry(pb, &addr, &txn, SLAPI_ADD_EXISTING_UNIQUEID_ENTRY, !is_replicated_operation);
}
- if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY))
+ if(slapi_isbitset_int(rc,SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY))
{
slapi_pblock_get( pb, SLAPI_ADD_TARGET, &dn );
- slapi_sdn_set_dn_byref(&sdn, dn);
+ slapi_sdn_set_dn_byref(&sdn, dn);
slapi_sdn_get_backend_parent(&sdn,&parentsdn,pb->pb_backend);
- /* Check if an entry with the intended DN already exists. */
+ /* Check if an entry with the intended DN already exists. */
done_with_pblock_entry(pb,SLAPI_ADD_EXISTING_DN_ENTRY); /* Could be through this multiple times */
addr.dn = dn;
addr.uniqueid = NULL;
@@ -206,24 +208,24 @@
/* need to set parentsdn or parentuniqueid if either is not set? */
}
- /* Call the Backend Pre Add plugins */
+ /* Call the Backend Pre Add plugins */
slapi_pblock_set(pb, SLAPI_RESULT_CODE, &ldap_result_code);
- rc= plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_ADD_FN);
- if(rc==-1)
- {
+ rc= plugin_call_plugins(pb, SLAPI_PLUGIN_BE_PRE_ADD_FN);
+ if(rc==-1)
+ {
/*
* Plugin indicated some kind of failure,
* or that this Operation became a No-Op.
*/
slapi_pblock_get(pb, SLAPI_RESULT_CODE, &ldap_result_code);
- goto error_return;
- }
+ goto error_return;
+ }
/*
* (rc!=-1 && rc!= 0) means that the plugin changed things, so we go around
* the loop once again to get the new present state.
*/
/* JCMREPL - Warning: A Plugin could cause an infinite loop by always returning a result code that requires some action. */
- }
+ }
/*
* Originally (in the U-M LDAP 3.3 code), there was a comment near this
@@ -237,7 +239,7 @@
/*
* Fetch the parent entry and acquire the cache lock.
*/
- if(have_parent_address(&parentsdn, operation->o_params.p.p_add.parentuniqueid))
+ if(have_parent_address(&parentsdn, operation->o_params.p.p_add.parentuniqueid))
{
addr.dn = (char*)slapi_sdn_get_dn (&parentsdn);
addr.uniqueid = operation->o_params.p.p_add.parentuniqueid;
@@ -255,13 +257,13 @@
modify_init(&parent_modify_c,parententry);
}
- /* Check if the entry we have been asked to add already exists */
+ /* Check if the entry we have been asked to add already exists */
{
Slapi_Entry *entry;
slapi_pblock_get( pb, SLAPI_ADD_EXISTING_DN_ENTRY, &entry);
if ( entry != NULL )
{
- /* The entry already exists */
+ /* The entry already exists */
ldap_result_code= LDAP_ALREADY_EXISTS;
goto error_return;
}
@@ -283,7 +285,7 @@
if ( ancestorentry != NULL )
{
int sentreferral= check_entry_for_referral(pb, ancestorentry->ep_entry, backentry_get_ndn(ancestorentry), "ldbm_back_add");
- cache_return( &inst->inst_cache, &ancestorentry );
+ cache_return( &inst->inst_cache, &ancestorentry );
if(sentreferral)
{
ldap_result_code= -1; /* The result was sent by check_entry_for_referral */
@@ -316,7 +318,7 @@
tombstoneentry = find_entry2modify( pb, be, &addr, NULL );
if ( tombstoneentry==NULL )
{
- ldap_result_code= -1;
+ ldap_result_code= -1;
goto error_return; /* error result sent by find_entry2modify() */
}
tombstone_in_cache = 1;
@@ -324,7 +326,7 @@
addingentry = backentry_dup( tombstoneentry );
if ( addingentry==NULL )
{
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
/*
@@ -405,8 +407,8 @@
addingentry = backentry_init( e );
if ( ( addingentry->ep_id = next_id( be ) ) >= MAXID ) {
LDAPDebug( LDAP_DEBUG_ANY,
- "add: maximum ID reached, cannot add entry to "
- "backend '%s'", be->be_name, 0, 0 );
+ "add: maximum ID reached, cannot add entry to "
+ "backend '%s'", be->be_name, 0, 0 );
ldap_result_code = LDAP_OPERATIONS_ERROR;
goto error_return;
}
@@ -436,11 +438,11 @@
/* Directly add the entry as a tombstone */
/*
* 1) If the entry has an existing DN, change it to be
- * "nsuniqueid=, "
+ * "nsuniqueid=, "
* 2) Add the objectclass value "tombstone" and arrange for only
- * that value to be indexed.
+ * that value to be indexed.
* 3) If the parent entry was found, set the nsparentuniqueid
- * attribute to be the unique id of that parent.
+ * attribute to be the unique id of that parent.
*/
char *untombstoned_dn = slapi_entry_get_dn(e);
if (NULL == untombstoned_dn)
@@ -476,13 +478,13 @@
struct backentry *ancestorentry;
LDAPDebug( LDAP_DEBUG_TRACE,
- "parent does not exist, pdn = %s\n",
- slapi_sdn_get_dn(&parentsdn), 0, 0 );
+ "parent does not exist, pdn = %s\n",
+ slapi_sdn_get_dn(&parentsdn), 0, 0 );
ancestorentry = dn2ancestor(be, &parentsdn, &ancestordn, &txn, &err );
cache_return( &inst->inst_cache, &ancestorentry );
- ldap_result_code= LDAP_NO_SUCH_OBJECT;
+ ldap_result_code= LDAP_NO_SUCH_OBJECT;
ldap_result_matcheddn= slapi_ch_strdup((char *)slapi_sdn_get_dn(&ancestordn)); /* jcm - cast away const. */
slapi_sdn_done(&ancestordn);
goto error_return;
@@ -502,8 +504,8 @@
if ( !isroot && !is_replicated_operation)
{
LDAPDebug( LDAP_DEBUG_TRACE, "no parent & not root\n",
- 0, 0, 0 );
- ldap_result_code= LDAP_INSUFFICIENT_ACCESS;
+ 0, 0, 0 );
+ ldap_result_code= LDAP_INSUFFICIENT_ACCESS;
goto error_return;
}
parententry = NULL;
@@ -527,7 +529,7 @@
/*
* add the parentid, entryid and entrydn operational attributes
*/
- add_update_entry_operational_attributes(addingentry, pid);
+ add_update_entry_operational_attributes(addingentry, pid);
}
/* Tentatively add the entry to the cache. We do this after adding any
@@ -560,7 +562,7 @@
retval = parent_update_on_childchange(&parent_modify_c,1,NULL); /* 1==add */\
/* The modify context now contains info needed later */
if (0 != retval) {
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
parent_found = 1;
@@ -577,10 +579,10 @@
/* We're re-trying */
LDAPDebug( LDAP_DEBUG_TRACE, "Add Retrying Transaction\n", 0, 0, 0 );
#ifndef LDBM_NO_BACKOFF_DELAY
- {
- PRIntervalTime interval;
- interval = PR_MillisecondsToInterval(slapi_rand() % 100);
- DS_Sleep(interval);
+ {
+ PRIntervalTime interval;
+ interval = PR_MillisecondsToInterval(slapi_rand() % 100);
+ DS_Sleep(interval);
}
#endif
}
@@ -682,7 +684,7 @@
}
if (retval != 0) {
LDAPDebug( LDAP_DEBUG_ANY, "add: attempt to index %lu failed\n",
- (u_long)addingentry->ep_id, 0, 0 );
+ (u_long)addingentry->ep_id, 0, 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
disk_full = 1;
ldap_result_code= LDAP_OPERATIONS_ERROR;
@@ -705,38 +707,41 @@
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
disk_full = 1;
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto diskfull_return;
}
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
}
- /*
- * Update the Virtual List View indexes
- */
- retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry);
- if (DB_LOCK_DEADLOCK == retval)
+ /*
+ * Update the Virtual List View indexes
+ */
+ if (!is_ruv)
{
- LDAPDebug( LDAP_DEBUG_ARGS, "add DEADLOCK vlv_update_index\n", 0, 0, 0 );
- /* Retry txn */
- continue;
- }
- if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_index failed, err=%d %s\n",
- retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
- if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
- disk_full = 1;
+ retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry);
+ if (DB_LOCK_DEADLOCK == retval) {
+ LDAPDebug( LDAP_DEBUG_ARGS,
+ "add DEADLOCK vlv_update_index\n", 0, 0, 0 );
+ /* Retry txn */
+ continue;
+ }
+ if (0 != retval) {
+ LDAPDebug( LDAP_DEBUG_TRACE,
+ "vlv_update_index failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ if (LDBM_OS_ERR_IS_DISKFULL(retval)) {
+ disk_full = 1;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
+ goto diskfull_return;
+ }
ldap_result_code= LDAP_OPERATIONS_ERROR;
- goto diskfull_return;
+ goto error_return;
}
- ldap_result_code= LDAP_OPERATIONS_ERROR;
- goto error_return;
}
- if (retval == 0 ) {
+ if (retval == 0) {
break;
}
-
}
if (retry_count == RETRY_TIMES) {
/* Failed */
@@ -760,9 +765,9 @@
if (cache_replace( &inst->inst_cache, tombstoneentry, addingentry ) != 0 )
{
/* This happens if the dn of addingentry already exists */
- ldap_result_code= LDAP_ALREADY_EXISTS;
+ ldap_result_code= LDAP_ALREADY_EXISTS;
cache_unlock_entry( &inst->inst_cache, tombstoneentry );
- goto error_return;
+ goto error_return;
}
/*
* The tombstone was locked down in the cache... we can
@@ -844,9 +849,9 @@
{
dblayer_unlock_backend(be);
}
- if(ldap_result_code!=-1)
+ if(ldap_result_code!=-1)
{
- slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL );
+ slapi_send_ldap_result( pb, ldap_result_code, ldap_result_matcheddn, ldap_result_message, 0, NULL );
}
slapi_sdn_done(&sdn);
slapi_sdn_done(&parentsdn);
Index: ldbm_delete.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_delete.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ldbm_delete.c 10 Nov 2006 23:45:39 -0000 1.7
+++ ldbm_delete.c 18 Oct 2007 22:40:18 -0000 1.8
@@ -73,6 +73,7 @@
Slapi_Operation *operation;
CSN *opcsn = NULL;
int is_fixup_operation = 0;
+ int is_ruv = 0; /* True if the current entry is RUV */
int is_replicated_operation= 0;
int is_tombstone_entry = 0; /* True if the current entry is alreday a tombstone */
int delete_tombstone_entry = 0; /* We must remove the given tombstone entry from the DB */
@@ -95,7 +96,8 @@
slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid);
}
- is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP);
+ is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
delete_tombstone_entry = operation_is_flag_set(operation, OP_FLAG_TOMBSTONE_ENTRY);
inst = (ldbm_instance *) be->be_instance_info;
@@ -469,7 +471,8 @@
ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
- } else if (delete_tombstone_entry)
+ } /* create_tombstone_entry */
+ else if (delete_tombstone_entry)
{
/*
* We need to remove the Tombstone entry from the remaining indexes:
@@ -521,7 +524,7 @@
goto error_return;
}
}
- }
+ } /* delete_tombstone_entry */
if (parent_found) {
/* Push out the db modifications from the parent entry */
@@ -536,32 +539,31 @@
LDAPDebug( LDAP_DEBUG_TRACE, "delete 3 BAD, err=%d %s\n",
retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
}
/*
* first check if searchentry needs to be removed
* Remove the entry from the Virtual List View indexes.
- *
*/
- if(!delete_tombstone_entry &&
- !vlv_delete_search_entry(pb,e->ep_entry,inst)) {
+ if (!delete_tombstone_entry && !is_ruv &&
+ !vlv_delete_search_entry(pb,e->ep_entry,inst)) {
retval = vlv_update_all_indexes(&txn, be, pb, e, NULL);
+
+ if (DB_LOCK_DEADLOCK == retval)
+ {
+ LDAPDebug( LDAP_DEBUG_ARGS, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 );
+ /* Retry txn */
+ continue;
+ }
+ if (retval != 0 ) {
+ if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
+ goto error_return;
+ }
}
-
- if (DB_LOCK_DEADLOCK == retval)
- {
- LDAPDebug( LDAP_DEBUG_ARGS, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 );
- /* Retry txn */
- continue;
- }
- if (retval != 0 ) {
- if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
- ldap_result_code= LDAP_OPERATIONS_ERROR;
- goto error_return;
- }
- if (retval == 0 ) {
+ if (retval == 0 ) {
break;
}
}
Index: ldbm_modify.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modify.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ldbm_modify.c 10 Nov 2006 23:45:39 -0000 1.5
+++ ldbm_modify.c 18 Oct 2007 22:40:18 -0000 1.6
@@ -131,12 +131,18 @@
back_txn *txn)
{
static char *function_name = "modify_update_all";
+ Slapi_Operation *operation;
+ int is_ruv = 0; /* True if the current entry is RUV */
int retval = 0;
- /*
- * Update the ID to Entry index.
- * Note that id2entry_add replaces the entry, so the Entry ID stays the same.
- */
+ if (pb) { /* pb could be NULL if it's called from import */
+ slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
+ }
+ /*
+ * Update the ID to Entry index.
+ * Note that id2entry_add replaces the entry, so the Entry ID stays the same.
+ */
retval = id2entry_add( be, mc->new_entry, txn );
if ( 0 != retval ) {
if (DB_LOCK_DEADLOCK != retval)
@@ -153,13 +159,13 @@
}
goto error;
}
- /*
- * Remove the old entry from the Virtual List View indexes.
- * Add the new entry to the Virtual List View indexes.
+ /*
+ * Remove the old entry from the Virtual List View indexes.
+ * Add the new entry to the Virtual List View indexes.
* Because the VLV code calls slapi_filter_test(), which requires a pb (why?),
* we allow the caller sans pb to get everything except vlv indexing.
- */
- if (NULL != pb) {
+ */
+ if (NULL != pb && !is_ruv) {
retval= vlv_update_all_indexes(txn, be, pb, mc->old_entry, mc->new_entry);
if ( 0 != retval ) {
if (DB_LOCK_DEADLOCK != retval)
@@ -189,7 +195,7 @@
char *errbuf = NULL;
int retry_count = 0;
int disk_full = 0;
- int ldap_result_code= LDAP_SUCCESS;
+ int ldap_result_code= LDAP_SUCCESS;
char *ldap_result_message= NULL;
int rc = 0;
Slapi_Operation *operation;
@@ -198,6 +204,7 @@
int change_entry = 0;
int ec_in_cache = 0;
int is_fixup_operation= 0;
+ int is_ruv = 0; /* True if the current entry is RUV */
CSN *opcsn = NULL;
int repl_op;
@@ -208,7 +215,8 @@
slapi_pblock_get( pb, SLAPI_PARENT_TXN, (void**)&parent_txn );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op);
- is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP);
+ is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
dblayer_txn_init(li,&txn);
@@ -221,15 +229,14 @@
* operations that the URP code in the Replication
* plugin generates.
*/
- if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP))
- {
+ if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP)) {
dblayer_lock_backend(be);
dblock_acquired= 1;
}
/* find and lock the entry we are about to modify */
if ( (e = find_entry2modify( pb, be, addr, NULL )) == NULL ) {
- ldap_result_code= -1;
+ ldap_result_code= -1;
goto error_return; /* error result sent by find_entry2modify() */
}
@@ -260,7 +267,7 @@
/* create a copy of the entry and apply the changes to it */
if ( (ec = backentry_dup( e )) == NULL ) {
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
@@ -276,10 +283,10 @@
{
Slapi_Mods smods;
- CSN *csn = operation_get_csn(operation);
+ CSN *csn = operation_get_csn(operation);
slapi_mods_init_byref(&smods,mods);
if ( (change_entry = mods_have_effect (ec->ep_entry, &smods)) ) {
- ldap_result_code = entry_apply_mods_wsi(ec->ep_entry, &smods, csn, operation_is_flag_set(operation,OP_FLAG_REPLICATED));
+ ldap_result_code = entry_apply_mods_wsi(ec->ep_entry, &smods, csn, operation_is_flag_set(operation,OP_FLAG_REPLICATED));
/*
* XXXmcs: it would be nice to get back an error message from
* the above call so we could pass it along to the client, e.g.,
@@ -356,8 +363,8 @@
dblayer_txn_abort(li,&txn);
LDAPDebug( LDAP_DEBUG_TRACE, "Modify Retrying Transaction\n", 0, 0, 0 );
#ifndef LDBM_NO_BACKOFF_DELAY
- {
- PRIntervalTime interval;
+ {
+ PRIntervalTime interval;
interval = PR_MillisecondsToInterval(slapi_rand() % 100);
DS_Sleep(interval);
}
@@ -373,10 +380,10 @@
goto error_return;
}
- /*
- * Update the ID to Entry index.
- * Note that id2entry_add replaces the entry, so the Entry ID stays the same.
- */
+ /*
+ * Update the ID to Entry index.
+ * Note that id2entry_add replaces the entry, so the Entry ID stays the same.
+ */
retval = id2entry_add( be, ec, &txn );
if (DB_LOCK_DEADLOCK == retval)
{
@@ -404,37 +411,41 @@
ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
- /*
- * Remove the old entry from the Virtual List View indexes.
- * Add the new entry to the Virtual List View indexes.
- */
- retval= vlv_update_all_indexes(&txn, be, pb, e, ec);
- if (DB_LOCK_DEADLOCK == retval)
- {
- /* Abort and re-try */
- continue;
- }
- if (0 != retval) {
- LDAPDebug( LDAP_DEBUG_ANY, "vlv_update_index failed, err=%d %s\n",
- retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
- if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
- ldap_result_code= LDAP_OPERATIONS_ERROR;
- goto error_return;
- }
+ /*
+ * Remove the old entry from the Virtual List View indexes.
+ * Add the new entry to the Virtual List View indexes.
+ * If the entry is ruv, no need to update vlv.
+ */
+ if (!is_ruv) {
+ retval= vlv_update_all_indexes(&txn, be, pb, e, ec);
+ if (DB_LOCK_DEADLOCK == retval)
+ {
+ /* Abort and re-try */
+ continue;
+ }
+ if (0 != retval) {
+ LDAPDebug( LDAP_DEBUG_ANY,
+ "vlv_update_index failed, err=%d %s\n",
+ retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
+ goto error_return;
+ }
+ }
if (0 == retval) {
break;
}
}
if (retry_count == RETRY_TIMES) {
LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in modify\n", 0, 0, 0 );
- ldap_result_code= LDAP_OPERATIONS_ERROR;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
goto error_return;
}
if (cache_replace( &inst->inst_cache, e, ec ) != 0 ) {
- ldap_result_code= LDAP_OPERATIONS_ERROR;
- goto error_return;
+ ldap_result_code= LDAP_OPERATIONS_ERROR;
+ goto error_return;
}
postentry = slapi_entry_dup( ec->ep_entry );
@@ -473,7 +484,7 @@
}
else
{
- backentry_free(&ec);
+ backentry_free(&ec);
}
if ( postentry != NULL )
{
Index: ldbm_modrdn.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ldbm_modrdn.c 10 Nov 2006 23:45:39 -0000 1.6
+++ ldbm_modrdn.c 18 Oct 2007 22:40:18 -0000 1.7
@@ -113,7 +113,7 @@
slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot );
slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &is_replicated_operation );
- is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP);
+ is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP);
if (pb->pb_conn)
{
@@ -1127,8 +1127,12 @@
ldbm_instance *inst;
int retval= 0;
char *msg;
+ Slapi_Operation *operation;
+ int is_ruv = 0; /* True if the current entry is RUV */
- slapi_pblock_get( pb, SLAPI_BACKEND, &be);
+ slapi_pblock_get( pb, SLAPI_BACKEND, &be );
+ slapi_pblock_get( pb, SLAPI_OPERATION, &operation );
+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV);
inst = (ldbm_instance *) be->be_instance_info;
/*
@@ -1206,17 +1210,21 @@
/*
* Remove the old entry from the Virtual List View indexes.
* Add the new entry to the Virtual List View indexes.
+ * If ruv, we don't have to update vlv.
*/
- retval= vlv_update_all_indexes(ptxn, be, pb, e, ec);
- if (DB_LOCK_DEADLOCK == retval)
- {
- /* Abort and re-try */
- goto error_return;
- }
- if (retval != 0)
+ if (!is_ruv)
{
- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
- goto error_return;
+ retval= vlv_update_all_indexes(ptxn, be, pb, e, ec);
+ if (DB_LOCK_DEADLOCK == retval)
+ {
+ /* Abort and re-try */
+ goto error_return;
+ }
+ if (retval != 0)
+ {
+ LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 );
+ goto error_return;
+ }
}
if (cache_replace( &inst->inst_cache, e, ec ) != 0 ) {
retval= -1;
From fedora-directory-commits at redhat.com Thu Oct 18 23:49:35 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 19:49:35 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd/tools/rsearch infadd.c, 1.5, 1.6
Message-ID: <200710182349.l9INnZSF013224@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13127
Modified Files:
infadd.c
Log Message:
Resolves: #336871
Summary: infadd tool won't start. Fails to load data file (comment #4)
Description: HP compiler does not like to have a function call in a constant
expression.
Index: infadd.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/tools/rsearch/infadd.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- infadd.c 18 Oct 2007 20:26:58 -0000 1.5
+++ infadd.c 18 Oct 2007 23:49:32 -0000 1.6
@@ -157,7 +157,7 @@
AddThread **threads;
PRUint32 total = 0, ntotal = 0;
int counter;
- char familynames[strlen(TEMPLATEDIR) + 19], givennames[strlen(TEMPLATEDIR) + 18];
+ char familynames[sizeof(TEMPLATEDIR) + 19], givennames[sizeof(TEMPLATEDIR) + 18];
srand(time(NULL));
if (argc < 2) {
From fedora-directory-commits at redhat.com Fri Oct 19 01:50:17 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 21:50:17 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
DSMigration.pm.in, 1.19, 1.20
Message-ID: <200710190150.l9J1oHND029935@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29918/ldapserver/ldap/admin/src/scripts
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 338991
Bug Description: obsolete values migrated to target instance
Reviewed by: nhosoi (Thanks!)
Fix Description: When fixing the attributes in the old entry, remove any obsolete attributes.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- DSMigration.pm.in 17 Oct 2007 15:56:53 -0000 1.19
+++ DSMigration.pm.in 19 Oct 2007 01:50:15 -0000 1.20
@@ -549,7 +549,11 @@
my ($ent, $mig, $inst) = @_;
for my $attr (keys %{$ent}) {
my $lcattr = lc $attr;
- if ($transformAttr{$lcattr}) {
+ if ($ignoreOld{$lcattr}) {
+ debug(3, "fixAttrsInEntry: ignoring old invalid or obsolete attr $attr\n");
+ $ent->remove($attr);
+ next;
+ } elsif ($transformAttr{$lcattr}) {
my $newval = &{$transformAttr{$lcattr}}($ent, $attr, $mig, $inst);
if (!$newval) {
debug(2, "Removing attribute $attr from entry ", $ent->getDN(), "\n");
@@ -558,7 +562,7 @@
debug(2, "Setting new value $newval for attribute $attr in entry ", $ent->getDN(), "\n");
$ent->setValues($attr, $newval);
}
- }
+ } # else just keep as is
}
}
From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 22:09:26 -0400
Subject: [Fedora-directory-commits] ldapserver configure.ac, 1.41,
1.42 config.h.in, 1.10, 1.11 configure, 1.72, 1.73
Message-ID: <200710190209.l9J29Qpe004516@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455
Modified Files:
configure.ac config.h.in configure
Log Message:
Resolves: #339031
Summary: Solaris: warnings reported by the Solaris compiler
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- configure.ac 18 Oct 2007 00:08:26 -0000 1.41
+++ configure.ac 19 Oct 2007 02:09:23 -0000 1.42
@@ -310,6 +310,7 @@
AC_DEFINE([sunos5], [1], [SunOS5])
AC_DEFINE([OSVERSION], [509], [OS version])
AC_DEFINE([_REENTRANT], [1], [_REENTRANT])
+ AC_DEFINE([NO_DOMAINNAME], [1], [no getdomainname])
dnl socket nsl and dl are required to link several programs and libdb
LIBSOCKET=-lsocket
AC_SUBST([LIBSOCKET], [$LIBSOCKET])
Index: config.h.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/config.h.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- config.h.in 18 Oct 2007 00:08:26 -0000 1.10
+++ config.h.in 19 Oct 2007 02:09:23 -0000 1.11
@@ -272,6 +272,9 @@
/* Linux */
#undef Linux
+/* no getdomainname */
+#undef NO_DOMAINNAME
+
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- configure 18 Oct 2007 00:08:26 -0000 1.72
+++ configure 19 Oct 2007 02:09:23 -0000 1.73
@@ -23360,6 +23360,11 @@
#define _REENTRANT 1
_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DOMAINNAME 1
+_ACEOF
+
LIBSOCKET=-lsocket
LIBSOCKET=$LIBSOCKET
From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 22:09:26 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/plugins/replication cl5_api.c, 1.19,
1.20 windows_protocol_util.c, 1.37, 1.38
Message-ID: <200710190209.l9J29QxR004523@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455/ldap/servers/plugins/replication
Modified Files:
cl5_api.c windows_protocol_util.c
Log Message:
Resolves: #339031
Summary: Solaris: warnings reported by the Solaris compiler
Index: cl5_api.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_api.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- cl5_api.c 18 Oct 2007 00:08:31 -0000 1.19
+++ cl5_api.c 19 Oct 2007 02:09:24 -0000 1.20
@@ -43,6 +43,7 @@
/* cl5_api.c - implementation of 5.0 style changelog API */
+#include
#include
#include
#if defined( OS_solaris ) || defined( hpux )
@@ -6451,8 +6452,8 @@
if (rc != 0)
{
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name_cl, "_cl5DBCloseFile: "
- "failed to remove (%s) file; libdb error - %d (%s)\n", file->name,
- rc, dblayer_strerror(rc));
+ "failed to remove (%s) file; libdb error - %d (%s)\n",
+ fullpathname, rc, db_strerror(rc));
}
}
Index: windows_protocol_util.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- windows_protocol_util.c 18 Oct 2007 00:08:31 -0000 1.37
+++ windows_protocol_util.c 19 Oct 2007 02:09:24 -0000 1.38
@@ -2256,7 +2256,7 @@
* to trim the DN to only dc components. */
if (suffix = slapi_sdn_get_dn(windows_private_get_windows_subtree(prp->agmt))) {
/* If this isn't found, it is treated as an error below. */
- suffix = (const char *) strcasestr(suffix,"dc=");
+ suffix = (const char *) PL_strcasestr(suffix,"dc=");
}
if (cn && guid && suffix) {
From fedora-directory-commits at redhat.com Fri Oct 19 02:09:26 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Thu, 18 Oct 2007 22:09:26 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm
back-ldbm.h, 1.11, 1.12 ldbm_attrcrypt.c, 1.10, 1.11
Message-ID: <200710190209.l9J29QXJ004530@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4455/ldap/servers/slapd/back-ldbm
Modified Files:
back-ldbm.h ldbm_attrcrypt.c
Log Message:
Resolves: #339031
Summary: Solaris: warnings reported by the Solaris compiler
Index: back-ldbm.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- back-ldbm.h 16 Oct 2007 17:30:58 -0000 1.11
+++ back-ldbm.h 19 Oct 2007 02:09:24 -0000 1.12
@@ -54,8 +54,10 @@
/* needed by at least HPUX and Solaris, to define off64_t */
#ifdef DB_USE_64LFS
+#if !defined(_LARGEFILE64_SOURCE)
#define _LARGEFILE64_SOURCE
#endif
+#endif
/* A bunch of random system headers taken from all the source files, no source file should #include
any system headers now */
Index: ldbm_attrcrypt.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ldbm_attrcrypt.c 18 Oct 2007 00:08:34 -0000 1.10
+++ ldbm_attrcrypt.c 19 Oct 2007 02:09:24 -0000 1.11
@@ -588,7 +588,7 @@
output_buffer_length = in_size + 16;
output_buffer = (unsigned char *)slapi_ch_malloc(output_buffer_length);
/* Now call NSS to do the cipher op */
- iv_item.data = "aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */
+ iv_item.data = (unsigned char *)"aaaaaaaaaaaaaaaa"; /* ptr to an array of IV bytes */
iv_item.len = acs->ace->iv_length; /* length of the array of IV bytes */
security_parameter = slapd_pk11_ParamFromIV(acs->ace->cipher_mechanism, &iv_item);
if (NULL == security_parameter) {
From fedora-directory-commits at redhat.com Fri Oct 19 03:17:58 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 23:17:58 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/ldif
template-suffix-db.ldif.in, 1.1, 1.2
Message-ID: <200710190317.l9J3Hww3013534@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/ldif
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13517/ldapserver/ldap/ldif
Modified Files:
template-suffix-db.ldif.in
Log Message:
Resolves: bug 339041
Bug Description: migration : encryption key entries missing when source is 6.21
Reviewed by: self
Fix Description: Just always create those entries when creating the backend. The server does this at startup, but I guess for this case that occurs too late in the startup process.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: template-suffix-db.ldif.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-suffix-db.ldif.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- template-suffix-db.ldif.in 19 Jun 2007 18:24:57 -0000 1.1
+++ template-suffix-db.ldif.in 19 Oct 2007 03:17:56 -0000 1.2
@@ -7,6 +7,16 @@
nsslapd-suffix: %ds_suffix%
cn: %ds_bename%
+dn: cn=encrypted attribute keys,cn=%ds_bename%,cn=ldbm database,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+cn: encrypted attributes keys
+
+dn: cn=encrypted attributes,cn=%ds_bename%,cn=ldbm database,cn=plugins,cn=config
+objectClass: top
+objectClass: extensibleObject
+cn: encrypted attributes
+
dn: cn="%ds_suffix%",cn=mapping tree,cn=config
objectclass: top
objectclass: extensibleObject
From fedora-directory-commits at redhat.com Fri Oct 19 03:19:10 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 18 Oct 2007 23:19:10 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd ssl.c, 1.15, 1.16
Message-ID: <200710190319.l9J3JAma013560@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13543
Modified Files:
ssl.c
Log Message:
Resolves: bug 336881
Bug Description: qualify warning message when cert8.db is missing
Reviewed by: self
Fix Description: Only warn when both cert8.db and cert7.db are missing. If cert7.db is there, NSS will automatically create cert8.db from it.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: ssl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ssl.c 18 Oct 2007 00:08:34 -0000 1.15
+++ ssl.c 19 Oct 2007 03:19:07 -0000 1.16
@@ -364,10 +364,15 @@
char *filename = slapi_ch_smprintf("%s/cert8.db", dir);
PRStatus status = PR_Access(filename, PR_ACCESS_READ_OK);
if (PR_SUCCESS != status) {
- slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
- "Warning: certificate DB file %s does not exist - SSL initialization will likely fail\n",
- filename);
- }
+ slapi_ch_free_string(&filename);
+ filename = slapi_ch_smprintf("%s/cert7.db", dir);
+ status = PR_Access(filename, PR_ACCESS_READ_OK);
+ if (PR_SUCCESS != status) {
+ slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
+ "Warning: certificate DB file cert8.db nor cert7.db exists - SSL initialization will likely fail\n",
+ filename);
+ }
+ }
slapi_ch_free_string(&filename);
}
From fedora-directory-commits at redhat.com Fri Oct 19 15:36:03 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 11:36:03 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
aclanom.c, 1.6, 1.7 acllas.c, 1.9, 1.10
Message-ID: <200710191536.l9JFa3T3021609@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/plugins/acl
Modified Files:
aclanom.c acllas.c
Log Message:
Resolves: bug 297221
Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: supplemental
Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly.
Index: aclanom.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclanom.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- aclanom.c 10 Nov 2006 23:44:49 -0000 1.6
+++ aclanom.c 19 Oct 2007 15:36:01 -0000 1.7
@@ -238,8 +238,16 @@
}
a_profile->anom_targetinfo[a_numacl].anom_filter = NULL;
- if ( aci->targetFilterStr )
+ if ( aci->targetFilterStr ) {
a_profile->anom_targetinfo[a_numacl].anom_filter = slapi_str2filter ( aci->targetFilterStr );
+ if (NULL == a_profile->anom_targetinfo[a_numacl].anom_filter) {
+ const char *dn = slapi_sdn_get_dn ( aci->aci_sdn );
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "Error: invalid filter [%s] in anonymous aci in entry [%s]\n",
+ aci->targetFilterStr, dn);
+ goto cleanup;
+ }
+ }
i = 0;
srcattrArray = aci->targetAttr;
Index: acllas.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- acllas.c 18 Oct 2007 22:25:13 -0000 1.9
+++ acllas.c 19 Oct 2007 15:36:01 -0000 1.10
@@ -3027,7 +3027,7 @@
/* Convert the filter string */
f = slapi_str2filter ( ludp->lud_filter );
- if (f == NULL) { /* bogus filter */
+ if (ludp->lud_filter && (f == NULL)) { /* bogus filter */
slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"DS_LASUserAttrEval: The member URL search filter in entry [%s] is not valid: [%s]\n",
n_clientdn, ludp->lud_filter);
@@ -3036,8 +3036,8 @@
}
rc = ACL_TRUE;
- if (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock,
- aclpb->aclpb_client_entry, f, 0 /* no acces chk */ ))
+ if (f && (0 != slapi_vattr_filter_test ( aclpb->aclpb_pblock,
+ aclpb->aclpb_client_entry, f, 0 /* no acces chk */ )))
rc = ACL_FALSE;
ldap_free_urldesc( ludp );
@@ -3843,6 +3843,8 @@
int rc = ACL_FALSE;
Slapi_Filter *f = NULL;
+ PR_ASSERT(str);
+
if ((f = slapi_str2filter(str)) == NULL) {
slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
"Warning: Bad targetfilter(%s) in aci: does not match\n", str);
From fedora-directory-commits at redhat.com Fri Oct 19 15:36:03 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 11:36:03 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/plugins/statechange statechange.c, 1.7, 1.8
Message-ID: <200710191536.l9JFa35M021615@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/plugins/statechange
Modified Files:
statechange.c
Log Message:
Resolves: bug 297221
Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: supplemental
Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly.
Index: statechange.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/statechange/statechange.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- statechange.c 18 Oct 2007 22:25:14 -0000 1.7
+++ statechange.c 19 Oct 2007 15:36:01 -0000 1.8
@@ -331,7 +331,8 @@
item->dn = 0;
item->filter = slapi_ch_strdup(filter);
item->caller_data = caller_data;
- if (NULL == (item->realfilter = slapi_str2filter(writable_filter))) {
+ if (writable_filter &&
+ (NULL == (item->realfilter = slapi_str2filter(writable_filter)))) {
slapi_log_error(SLAPI_LOG_FATAL, SCN_PLUGIN_SUBSYSTEM,
"Error: invalid filter in statechange entry [%s]: [%s]\n",
dn, filter);
@@ -341,6 +342,8 @@
slapi_ch_free_string(&writable_filter);
slapi_ch_free((void **)&item);
return -1;
+ } else if (!writable_filter) {
+ item->realfilter = NULL;
}
item->func = func;
From fedora-directory-commits at redhat.com Fri Oct 19 15:36:04 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 11:36:04 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd
plugin_internal_op.c, 1.9, 1.10
Message-ID: <200710191536.l9JFa4to021621@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21558/ldapserver/ldap/servers/slapd
Modified Files:
plugin_internal_op.c
Log Message:
Resolves: bug 297221
Description: rhds71 Malformed Dynamic Authorization Group makes Directory Server Crash
Reviewed by: supplemental
Fix Description: In some cases, it is ok if the filter is NULL. So just allow NULL in those cases. slapi_str2filter must take either NULL or a writable string, so make sure we pass those in correctly.
Index: plugin_internal_op.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_internal_op.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- plugin_internal_op.c 18 Oct 2007 00:08:34 -0000 1.9
+++ plugin_internal_op.c 19 Oct 2007 15:36:01 -0000 1.10
@@ -719,7 +719,7 @@
op->o_search_entry_handler = internal_srch_entry_callback;
op->o_search_referral_handler = internal_ref_entry_callback;
- filter = slapi_str2filter(ifstr ? (fstr = slapi_ch_strdup(ifstr)) : "");
+ filter = slapi_str2filter(ifstr ? (fstr = slapi_ch_strdup(ifstr)) : NULL);
if(scope == LDAP_SCOPE_BASE) filter->f_flags |= (SLAPI_FILTER_LDAPSUBENTRY | SLAPI_FILTER_TOMBSTONE);
if (NULL == filter)
{
From fedora-directory-commits at redhat.com Fri Oct 19 18:20:47 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 14:20:47 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd ssl.c, 1.16, 1.17
Message-ID: <200710191820.l9JIKlRK030014@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29991
Modified Files:
ssl.c
Log Message:
Resolves: bug 340211
Description: ssl acceptance tests are failing
Fix Description: This isn't the full fix, but the error message should print out the directory where it was looking for the missing cert db files.
Index: ssl.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ssl.c 19 Oct 2007 03:19:07 -0000 1.16
+++ ssl.c 19 Oct 2007 18:20:45 -0000 1.17
@@ -369,8 +369,8 @@
status = PR_Access(filename, PR_ACCESS_READ_OK);
if (PR_SUCCESS != status) {
slapi_log_error(SLAPI_LOG_FATAL, "SSL Initialization",
- "Warning: certificate DB file cert8.db nor cert7.db exists - SSL initialization will likely fail\n",
- filename);
+ "Warning: certificate DB file cert8.db nor cert7.db exists in [%s] - SSL initialization will likely fail\n",
+ dir);
}
}
slapi_ch_free_string(&filename);
From fedora-directory-commits at redhat.com Fri Oct 19 18:48:30 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Fri, 19 Oct 2007 14:48:30 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd
connection.c, 1.18, 1.19
Message-ID: <200710191848.l9JImUdx031935@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31841/ldap/servers/slapd
Modified Files:
connection.c
Log Message:
Resolves: 188320
Summary: Don't define _XOPEN_SOURCE_EXTENDED on HP-UX.
Index: connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- connection.c 18 Oct 2007 00:08:34 -0000 1.18
+++ connection.c 19 Oct 2007 18:48:27 -0000 1.19
@@ -254,7 +254,11 @@
/* try syscall since "from" was not given and PR_GetPeerName failed */
/* a corner case */
struct sockaddr_in addr; /* assuming IPv4 */
+#if ( defined( hpux ) )
+ int addrlen;
+#else
socklen_t addrlen;
+#endif
addrlen = sizeof( addr );
memset( &addr, 0, addrlen );
@@ -309,7 +313,11 @@
/* try syscall since c_prfd == NULL */
/* a corner case */
struct sockaddr_in destaddr; /* assuming IPv4 */
+#if ( defined( hpux ) )
+ int destaddrlen;
+#else
socklen_t destaddrlen;
+#endif
destaddrlen = sizeof( destaddr );
memset( &destaddr, 0, destaddrlen );
From fedora-directory-commits at redhat.com Fri Oct 19 18:48:29 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Fri, 19 Oct 2007 14:48:29 -0400
Subject: [Fedora-directory-commits] ldapserver Makefile.in, 1.77,
1.78 aclocal.m4, 1.56, 1.57 config.h.in, 1.11, 1.12 configure,
1.73, 1.74 configure.ac, 1.42, 1.43 ltmain.sh, 1.22, 1.23
Message-ID: <200710191848.l9JImTID031926@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31841
Modified Files:
Makefile.in aclocal.m4 config.h.in configure configure.ac
ltmain.sh
Log Message:
Resolves: 188320
Summary: Don't define _XOPEN_SOURCE_EXTENDED on HP-UX.
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- Makefile.in 18 Oct 2007 00:08:26 -0000 1.77
+++ Makefile.in 19 Oct 2007 18:48:27 -0000 1.78
@@ -852,6 +852,7 @@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLARIS_FALSE = @SOLARIS_FALSE@
Index: aclocal.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- aclocal.m4 18 Oct 2007 00:08:26 -0000 1.56
+++ aclocal.m4 19 Oct 2007 18:48:27 -0000 1.57
@@ -1578,10 +1578,27 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -4288,6 +4305,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -4421,11 +4441,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -4437,7 +4457,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -4517,7 +4537,7 @@
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -6353,6 +6373,7 @@
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6385,6 +6406,7 @@
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
Index: config.h.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/config.h.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- config.h.in 19 Oct 2007 02:09:23 -0000 1.11
+++ config.h.in 19 Oct 2007 18:48:27 -0000 1.12
@@ -347,9 +347,6 @@
/* SVID_GETTOD */
#undef _SVID_GETTOD
-/* To use XOPEN getpeername */
-#undef _XOPEN_SOURCE_EXTENDED
-
/* SVR4 */
#undef __svr4
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- configure 19 Oct 2007 02:09:23 -0000 1.73
+++ configure 19 Oct 2007 18:48:27 -0000 1.74
@@ -465,7 +465,7 @@
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX!
XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -3836,6 +3836,7 @@
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -3870,6 +3871,7 @@
fi
SED=$lt_cv_path_SED
+
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
@@ -4310,7 +4312,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4313 "configure"' > conftest.$ac_ext
+ echo '#line 4315 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5445,7 +5447,7 @@
# Provide some information about the compiler.
-echo "$as_me:5448:" \
+echo "$as_me:5450:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
@@ -6508,11 +6510,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6511: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6513: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6515: \$? = $ac_status" >&5
+ echo "$as_me:6517: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6776,11 +6778,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6779: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6781: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6783: \$? = $ac_status" >&5
+ echo "$as_me:6785: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6880,11 +6882,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6883: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6885: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6887: \$? = $ac_status" >&5
+ echo "$as_me:6889: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8345,10 +8347,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 8354 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -9225,7 +9248,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext < conftest.$ac_ext <&5)
+ (eval echo "\"\$as_me:11694: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11672: \$? = $ac_status" >&5
+ echo "$as_me:11698: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11769,11 +11795,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11772: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11798: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11776: \$? = $ac_status" >&5
+ echo "$as_me:11802: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12301,10 +12327,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 12334 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -12688,6 +12735,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_CXX
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -12821,11 +12871,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_CXX
+predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_CXX
+postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -12837,7 +12887,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -12917,7 +12967,7 @@
link_all_deplibs=$link_all_deplibs_CXX
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -13339,11 +13389,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13342: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13392: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13346: \$? = $ac_status" >&5
+ echo "$as_me:13396: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13443,11 +13493,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13446: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13496: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13450: \$? = $ac_status" >&5
+ echo "$as_me:13500: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14888,10 +14938,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 14945 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15275,6 +15346,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_F77
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -15408,11 +15482,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_F77
+predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_F77
+postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -15424,7 +15498,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -15504,7 +15578,7 @@
link_all_deplibs=$link_all_deplibs_F77
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -15646,11 +15720,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15649: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15723: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15653: \$? = $ac_status" >&5
+ echo "$as_me:15727: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15914,11 +15988,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15917: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15991: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15921: \$? = $ac_status" >&5
+ echo "$as_me:15995: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16018,11 +16092,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16021: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16095: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16025: \$? = $ac_status" >&5
+ echo "$as_me:16099: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17483,10 +17557,31 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '#line 17564 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -17870,6 +17965,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_GCJ
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18003,11 +18101,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_GCJ
+predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_GCJ
+postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18019,7 +18117,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18099,7 +18197,7 @@
link_all_deplibs=$link_all_deplibs_GCJ
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -18351,6 +18449,9 @@
# Is the compiler the GNU C compiler?
with_gcc=$GCC_RC
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
# An ERE matcher.
EGREP=$lt_EGREP
@@ -18484,11 +18585,11 @@
# Dependencies to place before the objects being linked to create a
# shared library.
-predep_objects=$lt_predep_objects_RC
+predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
-postdep_objects=$lt_postdep_objects_RC
+postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
@@ -18500,7 +18601,7 @@
# The library search path used internally by the compiler when linking
# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -18580,7 +18681,7 @@
link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -23243,11 +23344,6 @@
#define _HPUX_SOURCE 1
_ACEOF
-
-cat >>confdefs.h <<\_ACEOF
-#define _XOPEN_SOURCE_EXTENDED 1
-_ACEOF
-
# assume 64 bit
perlexec='/opt/perl_64/bin/perl'
platform="hpux"
@@ -25957,6 +26053,7 @@
s, at CCDEPMODE@,$CCDEPMODE,;t t
s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at SED@,$SED,;t t
s, at EGREP@,$EGREP,;t t
s, at LN_S@,$LN_S,;t t
s, at ECHO@,$ECHO,;t t
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- configure.ac 19 Oct 2007 02:09:23 -0000 1.42
+++ configure.ac 19 Oct 2007 18:48:27 -0000 1.43
@@ -277,7 +277,6 @@
AC_DEFINE([OS_hpux], [1], [OS HP-UX])
AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision])
AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace])
- AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [To use XOPEN getpeername])
# assume 64 bit
perlexec='/opt/perl_64/bin/perl'
platform="hpux"
Index: ltmain.sh
===================================================================
RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ltmain.sh 18 Oct 2007 00:08:26 -0000 1.22
+++ ltmain.sh 19 Oct 2007 18:48:27 -0000 1.23
@@ -46,10 +46,16 @@
VERSION=1.5.22
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
# Check that we have a working $echo.
@@ -105,12 +111,14 @@
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
# Make sure IFS has a sensible default
lt_nl='
@@ -136,6 +144,8 @@
preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
#####################################
# Shell function definitions:
@@ -327,7 +337,17 @@
*) my_xabs=`pwd`"/$my_xlib" ;;
esac
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
- my_xdir="$my_gentop/$my_xlib"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
$show "${rm}r $my_xdir"
$run ${rm}r "$my_xdir"
@@ -758,6 +778,7 @@
*.f90) xform=f90 ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -1138,8 +1159,9 @@
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
fi
@@ -1147,12 +1169,20 @@
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=yes
- else
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
prefer_static_libs=built
- fi
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
break
@@ -1712,7 +1742,7 @@
continue
;;
- -static)
+ -static | -static-libtool-libs)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
@@ -2490,7 +2520,9 @@
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
# Make sure the rpath contains only unique directories.
@@ -3186,7 +3218,7 @@
# which has an extra 1 added just for fun
#
case $version_type in
- darwin|linux|osf|windows)
+ darwin|linux|osf|windows|none)
current=`expr $number_major + $number_minor`
age="$number_minor"
revision="$number_revision"
@@ -3410,11 +3442,11 @@
fi
# Eliminate all temporary directories.
- for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
- done
+# for path in $notinst_path; do
+# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+# done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -3515,13 +3547,12 @@
int main() { return 0; }
EOF
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name=`expr $i : '-l\(.*\)'`
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" && test "$name" -ne "0"; then
+ if test "$name" != "" && test "$name" != "0"; then
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
*" $i "*)
@@ -3560,9 +3591,7 @@
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
- # Did it work?
- if test "$?" -eq 0 ; then
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
case " $predeps $postdeps " in
@@ -3594,7 +3623,7 @@
droppeddeps=yes
$echo
$echo "*** Warning! Library $i is needed by this library but I was not able to"
- $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** make it link in! You will probably need to install it or some"
$echo "*** library that it depends on before this library will be fully"
$echo "*** functional. Installing it before continuing would be even better."
fi
@@ -4239,12 +4268,14 @@
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
generated="$generated $gentop"
@@ -4692,16 +4723,16 @@
case $host in
*cygwin* | *mingw* )
if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
else
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
fi
;;
* )
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
;;
esac
;;
@@ -4716,13 +4747,13 @@
# really was required.
# Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
fi
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
@@ -4809,7 +4840,7 @@
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
else
# fast_install is set to needless
relink_command=
@@ -4846,7 +4877,7 @@
fi
done
relink_command="(cd `pwd`; $relink_command)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
fi
# Quote $echo for shipping.
@@ -5253,6 +5284,18 @@
Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
@@ -5395,7 +5438,7 @@
;;
esac
$echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ \$echo \"\$0: cannot exec \$program \$*\"
exit $EXIT_FAILURE
fi
else
@@ -5581,7 +5624,7 @@
done
# Quote the link command for shipping.
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
if test "$hardcode_automatic" = yes ; then
relink_command=
fi
@@ -5926,9 +5969,9 @@
if test -n "$inst_prefix_dir"; then
# Stick the inst_prefix_dir data into the link command.
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
else
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
fi
$echo "$modename: warning: relinking \`$file'" 1>&2
@@ -6137,7 +6180,7 @@
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
$show "$relink_command"
if $run eval "$relink_command"; then :
@@ -6413,12 +6456,15 @@
fi
# Restore saved environment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
# Now prepare to actually exec the command.
exec_cmd="\$cmd$args"
@@ -6775,9 +6821,9 @@
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
+ try to export only the symbols listed in SYMFILE
-export-symbols-regex REGEX
- try to export only the symbols matching REGEX
+ try to export only the symbols matching REGEX
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME
-module build a library that can dlopened
@@ -6791,9 +6837,11 @@
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
From fedora-directory-commits at redhat.com Fri Oct 19 19:01:18 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 15:01:18 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
aclparse.c, 1.8, 1.9
Message-ID: <200710191901.l9JJ1IsH006243@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6224
Modified Files:
aclparse.c
Log Message:
Resolves: bug 232910
Description: ACI targetattr list parser is whitespace sensitive
Fix Description: I made it too sensitive. The parser should allow simple unquoted strings. However, if it begins with a quote, it must end with a quote.
Index: aclparse.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- aclparse.c 18 Oct 2007 20:55:10 -0000 1.8
+++ aclparse.c 19 Oct 2007 19:01:16 -0000 1.9
@@ -1234,14 +1234,21 @@
__acl_strip_leading_space(&s);
__acl_strip_trailing_space(s);
len = strlen(s);
- if (*s == '"' && s[len-1] == '"') {
- s[len-1] = '\0';
- s++;
- } else {
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
- "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n",
- s);
- return ACL_SYNTAX_ERR;
+ /* Simple targetattr statements may not be quoted e.g.
+ targetattr=* or targetattr=userPassword
+ if it begins with a quote, it must end with one as well
+ */
+ if (*s == '"') {
+ s++; /* skip leading quote */
+ if (s[len-1] == '"') {
+ s[len-1] = '\0'; /* trim trailing quote */
+ } else {
+ /* error - if it begins with a quote, it must end with a quote */
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n",
+ attr_val);
+ return ACL_SYNTAX_ERR;
+ }
}
str = s;
From fedora-directory-commits at redhat.com Fri Oct 19 20:05:14 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 16:05:14 -0400
Subject: [Fedora-directory-commits] ldapserver/m4 db.m4,1.9,1.10
Message-ID: <200710192005.l9JK5ESo020095@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20058/ldapserver/m4
Modified Files:
db.m4
Log Message:
Resolves: bug 340361
Bug Description: build links wrong libdb on 64-bit systems
Reviewed by: nhosoi (Thanks!)
Fix Description: Once again, libtool attempts to be helpful but is instead harmful. If you have both db4-devel.i386 and db4-devel.x86_64 installed, this will install /usr/lib/libdb-4.N.la. If you use libtool to link with -ldb-4.N, and you do not specify a search path, libtool will attempt to find this library in it's default search path, which is something like /usr/lib/gcc/x86_64/blahblahblah/../../../lib. This will find /usr/lib/libdb-4.N.la and will use the information in that file and link the object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to the linker which is what it ought to do (darn libtool). In order to make libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so that it will use $libdir first in its search path.
Platforms tested: RHEL5 x86_64, RHEL4 x86_64
Flag Day: yes - autotool file changes
Doc impact: no
Index: db.m4
===================================================================
RCS file: /cvs/dirsec/ldapserver/m4/db.m4,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- db.m4 20 Aug 2007 17:49:17 -0000 1.9
+++ db.m4 19 Oct 2007 20:05:12 -0000 1.10
@@ -30,6 +30,8 @@
if test -f "/usr/include/db.h"; then
db_incdir="/usr/include"
db_inc="-I/usr/include"
+ db_lib='-L$(libdir)'
+ db_libdir='$(libdir)'
else
AC_MSG_ERROR([db.h not found])
fi
@@ -59,6 +61,8 @@
AC_MSG_RESULT([using /usr/include/db.h])
db_incdir="/usr/include"
db_inc="-I/usr/include"
+ db_lib='-L$(libdir)'
+ db_libdir='$(libdir)'
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([db not found, specify with --with-db.])
From fedora-directory-commits at redhat.com Fri Oct 19 20:05:15 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 16:05:15 -0400
Subject: [Fedora-directory-commits] ldapserver aclocal.m4, 1.57,
1.58 configure, 1.74, 1.75 missing, 1.42, 1.43 install-sh,
1.42, 1.43 depcomp, 1.42, 1.43 compile, 1.41, 1.42 Makefile.in,
1.78, 1.79 config.sub, 1.41, 1.42 config.guess, 1.41, 1.42
Message-ID: <200710192005.l9JK5Ftx020109@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20058/ldapserver
Modified Files:
aclocal.m4 configure missing install-sh depcomp compile
Makefile.in config.sub config.guess
Log Message:
Resolves: bug 340361
Bug Description: build links wrong libdb on 64-bit systems
Reviewed by: nhosoi (Thanks!)
Fix Description: Once again, libtool attempts to be helpful but is instead harmful. If you have both db4-devel.i386 and db4-devel.x86_64 installed, this will install /usr/lib/libdb-4.N.la. If you use libtool to link with -ldb-4.N, and you do not specify a search path, libtool will attempt to find this library in it's default search path, which is something like /usr/lib/gcc/x86_64/blahblahblah/../../../lib. This will find /usr/lib/libdb-4.N.la and will use the information in that file and link the object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to the linker which is what it ought to do (darn libtool). In order to make libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so that it will use $libdir first in its search path.
Platforms tested: RHEL5 x86_64, RHEL4 x86_64
Flag Day: yes - autotool file changes
Doc impact: no
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- configure 19 Oct 2007 18:48:27 -0000 1.74
+++ configure 19 Oct 2007 20:05:12 -0000 1.75
@@ -24169,6 +24169,8 @@
if test -f "/usr/include/db.h"; then
db_incdir="/usr/include"
db_inc="-I/usr/include"
+ db_lib='-L$(libdir)'
+ db_libdir='$(libdir)'
else
{ { echo "$as_me:$LINENO: error: db.h not found" >&5
echo "$as_me: error: db.h not found" >&2;}
@@ -24207,6 +24209,8 @@
echo "${ECHO_T}using /usr/include/db.h" >&6
db_incdir="/usr/include"
db_inc="-I/usr/include"
+ db_lib='-L$(libdir)'
+ db_libdir='$(libdir)'
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
From fedora-directory-commits at redhat.com Fri Oct 19 22:14:59 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 19 Oct 2007 18:14:59 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
aclparse.c, 1.9, 1.10
Message-ID: <200710192214.l9JMEx2S005416@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5399
Modified Files:
aclparse.c
Log Message:
Resolves: bug 232910
Description: ACI targetattr list parser is whitespace sensitive
Fix Description: In addition to the previous fixes, test for quote at end of string before incrementing s - otherwise test will always fail.
Index: aclparse.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- aclparse.c 19 Oct 2007 19:01:16 -0000 1.9
+++ aclparse.c 19 Oct 2007 22:14:56 -0000 1.10
@@ -1239,16 +1239,16 @@
if it begins with a quote, it must end with one as well
*/
if (*s == '"') {
+ if (s[len-1] == '"') {
+ s[len-1] = '\0'; /* trim trailing quote */
+ } else {
+ /* error - if it begins with a quote, it must end with a quote */
+ slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
+ "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n",
+ attr_val);
+ return ACL_SYNTAX_ERR;
+ }
s++; /* skip leading quote */
- if (s[len-1] == '"') {
- s[len-1] = '\0'; /* trim trailing quote */
- } else {
- /* error - if it begins with a quote, it must end with a quote */
- slapi_log_error(SLAPI_LOG_FATAL, plugin_name,
- "__aclp__init_targetattr: Error: The statement does not begin and end with a \": [%s]\n",
- attr_val);
- return ACL_SYNTAX_ERR;
- }
}
str = s;
From fedora-directory-commits at redhat.com Mon Oct 22 18:29:57 2007
From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder))
Date: Mon, 22 Oct 2007 14:29:57 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/snmp main.c, 1.14, 1.15
Message-ID: <200710221829.l9MITvQR010052@cvs-int.fedora.redhat.com>
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/snmp
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10019
Modified Files:
main.c
Log Message:
Resolves: 344631
Summary: Corrected path generation for loading SNMP stats file.
Index: main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/snmp/main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- main.c 18 Oct 2007 19:20:16 -0000 1.14
+++ main.c 22 Oct 2007 18:29:55 -0000 1.15
@@ -391,11 +391,12 @@
serv_p->port = atol(val);
got_port = 1;
} else if (strcmp(attr, "nsslapd-rundir") == 0) {
- serv_p->stats_file = malloc(vlen + 13);
+ /* 8 = "/" + ".stats" + \0 */
+ serv_p->stats_file = malloc(vlen + strlen(instancename) + 8);
if (serv_p->stats_file != NULL) {
- snprintf(serv_p->stats_file, vlen + 13,
- "%s/%s.stats", instancename, val);
- serv_p->stats_file[(vlen + 12)] = (char)0;
+ snprintf(serv_p->stats_file, vlen + strlen(instancename) + 8,
+ "%s/%s.stats", val, instancename);
+ serv_p->stats_file[(vlen + strlen(instancename) + 7)] = (char)0;
} else {
printf("ldap-agent: malloc error processing config file\n");
free(entry);
From fedora-directory-commits at redhat.com Tue Oct 23 02:13:55 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Mon, 22 Oct 2007 22:13:55 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
DSMigration.pm.in, 1.20, 1.21
Message-ID: <200710230213.l9N2DtxX022238@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22221/ldapserver/ldap/admin/src/scripts
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 345711
Bug Description: migration : ignore idl switch value in 6.21 and earlier
Reviewed by: nhosoi (Thanks!)
Fix Description: If we are migrating a 6.21 or older database, we must not preserve the old idl switch setting, we must use the new default. We also have to use LDIF files for database migration as we cannot reuse the old binary database files.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DSMigration.pm.in 19 Oct 2007 01:50:15 -0000 1.20
+++ DSMigration.pm.in 23 Oct 2007 02:13:53 -0000 1.21
@@ -134,6 +134,37 @@
'aci' => 'aci'
);
+sub getDBVERSION {
+ my $olddbdir = shift;
+ my $data = shift;
+
+ open DBVERSION, "$olddbdir/DBVERSION" or
+ return ('error_reading_dbversion', $olddbdir, $!);
+ my $line = ;
+ close DBVERSION;
+ chomp($line);
+ my @foo = split("/", $line);
+ $data = \@foo;
+ return ();
+}
+
+sub isOldDatabase {
+ my $olddbdir = shift;
+ my $errs = shift; # array ref
+ # check old DBVERSION file
+ my @verinfo;
+ if (@{$errs} = getDBVERSION($olddbdir, \@verinfo)) {
+ return 0;
+ }
+
+ if ((($verinfo[0] =~ /^netscape/i) or ($verinfo[0] =~ /^iplanet/i)) and
+ (($verinfo[1] =~ /^6/) or ($verinfo[1] =~ /^5/) or ($verinfo[1] =~ /^4/))) {
+ return 1;
+ }
+
+ return 0;
+}
+
sub getNewDbDir {
my ($ent, $attr, $mig, $inst) = @_;
my $newval;
@@ -217,7 +248,27 @@
# nsslapd-idl-switch
# if not doing cross platform, meaning we just use the existing
# database binaries, we must preserve whatever the old value is
+ # unless migrating from 6.21 or earlier, in which case we must
+ # be migrating from LDIF, and must use the new idl switch
if (!$mig->{crossplatform}) {
+ # the given entry is the old entry - see if it has the nsslapd-directory
+ my $olddbdir = $ent->getValues('nsslapd-db-home-directory') ||
+ $ent->getValues('nsslapd-directory') ||
+ "$mig->{actualsroot}/$inst/db"; # old default db home directory
+ # replace the old sroot value with the actual physical location on the target/dest
+ $olddbdir =~ s/^$mig->{actualsroot}/$mig->{oldsroot}/;
+ my @errs;
+ my $isold = isOldDatabase($olddbdir, \@errs);
+ if (@errs) {
+ $mig->msg($FATAL, @errs);
+ return $newval; # use default new value
+ } elsif ($isold) {
+ debug(3, "The database in $olddbdir is too old to migrate the idl switch setting\n");
+ return $newval; # use default new value
+ }
+
+ # else the database could be in the new format already - preserve
+ # the user's old value
$newval = $ent->getValues($attr);
}
@@ -241,35 +292,17 @@
'nsslapd-idl-switch' => \&migIdlSwitch
);
-sub getDBVERSION {
- my $olddbdir = shift;
- my $data = shift;
-
- open DBVERSION, "$olddbdir/DBVERSION" or
- return ('error_reading_dbversion', $olddbdir, $!);
- my $line = ;
- close DBVERSION;
- chomp($line);
- my @foo = split("/", $line);
- $data = \@foo;
- return ();
-}
-
sub copyDatabaseDirs {
my $srcdir = shift;
my $destdir = shift;
my $filesonly = shift;
my @errs;
- # check old DBVERSION file
- my @verinfo;
- if (@errs = getDBVERSION($srcdir, \@verinfo)) {
+ my $isold = isOldDatabase($srcdir, \@errs);
+ if (@errs) {
return @errs;
- }
-
- if ((($verinfo[0] =~ /^netscape/i) or ($verinfo[0] =~ /^iplanet/i)) and
- (($verinfo[1] =~ /^6/) or ($verinfo[1] =~ /^5/) or ($verinfo[1] =~ /^4/))) {
- return ('error_database_too_old', $srcdir, @verinfo);
+ } elsif ($isold) {
+ return ('error_database_too_old', $olddbdir, @verinfo);
}
if (-d $srcdir && ! -d $destdir && !$filesonly) {
From fedora-directory-commits at redhat.com Tue Oct 23 16:14:01 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Tue, 23 Oct 2007 12:14:01 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/slapd log.c, 1.19, 1.20
Message-ID: <200710231614.l9NGE1Qb002162@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1693
Modified Files:
log.c
Log Message:
Resolves: #188320
Summary: HP-UX: warnings reported by the HP-UX compiler (Comment #25,26)
Change description: moved the DEBUG_TRACE to the place before deleting the
physical log file.
Index: log.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- log.c 18 Oct 2007 00:08:34 -0000 1.19
+++ log.c 23 Oct 2007 16:13:58 -0000 1.20
@@ -3145,6 +3145,10 @@
return 0;
}
}
+ LDAPDebug(LDAP_DEBUG_TRACE,
+ "LOGINFO:Removing file:%s.%s because of (%s)\n",
+ loginfo.log_error_file, tbuf,
+ logstr);
if (p_delete_logp == delete_logp) {
/* then we are deleteing the first one */
@@ -3159,11 +3163,6 @@
if (PR_Delete(buffer) != PR_SUCCESS) {
LDAPDebug(LDAP_DEBUG_ANY, "LOGINFO:Unable to remove file:%s.%s\n",
loginfo.log_audit_file, tbuf,0);
- } else {
- LDAPDebug(LDAP_DEBUG_TRACE,
- "LOGINFO:Removed file:%s.%s because of (%s)\n",
- loginfo.log_error_file, tbuf,
- logstr);
}
slapi_ch_free((void**)&delete_logp);
loginfo.log_numof_error_logs--;
From fedora-directory-commits at redhat.com Wed Oct 24 18:41:17 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 24 Oct 2007 14:41:17 -0400
Subject: [Fedora-directory-commits]
ldapserver/ldap/servers/plugins/syntaxes value.c, 1.8, 1.9
Message-ID: <200710241841.l9OIfHQo014647@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14369/ldap/servers/plugins/syntaxes
Modified Files:
value.c
Log Message:
Resolves: #339791
Summary: rhds71sp1 rhel3u6 - ns-slapd process dies with segmentation fault
Description: ldap_utf8prev, LDAP_UTF8PREV, and LDAP_UTF8DEC were sometimes
used without checking the returned pointer going back beyond the beginning
of the string.
Index: value.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/value.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- value.c 2 Oct 2007 18:39:50 -0000 1.8
+++ value.c 24 Oct 2007 18:41:15 -0000 1.9
@@ -88,13 +88,14 @@
*/
void
value_normalize(
- char *s,
- int syntax,
+ char *s,
+ int syntax,
int trim_spaces
)
{
- char *d;
- int prevspace, curspace;
+ char *head = s;
+ char *d;
+ int prevspace, curspace;
if ( ! (syntax & SYNTAX_CIS) && ! (syntax & SYNTAX_CES) ) {
return;
@@ -107,10 +108,10 @@
d = s;
if (trim_spaces) {
- /* strip leading blanks */
- while (utf8isspace_fast(s)) {
- LDAP_UTF8INC(s);
- }
+ /* strip leading blanks */
+ while (utf8isspace_fast(s)) {
+ LDAP_UTF8INC(s);
+ }
}
/* for int syntax, look for leading sign, then trim 0s */
@@ -167,8 +168,8 @@
/* compress multiple blanks */
if ( prevspace && curspace ) {
- LDAP_UTF8INC(s);
- continue;
+ LDAP_UTF8INC(s);
+ continue;
}
prevspace = curspace;
if ( syntax & SYNTAX_CIS ) {
@@ -177,28 +178,28 @@
s += ssz;
d += dsz;
} else {
- char *np;
- int sz;
+ char *np;
+ int sz;
- np = ldap_utf8next(s);
- if (np == NULL || np == s) break;
- sz = np - s;
- memmove(d,s,sz);
- d += sz;
- s += sz;
+ np = ldap_utf8next(s);
+ if (np == NULL || np == s) break;
+ sz = np - s;
+ memmove(d,s,sz);
+ d += sz;
+ s += sz;
}
}
*d = '\0';
/* strip trailing blanks */
if (prevspace && trim_spaces) {
- char *nd;
+ char *nd;
- nd = ldap_utf8prev(d);
- while (nd && utf8isspace_fast(nd)) {
- d = nd;
- nd = ldap_utf8prev(d);
- *d = '\0';
- }
+ nd = ldap_utf8prev(d);
+ while (nd && nd >= head && utf8isspace_fast(nd)) {
+ d = nd;
+ nd = ldap_utf8prev(d);
+ *d = '\0';
+ }
}
}
From fedora-directory-commits at redhat.com Wed Oct 24 18:41:17 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 24 Oct 2007 14:41:17 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl
acllas.c, 1.10, 1.11 aclparse.c, 1.10, 1.11
Message-ID: <200710241841.l9OIfIkT014654@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14369/ldap/servers/plugins/acl
Modified Files:
acllas.c aclparse.c
Log Message:
Resolves: #339791
Summary: rhds71sp1 rhel3u6 - ns-slapd process dies with segmentation fault
Description: ldap_utf8prev, LDAP_UTF8PREV, and LDAP_UTF8DEC were sometimes
used without checking the returned pointer going back beyond the beginning
of the string.
Index: acllas.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acllas.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- acllas.c 19 Oct 2007 15:36:01 -0000 1.10
+++ acllas.c 24 Oct 2007 18:41:15 -0000 1.11
@@ -562,7 +562,10 @@
/* ignore trailing whitespace */
len = strlen(user);
ptr = user+len-1;
- while(ldap_utf8isspace(ptr)){ *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= user && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
}
/*
@@ -806,7 +809,10 @@
/* ignore trailing whitespace */
len = strlen(groupName);
ptr = groupName+len-1;
- while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= groupName && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
}
/*
@@ -966,7 +972,10 @@
/* ignore trailing whitespace */
len = strlen(role);
ptr = role+len-1;
- while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= role && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
}
/*
@@ -1118,7 +1127,10 @@
while(ldap_utf8isspace(attrName)) LDAP_UTF8INC(attrName);
len = strlen(attrName);
ptr = attrName+len-1;
- while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= attrName && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
/* See if we have a parent[2].attr" rule */
@@ -1346,7 +1358,10 @@
while(ldap_utf8isspace(attr)) LDAP_UTF8INC(attr);
len = strlen(attr);
ptr = attr+len-1;
- while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= attr && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
slapi_log_error( SLAPI_LOG_ACL, plugin_name,
"DS_LASAuthMethodEval:authtype:%s authmethod:%s\n",
@@ -2124,7 +2139,10 @@
while(ldap_utf8isspace(attrName)) LDAP_UTF8INC(attrName);
len = strlen(attrName);
ptr = attrName+len-1;
- while(ldap_utf8isspace(ptr)) { *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ while(ptr >= attrName && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
slapi_log_error( SLAPI_LOG_ACL, plugin_name,"Attr:%s\n" , attrName, 0,0);
Index: aclparse.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/aclparse.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- aclparse.c 19 Oct 2007 22:14:56 -0000 1.10
+++ aclparse.c 24 Oct 2007 18:41:15 -0000 1.11
@@ -464,7 +464,7 @@
char *next;
next = s + 12;
s--;
- while (s != str && ldap_utf8isspace(s)) LDAP_UTF8DEC(s);
+ while (s > str && ldap_utf8isspace(s)) LDAP_UTF8DEC(s);
if (s && *s == ';') {
/* We don't support authenticate stuff */
return ACL_INVALID_AUTHORIZATION;
@@ -1542,9 +1542,12 @@
if (*str) {
/* ignore trailing whitespace */
- len = strlen(str);
- ptr = str+len-1;
- while(ldap_utf8isspace(ptr)){ *ptr = '\0'; LDAP_UTF8DEC(ptr); }
+ len = strlen(str);
+ ptr = str+len-1;
+ while(ptr >= str && ldap_utf8isspace(ptr)) {
+ *ptr = '\0';
+ LDAP_UTF8DEC(ptr);
+ }
}
}
From fedora-directory-commits at redhat.com Thu Oct 25 18:12:01 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Thu, 25 Oct 2007 14:12:01 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
DSMigration.pm.in, 1.21, 1.22
Message-ID: <200710251812.l9PIC1al004871@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4852
Modified Files:
DSMigration.pm.in
Log Message:
Resolves: bug 345711
Description: migration : ignore idl switch value in 6.21 and earlier
Fix Description: Fix the error message
Index: DSMigration.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSMigration.pm.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- DSMigration.pm.in 23 Oct 2007 02:13:53 -0000 1.21
+++ DSMigration.pm.in 25 Oct 2007 18:11:59 -0000 1.22
@@ -302,7 +302,7 @@
if (@errs) {
return @errs;
} elsif ($isold) {
- return ('error_database_too_old', $olddbdir, @verinfo);
+ return ('error_database_too_old', $srcdir);
}
if (-d $srcdir && ! -d $destdir && !$filesonly) {
From fedora-directory-commits at redhat.com Fri Oct 26 08:10:03 2007
From: fedora-directory-commits at redhat.com (VIAGRA ® Official Site)
Date: Fri, 26 Oct 2007 04:10:03 -0400
Subject: [Fedora-directory-commits] Lovers package at discount price!
Message-ID: <20071026-71003.74981.qmail@rrcs-76-79-239-121.west.biz.rr.com>
An HTML attachment was scrubbed...
URL:
From fedora-directory-commits at redhat.com Fri Oct 26 22:00:34 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 26 Oct 2007 18:00:34 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts
migrate-ds.res, 1.7, 1.8
Message-ID: <200710262200.l9QM0YPk023881@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23864
Modified Files:
migrate-ds.res
Log Message:
Resolves: Bug 345711
Description: migration : ignore idl switch value in 6.21 and earlier
Fix Description: Fix the error message
Index: migrate-ds.res
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/migrate-ds.res,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- migrate-ds.res 17 Oct 2007 15:56:53 -0000 1.7
+++ migrate-ds.res 26 Oct 2007 22:00:32 -0000 1.8
@@ -26,7 +26,7 @@
error_removing_index_file = Could not remove the index file '%s'. Error: %s\n\n
error_recreating_index_file = Could not re-create the index file '%s'. Error: %s\n\n
error_reading_dbversion = Could not read the old database version information from '%s'. Error: %s\n\n
-error_database_too_old = The database at '%s' is version '%s/%s'.\
+error_database_too_old = The database at '%s' is too old to be migrated as a binary copy. You must export to LDIF.\n\n
This version cannot be migrated using the database binaries. You must\
first convert the databases to LDIF format and use the cross platform\
migration procedure. This procedure is documented in the migration\
From fedora-directory-commits at redhat.com Fri Oct 26 22:04:40 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 26 Oct 2007 18:04:40 -0400
Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.63,
1.64 Makefile.in, 1.79, 1.80 aclocal.m4, 1.58, 1.59 configure,
1.75, 1.76 missing, 1.43, 1.44 install-sh, 1.43, 1.44 depcomp,
1.43, 1.44 compile, 1.42, 1.43 config.sub, 1.42,
1.43 config.guess, 1.42, 1.43
Message-ID: <200710262204.l9QM4eMF030243@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30194/ldapserver
Modified Files:
Makefile.am Makefile.in aclocal.m4 configure missing
install-sh depcomp compile config.sub config.guess
Log Message:
Resolves: bug 353071
Description: Need to support mail server schema
Fix Description: There are customers who are using the mail schema, so we need to keep it in the product.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Makefile.am 18 Oct 2007 00:08:26 -0000 1.63
+++ Makefile.am 26 Oct 2007 22:04:37 -0000 1.64
@@ -173,6 +173,7 @@
$(srcdir)/ldap/schema/50ns-admin.ldif \
$(srcdir)/ldap/schema/50ns-certificate.ldif \
$(srcdir)/ldap/schema/50ns-directory.ldif \
+ $(srcdir)/ldap/schema/50ns-mail.ldif \
$(srcdir)/ldap/schema/50ns-value.ldif \
$(srcdir)/ldap/schema/50ns-web.ldif \
$(srcdir)/ldap/schema/60pam-plugin.ldif \
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- Makefile.in 19 Oct 2007 20:05:12 -0000 1.79
+++ Makefile.in 26 Oct 2007 22:04:37 -0000 1.80
@@ -1088,6 +1088,7 @@
$(srcdir)/ldap/schema/50ns-admin.ldif \
$(srcdir)/ldap/schema/50ns-certificate.ldif \
$(srcdir)/ldap/schema/50ns-directory.ldif \
+ $(srcdir)/ldap/schema/50ns-mail.ldif \
$(srcdir)/ldap/schema/50ns-value.ldif \
$(srcdir)/ldap/schema/50ns-web.ldif \
$(srcdir)/ldap/schema/60pam-plugin.ldif \
From fedora-directory-commits at redhat.com Fri Oct 26 22:04:40 2007
From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins))
Date: Fri, 26 Oct 2007 18:04:40 -0400
Subject: [Fedora-directory-commits] ldapserver/ldap/schema 50ns-mail.ldif,
1.5, 1.6
Message-ID: <200710262204.l9QM4eb9030247@cvs-int.fedora.redhat.com>
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/schema
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30194/ldapserver/ldap/schema
Added Files:
50ns-mail.ldif
Log Message:
Resolves: bug 353071
Description: Need to support mail server schema
Fix Description: There are customers who are using the mail schema, so we need to keep it in the product.
Index: 50ns-mail.ldif
===================================================================
RCS file: 50ns-mail.ldif
diff -N 50ns-mail.ldif
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ 50ns-mail.ldif 26 Oct 2007 22:04:38 -0000 1.6
@@ -0,0 +1,80 @@
+#
+# BEGIN COPYRIGHT BLOCK
+# This Program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; version 2 of the License.
+#
+# This Program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA.
+#
+# In addition, as a special exception, Red Hat, Inc. gives You the additional
+# right to link the code of this Program with code not covered under the GNU
+# General Public License ("Non-GPL Code") and to distribute linked combinations
+# including the two, subject to the limitations in this paragraph. Non-GPL Code
+# permitted under this exception must only link to the code of this Program
+# through those well defined interfaces identified in the file named EXCEPTION
+# found in the source code files (the "Approved Interfaces"). The files of
+# Non-GPL Code may instantiate templates or use macros or inline functions from
+# the Approved Interfaces without causing the resulting work to be covered by
+# the GNU General Public License. Only Red Hat, Inc. may make changes or
+# additions to the list of Approved Interfaces. You must obey the GNU General
+# Public License in all respects for all of the Program code and other code used
+# in conjunction with the Program except the Non-GPL Code covered by this
+# exception. If you modify this file, you may extend this exception to your
+# version of the file, but you are not obligated to do so. If you do not wish to
+# provide this exception without modification, you must delete this exception
+# statement from your version and license this file solely under the GPL without
+# exception.
+#
+#
+# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
+# Copyright (C) 2005 Red Hat, Inc.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+#
+# Schema for Netscape Messaging Server 4.x. Some attributes are also
+# used by NMS 5.x
+#
+dn: cn=schema
+attributeTypes: ( 2.16.840.1.113730.3.1.16 NAME ( 'mailDeliveryOption' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.707 NAME ( 'vacationstartdate' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.18 NAME ( 'mailHost' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.33 NAME ( 'mgrpModerator' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.25 NAME ( 'mgrpDeliverTo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( mgrpApprovePassword-oid NAME ( 'mgrpApprovePassword' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.31 NAME ( 'mailEnhancedUniqueMember' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.781 NAME ( 'mgrpAddHeader' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.22 NAME ( 'mgrpAllowedBroadcaster' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.30 NAME ( 'mgrpRFC822MailMember' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( nsmsgNumMsgQuota-oid NAME ( 'nsmsgNumMsgQuota' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.13 NAME ( 'mailAlternateAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.708 NAME ( 'vacationenddate' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.20 NAME ( 'mailProgramDeliveryInfo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.801 NAME ( 'mgrpRemoveHeader' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.12 NAME ( 'mailAccessDomain' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.14 NAME ( 'mailAutoReplyMode' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.15 NAME ( 'mailAutoReplyText' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.21 NAME ( 'mailQuota' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.788 NAME ( 'mgrpBroadcasterPolicy' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.24 NAME ( 'mailRoutingAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.19 NAME ( 'mailMessageStore' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.520 NAME ( 'nswmExtendedUserPrefs' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.26 NAME ( 'mgrpErrorsTo' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.23 NAME ( 'mgrpAllowedDomain' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.28 NAME ( 'mgrpMsgRejectAction' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( nsmsgDisallowAccess-oid NAME ( 'nsmsgDisallowAccess' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.17 NAME ( 'mailForwardingAddress' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.32 NAME ( 'mgrpMsgMaxSize' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.29 NAME ( 'mgrpMsgRejectText' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 X-ORIGIN 'Netscape Messaging Server 4.x' )
+attributeTypes: ( 2.16.840.1.113730.3.1.789 NAME ( 'mgrpNoDuplicateChecks' ) DESC 'Netscape Messaging Server 4.x defined attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Netscape Messaging Server 4.x' )
+objectclasses: ( 2.16.840.1.113730.3.2.3 NAME 'mailRecipient' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mail $ mailAlternateAddress $ mailHost $ mailRoutingAddress $ mailAccessDomain $ mailAutoReplyMode $ mailAutoReplyText $ mailDeliveryOption $ mailForwardingAddress $ mailMessageStore $ mailProgramDeliveryInfo $ mailQuota $ multiLineDescription $ uid $ userPassword ) X-ORIGIN 'Netscape Messaging Server 4.x' )
+objectclasses: ( 2.16.840.113730.3.2.37 NAME 'nsMessagingServerUser' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mailAccessDomain $ mailAutoReplyMode $ mailAutoReplyText $ mailDeliveryOption $ mailForwardingAddress $ mailMessageStore $ mailProgramDeliveryInfo $ mailQuota $ nsmsgDisallowAccess $ nsmsgNumMsgQuota $ nswmExtendedUserPrefs $ vacationstartdate $ vacationenddate ) X-ORIGIN 'Netscape Messaging Server 4.x' )
+objectclasses: ( 2.16.840.1.113730.3.2.4 NAME 'mailGroup' DESC '' SUP top AUXILIARY MUST ( objectClass ) MAY ( cn $ mail $ mailAlternateAddress $ mailHost $ mailRoutingAddress $ mgrpAddHeader $ mgrpAllowedBroadcaster $ mgrpAllowedDomain $ mgrpApprovePassword $ mgrpBroadcasterPolicy $ mgrpDeliverTo $ mgrpErrorsTo $ mgrpModerator $ mgrpMsgMaxSize $ mgrpMsgRejectAction $ mgrpMsgRejectText $ mgrpNoDuplicateChecks $ mgrpRemoveHeader $ mgrpRFC822MailMember $ owner ) X-ORIGIN 'Netscape Messaging Server 4.x' )
+objectclasses: ( 2.16.840.1.113730.3.2.5 NAME 'groupOfMailEnhancedUniqueNames' DESC '' SUP top AUXILIARY MUST ( objectClass $ cn ) MAY ( businessCategory $ description $ mailEnhancedUniqueMember $ o $ ou $ owner $ seeAlso ) X-ORIGIN 'Netscape Messaging Server 4.x' )
+objectclasses: ( 2.16.840.1.113730.3.2.24 NAME 'netscapeMailServer' DESC '' SUP top AUXILIARY MUST ( objectClass ) X-ORIGIN 'Netscape Messaging Server 4.x' )
From fedora-directory-commits at redhat.com Wed Oct 31 05:30:56 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 31 Oct 2007 01:30:56 -0400
Subject: [Fedora-directory-commits] adminserver/include/libadmin libadmin.h,
1.8, 1.9
Message-ID: <200710310530.l9V5UulB023030@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/adminserver/include/libadmin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/include/libadmin
Modified Files:
libadmin.h
Log Message:
Resolves: #357501
Summary: Console/admin express: can't view log files
Description: Implemented getLogDir to get the log dir from the server's
config info. To share psetHasObjectClass, moved it from security.c to
lib/libadmin/util.c.
Index: libadmin.h
===================================================================
RCS file: /cvs/dirsec/adminserver/include/libadmin/libadmin.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- libadmin.h 11 May 2007 19:44:05 -0000 1.8
+++ libadmin.h 31 Oct 2007 05:30:54 -0000 1.9
@@ -578,6 +578,9 @@
NSAPI_PUBLIC int
util_verify_file_or_dir(const char *path, PRFileType, const char *child, size_t, PRFileType);
+NSAPI_PUBLIC int
+util_psetHasObjectClass(PsetHndl pset, const char *ocname);
+
NSPR_END_EXTERN_C
#endif /* libadmin_h */
From fedora-directory-commits at redhat.com Wed Oct 31 05:30:57 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 31 Oct 2007 01:30:57 -0400
Subject: [Fedora-directory-commits] adminserver/lib/libadmin util.c, 1.9,
1.10
Message-ID: <200710310530.l9V5UvUJ023038@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/adminserver/lib/libadmin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/lib/libadmin
Modified Files:
util.c
Log Message:
Resolves: #357501
Summary: Console/admin express: can't view log files
Description: Implemented getLogDir to get the log dir from the server's
config info. To share psetHasObjectClass, moved it from security.c to
lib/libadmin/util.c.
Index: util.c
===================================================================
RCS file: /cvs/dirsec/adminserver/lib/libadmin/util.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- util.c 11 May 2007 19:44:05 -0000 1.9
+++ util.c 31 Oct 2007 05:30:54 -0000 1.10
@@ -1349,72 +1349,90 @@
PRStatus status = PR_GetFileInfo(name, &fileinfo);
ret = ((status == PR_SUCCESS) && (fileinfo.type == filetype));
if (ret) {
- /* checks out ok - let's split it into the base name and the parent dir,
- open the parent dir, and see if the base name exists in the parent dir
- */
- char *copy = PL_strdup(name);
- size_t len = strlen(copy);
- char *ptr = ©[len-1];
- /* get the basename - a really bad name may look like
- /path/foo/// or even ///////////////// */
- for (; (ptr > copy) && (*ptr == '/'); --ptr) {
- /* do nothing */
- }
- if ((ptr == copy) && (*ptr == '/')) {
- /* bad - string consists of nothing but '/' */
- ptr = NULL;
- ret = 0;
- } else {
- PRDir *pdir;
- PRDirEntry *pent;
+ /* checks out ok - let's split it into the base name and the parent dir,
+ open the parent dir, and see if the base name exists in the parent dir
+ */
+ char *copy = PL_strdup(name);
+ size_t len = strlen(copy);
+ char *ptr = ©[len-1];
+ /* get the basename - a really bad name may look like
+ /path/foo/// or even ///////////////// */
+ for (; (ptr > copy) && (*ptr == '/'); --ptr) {
+ /* do nothing */
+ }
+ if ((ptr == copy) && (*ptr == '/')) {
+ /* bad - string consists of nothing but '/' */
+ ptr = NULL;
+ ret = 0;
+ } else {
+ PRDir *pdir;
+ PRDirEntry *pent;
- ret = 0;
- if (*ptr == '/') {
- *ptr = 0; /* terminate the string at the first trailing '/' */
- }
- ptr = strrchr(copy, '/');
- if (!ptr) {
- ptr = copy;
- copy = PL_strdup(".");
- } else {
- *ptr = 0;
- ++ptr;
- ptr = PL_strdup(ptr);
- }
- /* copy now points at the parent, ptr at the child */
- if (pdir = PR_OpenDir(copy)) {
- for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret;
- pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) {
- ret = !strcmp(pent->name, ptr);
- }
- PR_CloseDir(pdir);
- }
- if (ret && childname && (filetype == PR_FILE_DIRECTORY)) {
- ret = 0;
- /* we've verified that name is a valid directory - see if
- the given filename exists in that directory */
- if (pdir = PR_OpenDir(name)) {
- for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret;
- pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) {
- if (childlen > 0) {
- ret = !strncmp(pent->name, childname, childlen);
- } else {
- ret = !strcmp(pent->name, childname);
- }
- }
- PR_CloseDir(pdir);
- if (ret) {
- /* child exists - check type */
- char *fullname = PR_smprintf("%s%c%s", name, FILE_PATHSEP, childname);
- status = PR_GetFileInfo(fullname, &fileinfo);
- ret = ((status == PR_SUCCESS) && (fileinfo.type == childtype));
- PR_smprintf_free(fullname);
- }
- }
- }
- }
- PL_strfree(copy);
- PL_strfree(ptr);
+ ret = 0;
+ if (*ptr == '/') {
+ *ptr = 0; /* terminate the string at the first trailing '/' */
+ }
+ ptr = strrchr(copy, '/');
+ if (!ptr) {
+ ptr = copy;
+ copy = PL_strdup(".");
+ } else {
+ *ptr = 0;
+ ++ptr;
+ ptr = PL_strdup(ptr);
+ }
+ /* copy now points at the parent, ptr at the child */
+ if (pdir = PR_OpenDir(copy)) {
+ for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret;
+ pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) {
+ ret = !strcmp(pent->name, ptr);
+ }
+ PR_CloseDir(pdir);
+ }
+ if (ret && childname && (filetype == PR_FILE_DIRECTORY)) {
+ ret = 0;
+ /* we've verified that name is a valid directory - see if
+ the given filename exists in that directory */
+ if (pdir = PR_OpenDir(name)) {
+ for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret;
+ pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) {
+ if (childlen > 0) {
+ ret = !strncmp(pent->name, childname, childlen);
+ } else {
+ ret = !strcmp(pent->name, childname);
+ }
+ }
+ PR_CloseDir(pdir);
+ if (ret) {
+ /* child exists - check type */
+ char *fullname = PR_smprintf("%s%c%s", name, FILE_PATHSEP, childname);
+ status = PR_GetFileInfo(fullname, &fileinfo);
+ ret = ((status == PR_SUCCESS) && (fileinfo.type == childtype));
+ PR_smprintf_free(fullname);
+ }
+ }
+ }
+ }
+ PL_strfree(copy);
+ PL_strfree(ptr);
}
return ret;
}
+
+NSAPI_PUBLIC int
+util_psetHasObjectClass(PsetHndl pset, const char *ocname)
+{
+ int rval = 0;
+ char *val = NULL;
+ ValueType nodeObjectClass = psetGetObjectClass(pset, "" /* use root node */, &rval);
+ ValueType iter = nodeObjectClass;
+
+ rval = 0;
+ while ((!rval) && ((val = *iter++))) {
+ rval = !PL_strcasecmp(ocname, val);
+ }
+
+ deleteValue(nodeObjectClass);
+ return rval;
+}
+
From fedora-directory-commits at redhat.com Wed Oct 31 05:30:56 2007
From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi))
Date: Wed, 31 Oct 2007 01:30:56 -0400
Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 viewlog.c,
1.9, 1.10 security.c, 1.11, 1.12 cgicommon.h, 1.1, 1.2
Message-ID: <200710310530.l9V5UuFf023025@cvs-int.fedora.redhat.com>
Author: nhosoi
Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22940/admserv/cgi-src40
Modified Files:
viewlog.c security.c cgicommon.h
Log Message:
Resolves: #357501
Summary: Console/admin express: can't view log files
Description: Implemented getLogDir to get the log dir from the server's
config info. To share psetHasObjectClass, moved it from security.c to
lib/libadmin/util.c.
Index: viewlog.c
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- viewlog.c 27 Jun 2007 22:24:59 -0000 1.9
+++ viewlog.c 31 Oct 2007 05:30:53 -0000 1.10
@@ -56,19 +56,19 @@
#define RESOURCE_FILE "viewlog"
#define resource_key(a,b) a b
-#define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1")
-#define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2")
-#define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3")
-#define DBT_WITH resource_key(RESOURCE_FILE, "4")
-#define DBT_NO_DIR resource_key(RESOURCE_FILE, "5")
-#define DBT_NO_DIR_DESC resource_key(RESOURCE_FILE, "6")
-#define DBT_NO_FILE resource_key(RESOURCE_FILE, "7")
-#define DBT_NO_FILE_DESC resource_key(RESOURCE_FILE, "8")
-#define DBT_NO_DIR_FOUND resource_key(RESOURCE_FILE, "9")
-#define DBT_NO_ID resource_key(RESOURCE_FILE, "10")
-#define DBT_NO_ID_DESC resource_key(RESOURCE_FILE, "11")
-#define DBT_INV_NOHTML resource_key(RESOURCE_FILE, "12")
-#define DBT_INV_NOHTML_DESC resource_key(RESOURCE_FILE, "13")
+#define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1")
+#define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2")
+#define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3")
+#define DBT_WITH resource_key(RESOURCE_FILE, "4")
+#define DBT_NO_DIR resource_key(RESOURCE_FILE, "5")
+#define DBT_NO_DIR_DESC resource_key(RESOURCE_FILE, "6")
+#define DBT_NO_FILE resource_key(RESOURCE_FILE, "7")
+#define DBT_NO_FILE_DESC resource_key(RESOURCE_FILE, "8")
+#define DBT_NO_DIR_FOUND resource_key(RESOURCE_FILE, "9")
+#define DBT_NO_ID resource_key(RESOURCE_FILE, "10")
+#define DBT_NO_ID_DESC resource_key(RESOURCE_FILE, "11")
+#define DBT_INV_NOHTML resource_key(RESOURCE_FILE, "12")
+#define DBT_INV_NOHTML_DESC resource_key(RESOURCE_FILE, "13")
/* html resource */
#define DBT_DISPLAY_LOGFILE_SELECT_BEGIN resource_key(RESOURCE_FILE, "20")
@@ -107,23 +107,23 @@
while(fgets(line, sizeof(line), cmd)) {
if(strncmp(line, "format=", 7))
if((!str) || (strstr(line, str))) {
- count++;
- if(count<=num) {
- if(!buffer)
- buffer = (char **)MALLOC(sizeof(char *));
- else
- buffer = (char **)REALLOC(buffer, count*(sizeof(char *)));
- }
- else
- FREE(buffer[replace]);
- temp = strlen(line);
- line[temp-1] = ' ';
- line[temp] = '\n';
- line[temp+1] = '\0';
- buffer[replace] = STRDUP(line);
- if(replace == (num-1))
- replace=0;
- else replace++;
+ count++;
+ if(count<=num) {
+ if(!buffer)
+ buffer = (char **)MALLOC(sizeof(char *));
+ else
+ buffer = (char **)REALLOC(buffer, count*(sizeof(char *)));
+ }
+ else
+ FREE(buffer[replace]);
+ temp = strlen(line);
+ line[temp-1] = ' ';
+ line[temp] = '\n';
+ line[temp+1] = '\0';
+ buffer[replace] = STRDUP(line);
+ if(replace == (num-1))
+ replace=0;
+ else replace++;
}
}
if(count < num) { /* could not find num entries */
@@ -133,7 +133,7 @@
/* replace is at the first entry to output */
for(temp=0; temp