Changeset 3854


Ignore:
Timestamp:
Nov 17, 2007, 4:20:08 PM (15 years ago)
Author:
charles
Message:

fix permissions issue reported by Jaybird in http://transmission.m0k.org/forum/viewtopic.php?t=2944

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r3779 r3854  
    8787enum
    8888{
    89     TR_MAX_SOCKETS = 512,
    90 
    91     TR_MAX_OPEN_FILES = 16, /* real files, not sockets */
    92 
    93     TR_RESERVED_FDS   = 16 /* sockets reserved for tracker connections */
     89    TR_MAX_SOCKETS = 320,
     90
     91    TR_MAX_OPEN_FILES = 8, /* real files, not sockets */
     92
     93    TR_RESERVED_FDS   = 16, /* sockets reserved for tracker connections */
     94
     95    TR_MKDIR_PERM = 0777,
     96
     97    TR_CREAT_PERM = 0666
    9498};
    9599
     
    132136    if( write ) {
    133137        char * tmp = tr_strdup( filename );
    134         const int val = tr_mkdirp( dirname(tmp), 0700 );
     138        const int val = tr_mkdirp( dirname(tmp), TR_MKDIR_PERM );
    135139        tr_free( tmp );
    136140        if( val )
     
    147151#endif
    148152    errno = 0;
    149     file->fd = open( filename, flags, 0600 );
     153    file->fd = open( filename, flags, TR_CREAT_PERM );
    150154    if( file->fd < 0 ) {
    151155        if( errno ) {
Note: See TracChangeset for help on using the changeset viewer.