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;
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to