#1 fssa.py tries to stat everything in /tmp

open
nobody
None
5
2006-09-22
2006-09-22
Anonymous
No

Basically, fssa.py fails occassionaly when it tries to
stat things that it shouldn't. The following patch is a
fix.

13a14,15
> import glob
>
31,36c35,39
< for filename in os.listdir('/tmp'):
< file_stat = os.stat("/tmp/%s" % (filename))
< if file_stat[stat.ST_UID] == os.getuid() \ < and stat.S_ISDIR(file_stat[stat.ST_MODE]) \ < and filename.find('ssh-') == 0:
< candidate_dirs.append("/tmp/%s" %
filename)
---
> for filename in glob.glob('/tmp/ssh-*'):
> file_stat = os.stat(filename)
> if (file_stat[stat.ST_UID] == os.getuid() and
> stat.S_ISDIR(file_stat[stat.ST_MODE])):
> candidate_dirs.append(filename)

Discussion

  • Nobody/Anonymous

    fssa.py patch.

     
  • Damon Kohler

    Damon Kohler - 2006-09-22

    Logged In: YES
    user_id=705317

    Sorry, didn't log in first. I submitted this patch.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks