Windows Backup Error on Vista

Jeremy Allison jra at samba.org
Wed Feb 7 23:22:54 GMT 2007


On Mon, Feb 05, 2007 at 02:07:25PM +0900, Kotaro Kawamura wrote:
> Hello all,
> 
> I got an error from Windows Vista Client when I made backup 
> operation with Windows Backup for files on Samba share.
> I found that the problem described below occurs when it creates
>  a temporally folder.
> I inform you cause and also suggest a resolution.
> 
> Note: The posix acl is not able to use on my Samba server environment
>  so I couldn't implement posix acl as a resolution.
> 
> The error code on Windows Vista Client is 0x800700B7.
> 
> Log message on Samba server.
> 
>     convert_canon_ace_to_posix_perms: Too many ACE entries for file
>     "file name" convert to posix perms.
> 
> When I looked up Samba (3.0.23d) source, it seems not able to process 
> following case of more than 4 ACEs at the environment of without using
>  POSIX ALC.

I just checked in the following fix to the SVN tree.
This should fix your problem - thanks for the report !

Jeremy.
-------------- next part --------------
Author: jra
Revision: r21223
Modified: source/smbd/posix_acls.c /branches/SAMBA_3_0_25/source/smbd/posix_acls.c
Added: 
Removed: 


Try and fix bug #4361 - Vista backup fails.
Based on work from  Joe Meadows <jameadows at webopolis.com>.
One for the Vista patchset.
Jeremy.


Index: source/smbd/posix_acls.c
===================================================================
--- source/smbd/posix_acls.c	(revision 21222)
+++ source/smbd/posix_acls.c	(revision 21223)
@@ -658,6 +658,7 @@
 	}
 	return 0;
 }
+
 /****************************************************************************
  Function to create owner and group SIDs from a SMB_STRUCT_STAT.
 ****************************************************************************/
@@ -669,6 +670,27 @@
 }
 
 /****************************************************************************
+ Is the identity in two ACEs equal ? Check both SID and uid/gid.
+****************************************************************************/
+
+static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2)
+{
+	if (sid_equal(&ace1->trustee, &ace2->trustee)) {
+		return True;
+	}
+	if (ace1->owner_type == ace2->owner_type) {
+		if (ace1->owner_type == UID_ACE &&
+				ace1->unix_ug.uid == ace2->unix_ug.uid) {
+			return True;
+		} else if (ace1->owner_type == GID_ACE &&
+				ace1->unix_ug.gid == ace2->unix_ug.gid) {
+			return True;
+		}
+	}
+	return False;
+}
+
+/****************************************************************************
  Merge aces with a common sid - if both are allow or deny, OR the permissions together and
  delete the second one. If the first is deny, mask the permissions off and delete the allow
  if the permissions become zero, delete the deny if the permissions are non zero.
@@ -695,7 +717,7 @@
 
 			curr_ace_next = curr_ace->next; /* Save the link in case of delete. */
 
-			if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) &&
+			if (identity_in_ace_equal(curr_ace, curr_ace_outer) &&
 				(curr_ace->attr == curr_ace_outer->attr)) {
 
 				if( DEBUGLVL( 10 )) {
@@ -735,7 +757,7 @@
 			 * we've put on the ACL, we know the deny must be the first one.
 			 */
 
-			if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) &&
+			if (identity_in_ace_equal(curr_ace, curr_ace_outer) &&
 				(curr_ace_outer->attr == DENY_ACE) && (curr_ace->attr == ALLOW_ACE)) {
 
 				if( DEBUGLVL( 10 )) {



More information about the samba-technical mailing list