1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 #include <sys/types.h> 30 #include <dirent.h> 31 #include <errno.h> 32 #include <stddef.h> 33 34 /* 35 * In OpenSSL 0.9.7 the EVP_read_pw_string now calls into the new "ui" 36 * routines of 0.9.7, which is not compiled in the standalone, so it is 37 * stubbed out here to avoid having to add a bunch of #ifndef's elsewhere. 38 */ 39 /* ARGSUSED */ 40 int 41 EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) 42 { 43 return (-1); /* failure */ 44 } 45 46 /* 47 * In standalone issetugid() is always false. 48 */ 49 int 50 OPENSSL_issetugid(void) 51 { 52 return (1); 53 } 54 55 /* 56 * Directory routines -- currently, the only consumer of these interfaces 57 * is $SRC/common/openssl/ssl/ssl_cert.c, and it has fallback code in the 58 * case of failure, so we just fail opendir() and stub out the rest. At 59 * some point, we may need to provide a real implementation. 60 */ 61 /* ARGSUSED */ 62 DIR * 63 opendir(const char *dirname) 64 { 65 errno = EACCES; 66 return (NULL); 67 } 68 69 /* ARGSUSED */ 70 struct dirent * 71 readdir(DIR *dirp) 72 { 73 return (NULL); 74 } 75 76 /* ARGSUSED */ 77 int 78 closedir(DIR *dirp) 79 { 80 return (0); 81 }