svn commit: r241185 - stable/9/bin/setfacl

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Oct 4 08:52:09 UTC 2012


Author: trasz
Date: Thu Oct  4 08:33:46 2012
New Revision: 241185
URL: http://svn.freebsd.org/changeset/base/241185

Log:
  MFC r240084:
  
  Make "setfacl -bd" an alias for "setfacl -k".  Previously it would crash
  on assert.
  
  PR:		bin/165807

Modified:
  stable/9/bin/setfacl/setfacl.c
Directory Properties:
  stable/9/bin/setfacl/   (props changed)

Modified: stable/9/bin/setfacl/setfacl.c
==============================================================================
--- stable/9/bin/setfacl/setfacl.c	Thu Oct  4 08:26:49 2012	(r241184)
+++ stable/9/bin/setfacl/setfacl.c	Thu Oct  4 08:33:46 2012	(r241185)
@@ -264,6 +264,17 @@ main(int argc, char *argv[])
 				need_mask = 1;
 				break;
 			case OP_REMOVE_EXT:
+				/*
+				 * Don't try to call remove_ext() for empty
+				 * default ACL.
+				 */
+				if (acl_type == ACL_TYPE_DEFAULT &&
+				    acl_get_entry(acl, ACL_FIRST_ENTRY,
+				    &unused_entry) == 0) {
+					local_error += remove_default(&acl,
+					    file->filename);
+					break;
+				}
 				remove_ext(&acl, file->filename);
 				need_mask = 0;
 				break;


More information about the svn-src-all mailing list