Branch: Tag:

2005-08-25

2005-08-25 14:00:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Released privileges too early for PUT.

Rev: server/modules/filesystems/filesystem.pike:1.149

7:   inherit "module";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.148 2005/07/19 12:17:04 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.149 2005/08/25 14:00:51 grubba Exp $";   constant thread_safe=1;      #include <module.h>
1039:       object to = open(f, "wct");    int err = errno(); -  privs = 0; +        TRACE_ENTER("PUT: Accepted", 0);   
1050:       if(!to)    { +  privs = 0;    TRACE_LEAVE("PUT: Open failed");    return errno_to_status (err, 1, id);    }       // FIXME: Race-condition.    chmod(f, 0666 & ~(id->misc->umask || 022)); -  +  privs = 0;       putting[id->my_fd] = id->misc->len;    if(id->data && strlen(id->data))