rdiff-backup-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-bugs] [bug #21202] Crash : AssertionError: no ownership of


From: Andrew Ferguson
Subject: [Rdiff-backup-bugs] [bug #21202] Crash : AssertionError: no ownership of ...
Date: Wed, 26 Dec 2007 18:23:21 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

Update of bug #21202 (project rdiff-backup):

                  Status:                   Fixed => In Progress            
             Open/Closed:                  Closed => Open                   

    _______________________________________________________

Follow-up Comment #5:

Alrighty, I'll reopen this so we can discuss.

Let me get this straight: rdiff-backup runs as UID X, writes files as owned
by UID Y, which have permission 000, but it *is* able to chmod those files?
Wouldn't it have to chmod them to 004 (or better, 044) in order to read them?

You need to narrow your except statements so that you don't catch errors you
don't know how to handle. If we take your new patch, it should look like:

sig = Null
try:
  sig = Rdiff.get_signature(dest_rp)
except IOError, e:
  if (e.errno == errno.EPERM):
    try:
      dest_rp.chmod(0400 | dest_rp.getperms())
    except IOError, e:
      if (e.errno == errno.EPERM):
        log.Log.FatalError("Could not open...")
      else:
        raise
    sig = Rdiff.get_signature(dest_rp)
  else:
    raise

return sig



Now, I imagine that the above code is a good deal slower than the code
currently in rdiff-backup. Also, the first except clause is going to be hit
fairly often because it replaces the original if statement that used to handle
the chmod. The try/except machinery is slower than an if statement.

This code is along a critical path: get_one_sig_fp() gets hit once for every
regular file. AFS sounds like a pretty sophisticated filesystem that made the
mistake of trying to live in a Unix environment. :-)


I noticed you also submited a patch in Debian for AFS. If I'm reading that
one correctly, ideally you would want to see the high_perms test broken into
high_perms_files and high_perms_dirs tests, so that rdiff-backup could set
those independently. Right? 

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?21202>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]