--- filemanip.cc 2010-09-03 01:39:11.068497900 +0400 +++ filemanip.cc.new 2010-09-03 01:27:32.459122900 +0400 @@ -31,9 +31,12 @@ #include "ntdll.h" #include "io.h" #include "fcntl.h" +#include "getopt++/BoolOption.h" using namespace std; +static BoolOption NoAclOption (false, 'f', "no-acl-files", "Disable ACL usage when creating files"); + /* legacy wrapper. * Clients should use io_stream.get_size() */ size_t @@ -490,7 +493,7 @@ wname[1] = L'?'; RtlInitUnicodeString (&uname, wname); InitializeObjectAttributes (&attr, &uname, OBJ_CASE_INSENSITIVE, NULL, - disp == FILE_OPEN || perms == 0 + disp == FILE_OPEN || perms == 0 || NoAclOption ? NULL : nt_sec.GetPosixPerms ("", NULL, NULL, perms, sd, acl));