Changeset 1703

Show
Ignore:
Timestamp:
11/09/08 22:01:28 (2 months ago)
Author:
till
Message:

honeytrap
- missing mode for open() with O_CREAT added

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeytrap/trunk/src/modules/htm_SaveFile.c

    r1697 r1703  
    147147 
    148148        /* open file and set access rights */ 
    149         if ((dumpfile_fd = open(filename, O_WRONLY | O_CREAT | O_EXCL)) < 0) { 
     149        if ((dumpfile_fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 644)) < 0) { 
    150150                logmsg(LOG_ERR, 1, "SaveFile error - Unable to save attack string in attacks directory: %s\n", strerror(errno)); 
    151151                return(-1); 
     
    182182                } 
    183183                logmsg(LOG_DEBUG, 1, "SaveFile - Malware sample dumpfile name is %s\n", mwfilename); 
    184                 if (((dumpfile_fd = open(mwfilename, O_WRONLY | O_CREAT | O_EXCL)) < 0) || 
     184                if (((dumpfile_fd = open(mwfilename, O_WRONLY | O_CREAT | O_EXCL, 644)) < 0) || 
    185185                    (fchmod(dumpfile_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0)) { 
    186186                        logmsg(LOG_WARN, 1, "SaveFile error - Unable to save malware sample dumpfile %s: %s.\n", mwfilename, 
  • honeytrap/trunk/src/modules/htm_ftpDownload.c

    r1697 r1703  
    336336        timeout = 60; 
    337337        data_sock_fd = -1; 
     338        memset(rline, 0, MAX_LINE); 
    338339 
    339340        // increase number of download tries