bugrdiff-backup - Bugs: bug #15436, Abort when using ACLs and...

 
 

bug #15436: Abort when using ACLs and user/group unknown on destination

Submitter:  Remy Blank <remyblank>
Submitted:  Fri 13 Jan 2006 12:57:02 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 14 Jan 2006 04:00:51 AM UTC, comment #4: 

Your first suggestion seems like a good one.  The patch at
http://cvs.savannah.nongnu.org/viewcvs/rdiff-backup/rdiff_backup/user_group.py?root=rdiff-backup&r1=1.6&r2=1.6.2.1&makepatch=1&diff_format=u
seems like it should fix the issue.

I'm closing the bug, reopen if that patch doesn't help, and/or that bugs shows up in the development version also.

Thanks for the very detailed bug report/fix suggestion.

Benedict Escoto <bescoto>
Group administrator
Fri 13 Jan 2006 08:18:42 PM UTC, comment #3: 

There's no change in user_group.py between 1.0.1 and 1.0.3. However, it has massively changed in 1.1.5. I'll try to reproduce the problem with 1.1.5.

Anonymous
Fri 13 Jan 2006 05:48:44 PM UTC, comment #2: 

I actually don't see any changes offhand in user_group.py since 1.0.1.  But you might as well verify that the bug happens in the newest version (1.0.3) as long as it wouldn't take you too long.

Benedict Escoto <bescoto>
Group administrator
Fri 13 Jan 2006 01:02:22 PM UTC, comment #1: 

I see that quite a lot has changed in user_group in CVS, so this is hopefully already fixed by those changes.

Remy Blank <remyblank>
Fri 13 Jan 2006 12:57:02 PM UTC, original submission:  

I am backing up from a linux server with ACLs to a linux server with ACLs. Both servers have different passwd/group files, i.e. some users from the source don't exist on the destination. I am not using user or group mapping files. I am using rdiff-backup-1.0.1 on Gentoo.

There is one file on the source with an ACL referencing user "gterrien", which doesn't exist on the destination. rdiff-backup warns that the ACL is dropped and continues. But it raises an uncaught exception and aborts as soon as it reaches a file without ACL but owned by "gterrien". The exception is due to calling os.chown() with "None" as the user parameter.

I could diagnose the cause as follows:

 - The unknown user is detected in eas_acls.list_to_acl() after calling map_id_name().
 - map_id_name() calls user_group.Map.get_id_from_name() to retrieve the id for a username.
 - Map.get_id_from_name() calls Map.find_id_from_name(), which returns None if the username cannot be found.
 - Map.get_id_from_name() gets None as the id and stores it in its cache name2id_dict.
 - When rdiff-backup reaches the next file without ACL but with the same username, it calls user_group.Map.get_id().
 - Map.get_id() looks the username up in the cache name2id_dict and finds an entry with value None, so it returns None instead of the id passed to get_id().

I am not familiar enough with the internal workings of rdiff-backup, so I am not sure what the correct fix would be.
I would propose either of the following:

 - Check in Map.get_id_from_name() if find_id_from_name() returns None, and not store it in the cache if it is the case.
 - Check in Map.get_id() if the value returned by the cache is None, and in that case to return the id passed as parameter.

Please feel free to contact me if you need more information or testing.

Remy Blank <remyblank>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-14 bescoto StatusNone Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code