Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 230421 Details for
Bug 250179
tmpwatch whacks stats
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs - add rundir to ds
cvsdiffs (text/plain), 11.99 KB, created by
Rich Megginson
on 2007-10-17 22:01:17 UTC
(
hide
)
Description:
diffs - add rundir to ds
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-10-17 22:01:17 UTC
Size:
11.99 KB
patch
obsolete
>Index: ldapserver/ldap/admin/src/scripts/dscreate.map.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/dscreate.map.in,v >retrieving revision 1.1 >diff -u -8 -r1.1 dscreate.map.in >--- ldapserver/ldap/admin/src/scripts/dscreate.map.in 13 Jul 2007 18:35:32 -0000 1.1 >+++ ldapserver/ldap/admin/src/scripts/dscreate.map.in 17 Oct 2007 21:57:03 -0000 >@@ -60,8 +60,9 @@ > tmp_dir = tmp_dir > cert_dir = cert_dir > ldif_dir = ldif_dir > bak_dir = bak_dir > inst_dir = inst_dir > log_dir = log_dir > config_dir = config_dir > db_dir = db_dir >+run_dir = run_dir >Index: ldapserver/ldap/ldif/template-dse.ldif.in >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v >retrieving revision 1.4 >diff -u -8 -r1.4 template-dse.ldif.in >--- ldapserver/ldap/ldif/template-dse.ldif.in 25 Jul 2007 15:20:01 -0000 1.4 >+++ ldapserver/ldap/ldif/template-dse.ldif.in 17 Oct 2007 21:57:04 -0000 >@@ -4,16 +4,17 @@ > objectclass:extensibleObject > objectclass:nsslapdConfig > nsslapd-schemadir: %schema_dir% > nsslapd-lockdir: %lock_dir% > nsslapd-tmpdir: %tmp_dir% > 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 > nsslapd-accesslog-mode: 600 > nsslapd-accesslog-maxlogsize: 100 > nsslapd-accesslog-logrotationtime: 1 > nsslapd-accesslog-logrotationtimeunit: day > nsslapd-accesslog-logrotationsync-enabled: off >Index: ldapserver/ldap/servers/slapd/agtmmap.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/agtmmap.h,v >retrieving revision 1.10 >diff -u -8 -r1.10 agtmmap.h >--- ldapserver/ldap/servers/slapd/agtmmap.h 10 Nov 2006 23:45:40 -0000 1.10 >+++ ldapserver/ldap/servers/slapd/agtmmap.h 17 Oct 2007 21:57:04 -0000 >@@ -74,17 +74,18 @@ > > #ifndef _WIN32 > extern int errno; > #endif > > #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 > > > typedef enum { AGT_MAP_UNINIT = 0, AGT_MAP_READ, AGT_MAP_RDWR } agt_mmap_type; > > #ifndef _WIN32 > typedef struct >Index: ldapserver/ldap/servers/slapd/libglobs.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libglobs.c,v >retrieving revision 1.22 >diff -u -8 -r1.22 libglobs.c >--- ldapserver/ldap/servers/slapd/libglobs.c 5 Oct 2007 17:00:04 -0000 1.22 >+++ ldapserver/ldap/servers/slapd/libglobs.c 17 Oct 2007 21:57:04 -0000 >@@ -568,16 +568,20 @@ > /* parameterizing bak dir */ > {CONFIG_BAKDIR_ATTRIBUTE, config_set_bakdir, > NULL, 0, > (void**)&global_slapdFrontendConfig.bakdir, CONFIG_STRING, (ConfigGetFunc)config_get_bakdir}, > /* parameterizing sasl plugin path */ > {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}, > {CONFIG_OUTBOUND_LDAP_IO_TIMEOUT_ATTRIBUTE, > config_set_outbound_ldap_io_timeout, > NULL, 0, > (void **)&global_slapdFrontendConfig.outbound_ldap_io_timeout, > CONFIG_INT, NULL} >@@ -4723,16 +4727,53 @@ > CFG_LOCK_WRITE(slapdFrontendConfig); > slapi_ch_free((void **)&slapdFrontendConfig->bakdir); > > slapdFrontendConfig->bakdir = slapi_ch_strdup(value); > > 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() > { > slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig(); > char *retVal; > > CFG_LOCK_READ(slapdFrontendConfig); > retVal = config_copy_strval(slapdFrontendConfig->saslpath); >Index: ldapserver/ldap/servers/slapd/proto-slap.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v >retrieving revision 1.29 >diff -u -8 -r1.29 proto-slap.h >--- ldapserver/ldap/servers/slapd/proto-slap.h 20 Sep 2007 16:54:38 -0000 1.29 >+++ ldapserver/ldap/servers/slapd/proto-slap.h 17 Oct 2007 21:57:04 -0000 >@@ -321,16 +321,17 @@ > int config_set_configdir( const char *attrname, char *value, char *errorbuf, int apply ); > int config_set_instancedir( const char *attrname, char *value, char *errorbuf, int apply ); > int config_set_schemadir( const char *attrname, char *value, char *errorbuf, int apply ); > int config_set_lockdir( const char *attrname, char *value, char *errorbuf, int apply ); > int config_set_tmpdir( const char *attrname, char *value, char *errorbuf, int apply ); > 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 ); > int config_set_rewrite_rfc1274( const char *attrname, char *value, char *errorbuf, int apply ); > int config_set_outbound_ldap_io_timeout( const char *attrname, char *value, > char *errorbuf, int apply ); > int config_set_accesslogbuffering(const char *attrname, char *value, char *errorbuf, int apply); > int config_set_csnlogging(const char *attrname, char *value, char *errorbuf, int apply); >@@ -433,16 +434,17 @@ > char *config_get_basedn(); > char *config_get_configdir(); > char *config_get_schemadir(); > char *config_get_lockdir(); > char *config_get_tmpdir(); > 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(); > char **config_get_auditlog_list(); > int config_get_attrname_exceptions(); > int config_get_hash_filters(); > int config_get_rewrite_rfc1274(); > int config_get_outbound_ldap_io_timeout(void); >Index: ldapserver/ldap/servers/slapd/slap.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v >retrieving revision 1.28 >diff -u -8 -r1.28 slap.h >--- ldapserver/ldap/servers/slapd/slap.h 12 Oct 2007 18:03:42 -0000 1.28 >+++ ldapserver/ldap/servers/slapd/slap.h 17 Oct 2007 21:57:05 -0000 >@@ -1723,16 +1723,17 @@ > #define CONFIG_INSTDIR_ATTRIBUTE "nsslapd-instancedir" > #define CONFIG_SCHEMADIR_ATTRIBUTE "nsslapd-schemadir" > #define CONFIG_LOCKDIR_ATTRIBUTE "nsslapd-lockdir" > #define CONFIG_TMPDIR_ATTRIBUTE "nsslapd-tmpdir" > #define CONFIG_CERTDIR_ATTRIBUTE "nsslapd-certdir" > #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" > #define CONFIG_OUTBOUND_LDAP_IO_TIMEOUT_ATTRIBUTE "nsslapd-outbound-ldap-io-timeout" > > /* flag used to indicate that the change to the config parameter should be saved */ > #define CONFIG_APPLY 1 > >@@ -1902,16 +1903,17 @@ > char *workingdir; /* full path of directory before detach */ > char *configdir; /* full path name of directory containing configuration files */ > char *schemadir; /* full path name of directory containing schema files */ > char *lockdir; /* full path name of directory containing lock files */ > char *tmpdir; /* full path name of directory containing tmp files */ > 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 */ > char *schemareplace; /* see CONFIG_SCHEMAREPLACE_* #defines below */ > char *ldapi_filename; /* filename for ldapi socket */ > int ldapi_switch; /* switch to turn ldapi on/off */ > int ldapi_bind_switch; /* switch to turn ldapi auto binding on/off */ > char *ldapi_root_dn; /* DN to map root to over LDAPI */ >Index: ldapserver/ldap/servers/slapd/snmp_collator.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v >retrieving revision 1.10 >diff -u -8 -r1.10 snmp_collator.c >--- ldapserver/ldap/servers/slapd/snmp_collator.c 10 Nov 2006 23:45:40 -0000 1.10 >+++ ldapserver/ldap/servers/slapd/snmp_collator.c 17 Oct 2007 21:57:05 -0000 >@@ -55,16 +55,17 @@ > #include <errno.h> > > #include "agtmmap.h" > #include "slap.h" > #include "prthread.h" > #include "prlock.h" > #include "prerror.h" > #include "prcvar.h" >+#include "plstr.h" > > #include "snmp_collator.h" > #include "../snmp/ntagt/nslagtcom_nt.h" > > /* stevross: safe to assume port should be at most 5 digits ? */ > #define PORT_LEN 5 > /* strlen of url portions ie "ldap://:/" */ > #define URL_CHARS_LEN 9 >@@ -392,30 +393,40 @@ > * > * starts the collator thread > ************************************************************************************/ > > int snmp_collator_start() > { > > 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 > */ > if (NULL == statspath) { > 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)) > { > if (err != EEXIST) /* Ignore if file already exists */ > { > printf("Failed to open stats file (%s) (error %d).\n", > szStatsFile, err);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250179
:
230421
|
230431
|
230511
|
230541