httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.com>
Subject cvs commit: apache/src http_core.c
Date Fri, 24 Jan 1997 07:42:47 GMT
brian       97/01/23 23:42:47

  Modified:    src       http_core.c
  Log:
  Reviewed by:	Randy Terbush, Chuck Murcko
  Submitted by:	Ed Korthof
  
  This is a bug fix; as I mentioned, the RLimit* set of directives silently
  ignore any second argument.
  
  The TAKE12 method passes a second char * argument (which may be NULL),
  which was simply being ignored (I suppose compilers haven't complained
  because the functioned called is determined at runtime; and the function
  was finding all the arguments it expected...).
  
  Revision  Changes    Path
  1.60      +10 -10    apache/src/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_core.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -C3 -r1.59 -r1.60
  *** http_core.c	1997/01/24 01:49:15	1.59
  --- http_core.c	1997/01/24 07:42:45	1.60
  ***************
  *** 976,982 ****
    
    #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC)
    static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg,
  ! 		       int type)
    {
        char *str;
        struct rlimit *limit;
  --- 976,982 ----
    
    #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC)
    static void set_rlimit(cmd_parms *cmd, struct rlimit **plimit, const char *arg,
  !                        const char * arg2, int type)
    {
        char *str;
        struct rlimit *limit;
  ***************
  *** 1003,1009 ****
    	return;
        }
        
  !     if ((str = getword_conf(cmd->pool, &arg)))
    	max = atol(str);
    
        /* if we aren't running as root, cannot increase max */
  --- 1003,1009 ----
    	return;
        }
        
  !     if ((str = getword_conf(cmd->pool, &arg2)))
    	max = atol(str);
    
        /* if we aren't running as root, cannot increase max */
  ***************
  *** 1024,1030 ****
    
    #if !defined (RLIMIT_CPU) || !(defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)) || !defined
(RLIMIT_NPROC)
    static const char *no_set_limit (cmd_parms *cmd, core_dir_config *conf,
  ! 				 char *arg)
    {
        log_printf(cmd->server, "%s not supported on this platform",
    	       cmd->cmd->name);
  --- 1024,1030 ----
    
    #if !defined (RLIMIT_CPU) || !(defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)) || !defined
(RLIMIT_NPROC)
    static const char *no_set_limit (cmd_parms *cmd, core_dir_config *conf,
  ! 				 char *arg, char *arg2)
    {
        log_printf(cmd->server, "%s not supported on this platform",
    	       cmd->cmd->name);
  ***************
  *** 1033,1061 ****
    #endif
    
    #ifdef RLIMIT_CPU
  ! const char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg)
    {
  !     set_rlimit(cmd,&conf->limit_cpu,arg,RLIMIT_CPU);
        return NULL;
    }
    #endif
    
    #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
  ! const char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg)
    {
    #ifdef RLIMIT_DATA
  !     set_rlimit(cmd,&conf->limit_mem,arg,RLIMIT_DATA);
    #else
  !     set_rlimit(cmd,&conf->limit_mem,arg,RLIMIT_VMEM);
    #endif
        return NULL;
    }
    #endif
    
    #ifdef RLIMIT_NPROC
  ! const char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg)
    {
  !     set_rlimit(cmd,&conf->limit_nproc,arg,RLIMIT_NPROC);
        return NULL;
    }
    #endif
  --- 1033,1061 ----
    #endif
    
    #ifdef RLIMIT_CPU
  ! const char *set_limit_cpu (cmd_parms *cmd, core_dir_config *conf, char *arg, char *arg2)
    {
  !     set_rlimit(cmd,&conf->limit_cpu,arg,arg2,RLIMIT_CPU);
        return NULL;
    }
    #endif
    
    #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM)
  ! const char *set_limit_mem (cmd_parms *cmd, core_dir_config *conf, char *arg, char * arg2)
    {
    #ifdef RLIMIT_DATA
  !     set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_DATA);
    #else
  !     set_rlimit(cmd,&conf->limit_mem,arg,arg2,RLIMIT_VMEM);
    #endif
        return NULL;
    }
    #endif
    
    #ifdef RLIMIT_NPROC
  ! const char *set_limit_nproc (cmd_parms *cmd, core_dir_config *conf, char *arg, char *
arg2)
    {
  !     set_rlimit(cmd,&conf->limit_nproc,arg,arg2,RLIMIT_NPROC);
        return NULL;
    }
    #endif
  
  
  

Mime
View raw message