2362N/A * Copyright (c) 2004, 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 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/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. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * Access mask to represent any file access 0N/A * Returns JNI_TRUE if the specified file is on a file system that supports 0N/A * persistent ACLs (On NTFS file systems returns true, on FAT32 file systems 0N/A * Get root directory. Assume that files are absolute paths. For UNCs 0N/A * the slash after the share name is required. 0N/A * \\server\share\file ==> \\server\share\ 0N/A * Get the volume information - this gives us the file system file and 0N/A * also tells us if the file system supports persistent ACLs. 0N/A NULL,
// address of name of the volume, can be NULL 0N/A 0,
// length of volume name 0N/A NULL,
// address of volume serial number, can be NULL 0N/A * Returns the security descriptor for a file. 0N/A * Returns pointer to the SID identifying the owner of the specified 0N/A * Returns pointer discretionary access-control list (ACL) from the security 0N/A * descriptor of the specified file. 0N/A * Returns JNI_TRUE if the specified owner is the only SID will access 0N/A * If there's no DACL then there's no access to the file 0N/A * Iterate over the ACEs. For each "allow" type check that the SID 0N/A * matches the owner, and check that the access is read only. 0N/A * If the ACE allows any access then the file is not secure. 0N/A * Class: sun_management_FileSystemImpl 0N/A * Class: sun_management_FileSystemImpl 0N/A * Method: isSecuritySupported0 0N/A /* exception thrown - doesn't matter what we return */ 0N/A * Class: sun_management_FileSystemImpl 0N/A * Method: isAccessUserOnly0 0N/A * From the security descriptor get the file owner and 0N/A * DACL. Then check if anybody but the owner has access 0N/A * If acl is NULL it means that an exception was thrown 0N/A * or there is "all acess" to the file.