+-------------------------------------------------------------------
+Tue Feb 11 14:08:06 CET 2014 - aschnell@suse.de
+
+- sync ACL at startup (bnc#863073)
+
-------------------------------------------------------------------
Wed Feb 05 10:50:25 CET 2014 - aschnell@suse.de
config_info->getValue(KEY_FSTYPE, fstype);
filesystem = Filesystem::create(fstype, config_info->getSubvolume());
+ bool sync_acl;
+ if (config_info->getValue(KEY_SYNC_ACL, sync_acl) && sync_acl == true)
+ syncAcl();
+
y2mil("subvolume:" << config_info->getSubvolume() << " filesystem:" <<
filesystem->fstype());
{
SDir infos_dir = openInfosDir();
- acl_t acl = acl_get_fd(infos_dir.fd());
+ acl_t orig_acl = acl_get_fd(infos_dir.fd());
+ if (!orig_acl)
+ throw AclException();
+
+ acl_t acl = acl_dup(orig_acl);
if (!acl)
throw AclException();
if (acl_calc_mask(&acl) != 0)
throw AclException();
- if (acl_set_fd(infos_dir.fd(), acl) != 0)
- throw AclException();
+ if (acl_cmp(orig_acl, acl) == 1)
+ if (acl_set_fd(infos_dir.fd(), acl) != 0)
+ throw AclException();
if (acl_free(acl) != 0)
throw AclException();