0N/A * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 0N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 233N/A * Windows implementation of AclFileAttributeView. 233N/A * typedef struct _SECURITY_DESCRIPTOR { 233N/A * SECURITY_DESCRIPTOR_CONTROL Control; 564N/A * } SECURITY_DESCRIPTOR; 563N/A // invokes GetFileSecurity to get requested security information 0N/A // invoke get to buffer size 0N/A // allocate buffer and re-invoke to get security information 233N/A // buffer was insufficient 0N/A // GetFileSecurity does not follow links so when following links we 0N/A // need the final target 0N/A // get the address of the SID 0N/A // GetFileSecurity does not follow links so when following links we 0N/A // need the final target 0N/A // ALLOW and DENY entries in DACL; 0N/A // AUDIT entries in SACL (ignore for now as it requires privileges) 0N/A // SetFileSecurity does not follow links so when following links we 0N/A // need the final target 0N/A // ConvertStringSidToSid allocates memory for SID so must invoke 0N/A // LocalFree to free it when we are done 0N/A // Allocate buffer for security descriptor, initialize it, set 0N/A // owner information and update the file. 0N/A // may need SeRestorePrivilege to set the owner 109N/A // SetFileSecurity does not follow links so when following links we 110N/A // need the final target