Print this page
10133 smatch fixes for usr/src/cmd/fs.d

@@ -23,10 +23,14 @@
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
  * This is the smbfs/chacl command.
  * (just for testing - not installed)
  *
  * Works like chmod(1), but only supporting A=... forms.
  * i.e. chacl A=everyone@:full_set:fd:allow /mnt/foo

@@ -136,13 +140,12 @@
         }
 
         /*
          * Which parts of the SD are being modified?
          */
-        selector = 0;
-        if (acl)
-                selector |= DACL_SECURITY_INFORMATION;
+        selector = DACL_SECURITY_INFORMATION;
+
         if (uid != (uid_t)-1)
                 selector |= OWNER_SECURITY_INFORMATION;
         if (gid != (gid_t)-1)
                 selector |= GROUP_SECURITY_INFORMATION;