+-------------------------------------------------------------------
+Tue Oct 01 15:46:19 CEST 2013 - aschnell@suse.de
+
+- restrict permissions on .snapshots subvolume (bnc#843219)
+
-------------------------------------------------------------------
Mon Sep 30 14:20:22 CEST 2013 - aschnell@suse.de
y2err("create subvolume failed errno:" << errno << " (" << stringerror(errno) << ")");
throw CreateConfigFailedException("creating btrfs snapshot failed");
}
+
+ SFile x(subvolume_dir, ".snapshots");
+ struct stat stat;
+ if (x.stat(&stat, 0) == 0)
+ x.chmod(stat.st_mode & ~0027, 0);
}
}
+ int
+ SFile::chmod(mode_t mode, int flags) const
+ {
+ return dir.chmod(name, mode, flags);
+ }
+
+
bool
SFile::xaSupported() const
{
int stat(struct stat* buf, int flags) const;
int open(int flags) const;
int readlink(string& buf) const;
+ int chmod(mode_t mode, int flags) const;
bool xaSupported() const;