httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_log.c
Date Mon, 12 Jun 2000 21:08:26 GMT
trawick     00/06/12 14:08:26

  Modified:    src/lib/apr/file_io/unix open.c
               src/lib/apr/include apr_file_io.h
               src/main http_log.c
  Log:
  Back out ap_set_default_perms().  Remove old logic to play with umask
  around the creation of the httpd.pid file.  Pass explicit permissions to
  ap_open(), omitting write-ability except by the owning user.  As always,
  we end up with rw-r--r-- for the permissions unless the umask is something
  unusual.
  
  Note that the OS/2 and Win32 implementations of ap_open() ignore the
  permissions parameter altogether.
  
  Revision  Changes    Path
  1.53      +0 -5      apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- open.c	2000/06/12 16:00:31	1.52
  +++ open.c	2000/06/12 21:08:24	1.53
  @@ -79,11 +79,6 @@
       }
   }
   
  -ap_fileperms_t ap_set_default_fperms(ap_fileperms_t perm)
  -{
  -    return umask(perm);
  -}
  -
   ap_status_t ap_open(ap_file_t **new, const char *fname, ap_int32_t flag,  ap_fileperms_t
perm, ap_pool_t *cont)
   {
       int oflags = 0;
  
  
  
  1.52      +0 -15     apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- apr_file_io.h	2000/06/12 16:00:32	1.51
  +++ apr_file_io.h	2000/06/12 21:08:25	1.52
  @@ -158,21 +158,6 @@
   
   /*
   
  -=head1 ap_fileperms_t ap_set_default_fperms(ap_fileperms_t perm)
  -
  -B<Set the default file permissions.>
  -
  -    arg 1) The permissions to use as the defaults for all files created by APR.
  -
  -B<NOTE>:  This function can not fail, and it returns the current default
  -          permissions.
  -
  -=cut
  - */
  -ap_fileperms_t ap_set_default_fperms(ap_fileperms_t perm);
  -
  -/*
  -
   =head1 ap_status_t ap_close(ap_file_t *file)
   
   B<Close the specified file.>
  
  
  
  1.54      +1 -11     apache-2.0/src/main/http_log.c
  
  Index: http_log.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- http_log.c	2000/06/12 16:00:33	1.53
  +++ http_log.c	2000/06/12 21:08:25	1.54
  @@ -490,9 +490,6 @@
       ap_finfo_t finfo;
       static pid_t saved_pid = -1;
       pid_t mypid;
  -#ifndef WIN32
  -    mode_t u;
  -#endif
   
       if (!fname) 
   	return;
  @@ -514,21 +511,14 @@
   			       );
       }
   
  -#ifndef WIN32
  -    u = ap_set_default_fperms(022);
  -    (void) ap_set_default_fperms(u | 022);
  -#endif
       if (ap_open(&pid_file, fname, APR_WRITE | APR_CREATE | APR_TRUNCATE,
  -                APR_OS_DEFAULT, p) != APR_SUCCESS) {
  +                APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p) != APR_SUCCESS) {
   	perror("fopen");
           ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
                        "%s: could not log pid to file %s",
   		     ap_server_argv0, fname);
           exit(1);
       }
  -#ifndef WIN32
  -    (void) ap_set_default_fperms(u);
  -#endif
       ap_fprintf(pid_file, "%ld\n", (long)mypid);
       ap_close(pid_file);
       saved_pid = mypid;
  
  
  

Mime
View raw message