Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2012 08:33:46 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r241185 - stable/9/bin/setfacl
Message-ID:  <201210040833.q948XkNw007049@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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