Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save WanpengQian/e8d617ea11ff380e77586a59ff88dbff to your computer and use it in GitHub Desktop.
Save WanpengQian/e8d617ea11ff380e77586a59ff88dbff to your computer and use it in GitHub Desktop.
[partial fix] CVE-2015-5299 denies access to ZFS snapshots due to overly strict condition checking (the patch is against Samba 4.4.13)
--- source3/modules/vfs_shadow_copy2.c.orig 2017-04-02 08:19:24 UTC
+++ source3/modules/vfs_shadow_copy2.c
@@ -1533,7 +1533,7 @@ static bool check_access_snapdir(struct
&smb_fname,
false,
SEC_DIR_LIST);
- if (!NT_STATUS_IS_OK(status)) {
+ if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
DEBUG(0,("user does not have list permission "
"on snapdir %s\n",
smb_fname.base_name));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment