ldconfig.c (d4ba5766dde61481c91cb861ae7894fb7e3eac9b) | ldconfig.c (cabb97dcbf9a5a7e0ce3b2cfef019afdfc9a21dc) |
---|---|
1/* 2 * Copyright (c) 1993,1995 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/* 2 * Copyright (c) 1993,1995 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $Id: ldconfig.c,v 1.19 1997/07/11 14:45:41 jkh Exp $ | 30 * $Id: ldconfig.c,v 1.20 1997/08/22 04:42:12 peter Exp $ |
31 */ 32 33#include <sys/param.h> 34#include <sys/types.h> 35#include <sys/stat.h> 36#include <sys/file.h> 37#include <sys/time.h> 38#include <sys/mman.h> --- 102 unchanged lines hidden (view full) --- 141 /* Add any directories/files from the command line */ 142 if (!justread) { 143 for (i = optind; i < argc; i++) { 144 struct stat stbuf; 145 146 if (stat(argv[i], &stbuf) == -1) { 147 warn("%s", argv[i]); 148 rval = -1; | 31 */ 32 33#include <sys/param.h> 34#include <sys/types.h> 35#include <sys/stat.h> 36#include <sys/file.h> 37#include <sys/time.h> 38#include <sys/mman.h> --- 102 unchanged lines hidden (view full) --- 141 /* Add any directories/files from the command line */ 142 if (!justread) { 143 for (i = optind; i < argc; i++) { 144 struct stat stbuf; 145 146 if (stat(argv[i], &stbuf) == -1) { 147 warn("%s", argv[i]); 148 rval = -1; |
149 } else { | 149 } 150 else if (!strcmp(argv[i], "/usr/lib")) { 151 warnx("WARNING! '%s' can not be used", argv[i]); 152 rval = -1; 153 } 154 else { |
150 /* 151 * See if this is a directory-containing 152 * file instead of a directory 153 */ 154 if (S_ISREG(stbuf.st_mode)) 155 rval |= dofile(argv[i], 0); 156 else 157 add_search_path(argv[i]); --- 424 unchanged lines hidden --- | 155 /* 156 * See if this is a directory-containing 157 * file instead of a directory 158 */ 159 if (S_ISREG(stbuf.st_mode)) 160 rval |= dofile(argv[i], 0); 161 else 162 add_search_path(argv[i]); --- 424 unchanged lines hidden --- |