httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk.vanGu...@jrc.it
Subject Some diffs related to the set_flag_slot()
Date Tue, 07 Jan 1997 10:25:02 GMT

Some diff's related to the set flag slot stuff. Essentially
a lot off calls which set just an int arg are removed
and replaced by the generic one.

Seems to work; not extensively tested :-)

Dw.


Index: http_core.c
===================================================================
RCS file: /home/cvs/apache/src/http_core.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 http_core.c
*** http_core.c	1997/01/03 17:14:37	1.1.1.2
--- http_core.c	1997/01/04 16:10:39
***************
*** 913,940 ****
      return NULL;
  }
  
- const char *set_idcheck (cmd_parms *cmd, core_dir_config *d, int arg) {
-     d->do_rfc1413 = arg;
-     return NULL;
- }
- 
- const char *set_hostname_lookups (cmd_parms *cmd, core_dir_config *d, int arg)
- {
-     d->hostname_lookups = arg;
-     return NULL;
- }
- 
  const char *set_serverpath (cmd_parms *cmd, void *dummy, char *arg) {
      cmd->server->path = pstrdup (cmd->pool, arg);
      cmd->server->pathlen = strlen (arg);
      return NULL;
  }
  
- const char *set_content_md5 (cmd_parms *cmd, core_dir_config *d, int arg) {
-     d->content_md5 = arg;
-     return NULL;
- }
- 
  const char *set_daemons_to_start (cmd_parms *cmd, void *dummy, char *arg) {
      daemons_to_start = atoi (arg);
      return NULL;
--- 913,924 ----
***************
*** 1142,1148 ****
  
  { "ServerType", server_type, NULL, RSRC_CONF, TAKE1,"'inetd' or 'standalone'"},
  { "Port", server_port, NULL, RSRC_CONF, TAKE1, "A TCP port number"},
! { "HostnameLookups", set_hostname_lookups, NULL, ACCESS_CONF|RSRC_CONF, FLAG, "\"on\" to
enable or \"off\" to disable reverse DNS lookups" },
  { "User", set_user, NULL, RSRC_CONF, TAKE1, "Effective user id for this server"},
  { "Group", set_group, NULL, RSRC_CONF, TAKE1, "Effective group id for this server"},
  { "ServerAdmin", set_server_string_slot,
--- 1126,1135 ----
  
  { "ServerType", server_type, NULL, RSRC_CONF, TAKE1,"'inetd' or 'standalone'"},
  { "Port", server_port, NULL, RSRC_CONF, TAKE1, "A TCP port number"},
! { "HostnameLookups", set_flag_slot,
! 	(void*)XtOffsetOf(core_dir_config, hostname_lookups),
! 	ACCESS_CONF|RSRC_CONF, FLAG, 
! 	"\"on\" to enable or \"off\" to disable reverse DNS lookups" },
  { "User", set_user, NULL, RSRC_CONF, TAKE1, "Effective user id for this server"},
  { "Group", set_group, NULL, RSRC_CONF, TAKE1, "Effective group id for this server"},
  { "ServerAdmin", set_server_string_slot,
***************
*** 1173,1180 ****
  { "Timeout", set_timeout, NULL, RSRC_CONF, TAKE1, "Timeout duration (sec)"},
  { "KeepAliveTimeout", set_keep_alive_timeout, NULL, RSRC_CONF, TAKE1, "Keep-Alive timeout
duration (sec)"},
  { "KeepAlive", set_keep_alive, NULL, RSRC_CONF, TAKE1, "Maximum Keep-Alive requests per
connection (0 to disable)" },
! { "IdentityCheck", set_idcheck, NULL, RSRC_CONF|ACCESS_CONF, FLAG, "Enable identd (RFC931)
user lookups - SLOW" },
! { "ContentDigest", set_content_md5, NULL, RSRC_CONF|ACCESS_CONF|OR_AUTHCFG, FLAG, "whether
or not to send a Content-MD5 header with each request" },
  { "StartServers", set_daemons_to_start, NULL, RSRC_CONF, TAKE1, "Number of child processes
launched at server startup" },
  { "MinSpareServers", set_min_free_servers, NULL, RSRC_CONF, TAKE1, "Minimum number of idle
children, to handle request spikes" },
  { "MaxSpareServers", set_max_free_servers, NULL, RSRC_CONF, TAKE1, "Maximum number of idle
children" },
--- 1160,1172 ----
  { "Timeout", set_timeout, NULL, RSRC_CONF, TAKE1, "Timeout duration (sec)"},
  { "KeepAliveTimeout", set_keep_alive_timeout, NULL, RSRC_CONF, TAKE1, "Keep-Alive timeout
duration (sec)"},
  { "KeepAlive", set_keep_alive, NULL, RSRC_CONF, TAKE1, "Maximum Keep-Alive requests per
connection (0 to disable)" },
! { "IdentityCheck", set_flag_slot,
! 	(void*)XtOffsetOf(core_dir_config,content_md5), 
! 	RSRC_CONF|ACCESS_CONF, FLAG, "Enable identd (RFC931) user lookups - SLOW" },
! { "ContentDigest", set_flag_slot,
! 	(void*)XtOffsetOf(core_dir_config,do_rfc1413), 
! 	RSRC_CONF|ACCESS_CONF|OR_AUTHCFG, FLAG, 
! 	"whether or not to send a Content-MD5 header with each request" },
  { "StartServers", set_daemons_to_start, NULL, RSRC_CONF, TAKE1, "Number of child processes
launched at server startup" },
  { "MinSpareServers", set_min_free_servers, NULL, RSRC_CONF, TAKE1, "Minimum number of idle
children, to handle request spikes" },
  { "MaxSpareServers", set_max_free_servers, NULL, RSRC_CONF, TAKE1, "Maximum number of idle
children" },
Index: mod_auth_anon.c
===================================================================
RCS file: /home/cvs/apache/src/mod_auth_anon.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 mod_auth_anon.c
*** mod_auth_anon.c	1997/01/03 17:15:10	1.1.1.2
--- mod_auth_anon.c	1997/01/04 16:50:55
***************
*** 127,161 ****
      sec -> auth_anon_authoritative        =0;
      return sec;
  }
! 
! const char *anon_set_passwd_flag (cmd_parms *cmd, 
! 	anon_auth_config_rec *sec, int arg) {
!     sec->auth_anon_mustemail=arg;
!     return NULL;
! }
! 
! const char *anon_set_userid_flag (cmd_parms *cmd, 
! 	anon_auth_config_rec *sec, int arg) {
!     sec->auth_anon_nouserid=arg;
!     return NULL;
! }
! const char *anon_set_logemail_flag (cmd_parms *cmd, 
! 	anon_auth_config_rec *sec, int arg) {
!     sec->auth_anon_logemail=arg;
!     return NULL;
! }
! const char *anon_set_verifyemail_flag (cmd_parms *cmd, 
! 	anon_auth_config_rec *sec, int arg) {
!     sec->auth_anon_verifyemail=arg;
!     return NULL;
! }
! const char *anon_set_authoritative_flag (cmd_parms *cmd, 
! 	anon_auth_config_rec *sec, int arg) {
!     sec->auth_anon_authoritative=arg;
!     return NULL;
! }
! 
! const char *anon_set_string_slots (cmd_parms *cmd, 
  	anon_auth_config_rec *sec, char *arg) {
    
      auth_anon 	* first;
--- 127,133 ----
      sec -> auth_anon_authoritative        =0;
      return sec;
  }
! const char *anon_add_string_slots (cmd_parms *cmd, 
  	anon_auth_config_rec *sec, char *arg) {
    
      auth_anon 	* first;
***************
*** 178,194 ****
  }
  
  command_rec anon_auth_cmds[] = {
! { "Anonymous", anon_set_string_slots,
      NULL,OR_AUTHCFG, ITERATE, NULL },
! { "Anonymous_MustGiveEmail", anon_set_passwd_flag, NULL, OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_NoUserId", anon_set_userid_flag, NULL, OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_VerifyEmail", anon_set_verifyemail_flag, NULL, OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_LogEmail", anon_set_logemail_flag, NULL, OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_Authoritative", anon_set_authoritative_flag, NULL, OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
  
  { NULL }
--- 150,181 ----
  }
  
  command_rec anon_auth_cmds[] = {
! { "Anonymous", anon_add_string_slots,
      NULL,OR_AUTHCFG, ITERATE, NULL },
! { "Anonymous_MustGiveEmail", 
! 	set_flag_slot,
! 	(void*)XtOffsetOf(anon_auth_config_rec,auth_anon_mustemail),
! 	OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_NoUserId", 
! 	set_flag_slot,
! 	(void*)XtOffsetOf(anon_auth_config_rec,auth_anon_nouserid),
! 	OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_VerifyEmail", 
! 	set_flag_slot,
! 	(void*)XtOffsetOf(anon_auth_config_rec,auth_anon_verifyemail),
! 	OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_LogEmail", 
! 	set_flag_slot,
! 	(void*)XtOffsetOf(anon_auth_config_rec,auth_anon_logemail),
! 	OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
! { "Anonymous_Authoritative", 
! 	set_flag_slot,
! 	(void*)XtOffsetOf(anon_auth_config_rec,auth_anon_authoritative),
! 	OR_AUTHCFG, FLAG, 
  	"Limited to 'on' or 'off'" },
  
  { NULL }
Index: mod_auth_msql.c
===================================================================
RCS file: /home/cvs/apache/src/mod_auth_msql.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 mod_auth_msql.c
*** mod_auth_msql.c	1997/01/03 17:15:16	1.1.1.2
--- mod_auth_msql.c	1997/01/04 17:01:44
***************
*** 449,513 ****
      return sec;
  }
  
- const char *set_passwd_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg) {
-     sec->auth_msql_nopasswd=arg;
-     return NULL;
- }
- 
- const char *set_authoritative_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg)
{
-     sec->auth_msql_authoritative=arg;
-     return NULL;
- }
- 
- const char *set_crypted_password_flag (cmd_parms *cmd, msql_auth_config_rec *sec , int arg)
{
-     sec->auth_msql_encrypted = arg;
-     return NULL;
- }
- 
- const char *msql_set_string_slot (cmd_parms *cmd, char *struct_ptr, char *arg) {
-     int offset = (int)cmd->info;
-     *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
-     return NULL;
- }
- 
- 
  command_rec msql_auth_cmds[] = {
! { "Auth_MSQLhost", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_host),
      OR_AUTHCFG, TAKE1, "Host on which the mSQL database engine resides (defaults to localhost)"
},
  
! { "Auth_MSQLdatabase", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_database),
      OR_AUTHCFG, TAKE1, "Name of the mSQL database which contains the password (and possibly
the group) tables. " },
  
! { "Auth_MSQLpwd_table", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_table),
      OR_AUTHCFG, TAKE1, "Name of the mSQL table containing the password/user-name combination"
},
  
! { "Auth_MSQLgrp_table", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_grp_table),
      OR_AUTHCFG, TAKE1, "Name of the mSQL table containing the group-name/user-name combination;
can be the same as the password-table." },
  
! { "Auth_MSQLpwd_field", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_field),
      OR_AUTHCFG, TAKE1, "The name of the field in the mSQL password table" },
  
! { "Auth_MSQLuid_field", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_uname_field),
      OR_AUTHCFG, TAKE1, "The name of the user-name field in the mSQL password (and possibly
group) table(s)." },
  
! { "Auth_MSQLgrp_field", msql_set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_grp_field),
      OR_AUTHCFG, TAKE1,
  	"The name of the group field in the mSQL group table; must be set if you want to use groups."
},
  
! { "Auth_MSQL_nopasswd", set_passwd_flag, NULL, OR_AUTHCFG, FLAG,
  	"Enable (on) or disable (off) empty password strings; in which case any user password is
accepted." },
  
! { "Auth_MSQL_Authoritative", set_authoritative_flag, NULL, OR_AUTHCFG, FLAG,
  	"When 'on' the mSQL database is taken to be authoritative and access control is not passed
along to other db or access modules." },
  
! { "Auth_MSQL_EncryptedPasswords", set_crypted_password_flag, NULL, OR_AUTHCFG, FLAG,
  	"When 'on' the password in the password table are taken to be crypt()ed using your machines
crypt() function." },
  
  #ifdef BACKWARD_VITEK
--- 449,500 ----
      return sec;
  }
  
  command_rec msql_auth_cmds[] = {
! { "Auth_MSQLhost", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_host),
      OR_AUTHCFG, TAKE1, "Host on which the mSQL database engine resides (defaults to localhost)"
},
  
! { "Auth_MSQLdatabase", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_database),
      OR_AUTHCFG, TAKE1, "Name of the mSQL database which contains the password (and possibly
the group) tables. " },
  
! { "Auth_MSQLpwd_table", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_table),
      OR_AUTHCFG, TAKE1, "Name of the mSQL table containing the password/user-name combination"
},
  
! { "Auth_MSQLgrp_table", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_grp_table),
      OR_AUTHCFG, TAKE1, "Name of the mSQL table containing the group-name/user-name combination;
can be the same as the password-table." },
  
! { "Auth_MSQLpwd_field", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_field),
      OR_AUTHCFG, TAKE1, "The name of the field in the mSQL password table" },
  
! { "Auth_MSQLuid_field", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_uname_field),
      OR_AUTHCFG, TAKE1, "The name of the user-name field in the mSQL password (and possibly
group) table(s)." },
  
! { "Auth_MSQLgrp_field", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_grp_field),
      OR_AUTHCFG, TAKE1,
  	"The name of the group field in the mSQL group table; must be set if you want to use groups."
},
  
! { "Auth_MSQL_nopasswd", 
! 	set_flag_slot, 
! 	(void*)XtOffsetOf(msql_auth_config_rec, auth_msql_nopasswd ), 
! 	OR_AUTHCFG, FLAG,
  	"Enable (on) or disable (off) empty password strings; in which case any user password is
accepted." },
  
! { "Auth_MSQL_Authoritative", 
! 	set_flag_slot, 
! 	(void*)XtOffsetOf(msql_auth_config_rec, auth_msql_authoritative ), 
! 	OR_AUTHCFG, FLAG,
  	"When 'on' the mSQL database is taken to be authoritative and access control is not passed
along to other db or access modules." },
  
! { "Auth_MSQL_EncryptedPasswords", 
! 	set_flag_slot, 
! 	(void*)XtOffsetOf(msql_auth_config_rec, auth_msql_encrypted ), 
! 	OR_AUTHCFG, FLAG,
  	"When 'on' the password in the password table are taken to be crypt()ed using your machines
crypt() function." },
  
  #ifdef BACKWARD_VITEK
***************
*** 536,542 ****
  { "AuthMSQLPasswordField", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_field),
      OR_AUTHCFG, TAKE1, "mSQL Password field name within table" },
! { "AuthMSQLCryptedPasswords", set_crypted_password_flag, NULL,
      OR_AUTHCFG, FLAG, "mSQL passwords are stored encrypted if On" },
  
  #endif
--- 523,531 ----
  { "AuthMSQLPasswordField", set_string_slot,
      (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_pwd_field),
      OR_AUTHCFG, TAKE1, "mSQL Password field name within table" },
! { "AuthMSQLCryptedPasswords", 
!     set_flag_slot, 
!     (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_encrypted ), 
      OR_AUTHCFG, FLAG, "mSQL passwords are stored encrypted if On" },
  
  #endif
Index: mod_dld.c
===================================================================
RCS file: /home/cvs/apache/src/mod_dld.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 mod_dld.c
*** mod_dld.c	1997/01/03 17:15:26	1.1.1.2
--- mod_dld.c	1997/01/04 22:30:37
***************
*** 53,64 ****
--- 53,80 ----
  /*
   * A first stab at dynamic loading, using the GNU dld library
   * (or at least, an embarassingly old version of it...).
+  *
+  * -dirkx- Added a second stab; using the dlopen/dlclose/dlsymb
+  *         calls in FreeBSD. Not tested.
   */
  
  #include "httpd.h"
  #include "http_config.h"
  #include "http_conf_globals.h"	/* server_argv0.  Sigh... */
+ 
+ #ifdef DLD
  #include <dld.h>
+ #endif
+ 
+ #ifdef DLFCN
+ #include <dlfcn.h>
+ #endif
+ 
+ #ifdef DLD_MODULE_DEBUG
+ #define DLDDEBUG(x) { printf x ; }
+ #else
+ #define DLDDEBUG(x)
+ #endif
  
  /*
   * The hard part of implementing LoadModule is deciding what to do about
***************
*** 71,143 ****
  
  char *insure_dld_sane()
  {
      int errcode;
      char *bin_name;
!     
      if (have_symbol_table) return NULL;
  
      bin_name = dld_find_executable (server_argv0);
      
      if ((errcode = dld_init (bin_name))) {
  	dld_perror (server_argv0);
  	return "Cannot find server binary (needed for dynamic linking).";
      }
  
      have_symbol_table = 1;
      return NULL;
  }
  
  char *link_file (pool *p, char *filename)
  {
      int errcode;
      
      filename = server_root_relative (p, filename);
      if ((errcode = dld_link (filename))) {
  	dld_perror (server_argv0);
  	return pstrcat (p, "Cannot load ", filename, " into server", NULL);
      }
      return NULL;
  }
  
! char *load_module (cmd_parms *cmd, void *dummy, char *modname, char *filename)
  {
      char *errname;
      module *modp;
  
      if (been_there_done_that) return NULL;
      
      if ((errname = insure_dld_sane())) return errname;
      if ((errname = link_file (cmd->pool, filename))) return errname;
!     if (!(modp = (module *)dld_get_symbol (modname))) {
! 	return pstrcat (cmd->pool, "Can't find module ", modname,
  			           " in file ", filename, NULL);
      }
  
!     add_module (modp);
  
      /* Alethea Patch (rws,djw2) - need to run configuration functions
         in new modules */
  
      if (modp->create_server_config)
        ((void**)cmd->server->module_config)[modp->module_index]=
  	(*modp->create_server_config)(cmd->pool, cmd->server);
  
      if (modp->create_dir_config)
        ((void**)cmd->server->lookup_defaults)[modp->module_index]=
  	(*modp->create_dir_config)(cmd->pool, NULL);
  
  
      return NULL;
  }
  
! char *load_file (cmd_parms *cmd, void *dummy, char *filename)
  {
      char *errname;
!     
      if (been_there_done_that) return NULL;
      
      if ((errname = insure_dld_sane())) return errname;
      if ((errname = link_file (cmd->pool, filename))) return errname;
      return NULL;
  }
  
--- 87,216 ----
  
  char *insure_dld_sane()
  {
+ #ifdef DLD
      int errcode;
      char *bin_name;
! #endif
! 
! #ifdef DLFCN
!     void *bin_ptr;
! #endif
! 
      if (have_symbol_table) return NULL;
  
+ #ifdef DLD
      bin_name = dld_find_executable (server_argv0);
      
      if ((errcode = dld_init (bin_name))) {
  	dld_perror (server_argv0);
  	return "Cannot find server binary (needed for dynamic linking).";
      }
+ #endif
+ 
+ #ifdef DLFCN
+     if (!(bin_ptr = dlopen(NULL,1))) 
+ 	return dlerror();
  
+ #endif
      have_symbol_table = 1;
      return NULL;
  }
  
+ #ifdef DLD
  char *link_file (pool *p, char *filename)
  {
      int errcode;
      
      filename = server_root_relative (p, filename);
+ 
      if ((errcode = dld_link (filename))) {
  	dld_perror (server_argv0);
  	return pstrcat (p, "Cannot load ", filename, " into server", NULL);
      }
+ 
      return NULL;
  }
+ #endif
  
! const char *load_module (cmd_parms *cmd, void *dummy, char *modname, char *filename)
  {
      char *errname;
      module *modp;
+ #ifdef DLFCN
+     void * handle;
+ #endif
+ 
+ DLDDEBUG(
+ 	(
+ 	"load_module Act='%s' of %s\n",
+ 	(been_there_done_that ? "Skip" : "Load"),
+ 	(filename ? filename : "<null ptr>"))
+ 	); 
  
      if (been_there_done_that) return NULL;
      
      if ((errname = insure_dld_sane())) return errname;
+ #ifdef DLD
      if ((errname = link_file (cmd->pool, filename))) return errname;
!     if (!(modp = (module *)dld_get_symbol (modname)))) {
! 	return pstrcat (cmd->pool, "Can't find module symbol ", modname,
  			           " in file ", filename, NULL);
      }
+ #endif
+ #ifdef DLFCN
+     if (!(handle=dlopen(filename,1)))
+ 	return pstrcat (cmd->pool," Cannot dlopen() module ", filename,
+ 		" Failed with :",dlerror(), NULL);
+ DLDDEBUG(("Done the dlopen()\n"));
+ 
+     if (!(modp = (module *) dlsym(handle,pstrcat(cmd->pool ,"_", modname, NULL)))) {
+ 	return pstrcat (cmd->pool, "Can't find module symbol ", modname,
+ 			           " in file ", filename, 
+ 					" with error : ",dlerror(),
+ 					NULL);
+     }
+ #endif
  
! DLDDEBUG(("About to add_module on %s\n",filename));
!    add_module(modp); 
  
      /* Alethea Patch (rws,djw2) - need to run configuration functions
         in new modules */
  
+ DLDDEBUG(("About to create_server_config %s\n",filename));
      if (modp->create_server_config)
        ((void**)cmd->server->module_config)[modp->module_index]=
  	(*modp->create_server_config)(cmd->pool, cmd->server);
  
+ DLDDEBUG(("About to create_dir_config %s\n",filename));
      if (modp->create_dir_config)
        ((void**)cmd->server->lookup_defaults)[modp->module_index]=
  	(*modp->create_dir_config)(cmd->pool, NULL);
  
+ DLDDEBUG(("OK for %s\n",filename));
  
      return NULL;
  }
  
! const char *load_file (cmd_parms *cmd, void *dummy, char *filename)
  {
      char *errname;
!    
! DLDDEBUG(("load_file %s %s\n",
! 	been_there_done_that ? "Skip" : "Load",
! 	filename ? filename :"<null ptr>")); 
! 
      if (been_there_done_that) return NULL;
      
      if ((errname = insure_dld_sane())) return errname;
+ #ifdef DLD
      if ((errname = link_file (cmd->pool, filename))) return errname;
+ #endif
+ 
+ #ifdef DLFCN
+     if (!(dlopen(filename,1)))
+ 	return dlerror();
+ #endif
      return NULL;
  }
  
***************
*** 145,150 ****
--- 218,224 ----
  {
      if (been_there_done_that) return;
  
+ #ifdef DLD
      if (dld_undefined_sym_count > 0) {
  	/* Screwup.  Do the best we can to inform the user, and exit */
  	char **bad_syms = dld_list_undefined_sym();
***************
*** 159,165 ****
  
  	exit (1);
      }
!     
      been_there_done_that = 1;
  }
  
--- 233,248 ----
  
  	exit (1);
      }
! #endif
! 
! #ifdef DLFNC
!     /* we COULD call dlerror(), but that is not exactly neat;
!      * and is likely to interfere with any other modules or
!      * libaries (such as the Sybase one) which do dlopen()s
!      * themselves. So we rely on the dlXXX() calles themselves
!      * to be checked properly.
!      */
! #endif    
      been_there_done_that = 1;
  }
  
Index: mod_expires.c
===================================================================
RCS file: /home/cvs/apache/src/mod_expires.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 mod_expires.c
*** mod_expires.c	1997/01/03 17:15:57	1.1.1.2
--- mod_expires.c	1997/01/04 17:02:40
***************
*** 218,235 ****
      return (void *)new;
  }   
  
- const char *set_expiresactive (cmd_parms *cmd, expires_dir_config *dir_config, int arg)
- {
-     /* if we're here at all it's because someone explicitly
-      * set the active flag
-      */
-     dir_config->active = ACTIVE_ON;
-     if ( arg == 0 ) {
-         dir_config->active = ACTIVE_OFF;
-     };
-     return NULL;
- } 
- 
  /* check_code() parse 'code' and return NULL or an error response
   * string.  If we return NULL then real_code contains code converted
   * to the cnnnn format.
--- 218,223 ----
***************
*** 352,358 ****
  } 
  
  command_rec expires_cmds[] = {
! { "ExpiresActive", set_expiresactive, NULL, DIR_CMD_PERMS, FLAG, NULL},
  { "ExpiresBytype", set_expiresbytype, NULL, DIR_CMD_PERMS, TAKE2,
      "a mime type followed by an expiry date code"},
  { "ExpiresDefault", set_expiresdefault, NULL, DIR_CMD_PERMS, TAKE1,
--- 340,348 ----
  } 
  
  command_rec expires_cmds[] = {
! { "ExpiresActive", set_flag_slot, 
! 	(void*)XtOffsetOf(expires_dir_config,active), 
! 	DIR_CMD_PERMS, FLAG, NULL},
  { "ExpiresBytype", set_expiresbytype, NULL, DIR_CMD_PERMS, TAKE2,
      "a mime type followed by an expiry date code"},
  { "ExpiresDefault", set_expiresdefault, NULL, DIR_CMD_PERMS, TAKE1,
Index: mod_usertrack.c
===================================================================
RCS file: /home/cvs/apache/src/mod_usertrack.c,v
retrieving revision 1.1.1.2
diff -c -3 -r1.1.1.2 mod_usertrack.c
*** mod_usertrack.c	1997/01/03 17:15:25	1.1.1.2
--- mod_usertrack.c	1997/01/04 15:35:30
***************
*** 210,221 ****
      return (void *)pcalloc(p, sizeof(int));
  }
  
- const char *set_cookie_enable (cmd_parms *cmd, int *c, int arg)
- {
-     *c = arg;
-     return NULL;
- }
- 
  const char *set_cookie_exp (cmd_parms *parms, void *dummy, const char *arg)
  {
      cookie_log_state *cls = get_module_config (parms->server->module_config,
--- 210,215 ----
***************
*** 284,290 ****
  command_rec cookie_log_cmds[] = {
  { "CookieExpires", set_cookie_exp, NULL, RSRC_CONF, TAKE1,
      "an expiry date code" },
! { "CookieTracking", set_cookie_enable, NULL, OR_FILEINFO, FLAG,
      "whether or not to enable cookies" },
  { NULL }
  };
--- 278,284 ----
  command_rec cookie_log_cmds[] = {
  { "CookieExpires", set_cookie_exp, NULL, RSRC_CONF, TAKE1,
      "an expiry date code" },
! { "CookieTracking", set_flag_slot, NULL, OR_FILEINFO, FLAG,
      "whether or not to enable cookies" },
  { NULL }
  };


Mime
View raw message