httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@hyperreal.org
Subject cvs commit: apache-1.3/src/main http_main.c
Date Tue, 20 Jul 1999 17:44:25 GMT
coar        99/07/20 10:44:21

  Modified:    src/main http_main.c
  Log:
  	*SecurityDescriptor() should be returning an error on Win98, but
  	sometimes doesn't -- so check the last error if it claims all
  	went well, just in case it's fibbing.
  
  Submitted by:	Allan Edwards <ake@raleigh.ibm.com>,
  		Keith Wannamaker <krw@raleigh.ibm.com>
  Reviewed by:	Ken Coar
  
  Revision  Changes    Path
  1.455     +9 -5      apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.454
  retrieving revision 1.455
  diff -u -r1.454 -r1.455
  --- http_main.c	1999/07/02 15:55:07	1.454
  +++ http_main.c	1999/07/20 17:44:16	1.455
  @@ -5757,16 +5757,20 @@
       PSECURITY_DESCRIPTOR pSD;
       PSECURITY_ATTRIBUTES sa;
   
  -    sa  = (PSECURITY_ATTRIBUTES) LocalAlloc(LPTR, sizeof (SECURITY_ATTRIBUTES));
  -    pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
  -    if (pSD == NULL || sa == NULL)
  +    sa  = (PSECURITY_ATTRIBUTES) LocalAlloc(LPTR, sizeof(SECURITY_ATTRIBUTES));
  +    pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR,
  +					    SECURITY_DESCRIPTOR_MIN_LENGTH);
  +    if (pSD == NULL || sa == NULL) {
           return NULL;
  -    if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) {
  +    }
  +    if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)
  +	|| GetLastError()) {
           LocalFree( pSD );
           LocalFree( sa );
           return NULL;
       }
  -    if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)) {
  +    if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)
  +	|| GetLastError()) {
           LocalFree( pSD );
           LocalFree( sa );
           return NULL;
  
  
  

Mime
View raw message