Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2012 11:50:14 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240084 - head/bin/setfacl
Message-ID:  <201209041150.q84BoEqC049173@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Tue Sep  4 11:50:13 2012
New Revision: 240084
URL: http://svn.freebsd.org/changeset/base/240084

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

Modified:
  head/bin/setfacl/setfacl.c

Modified: head/bin/setfacl/setfacl.c
==============================================================================
--- head/bin/setfacl/setfacl.c	Tue Sep  4 11:43:00 2012	(r240083)
+++ head/bin/setfacl/setfacl.c	Tue Sep  4 11:50:13 2012	(r240084)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209041150.q84BoEqC049173>