smb_common_search.c revision 7b59d02d2a384be9a08087b14defadd214b3c1dd
1073N/A * The contents of this file are subject to the terms of the 1073N/A * Common Development and Distribution License (the "License"). 1073N/A * You may not use this file except in compliance with the License. 1073N/A * See the License for the specific language governing permissions 1073N/A * and limitations under the License. 1073N/A * When distributing Covered Code, include this CDDL HEADER in each 1073N/A * If applicable, add the following below this CDDL HEADER, with the 1073N/A * fields enclosed by brackets "[]" replaced with your own identifying 1073N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1073N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 1073N/A * Use is subject to license terms. 1073N/A#
pragma ident "%Z%%M% %I% %E% SMI" 1073N/A * Implementation of smb_rdir_open, smb_rdir_next and smb_rdir_close. 1100N/A * ENOENT There is no (more) entry 1100N/A * error code An error happened 1073N/A /* There are no wildcards in pattern */ 1415N/A /* Already found entry... */ 1073N/A * We are here if there was a successful lookup of the 1415N/A * name. The name may be a mangled name. If it was, 1073N/A * then shortname has the copy of it. So, we may 1073N/A * not need to do mangling later. 1073N/A * dir->name will contain the case-preserved name. 1073N/A * If that name is not available (this should not 1073N/A * happen), then copy dir->pattern into dir->name. 1073N/A * If name not already mangled, do it. 1073N/A * The name will only be mangled if smb_needs_mangle() 1073N/A * determines that it is required. Mangling due to 1073N/A * case-insensitive collisions is not necessary here. 1073N/A }
/* No wild card search */ 1073N/A /* sizeof dir->name == 256 */ 1073N/A * Don't return "." or ".." unless SMB_FA_HIDDEN bit is set 1073N/A * We have to code these specially since we cannot set the 1073N/A * SMB_FA_HIDDEN bits in these because they are simply links to 1073N/A * the real directory and the real directory is NOT hidden. 1073N/A /* may match a mangled name or "real" name */ 1073N/A /* Look up the "real" name */ 1073N/A /* Obey search attributes */