configdse.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. /* configdse.c - routines to manage the config DSE */
  39. #include <stdio.h>
  40. #include <string.h>
  41. #include <sys/types.h>
  42. #include <errno.h>
  43. #ifndef _WIN32
  44. #include <sys/socket.h>
  45. #include <sys/param.h>
  46. #endif
  47. #include "log.h"
  48. #include "slap.h"
  49. #include "pw.h"
  50. static int check_all_maxdiskspace_and_mlogsize(Slapi_PBlock *pb, LDAPMod **mod, char *returntext);
  51. static void get_log_max_size( LDAPMod *mod,
  52. char *maxdiskspace_str,
  53. char *mlogsize_str,
  54. int *maxdiskspace,
  55. int *mlogsize);
  56. /* List of attributes which require server restart to take effect */
  57. static const char *requires_restart[] = {
  58. "cn=config:nsslapd-port",
  59. "cn=config:nsslapd-secureport",
  60. "cn=config:nsslapd-workingdir",
  61. "cn=config:nsslapd-plugin",
  62. "cn=config:nsslapd-sslclientauth",
  63. "cn=config:nsslapd-changelogdir",
  64. "cn=config:nsslapd-changelogsuffix",
  65. "cn=config:nsslapd-changelogmaxentries",
  66. "cn=config:nsslapd-changelogmaxage",
  67. "cn=config:nsslapd-db-locks",
  68. #if !defined(_WIN32) && !defined(AIX)
  69. "cn=config:nsslapd-maxdescriptors",
  70. #endif
  71. "cn=config:" CONFIG_RETURN_EXACT_CASE_ATTRIBUTE,
  72. "cn=config:" CONFIG_SCHEMA_IGNORE_TRAILING_SPACES,
  73. "cn=config,cn=ldbm:nsslapd-idlistscanlimit",
  74. "cn=config,cn=ldbm:nsslapd-parentcheck",
  75. "cn=config,cn=ldbm:nsslapd-dbcachesize",
  76. "cn=config,cn=ldbm:nsslapd-dbncache",
  77. "cn=config,cn=ldbm:nsslapd-cachesize",
  78. "cn=config,cn=ldbm:nsslapd-plugin",
  79. "cn=encryption,cn=config:nssslsessiontimeout",
  80. "cn=encryption,cn=config:nssslclientauth",
  81. "cn=encryption,cn=config:nsssl2",
  82. "cn=encryption,cn=config:nsssl3" };
  83. static int
  84. isASyntaxOrMrPluginOrPss(Slapi_Entry *e)
  85. {
  86. char *ptype = slapi_entry_attr_get_charptr(e, ATTR_PLUGIN_TYPE);
  87. int retval = (ptype && !strcasecmp(ptype, "syntax"));
  88. if (!retval)
  89. retval = (ptype && !strcasecmp(ptype, "matchingrule"));
  90. if (!retval)
  91. retval = (ptype && !strcasecmp(ptype, "pwdstoragescheme"));
  92. if (!retval)
  93. retval = (ptype && !strcasecmp(ptype, "reverpwdstoragescheme"));
  94. slapi_ch_free((void**)&ptype);
  95. return retval;
  96. }
  97. /* these attr types are ignored for the purposes of configuration search/modify */
  98. static int
  99. ignore_attr_type(const char *attr_type)
  100. {
  101. if ( !attr_type ||
  102. (strcasecmp (attr_type, "cn") == 0) ||
  103. (strcasecmp (attr_type, "aci") == 0) ||
  104. (strcasecmp (attr_type, "objectclass") == 0) ||
  105. (strcasecmp (attr_type, "numsubordinates") == 0) ||
  106. (strcasecmp (attr_type, "modifytimestamp") == 0) ||
  107. (strcasecmp (attr_type, "modifiersname") == 0)) {
  108. return 1;
  109. }
  110. return 0;
  111. }
  112. int
  113. read_config_dse (Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* entryAfter, int *returncode, char *returntext, void *arg)
  114. {
  115. struct berval *vals[2];
  116. struct berval val;
  117. Slapi_Backend *be;
  118. slapdFrontendConfig_t *slapdFrontendConfig;
  119. struct slapdplugin *pPlugin;
  120. char *cookie;
  121. int i;
  122. slapdFrontendConfig = getFrontendConfig();
  123. vals[0] = &val;
  124. vals[1] = NULL;
  125. /*
  126. * We can skip using the config accessor functions here because we're holding
  127. * the read lock explicitly
  128. */
  129. CFG_LOCK_READ(slapdFrontendConfig);
  130. /* show backend config */
  131. attrlist_delete ( &e->e_attrs, "nsslapd-backendconfig");
  132. for ( i = 0;
  133. slapdFrontendConfig->backendconfig &&
  134. slapdFrontendConfig->backendconfig[i];
  135. i++) {
  136. val.bv_val = slapdFrontendConfig->backendconfig[i];
  137. val.bv_len = strlen ( val.bv_val );
  138. attrlist_merge ( &e->e_attrs, "nsslapd-backendconfig", vals);
  139. }
  140. CFG_UNLOCK_READ(slapdFrontendConfig);
  141. /* show other config entries */
  142. attrlist_delete ( &e->e_attrs, "nsslapd-backendconfig");
  143. cookie = NULL;
  144. be = slapi_get_first_backend (&cookie);
  145. while ( be )
  146. {
  147. if(!be->be_private)
  148. {
  149. Slapi_DN dn;
  150. slapi_sdn_init(&dn);
  151. be_getconfigdn(be,&dn);
  152. val.bv_val = (char*)slapi_sdn_get_ndn(&dn);
  153. val.bv_len = strlen (val.bv_val);
  154. attrlist_merge ( &e->e_attrs, "nsslapd-backendconfig", vals);
  155. slapi_sdn_done(&dn);
  156. }
  157. be = slapi_get_next_backend (cookie);
  158. }
  159. slapi_ch_free ((void **)&cookie);
  160. /* show be_type */
  161. attrlist_delete( &e->e_attrs, "nsslapd-betype");
  162. cookie = NULL;
  163. be = slapi_get_first_backend(&cookie);
  164. while ( be ) {
  165. if( !be->be_private )
  166. {
  167. val.bv_val = be->be_type;
  168. val.bv_len = strlen (be->be_type);
  169. attrlist_replace( &e->e_attrs, "nsslapd-betype", vals );
  170. }
  171. be = slapi_get_next_backend(cookie);
  172. }
  173. slapi_ch_free ( (void **) &cookie);
  174. /* show private suffixes */
  175. attrlist_delete ( &e->e_attrs, "nsslapd-privatenamespaces");
  176. cookie = NULL;
  177. be = slapi_get_first_backend(&cookie);
  178. while ( be )
  179. {
  180. if(be->be_private)
  181. {
  182. int n= 0;
  183. const Slapi_DN *base= NULL;
  184. do {
  185. base= slapi_be_getsuffix(be,n);
  186. if(base!=NULL)
  187. {
  188. val.bv_val = (void*)slapi_sdn_get_dn(base); /* jcm: had to cast away const */
  189. val.bv_len = strlen (val.bv_val);
  190. attrlist_merge ( &e->e_attrs, "nsslapd-privatenamespaces", vals);
  191. }
  192. n++;
  193. } while (base!=NULL);
  194. }
  195. be = slapi_get_next_backend(cookie);
  196. }
  197. slapi_ch_free ((void **) &cookie);
  198. /* show syntax plugins */
  199. attrlist_delete ( &e->e_attrs, CONFIG_PLUGIN_ATTRIBUTE );
  200. for ( pPlugin = slapi_get_global_syntax_plugins(); pPlugin != NULL;
  201. pPlugin = pPlugin->plg_next ) {
  202. val.bv_val = pPlugin->plg_dn;
  203. val.bv_len = strlen ( val.bv_val );
  204. attrlist_merge ( &e->e_attrs, CONFIG_PLUGIN_ATTRIBUTE, vals );
  205. }
  206. /* show matching rule plugins */
  207. for ( pPlugin = slapi_get_global_mr_plugins(); pPlugin != NULL;
  208. pPlugin = pPlugin->plg_next ) {
  209. val.bv_val = pPlugin->plg_dn;
  210. val.bv_len = strlen ( val.bv_val );
  211. attrlist_merge ( &e->e_attrs, CONFIG_PLUGIN_ATTRIBUTE, vals );
  212. }
  213. /* show requiresrestart */
  214. attrlist_delete( &e->e_attrs, "nsslapd-requiresrestart");
  215. for ( i = 0; i < sizeof(requires_restart)/sizeof(requires_restart[0]); i++ ) {
  216. val.bv_val = (char *)requires_restart[i];
  217. val.bv_len = strlen (val.bv_val);
  218. attrlist_merge ( &e->e_attrs, "nsslapd-requiresrestart", vals);
  219. }
  220. /* show the rest of the configuration parameters */
  221. *returncode= config_set_entry(e);
  222. return SLAPI_DSE_CALLBACK_OK;
  223. }
  224. int
  225. load_config_dse(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* ignored, int *returncode, char *returntext, void *arg)
  226. {
  227. int retval = LDAP_SUCCESS;
  228. Slapi_Attr *attr = 0;
  229. for (slapi_entry_first_attr(e, &attr); (retval == LDAP_SUCCESS) && attr;
  230. slapi_entry_next_attr(e, attr, &attr))
  231. {
  232. char *attr_name = 0;
  233. struct berval **values = 0;
  234. int nvals = 0;
  235. slapi_attr_get_type(attr, &attr_name);
  236. if (ignore_attr_type(attr_name))
  237. continue;
  238. slapi_attr_get_numvalues(attr, &nvals);
  239. /* convert the values into an array of bervals */
  240. if (nvals)
  241. {
  242. Slapi_Value *v = 0;
  243. int index = 0;
  244. values = (struct berval **)slapi_ch_malloc((nvals+1) *
  245. sizeof(struct berval *));
  246. values[nvals] = 0;
  247. for (index = slapi_attr_first_value(attr, &v);
  248. v && (index != -1);
  249. index = slapi_attr_next_value(attr, index, &v))
  250. {
  251. values[index] = (struct berval *)slapi_value_get_berval(v);
  252. }
  253. }
  254. if (attr_name)
  255. {
  256. retval = config_set(attr_name, values, returntext, 1 /* force apply */);
  257. if ((retval != LDAP_SUCCESS) &&
  258. slapi_attr_flag_is_set(attr, SLAPI_ATTR_FLAG_OPATTR))
  259. retval = LDAP_SUCCESS; /* ignore attempts to modify operational attrs */
  260. }
  261. if (values)
  262. {
  263. /* slapi_value_get_berval returns the actual memory owned by the
  264. slapi attr, so we cannot free it */
  265. slapi_ch_free((void **)&values);
  266. }
  267. }
  268. *returncode = retval;
  269. return (retval == LDAP_SUCCESS) ? SLAPI_DSE_CALLBACK_OK
  270. : SLAPI_DSE_CALLBACK_ERROR;
  271. }
  272. int
  273. load_plugin_entry(Slapi_PBlock *pb, Slapi_Entry* e, Slapi_Entry* ignored, int *returncode, char *returntext, void *arg)
  274. {
  275. int retval = LDAP_SUCCESS;
  276. if (isASyntaxOrMrPluginOrPss(e))
  277. {
  278. /*
  279. * syntax/matching/passwd storage scheme rule plugins are loaded
  280. * at bootstrap time, so no need to load them here. BUT -- the
  281. * descriptive information that is registered by the plugin is
  282. * thrown away during bootstrap time, so we set it here.
  283. */
  284. (void)plugin_add_descriptive_attributes( e, NULL );
  285. } else {
  286. /*
  287. * Process plugins that were not loaded during bootstrap.
  288. */
  289. retval = plugin_setup(e, 0, 0, 1);
  290. /*
  291. * well this damn well sucks, but this function is used as a callback
  292. * and to ensure we do not continue if a plugin fails to load or init
  293. * properly we must exit here.
  294. */
  295. if(retval)
  296. {
  297. char dnbuf[ BUFSIZ ];
  298. slapi_log_error( SLAPI_LOG_FATAL, NULL,
  299. "Unable to load plugin \"%s\"\n",
  300. escape_string( slapi_entry_get_dn_const( e ), dnbuf ));
  301. exit(1);
  302. }
  303. }
  304. *returncode = retval;
  305. return (retval == LDAP_SUCCESS) ? SLAPI_DSE_CALLBACK_OK
  306. : SLAPI_DSE_CALLBACK_ERROR;
  307. }
  308. int
  309. modify_config_dse(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg)
  310. {
  311. char *config_attr;
  312. LDAPMod **mods;
  313. int rc = LDAP_SUCCESS;
  314. int apply_mods = 0;
  315. char *pwd = 0;
  316. int checked_all_maxdiskspace_and_mlogsize = 0;
  317. slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
  318. returntext[0] = '\0';
  319. /*
  320. * First pass: set apply mods to 0 so only input validation will be done;
  321. * 2nd pass: set apply mods to 1 to apply changes to internal storage
  322. */
  323. for ( apply_mods = 0; apply_mods <= 1; apply_mods++ ) {
  324. int i = 0;
  325. for (i = 0; (mods[i] && (LDAP_SUCCESS == rc)); i++) {
  326. if ((mods[i]->mod_op & LDAP_MOD_DELETE) ||
  327. (mods[i]->mod_op & LDAP_MOD_ADD)) {
  328. rc= LDAP_UNWILLING_TO_PERFORM;
  329. PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE, "%s attributes is not allowed",
  330. (mods[i]->mod_op & LDAP_MOD_DELETE) ? "Deleting" : "Adding");
  331. } else if (mods[i]->mod_op & LDAP_MOD_REPLACE) {
  332. /* send all aci modifications to the backend */
  333. config_attr = (char *)mods[i]->mod_type;
  334. if (ignore_attr_type(config_attr))
  335. continue;
  336. if ( (checked_all_maxdiskspace_and_mlogsize == 0 ) &&
  337. ((strcasecmp( mods[i]->mod_type, CONFIG_ERRORLOG_MAXLOGDISKSPACE_ATTRIBUTE) == 0) ||
  338. (strcasecmp( mods[i]->mod_type, CONFIG_ERRORLOG_MAXLOGSIZE_ATTRIBUTE) == 0) ||
  339. (strcasecmp( mods[i]->mod_type, CONFIG_ACCESSLOG_MAXLOGDISKSPACE_ATTRIBUTE) == 0) ||
  340. (strcasecmp( mods[i]->mod_type, CONFIG_ACCESSLOG_MAXLOGSIZE_ATTRIBUTE) == 0) ||
  341. (strcasecmp( mods[i]->mod_type, CONFIG_AUDITLOG_MAXLOGDISKSPACE_ATTRIBUTE) == 0) ||
  342. (strcasecmp( mods[i]->mod_type, CONFIG_AUDITLOG_MAXLOGSIZE_ATTRIBUTE) == 0)) )
  343. {
  344. checked_all_maxdiskspace_and_mlogsize = 1;
  345. if ( (rc=check_all_maxdiskspace_and_mlogsize(pb, mods, returntext)) != LDAP_SUCCESS )
  346. {
  347. goto finish_and_return;
  348. }
  349. }
  350. rc = config_set(config_attr, mods[i]->mod_bvalues, returntext,
  351. apply_mods);
  352. }
  353. }
  354. }
  355. finish_and_return:
  356. /*
  357. * The DSE code will be writing the resultant entry value to the
  358. * dse.ldif file. We *must*not* write plain passwords into here.
  359. */
  360. slapi_entry_attr_delete( e, CONFIG_ROOTPW_ATTRIBUTE );
  361. /* if the password has been set, it will be hashed */
  362. if ((pwd = config_get_rootpw()) != NULL) {
  363. slapi_entry_attr_set_charptr(e, CONFIG_ROOTPW_ATTRIBUTE, pwd);
  364. slapi_ch_free((void**)&pwd);
  365. }
  366. *returncode= rc;
  367. if(LDAP_SUCCESS == rc) {
  368. return(SLAPI_DSE_CALLBACK_OK); /* success -- apply the mods. */
  369. }
  370. else {
  371. return(SLAPI_DSE_CALLBACK_ERROR); /* failure -- reject the mods. */
  372. }
  373. }
  374. int
  375. postop_modify_config_dse(Slapi_PBlock *pb, Slapi_Entry* entryBefore, Slapi_Entry* e, int *returncode, char *returntext, void *arg)
  376. {
  377. static int num_requires_restart = sizeof(requires_restart)/sizeof(char*);
  378. LDAPMod **mods;
  379. int i, j;
  380. char *p;
  381. slapi_pblock_get( pb, SLAPI_MODIFY_MODS, &mods );
  382. returntext[0] = '\0';
  383. for (i = 0; mods[i]; i++) {
  384. if (mods[i]->mod_op & LDAP_MOD_REPLACE ) {
  385. /* Check if the server needs to be restarted */
  386. for (j = 0; j < num_requires_restart; j++)
  387. {
  388. p = strchr (requires_restart[j], ':');
  389. if (p == NULL)
  390. continue;
  391. while ( *(++p) == ' ' || *p == '\t' );
  392. if ( strcasecmp (p, mods[i]->mod_type) == 0 ) {
  393. PR_snprintf(returntext, SLAPI_DSE_RETURNTEXT_SIZE,
  394. "The change of %s will not take effect "
  395. "until the server is restarted", mods[i]->mod_type);
  396. slapi_log_error (SLAPI_LOG_FATAL, NULL, "%s\n", returntext);
  397. break;
  398. }
  399. }
  400. if (j < num_requires_restart) {
  401. /* That's enough, don't check remaining mods any more */
  402. break;
  403. }
  404. }
  405. }
  406. *returncode = LDAP_SUCCESS;
  407. return *returncode;
  408. }
  409. static int
  410. check_all_maxdiskspace_and_mlogsize(Slapi_PBlock *pb, LDAPMod **mods, char *returntext)
  411. {
  412. int i = 0;
  413. int rc = LDAP_SUCCESS;
  414. int errormaxdiskspace = -1;
  415. int errormlogsize = -1;
  416. int accessmaxdiskspace = -1;
  417. int accessmlogsize = -1;
  418. int auditmaxdiskspace = -1;
  419. int auditmlogsize = -1;
  420. for (i = 0; mods[i] ; i++)
  421. {
  422. get_log_max_size(mods[i],
  423. CONFIG_ERRORLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  424. CONFIG_ERRORLOG_MAXLOGSIZE_ATTRIBUTE,
  425. &errormaxdiskspace,
  426. &errormlogsize);
  427. get_log_max_size(mods[i],
  428. CONFIG_ACCESSLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  429. CONFIG_ACCESSLOG_MAXLOGSIZE_ATTRIBUTE,
  430. &accessmaxdiskspace,
  431. &accessmlogsize);
  432. get_log_max_size(mods[i],
  433. CONFIG_AUDITLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  434. CONFIG_AUDITLOG_MAXLOGSIZE_ATTRIBUTE,
  435. &auditmaxdiskspace,
  436. &auditmlogsize);
  437. }
  438. if ( (rc=check_log_max_size(
  439. CONFIG_ERRORLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  440. CONFIG_ERRORLOG_MAXLOGSIZE_ATTRIBUTE,
  441. errormaxdiskspace,
  442. errormlogsize,
  443. returntext,
  444. SLAPD_ERROR_LOG)) != LDAP_SUCCESS )
  445. {
  446. return rc;
  447. }
  448. if ( (rc=check_log_max_size(
  449. CONFIG_ACCESSLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  450. CONFIG_ACCESSLOG_MAXLOGSIZE_ATTRIBUTE,
  451. accessmaxdiskspace,
  452. accessmlogsize,
  453. returntext,
  454. SLAPD_ACCESS_LOG)) != LDAP_SUCCESS )
  455. {
  456. return rc;
  457. }
  458. if ( (rc=check_log_max_size(
  459. CONFIG_AUDITLOG_MAXLOGDISKSPACE_ATTRIBUTE,
  460. CONFIG_AUDITLOG_MAXLOGSIZE_ATTRIBUTE,
  461. auditmaxdiskspace,
  462. auditmlogsize,
  463. returntext,
  464. SLAPD_AUDIT_LOG)) != LDAP_SUCCESS )
  465. {
  466. return rc;
  467. }
  468. return rc;
  469. }
  470. static void
  471. get_log_max_size( LDAPMod *mod,
  472. char *maxdiskspace_str,
  473. char *mlogsize_str,
  474. int *maxdiskspace,
  475. int *mlogsize)
  476. {
  477. if ( mod->mod_bvalues != NULL &&
  478. (strcasecmp( mod->mod_type, maxdiskspace_str ) == 0) )
  479. {
  480. *maxdiskspace = atoi((char *) mod->mod_bvalues[0]->bv_val);
  481. }
  482. if ( mod->mod_bvalues != NULL &&
  483. (strcasecmp( mod->mod_type, mlogsize_str ) == 0) )
  484. {
  485. *mlogsize = atoi((char *) mod->mod_bvalues[0]->bv_val);
  486. }
  487. }