pax_global_header00006660000000000000000000000064122047212140014505gustar00rootroot0000000000000052 comment=463ed9a71dfcdb801e58c24b06cd3e99d6f1a6c9 389-admin-1.1.35/000077500000000000000000000000001220472121400132055ustar00rootroot00000000000000389-admin-1.1.35/.gitignore000066400000000000000000000000701220472121400151720ustar00rootroot00000000000000*~ autom4te.cache .project .cproject .autotools *.patch 389-admin-1.1.35/AUTHORS000066400000000000000000000000001220472121400142430ustar00rootroot00000000000000389-admin-1.1.35/COPYING000066400000000000000000000431221220472121400142420ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. 389-admin-1.1.35/ChangeLog000066400000000000000000000000001220472121400147450ustar00rootroot00000000000000389-admin-1.1.35/INSTALL000066400000000000000000000224321220472121400142410ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. 389-admin-1.1.35/LICENSE000066400000000000000000000431141220472121400142150ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. 389-admin-1.1.35/Makefile.am000066400000000000000000000600671220472121400152520ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK NULLSTRING := SPACE := $(NULLSTRING) # the space is between the ) and the # COLON := $(NULLSTRING):# a colon QUOTE := $(NULLSTRING)"# a double quote" define NL \\n endef BUILDNUM := $(shell perl $(srcdir)/buildnum.pl) NQBUILDNUM := $(subst \,,$(subst $(QUOTE),,$(BUILDNUM))) DEBUG_DEFINES = @debug_defs@ # the -U undefines these symbols - should use the corresponding ADM_ ones instead - see configure.ac OTHER_DEFINES = -DVENDOR="\"$(vendor)\"" -DBRAND="\"$(brand)\"" -DCAPBRAND="\"$(capbrand)\"" \ -DVENDORURL="\"$(vendorurl)\"" \ -UPACKAGE_VERSION -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_BUGREPORT \ -DDIRSRV_SYSTEMD_PREFIX="\"@dirsrv_systemd_prefix@\"" \ -DDIRSRV_SYSTEMD_SUFFIX="\"@dirsrv_systemd_suffix@\"" \ -DDIRSRV_SERVICE_NAME="\"@dirsrv_service_name@\"" PATH_DEFINES = -DINITCONFIGDIR="\"$(initconfigdir)\"" # look for included m4 files in the ./m4/ directory ACLOCAL_AMFLAGS = -I m4 install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ progdir=`dirname $$file` ; \ progname=`basename $$progdir` ; \ destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ cp "$$file" "$$destdir" || exit 1 ; \ cp "$$file" "$$destdir/en.res" || exit 1 ; \ cp "$$file" "$$destdir/en_US.res" || exit 1 ; \ done cgibindir = $(libdir)@cgibindir@ cmdbindir = $(sbindir) moddir = @moddir@ propertydir = $(datadir)@propertydir@ htmldir = $(datadir)@htmldir@ icondir = $(datadir)@icondir@ httpdconf = @httpdconf@ manualdir = $(datadir)@manualdir@ helpdir = $(manualdir)/help systemdsystemunitdir = @with_systemdsystemunitdir@ systemddirsrvgroupname = @with_systemddirsrvgroupname@ initdir = @initdir@ initconfigdir = $(sysconfdir)@initconfigdir@ instconfigdir = @instconfigdir@ instancename = @instancename@ configdir = $(instconfigdir)/$(instancename) # same as configdir for now securitydir = $(configdir) piddir = $(localstatedir)@piddir@ pidfile = @pidfile@ HTTPD = @HTTPD@ httpduser = @httpduser@ modnssbindir = @modnssbindir@ ldifdir = $(datadir)@ldifdir@ admmoddir = $(libdir)@admmoddir@ infdir = $(datadir)@infdir@ perldir = $(libdir)@perldir@ dslibdir = @dslibdir@ if BUNDLE logdir = $(localstatedir)@admlogdir@ else logdir = $(localstatedir)@admlogdir@/$(instancename) endif updatedir = $(datadir)@updatedir@ # needed for selinux policy dsgwcgibindir = $(libdir)@dsgwcgibindir@ dsgwconfigdir = $(instconfigdir)/dsgw dsgwcookiedir = $(localstatedir)@dsgwcookiedir@ libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ lib/libadmin/referer.c lib/libadmin/template.c lib/libadmin/util.c AM_CPPFLAGS = $(DEBUG_DEFINES) $(PATH_DEFINES) $(OTHER_DEFINES) @adminutil_inc@ @icu_inc@ @openldap_inc@ @ldapsdk_inc@ @nss_inc@ @nspr_inc@ -DUSE_ADMSERV=1 \ -I$(srcdir)/include -I$(srcdir)/include/base if WINNT AM_CPPFLAGS += -DXP_WINNT else AM_CPPFLAGS += -DXP_UNIX endif AM_CPPFLAGS +=-DPROPERTYDIR=\"$(propertydir)\" -DLIBDIR=\"$(libdir)\" \ -DPIDDIR=\"$(piddir)\" -DHTMLDIR=\"$(htmldir)\" -DICONDIR=\"$(icondir)\" \ -DCMDBINDIR=\"$(cmdbindir)\" -DMANUALDIR=\"$(manualdir)\" \ -DCONFIGDIR=\"$(configdir)\" -DSECURITYDIR=\"$(securitydir)\" \ -DLOGDIR=\"$(logdir)\" -DHTTPD=\"$(HTTPD)\" -DDEFAULT_HTTPDUSER=\"$(httpduser)\" \ -DPIDFILE=\"$(pidfile)\" -DDATADIR=\"$(datadir)\" -DLDIFDIR=\"$(ldifdir)\" \ -DBUILD_NUM=$(BUILDNUM) -DINFDIR=\"$(infdir)\" -DCGIBINDIR=\"$(cgibindir)\" \ -DINSTCONFIGDIR=\"$(instconfigdir)\" -DDSLIBDIR=\"$(dslibdir)\" # We need to make sure that libpthread is linked before libc on HP-UX. if HPUX AM_LDFLAGS = -lpthread endif # CGI shared library lib_LTLIBRARIES = libds-admin-serv.la # CGI static library noinst_LIBRARIES = libdsa.a # Apache modules admmod_LTLIBRARIES = mod_admserv.la mod_restartd.la LIBSOCKET=@LIBSOCKET@ LIBNSL=@LIBNSL@ LIBCSTD=@LIBCSTD@ LIBCRUN=@LIBCRUN@ #------------------------ # Linker Flags #------------------------ if OPENLDAP LDAPSDK_LINK = @openldap_lib@ -lldap@ol_libver@ @ldap_lib_ldif@ use_openldap = 1 ADMINUTIL_LINK = @adminutil_lib@ @nspr_lib@ @nss_lib@ @sasl_lib@ @openldap_lib@ @icu_lib@ -ladmsslutil@adminutil_ver@ -ladminutil@adminutil_ver@ else LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lprldap60 -lldap60 -lldif60 ADMINUTIL_LINK = @adminutil_lib@ @nspr_lib@ @nss_lib@ @sasl_lib@ @ldapsdk_lib@ @icu_lib@ -ladmsslutil@adminutil_ver@ -ladminutil@adminutil_ver@ endif NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 NSS_LINK = @nss_lib@ -lsmime3 -lssl3 -lnss3 -lsoftokn3 SASL_LINK = @sasl_lib@ -lsasl2 ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata DEFAULT_LIBS_NOCGI = $(ADMINUTIL_LINK) \ $(ICU_LINK) \ $(LDAPSDK_LINK) \ $(SASL_LINK) \ $(NSS_LINK) \ $(NSPR_LINK) \ $(LIBNSL) $(LIBSOCKET) $(LIBCSTD) $(LIBCRUN) DEFAULT_LIBS = libds-admin-serv.la $(DEFAULT_LIBS_NOCGI) if CXXLINK_REQUIRED MYLINK = $(CXXLINK) else MYLINK = $(LINK) endif if SELINUX POLICY_FC = selinux-built/dirsrv-admin.fc endif BUILT_SOURCES = $(POLICY_FC) $(RESOURCE_BUNDLES_ROOT) clean-local: -rm -rf selinux-built selinux-built: cp -r $(srcdir)/selinux $@ selinux-built/dirsrv-admin.fc: selinux-built $(fixupcmd) selinux-built/dirsrv-admin.fc.in > $@ if SYSTEMD systemdsystemunit_DATA = wrappers/$(PACKAGE_NAME).service else init_SCRIPTS = wrappers/$(PACKAGE_NAME) endif initconfig_DATA = admserv/cfgstuff/$(PACKAGE_NAME) ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ admserv/schema/ldif/02globalpreferences.ldif.tmpl \ admserv/schema/ldif/10dsdata.ldif.tmpl \ admserv/schema/ldif/10rm_dsdata.ldif.tmpl \ admserv/schema/ldif/11dstasks.ldif.tmpl \ admserv/schema/ldif/12dsconfig.mod.tmpl \ admserv/schema/ldif/13dsschema.mod.tmpl \ admserv/schema/ldif/14dsmonitor.mod.tmpl \ admserv/schema/ldif/15dspta.mod.tmpl \ admserv/schema/ldif/16dssuffixadmin.mod.tmpl \ admserv/schema/ldif/20asdata.ldif.tmpl \ admserv/schema/ldif/21astasks.ldif.tmpl \ admserv/schema/ldif/22ascommands.ldif.tmpl \ admserv/schema/ldif/asmigrate.ldif.tmpl \ admserv/html/admserv_phonebook.html \ admserv/html/admserv_orgchart.html \ admserv/html/admserv_dsgw.html inf_DATA = admserv/newinst/src/admin.inf \ admserv/newinst/src/setup.inf \ admserv/newinst/src/register_param.map \ admserv/newinst/src/configdsroot.map \ admserv/newinst/src/adminserver.map \ admserv/newinst/src/dirserver.map \ admserv/newinst/src/asmigrate.map \ admserv/newinst/src/updateconsoleinfo.map \ admserv/newinst/src/dssuffixadmin.map cgibin_PROGRAMS = admpw security ugdsconfig ReadLog start_config_ds \ config statpingserv viewdata dsconfig monreplication restartsrv \ statusping viewlog htmladmin sec-activate stopsrv download help \ ds_start ds_restart ds_shutdown ds_listdb ds_snmpctrl cgibin_SCRIPTS = admserv/cgi-src40/ds_create \ admserv/cgi-src40/ds_remove \ admserv/cgi-src40/ds_unregister \ admserv/cgi-src40/repl-monitor-cgi.pl nodist_cmdbin_SCRIPTS = admserv/cfgstuff/start-ds-admin \ admserv/cfgstuff/stop-ds-admin \ admserv/cfgstuff/restart-ds-admin \ admserv/cfgstuff/ds_removal \ admserv/cfgstuff/ds_unregister cmdbin_SCRIPTS = admserv/newinst/src/setup-ds-admin.pl \ admserv/newinst/src/migrate-ds-admin.pl \ admserv/newinst/src/register-ds-admin.pl \ admserv/newinst/src/remove-ds-admin.pl perl_DATA = admserv/newinst/src/ASDialogs.pm \ admserv/newinst/src/AdminUtil.pm \ admserv/newinst/src/AdminServer.pm \ admserv/newinst/src/ConfigDSDialogs.pm \ admserv/newinst/src/AdminMigration.pm \ admserv/newinst/src/RegDSDialogs.pm #------------------------ # man pages #------------------------ dist_man_MANS = man/man8/ds_removal.8 \ man/man8/ds_unregister.8 \ man/man8/migrate-ds-admin.pl.8 \ man/man8/setup-ds-admin.pl.8 \ man/man8/start-ds-admin.8 \ man/man8/stop-ds-admin.8 \ man/man8/register-ds-admin.pl.8 \ man/man8/restart-ds-admin.8 \ man/man8/remove-ds-admin.pl.8 #------------------------ # updates # the directory server package contains examples # perl files and LDIF files are DATA - not executable # processed by the update script # shell scripts and other files are SCRIPTS - executable #------------------------ update_DATA = admserv/newinst/src/25rebrand.pl \ admserv/newinst/src/30updateglobalpref.pl update_SCRIPTS = admserv/makeUpgradeTar.sh #------------------------ # libraries #------------------------ libds_admin_serv_la_SOURCES = $(libbase_a_SOURCES) $(libsi18n_a_SOURCES) $(libadmin_a_SOURCES) libds_admin_serv_la_LINK = $(MYLINK) libds_admin_serv_la_LIBADD = $(ADMINUTIL_LINK) \ $(NSPR_LINK) libdsa_a_SOURCES = lib/libdsa/dsalib_conf.c \ lib/libdsa/dsalib_debug.c \ lib/libdsa/dsalib_tailf.c \ lib/libdsa/dsalib_confs.c \ lib/libdsa/dsalib_location.c \ lib/libdsa/dsalib_updown.c \ lib/libdsa/dsalib_db.c \ lib/libdsa/dsalib_util.c libdsa_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include/libdsa @openldap_inc@ @ldapsdk_inc@ @nss_inc@ @nspr_inc@ # source files for our CGI programs download_SOURCES = admserv/cgi-src40/download.c help_SOURCES = admserv/cgi-src40/help.c start_config_ds_SOURCES = admserv/cgi-src40/start_config_ds.c admpw_SOURCES = admserv/cgi-src40/admpw.c security_SOURCES = admserv/cgi-src40/security.c ugdsconfig_SOURCES = admserv/cgi-src40/ugdsconfig.c ReadLog_SOURCES = admserv/cgi-src40/ReadLog.c config_SOURCES = admserv/cgi-src40/config.c statpingserv_SOURCES = admserv/cgi-src40/statpingserv.c viewdata_SOURCES = admserv/cgi-src40/viewdata.c dsconfig_SOURCES = admserv/cgi-src40/dsconfig.c monreplication_SOURCES = admserv/cgi-src40/monreplication.c restartsrv_SOURCES = admserv/cgi-src40/restartsrv.c statusping_SOURCES = admserv/cgi-src40/statusping.c viewlog_SOURCES = admserv/cgi-src40/viewlog.c htmladmin_SOURCES = admserv/cgi-src40/htmladmin.c sec_activate_SOURCES = admserv/cgi-src40/sec-activate.c stopsrv_SOURCES = admserv/cgi-src40/stopsrv.c # libs to use for each program - they are different in some cases - so can't just use global ldflags admpw_LDADD = $(DEFAULT_LIBS) start_config_ds_LDADD = $(DEFAULT_LIBS) security_LDADD = $(DEFAULT_LIBS) ugdsconfig_LDADD = $(DEFAULT_LIBS) ReadLog_LDADD = $(DEFAULT_LIBS) config_LDADD = $(DEFAULT_LIBS) statpingserv_LDADD = $(DEFAULT_LIBS) viewdata_LDADD = $(DEFAULT_LIBS) dsconfig_LDADD = $(DEFAULT_LIBS) monreplication_LDADD = $(DEFAULT_LIBS) restartsrv_LDADD = $(DEFAULT_LIBS) statusping_LDADD = $(DEFAULT_LIBS) viewlog_LDADD = $(DEFAULT_LIBS) htmladmin_LDADD = $(DEFAULT_LIBS) sec_activate_LDADD = $(DEFAULT_LIBS) stopsrv_LDADD = $(DEFAULT_LIBS) admpw_LINK = $(MYLINK) start_config_ds_LINK = $(MYLINK) security_LINK = $(MYLINK) ugdsconfig_LINK = $(MYLINK) ReadLog_LINK = $(MYLINK) config_LINK = $(MYLINK) statpingserv_LINK = $(MYLINK) viewdata_LINK = $(MYLINK) dsconfig_LINK = $(MYLINK) monreplication_LINK = $(MYLINK) restartsrv_LINK = $(MYLINK) statusping_LINK = $(MYLINK) viewlog_LINK = $(MYLINK) htmladmin_LINK = $(MYLINK) sec_activate_LINK = $(MYLINK) stopsrv_LINK = $(MYLINK) # ds admin interfaces ds_start_SOURCES = admserv/cgi-ds/start.c admserv/cgi-ds/init_ds_env.c ds_start_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_start_LDADD = libdsa.a $(DEFAULT_LIBS) ds_start_LINK = $(MYLINK) ds_restart_SOURCES = admserv/cgi-ds/restart.c admserv/cgi-ds/init_ds_env.c ds_restart_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_restart_LDADD = libdsa.a $(DEFAULT_LIBS) ds_restart_LINK = $(MYLINK) ds_shutdown_SOURCES = admserv/cgi-ds/shutdown.c admserv/cgi-ds/init_ds_env.c ds_shutdown_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_shutdown_LDADD = libdsa.a $(DEFAULT_LIBS) ds_shutdown_LINK = $(MYLINK) ds_listdb_SOURCES = admserv/cgi-ds/ds_listdb.c admserv/cgi-ds/init_ds_env.c ds_listdb_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_listdb_LDADD = libdsa.a $(DEFAULT_LIBS) ds_listdb_LINK = $(MYLINK) ds_snmpctrl_SOURCES = admserv/cgi-ds/ds_snmpctrl.c admserv/cgi-ds/init_ds_env.c ds_snmpctrl_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_snmpctrl_LDADD = libdsa.a $(DEFAULT_LIBS) ds_snmpctrl_LINK = $(MYLINK) ############## mod_admserv ################ mod_admserv_la_SOURCES = mod_admserv/mod_admserv.c mod_admserv_la_CPPFLAGS = -I@apache_inc@ @apr_inc@ $(AM_CPPFLAGS) @extra_cppflags@ mod_admserv_la_LDFLAGS = -module -avoid-version mod_admserv_la_LIBADD = $(DEFAULT_LIBS) mod_admserv_la_LINK = $(MYLINK) $(mod_admserv_la_LDFLAGS) ############## mod_restartd ################ mod_restartd_la_SOURCES = mod_restartd/mod_restartd@ap_ver_suf@.c mod_restartd_la_CPPFLAGS = @apr_inc@ -I@apache_inc@ @extra_cppflags@ mod_restartd_la_LDFLAGS = -module -avoid-version mod_restartd_la_LINK = $(MYLINK) $(mod_restartd_la_LDFLAGS) ############## Data Files ################ HTMLDIR = admserv/html dist_html_DATA = $(HTMLDIR)/htmladmin.html $(HTMLDIR)/monreplication.html $(HTMLDIR)/viewdata.html $(HTMLDIR)/viewlog.html $(HTMLDIR)/admserv.html ICONDIR = admserv/icons40 dist_icon_DATA = $(ICONDIR)/16space.gif $(ICONDIR)/directorysmall.gif $(ICONDIR)/group2.gif $(ICONDIR)/togoff.gif \ $(ICONDIR)/adminics.gif $(ICONDIR)/dms.jpg $(ICONDIR)/help.gif $(ICONDIR)/messagingic.gif $(ICONDIR)/togon.gif \ $(ICONDIR)/cert16.gif $(ICONDIR)/domain16.gif $(ICONDIR)/host.gif $(ICONDIR)/N24b.gif \ $(ICONDIR)/enterpriseic.gif $(ICONDIR)/hr.gif $(ICONDIR)/oldservic.gif $(ICONDIR)/goto.gif \ $(ICONDIR)/spacer.gif dist_help_DATA = admserv/cgi-src40/help.js admserv/cgi-src40/library.html \ admserv/cgi-src40/head.html admserv/cgi-src40/frameset.html nodist_config_DATA = admserv/cfgstuff/console.conf admserv/cfgstuff/admserv.conf \ admserv/cfgstuff/nss.conf admserv/cfgstuff/httpd.conf if APACHE24 # F18 and newer HTTPD_CONF_SRC = admserv/cfgstuff/httpd-2.4.conf.in else if APACHE22 HTTPD_CONF_SRC = admserv/cfgstuff/httpd-2.2.conf.in else HTTPD_CONF_SRC = admserv/cfgstuff/httpd.conf.in endif endif MOSTLYCLEANFILES = $(nodist_cmdbin_SCRIPTS) $(nodist_config_DATA) # Resource Bundle Compiler if WINNT ICU_GENRB = @icu_bin@/genrb.exe else ICU_GENRB = sh -x $(srcdir)/admserv/genrb_wrapper.sh "@icu_bin@" "@icu_libdir@" endif # need a reverse sort # on some systems, -e is not used - escape sequences just work # so we have to remove the -e from the stream mysort = $(shell echo -e $(subst $(SPACE),$(NL),$2) | grep -v -- -e | sort $1 -k1,1) # for a bundle, all of the components will be under libdir (e.g. prefix/lib) # and mod_nss will be in the admin server module directory if BUNDLE LIBPATH = $(subst $(SPACE),$(COLON),$(dslibdir) $(libdir)) runtime_nssmoddir=$(admmoddir) runtime_nss_libdir=$(libdir) runtime_ldapsdk_libdir=$(libdir) perlpath=$(perldir) $(libdir)/perl/arch $(libdir)/perl else # need to create the LD_LIBRARY_PATH,SHLIB_PATH string to use in scripts # sort also strips out duplicates LIBDIRLIST = $(nspr_libdir) $(nss_libdir) $(openldap_libdir) $(ldapsdk_libdir) $(sasl_libdir) $(adminutil_libdir) $(icu_libdir) $(libdir) LIBDIRS = $(call mysort,-ru,$(LIBDIRLIST)) # now put it in the canonical form LIBPATH = $(subst $(SPACE),$(COLON),$(LIBDIRS)) # nssmoddir is the same runtime_nssmoddir=$(nssmoddir) runtime_nss_libdir=$(nss_libdir) runtime_ldapsdk_libdir=$(openldap_libdir) $(ldapsdk_libdir) perlpath=$(perldir) endif # this is primarily needed for HP-UX and the other platforms # where we bundle all of the components together adminutilpath=$(datadir)/$(PACKAGE_BASE_NAME)/adminutil # The root resource bundle is based on English (en) locale; # This bundle must be always distributed and there is no need to have # *_en.properties resource bundle source files. # ICU resource file installation is handled specially RESOURCE_BUNDLES_ROOT = \ properties/admpw/root.res \ properties/security/root.res properties/config/root.res \ properties/stopsrv/root.res \ properties/dsconfig/root.res properties/monreplication/root.res \ properties/ugdsconfig/root.res properties/htmladmin/root.res \ properties/restartsrv/root.res properties/viewdata/root.res \ properties/sec-activate/root.res properties/viewlog/root.res \ properties/cgicommon/root.res MOSTLYCLEANFILES += $(RESOURCE_BUNDLES_ROOT) # regular property files go here property_DATA = admserv/newinst/src/setup-ds-admin.res \ admserv/newinst/src/migrate-ds-admin.res \ admserv/newinst/src/register-ds-admin.res \ admserv/cgi-src40/ds_create.res \ admserv/cgi-src40/ds_remove.res # French resource bundles (for the French localization in the future) #RESOURCE_BUNDLES_FR = foo_fr.res # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res properties/%/root.res : admserv/cgi-src40/%.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $+ %/root.res : %.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $+ %_fr.res : %_fr.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-2 $+ %_de.res : %_de.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-2 $+ # these are for the config files and scripts that we need to generate and replace # the paths and other tokens with the real values set during configure/make # note that we cannot just use AC_OUTPUT to do this for us, since it will do things like this: # ADMConfigDir = ${prefix}/etc/packagename # i.e. it literally copies in '${prefix}' rather than expanding it out - we want this instead: # ADMConfigDir = /etc/packagename if BUNDLE # Some of the paths need to be different if we are making a bundled build, # namely the mod_nss bindir. fixupcmd = sed \ -e 's,@ECHO_C\@,$(ECHO_C),g' \ -e 's,@ECHO_N\@,$(ECHO_N),g' \ -e 's,@HTTPD\@,$(HTTPD),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@localstatedir\@,$(localstatedir),g' \ -e 's,@cgibindir\@,$(cgibindir),g' \ -e 's,@cmdbindir\@,$(cmdbindir),g' \ -e 's,@moddir\@,$(moddir),g' \ -e 's,@modnssbindir\@,$(sbindir),g' \ -e 's,@propertydir\@,$(propertydir),g' \ -e 's,@htmldir\@,$(htmldir),g' \ -e 's,@icondir\@,$(icondir),g' \ -e 's,@logdir\@,$(logdir),g' \ -e 's,@manualdir\@,$(manualdir),g' \ -e 's,@configdir\@,$(configdir),g' \ -e 's,@securitydir\@,$(securitydir),g' \ -e 's,@httpduser\@,$(httpduser),g' \ -e 's,@httpdgroup\@,$(httpdgroup),g' \ -e 's,@httpdconfdir\@,$(httpdconfdir),g' \ -e 's,@piddir\@,$(piddir),g' \ -e 's,@pidfile\@,$(pidfile),g' \ -e 's,@admservport\@,$(admservport),g' \ -e 's,@admservip\@,$(admservip),g' \ -e 's,@LIBPATH\@,$(LIBPATH),g' \ -e 's,@nss_libdir\@,$(runtime_nss_libdir),g' \ -e 's,@ldapsdk_libdir\@,$(runtime_ldapsdk_libdir),g' \ -e 's,@use_openldap\@,$(use_openldap),g' \ -e 's,@admmoddir\@,$(admmoddir),g' \ -e 's,@nssmoddir\@,$(runtime_nssmoddir),g' \ -e 's,@instconfigdir\@,$(instconfigdir),g' \ -e 's,@instancename\@,$(instancename),g' \ -e 's,@BUILD_NUM\@,$(BUILDNUM),g' \ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ -e 's,@package_name\@,$(PACKAGE_NAME),g' \ -e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ -e 's,@brand\@,$(brand),g' \ -e 's,@capbrand\@,$(capbrand),g' \ -e 's,@vendor\@,$(vendor),g' \ -e 's,@vendorurl\@,$(vendorurl),g' \ -e 's,@helpdir\@,$(helpdir),g' \ -e 's,@mimemagic\@,$(mimemagic),g' \ -e 's,@initdir\@,$(initdir),g' \ -e 's,@perlpath\@,$(perlpath),g' \ -e 's,@perlexec\@,@perlexec@,g' \ -e 's,@infdir\@,$(infdir),g' \ -e 's,@dslibdir\@,$(dslibdir),g' \ -e 's,@ldifdir\@,$(ldifdir),g' \ -e 's,@adminutilpath\@,$(adminutilpath),g' \ -e 's,@initconfigdir\@,$(initconfigdir),g' \ -e 's,@updatedir\@,$(updatedir),g' \ -e 's,@with_selinux\@,@with_selinux@,g' \ -e 's,@enable_service\@,@enable_service@,g' \ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \ -e 's,@systemddirsrvgroupname\@,$(systemddirsrvgroupname),g' \ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g' else fixupcmd = sed \ -e 's,@ECHO_C\@,$(ECHO_C),g' \ -e 's,@ECHO_N\@,$(ECHO_N),g' \ -e 's,@HTTPD\@,$(HTTPD),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@sbindir\@,$(sbindir),g' \ -e 's,@localstatedir\@,$(localstatedir),g' \ -e 's,@cgibindir\@,$(cgibindir),g' \ -e 's,@cmdbindir\@,$(cmdbindir),g' \ -e 's,@moddir\@,$(moddir),g' \ -e 's,@modnssbindir\@,$(modnssbindir),g' \ -e 's,@propertydir\@,$(propertydir),g' \ -e 's,@htmldir\@,$(htmldir),g' \ -e 's,@icondir\@,$(icondir),g' \ -e 's,@logdir\@,$(logdir),g' \ -e 's,@manualdir\@,$(manualdir),g' \ -e 's,@configdir\@,$(configdir),g' \ -e 's,@securitydir\@,$(securitydir),g' \ -e 's,@httpduser\@,$(httpduser),g' \ -e 's,@httpdgroup\@,$(httpdgroup),g' \ -e 's,@httpdconfdir\@,$(httpdconfdir),g' \ -e 's,@piddir\@,$(piddir),g' \ -e 's,@pidfile\@,$(pidfile),g' \ -e 's,@admservport\@,$(admservport),g' \ -e 's,@admservip\@,$(admservip),g' \ -e 's,@LIBPATH\@,$(LIBPATH),g' \ -e 's,@nss_libdir\@,$(runtime_nss_libdir),g' \ -e 's,@ldapsdk_libdir\@,$(runtime_ldapsdk_libdir),g' \ -e 's,@use_openldap\@,$(use_openldap),g' \ -e 's,@admmoddir\@,$(admmoddir),g' \ -e 's,@nssmoddir\@,$(runtime_nssmoddir),g' \ -e 's,@instconfigdir\@,$(instconfigdir),g' \ -e 's,@instancename\@,$(instancename),g' \ -e 's,@BUILD_NUM\@,$(BUILDNUM),g' \ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ -e 's,@package_name\@,$(PACKAGE_NAME),g' \ -e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ -e 's,@brand\@,$(brand),g' \ -e 's,@capbrand\@,$(capbrand),g' \ -e 's,@vendor\@,$(vendor),g' \ -e 's,@vendorurl\@,$(vendorurl),g' \ -e 's,@helpdir\@,$(helpdir),g' \ -e 's,@mimemagic\@,$(mimemagic),g' \ -e 's,@initdir\@,$(initdir),g' \ -e 's,@perlpath\@,$(perlpath),g' \ -e 's,@perlexec\@,@perlexec@,g' \ -e 's,@infdir\@,$(infdir),g' \ -e 's,@dslibdir\@,$(dslibdir),g' \ -e 's,@ldifdir\@,$(ldifdir),g' \ -e 's,@adminutilpath\@,$(adminutilpath),g' \ -e 's,@initconfigdir\@,$(initconfigdir),g' \ -e 's,@updatedir\@,$(updatedir),g' \ -e 's,@with_selinux\@,@with_selinux@,g' \ -e 's,@enable_service\@,@enable_service@,g' \ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \ -e 's,@systemddirsrvgroupname\@,$(systemddirsrvgroupname),g' \ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g' endif # because the source may be either httpd.conf.in or httpd-2.2.conf.in admserv/cfgstuff/httpd.conf: $(HTTPD_CONF_SRC) if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $< > $@ wrappers/$(PACKAGE_NAME).service: $(srcdir)/wrappers/systemd.service.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initscript.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initconfig.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ % : %.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $< > $@ 389-admin-1.1.35/Makefile.in000066400000000000000000004433471220472121400152710ustar00rootroot00000000000000# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2012 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @WINNT_TRUE@am__append_1 = -DXP_WINNT @WINNT_FALSE@am__append_2 = -DXP_UNIX cgibin_PROGRAMS = admpw$(EXEEXT) security$(EXEEXT) ugdsconfig$(EXEEXT) \ ReadLog$(EXEEXT) start_config_ds$(EXEEXT) config$(EXEEXT) \ statpingserv$(EXEEXT) viewdata$(EXEEXT) dsconfig$(EXEEXT) \ monreplication$(EXEEXT) restartsrv$(EXEEXT) \ statusping$(EXEEXT) viewlog$(EXEEXT) htmladmin$(EXEEXT) \ sec-activate$(EXEEXT) stopsrv$(EXEEXT) download$(EXEEXT) \ help$(EXEEXT) ds_start$(EXEEXT) ds_restart$(EXEEXT) \ ds_shutdown$(EXEEXT) ds_listdb$(EXEEXT) ds_snmpctrl$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(dist_help_DATA) \ $(dist_html_DATA) $(dist_icon_DATA) $(dist_man_MANS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/fhs.m4 $(top_srcdir)/m4/fortitude.m4 \ $(top_srcdir)/m4/httpd.m4 $(top_srcdir)/m4/nspr.m4 \ $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/sasl.m4 \ $(top_srcdir)/m4/openldap.m4 $(top_srcdir)/m4/mozldap.m4 \ $(top_srcdir)/m4/icu.m4 $(top_srcdir)/m4/adminutil.m4 \ $(top_srcdir)/m4/mod_nss.m4 $(top_srcdir)/m4/selinux.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libdsa_a_AR = $(AR) $(ARFLAGS) libdsa_a_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_libdsa_a_OBJECTS = lib/libdsa/libdsa_a-dsalib_conf.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_debug.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_tailf.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_confs.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_location.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_updown.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_db.$(OBJEXT) \ lib/libdsa/libdsa_a-dsalib_util.$(OBJEXT) libdsa_a_OBJECTS = $(am_libdsa_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(admmoddir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" \ "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" \ "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(updatedir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(helpdir)" \ "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" \ "$(DESTDIR)$(infdir)" "$(DESTDIR)$(initconfigdir)" \ "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" \ "$(DESTDIR)$(perldir)" "$(DESTDIR)$(propertydir)" \ "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(updatedir)" LTLIBRARIES = $(admmod_LTLIBRARIES) $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libds_admin_serv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_1 = lib/base/file.lo lib/base/nscperror.lo \ lib/base/system.lo lib/base/nscputil.lo am__objects_2 = lib/libsi18n/getstrprop.lo am__objects_3 = lib/libadmin/cluster.lo lib/libadmin/error.lo \ lib/libadmin/form_get.lo lib/libadmin/httpcon.lo \ lib/libadmin/install.lo lib/libadmin/referer.lo \ lib/libadmin/template.lo lib/libadmin/util.lo am_libds_admin_serv_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) libds_admin_serv_la_OBJECTS = $(am_libds_admin_serv_la_OBJECTS) am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__DEPENDENCIES_3 = libds-admin-serv.la $(am__DEPENDENCIES_2) mod_admserv_la_DEPENDENCIES = $(am__DEPENDENCIES_3) am_mod_admserv_la_OBJECTS = mod_admserv/mod_admserv_la-mod_admserv.lo mod_admserv_la_OBJECTS = $(am_mod_admserv_la_OBJECTS) mod_restartd_la_LIBADD = am_mod_restartd_la_OBJECTS = \ mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo mod_restartd_la_OBJECTS = $(am_mod_restartd_la_OBJECTS) PROGRAMS = $(cgibin_PROGRAMS) am_ReadLog_OBJECTS = admserv/cgi-src40/ReadLog.$(OBJEXT) ReadLog_OBJECTS = $(am_ReadLog_OBJECTS) ReadLog_DEPENDENCIES = $(am__DEPENDENCIES_3) am_admpw_OBJECTS = admserv/cgi-src40/admpw.$(OBJEXT) admpw_OBJECTS = $(am_admpw_OBJECTS) admpw_DEPENDENCIES = $(am__DEPENDENCIES_3) am_config_OBJECTS = admserv/cgi-src40/config.$(OBJEXT) config_OBJECTS = $(am_config_OBJECTS) config_DEPENDENCIES = $(am__DEPENDENCIES_3) am_download_OBJECTS = admserv/cgi-src40/download.$(OBJEXT) download_OBJECTS = $(am_download_OBJECTS) download_LDADD = $(LDADD) am_ds_listdb_OBJECTS = admserv/cgi-ds/ds_listdb-ds_listdb.$(OBJEXT) \ admserv/cgi-ds/ds_listdb-init_ds_env.$(OBJEXT) ds_listdb_OBJECTS = $(am_ds_listdb_OBJECTS) ds_listdb_DEPENDENCIES = libdsa.a $(am__DEPENDENCIES_3) am_ds_restart_OBJECTS = admserv/cgi-ds/ds_restart-restart.$(OBJEXT) \ admserv/cgi-ds/ds_restart-init_ds_env.$(OBJEXT) ds_restart_OBJECTS = $(am_ds_restart_OBJECTS) ds_restart_DEPENDENCIES = libdsa.a $(am__DEPENDENCIES_3) am_ds_shutdown_OBJECTS = \ admserv/cgi-ds/ds_shutdown-shutdown.$(OBJEXT) \ admserv/cgi-ds/ds_shutdown-init_ds_env.$(OBJEXT) ds_shutdown_OBJECTS = $(am_ds_shutdown_OBJECTS) ds_shutdown_DEPENDENCIES = libdsa.a $(am__DEPENDENCIES_3) am_ds_snmpctrl_OBJECTS = \ admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.$(OBJEXT) \ admserv/cgi-ds/ds_snmpctrl-init_ds_env.$(OBJEXT) ds_snmpctrl_OBJECTS = $(am_ds_snmpctrl_OBJECTS) ds_snmpctrl_DEPENDENCIES = libdsa.a $(am__DEPENDENCIES_3) am_ds_start_OBJECTS = admserv/cgi-ds/ds_start-start.$(OBJEXT) \ admserv/cgi-ds/ds_start-init_ds_env.$(OBJEXT) ds_start_OBJECTS = $(am_ds_start_OBJECTS) ds_start_DEPENDENCIES = libdsa.a $(am__DEPENDENCIES_3) am_dsconfig_OBJECTS = admserv/cgi-src40/dsconfig.$(OBJEXT) dsconfig_OBJECTS = $(am_dsconfig_OBJECTS) dsconfig_DEPENDENCIES = $(am__DEPENDENCIES_3) am_help_OBJECTS = admserv/cgi-src40/help.$(OBJEXT) help_OBJECTS = $(am_help_OBJECTS) help_LDADD = $(LDADD) am_htmladmin_OBJECTS = admserv/cgi-src40/htmladmin.$(OBJEXT) htmladmin_OBJECTS = $(am_htmladmin_OBJECTS) htmladmin_DEPENDENCIES = $(am__DEPENDENCIES_3) am_monreplication_OBJECTS = \ admserv/cgi-src40/monreplication.$(OBJEXT) monreplication_OBJECTS = $(am_monreplication_OBJECTS) monreplication_DEPENDENCIES = $(am__DEPENDENCIES_3) am_restartsrv_OBJECTS = admserv/cgi-src40/restartsrv.$(OBJEXT) restartsrv_OBJECTS = $(am_restartsrv_OBJECTS) restartsrv_DEPENDENCIES = $(am__DEPENDENCIES_3) am_sec_activate_OBJECTS = admserv/cgi-src40/sec-activate.$(OBJEXT) sec_activate_OBJECTS = $(am_sec_activate_OBJECTS) sec_activate_DEPENDENCIES = $(am__DEPENDENCIES_3) am_security_OBJECTS = admserv/cgi-src40/security.$(OBJEXT) security_OBJECTS = $(am_security_OBJECTS) security_DEPENDENCIES = $(am__DEPENDENCIES_3) am_start_config_ds_OBJECTS = \ admserv/cgi-src40/start_config_ds.$(OBJEXT) start_config_ds_OBJECTS = $(am_start_config_ds_OBJECTS) start_config_ds_DEPENDENCIES = $(am__DEPENDENCIES_3) am_statpingserv_OBJECTS = admserv/cgi-src40/statpingserv.$(OBJEXT) statpingserv_OBJECTS = $(am_statpingserv_OBJECTS) statpingserv_DEPENDENCIES = $(am__DEPENDENCIES_3) am_statusping_OBJECTS = admserv/cgi-src40/statusping.$(OBJEXT) statusping_OBJECTS = $(am_statusping_OBJECTS) statusping_DEPENDENCIES = $(am__DEPENDENCIES_3) am_stopsrv_OBJECTS = admserv/cgi-src40/stopsrv.$(OBJEXT) stopsrv_OBJECTS = $(am_stopsrv_OBJECTS) stopsrv_DEPENDENCIES = $(am__DEPENDENCIES_3) am_ugdsconfig_OBJECTS = admserv/cgi-src40/ugdsconfig.$(OBJEXT) ugdsconfig_OBJECTS = $(am_ugdsconfig_OBJECTS) ugdsconfig_DEPENDENCIES = $(am__DEPENDENCIES_3) am_viewdata_OBJECTS = admserv/cgi-src40/viewdata.$(OBJEXT) viewdata_OBJECTS = $(am_viewdata_OBJECTS) viewdata_DEPENDENCIES = $(am__DEPENDENCIES_3) am_viewlog_OBJECTS = admserv/cgi-src40/viewlog.$(OBJEXT) viewlog_OBJECTS = $(am_viewlog_OBJECTS) viewlog_DEPENDENCIES = $(am__DEPENDENCIES_3) SCRIPTS = $(cgibin_SCRIPTS) $(cmdbin_SCRIPTS) $(init_SCRIPTS) \ $(nodist_cmdbin_SCRIPTS) $(update_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libdsa_a_SOURCES) $(libds_admin_serv_la_SOURCES) \ $(mod_admserv_la_SOURCES) $(mod_restartd_la_SOURCES) \ $(ReadLog_SOURCES) $(admpw_SOURCES) $(config_SOURCES) \ $(download_SOURCES) $(ds_listdb_SOURCES) $(ds_restart_SOURCES) \ $(ds_shutdown_SOURCES) $(ds_snmpctrl_SOURCES) \ $(ds_start_SOURCES) $(dsconfig_SOURCES) $(help_SOURCES) \ $(htmladmin_SOURCES) $(monreplication_SOURCES) \ $(restartsrv_SOURCES) $(sec_activate_SOURCES) \ $(security_SOURCES) $(start_config_ds_SOURCES) \ $(statpingserv_SOURCES) $(statusping_SOURCES) \ $(stopsrv_SOURCES) $(ugdsconfig_SOURCES) $(viewdata_SOURCES) \ $(viewlog_SOURCES) DIST_SOURCES = $(libdsa_a_SOURCES) $(libds_admin_serv_la_SOURCES) \ $(mod_admserv_la_SOURCES) $(mod_restartd_la_SOURCES) \ $(ReadLog_SOURCES) $(admpw_SOURCES) $(config_SOURCES) \ $(download_SOURCES) $(ds_listdb_SOURCES) $(ds_restart_SOURCES) \ $(ds_shutdown_SOURCES) $(ds_snmpctrl_SOURCES) \ $(ds_start_SOURCES) $(dsconfig_SOURCES) $(help_SOURCES) \ $(htmladmin_SOURCES) $(monreplication_SOURCES) \ $(restartsrv_SOURCES) $(sec_activate_SOURCES) \ $(security_SOURCES) $(start_config_ds_SOURCES) \ $(statpingserv_SOURCES) $(statusping_SOURCES) \ $(stopsrv_SOURCES) $(ugdsconfig_SOURCES) $(viewdata_SOURCES) \ $(viewlog_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man8dir = $(mandir)/man8 NROFF = nroff MANS = $(dist_man_MANS) DATA = $(dist_help_DATA) $(dist_html_DATA) $(dist_icon_DATA) \ $(inf_DATA) $(initconfig_DATA) $(ldif_DATA) \ $(nodist_config_DATA) $(perl_DATA) $(property_DATA) \ $(systemdsystemunit_DATA) $(update_DATA) ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ APR_CONFIG = @APR_CONFIG@ APXS = @APXS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GENRB = @GENRB@ GREP = @GREP@ HTTPD = @HTTPD@ ICU_CONFIG = @ICU_CONFIG@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCRUN = @LIBCRUN@ LIBCSTD = @LIBCSTD@ LIBNSL = @LIBNSL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOCKET = @LIBSOCKET@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BASE_NAME = @PACKAGE_BASE_NAME@ PACKAGE_BASE_VERSION = @PACKAGE_BASE_VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ adminutil_inc = @adminutil_inc@ adminutil_lib = @adminutil_lib@ adminutil_libdir = @adminutil_libdir@ adminutil_ver = @adminutil_ver@ admlogdir = @admlogdir@ admmoddir = $(libdir)@admmoddir@ admservip = @admservip@ admservport = @admservport@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ap_ver_suf = @ap_ver_suf@ apache_bin = @apache_bin@ apache_conf = @apache_conf@ apache_inc = @apache_inc@ apache_prefix = @apache_prefix@ apr_inc = @apr_inc@ bindir = @bindir@ brand = @brand@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ capbrand = @capbrand@ cgibindir = $(libdir)@cgibindir@ cmdbindir = $(sbindir) datadir = @datadir@ datarootdir = @datarootdir@ debug_defs = @debug_defs@ dirsrv_service_name = @dirsrv_service_name@ dirsrv_systemd_prefix = @dirsrv_systemd_prefix@ dirsrv_systemd_suffix = @dirsrv_systemd_suffix@ docdir = @docdir@ # needed for selinux policy dsgwcgibindir = $(libdir)@dsgwcgibindir@ dsgwcookiedir = $(localstatedir)@dsgwcookiedir@ dslibdir = @dslibdir@ dvidir = @dvidir@ enable_service = @enable_service@ exec_prefix = @exec_prefix@ extra_cppflags = @extra_cppflags@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = $(datadir)@htmldir@ httpdconf = @httpdconf@ httpdconfdir = @httpdconfdir@ httpdgroup = @httpdgroup@ httpduser = @httpduser@ icondir = $(datadir)@icondir@ icu_bin = @icu_bin@ icu_inc = @icu_inc@ icu_lib = @icu_lib@ icu_libdir = @icu_libdir@ includedir = @includedir@ infdir = $(datadir)@infdir@ infodir = @infodir@ initconfigdir = $(sysconfdir)@initconfigdir@ initdir = @initdir@ install_sh = @install_sh@ instancename = @instancename@ instconfigdir = @instconfigdir@ ldap_lib_ldif = @ldap_lib_ldif@ ldapsdk_inc = @ldapsdk_inc@ ldapsdk_lib = @ldapsdk_lib@ ldapsdk_libdir = @ldapsdk_libdir@ ldifdir = $(datadir)@ldifdir@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ manualdir = $(datadir)@manualdir@ mimemagic = @mimemagic@ mkdir_p = @mkdir_p@ moddir = @moddir@ modnssbindir = @modnssbindir@ nspr_inc = @nspr_inc@ nspr_lib = @nspr_lib@ nspr_libdir = @nspr_libdir@ nss_inc = @nss_inc@ nss_lib = @nss_lib@ nss_libdir = @nss_libdir@ nssmoddir = @nssmoddir@ nsspcache = @nsspcache@ ol_libver = @ol_libver@ oldincludedir = @oldincludedir@ openldap_inc = @openldap_inc@ openldap_lib = @openldap_lib@ openldap_libdir = @openldap_libdir@ pdfdir = @pdfdir@ perldir = $(libdir)@perldir@ perlexec = @perlexec@ piddir = $(localstatedir)@piddir@ pidfile = @pidfile@ prefix = @prefix@ program_transform_name = @program_transform_name@ propertydir = $(datadir)@propertydir@ psdir = @psdir@ sasl_inc = @sasl_inc@ sasl_lib = @sasl_lib@ sasl_libdir = @sasl_libdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ updatedir = $(datadir)@updatedir@ vendor = @vendor@ vendorurl = @vendorurl@ with_selinux = @with_selinux@ with_systemddirsrvgroupname = @with_systemddirsrvgroupname@ with_systemdsystemunitdir = @with_systemdsystemunitdir@ # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK NULLSTRING := SPACE := $(NULLSTRING) # the space is between the ) and the # COLON := $(NULLSTRING):# a colon QUOTE := $(NULLSTRING)"# a double quote" BUILDNUM := $(shell perl $(srcdir)/buildnum.pl) NQBUILDNUM := $(subst \,,$(subst $(QUOTE),,$(BUILDNUM))) DEBUG_DEFINES = @debug_defs@ # the -U undefines these symbols - should use the corresponding ADM_ ones instead - see configure.ac OTHER_DEFINES = -DVENDOR="\"$(vendor)\"" -DBRAND="\"$(brand)\"" -DCAPBRAND="\"$(capbrand)\"" \ -DVENDORURL="\"$(vendorurl)\"" \ -UPACKAGE_VERSION -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_BUGREPORT \ -DDIRSRV_SYSTEMD_PREFIX="\"@dirsrv_systemd_prefix@\"" \ -DDIRSRV_SYSTEMD_SUFFIX="\"@dirsrv_systemd_suffix@\"" \ -DDIRSRV_SERVICE_NAME="\"@dirsrv_service_name@\"" PATH_DEFINES = -DINITCONFIGDIR="\"$(initconfigdir)\"" # look for included m4 files in the ./m4/ directory ACLOCAL_AMFLAGS = -I m4 helpdir = $(manualdir)/help systemdsystemunitdir = @with_systemdsystemunitdir@ systemddirsrvgroupname = @with_systemddirsrvgroupname@ configdir = $(instconfigdir)/$(instancename) # same as configdir for now securitydir = $(configdir) @BUNDLE_FALSE@logdir = $(localstatedir)@admlogdir@/$(instancename) @BUNDLE_TRUE@logdir = $(localstatedir)@admlogdir@ dsgwconfigdir = $(instconfigdir)/dsgw libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ lib/libadmin/referer.c lib/libadmin/template.c lib/libadmin/util.c AM_CPPFLAGS = $(DEBUG_DEFINES) $(PATH_DEFINES) $(OTHER_DEFINES) \ @adminutil_inc@ @icu_inc@ @openldap_inc@ @ldapsdk_inc@ \ @nss_inc@ @nspr_inc@ -DUSE_ADMSERV=1 -I$(srcdir)/include \ -I$(srcdir)/include/base $(am__append_1) $(am__append_2) \ -DPROPERTYDIR=\"$(propertydir)\" -DLIBDIR=\"$(libdir)\" \ -DPIDDIR=\"$(piddir)\" -DHTMLDIR=\"$(htmldir)\" \ -DICONDIR=\"$(icondir)\" -DCMDBINDIR=\"$(cmdbindir)\" \ -DMANUALDIR=\"$(manualdir)\" -DCONFIGDIR=\"$(configdir)\" \ -DSECURITYDIR=\"$(securitydir)\" -DLOGDIR=\"$(logdir)\" \ -DHTTPD=\"$(HTTPD)\" -DDEFAULT_HTTPDUSER=\"$(httpduser)\" \ -DPIDFILE=\"$(pidfile)\" -DDATADIR=\"$(datadir)\" \ -DLDIFDIR=\"$(ldifdir)\" -DBUILD_NUM=$(BUILDNUM) \ -DINFDIR=\"$(infdir)\" -DCGIBINDIR=\"$(cgibindir)\" \ -DINSTCONFIGDIR=\"$(instconfigdir)\" \ -DDSLIBDIR=\"$(dslibdir)\" # We need to make sure that libpthread is linked before libc on HP-UX. @HPUX_TRUE@AM_LDFLAGS = -lpthread # CGI shared library lib_LTLIBRARIES = libds-admin-serv.la # CGI static library noinst_LIBRARIES = libdsa.a # Apache modules admmod_LTLIBRARIES = mod_admserv.la mod_restartd.la @OPENLDAP_FALSE@LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lprldap60 -lldap60 -lldif60 #------------------------ # Linker Flags #------------------------ @OPENLDAP_TRUE@LDAPSDK_LINK = @openldap_lib@ -lldap@ol_libver@ @ldap_lib_ldif@ @OPENLDAP_TRUE@use_openldap = 1 @OPENLDAP_FALSE@ADMINUTIL_LINK = @adminutil_lib@ @nspr_lib@ @nss_lib@ @sasl_lib@ @ldapsdk_lib@ @icu_lib@ -ladmsslutil@adminutil_ver@ -ladminutil@adminutil_ver@ @OPENLDAP_TRUE@ADMINUTIL_LINK = @adminutil_lib@ @nspr_lib@ @nss_lib@ @sasl_lib@ @openldap_lib@ @icu_lib@ -ladmsslutil@adminutil_ver@ -ladminutil@adminutil_ver@ NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 NSS_LINK = @nss_lib@ -lsmime3 -lssl3 -lnss3 -lsoftokn3 SASL_LINK = @sasl_lib@ -lsasl2 ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata DEFAULT_LIBS_NOCGI = $(ADMINUTIL_LINK) \ $(ICU_LINK) \ $(LDAPSDK_LINK) \ $(SASL_LINK) \ $(NSS_LINK) \ $(NSPR_LINK) \ $(LIBNSL) $(LIBSOCKET) $(LIBCSTD) $(LIBCRUN) DEFAULT_LIBS = libds-admin-serv.la $(DEFAULT_LIBS_NOCGI) @CXXLINK_REQUIRED_FALSE@MYLINK = $(LINK) @CXXLINK_REQUIRED_TRUE@MYLINK = $(CXXLINK) @SELINUX_TRUE@POLICY_FC = selinux-built/dirsrv-admin.fc BUILT_SOURCES = $(POLICY_FC) $(RESOURCE_BUNDLES_ROOT) @SYSTEMD_TRUE@systemdsystemunit_DATA = wrappers/$(PACKAGE_NAME).service @SYSTEMD_FALSE@init_SCRIPTS = wrappers/$(PACKAGE_NAME) initconfig_DATA = admserv/cfgstuff/$(PACKAGE_NAME) ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ admserv/schema/ldif/02globalpreferences.ldif.tmpl \ admserv/schema/ldif/10dsdata.ldif.tmpl \ admserv/schema/ldif/10rm_dsdata.ldif.tmpl \ admserv/schema/ldif/11dstasks.ldif.tmpl \ admserv/schema/ldif/12dsconfig.mod.tmpl \ admserv/schema/ldif/13dsschema.mod.tmpl \ admserv/schema/ldif/14dsmonitor.mod.tmpl \ admserv/schema/ldif/15dspta.mod.tmpl \ admserv/schema/ldif/16dssuffixadmin.mod.tmpl \ admserv/schema/ldif/20asdata.ldif.tmpl \ admserv/schema/ldif/21astasks.ldif.tmpl \ admserv/schema/ldif/22ascommands.ldif.tmpl \ admserv/schema/ldif/asmigrate.ldif.tmpl \ admserv/html/admserv_phonebook.html \ admserv/html/admserv_orgchart.html \ admserv/html/admserv_dsgw.html inf_DATA = admserv/newinst/src/admin.inf \ admserv/newinst/src/setup.inf \ admserv/newinst/src/register_param.map \ admserv/newinst/src/configdsroot.map \ admserv/newinst/src/adminserver.map \ admserv/newinst/src/dirserver.map \ admserv/newinst/src/asmigrate.map \ admserv/newinst/src/updateconsoleinfo.map \ admserv/newinst/src/dssuffixadmin.map cgibin_SCRIPTS = admserv/cgi-src40/ds_create \ admserv/cgi-src40/ds_remove \ admserv/cgi-src40/ds_unregister \ admserv/cgi-src40/repl-monitor-cgi.pl nodist_cmdbin_SCRIPTS = admserv/cfgstuff/start-ds-admin \ admserv/cfgstuff/stop-ds-admin \ admserv/cfgstuff/restart-ds-admin \ admserv/cfgstuff/ds_removal \ admserv/cfgstuff/ds_unregister cmdbin_SCRIPTS = admserv/newinst/src/setup-ds-admin.pl \ admserv/newinst/src/migrate-ds-admin.pl \ admserv/newinst/src/register-ds-admin.pl \ admserv/newinst/src/remove-ds-admin.pl perl_DATA = admserv/newinst/src/ASDialogs.pm \ admserv/newinst/src/AdminUtil.pm \ admserv/newinst/src/AdminServer.pm \ admserv/newinst/src/ConfigDSDialogs.pm \ admserv/newinst/src/AdminMigration.pm \ admserv/newinst/src/RegDSDialogs.pm #------------------------ # man pages #------------------------ dist_man_MANS = man/man8/ds_removal.8 \ man/man8/ds_unregister.8 \ man/man8/migrate-ds-admin.pl.8 \ man/man8/setup-ds-admin.pl.8 \ man/man8/start-ds-admin.8 \ man/man8/stop-ds-admin.8 \ man/man8/register-ds-admin.pl.8 \ man/man8/restart-ds-admin.8 \ man/man8/remove-ds-admin.pl.8 #------------------------ # updates # the directory server package contains examples # perl files and LDIF files are DATA - not executable # processed by the update script # shell scripts and other files are SCRIPTS - executable #------------------------ update_DATA = admserv/newinst/src/25rebrand.pl \ admserv/newinst/src/30updateglobalpref.pl update_SCRIPTS = admserv/makeUpgradeTar.sh #------------------------ # libraries #------------------------ libds_admin_serv_la_SOURCES = $(libbase_a_SOURCES) $(libsi18n_a_SOURCES) $(libadmin_a_SOURCES) libds_admin_serv_la_LINK = $(MYLINK) libds_admin_serv_la_LIBADD = $(ADMINUTIL_LINK) \ $(NSPR_LINK) libdsa_a_SOURCES = lib/libdsa/dsalib_conf.c \ lib/libdsa/dsalib_debug.c \ lib/libdsa/dsalib_tailf.c \ lib/libdsa/dsalib_confs.c \ lib/libdsa/dsalib_location.c \ lib/libdsa/dsalib_updown.c \ lib/libdsa/dsalib_db.c \ lib/libdsa/dsalib_util.c libdsa_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include/libdsa @openldap_inc@ @ldapsdk_inc@ @nss_inc@ @nspr_inc@ # source files for our CGI programs download_SOURCES = admserv/cgi-src40/download.c help_SOURCES = admserv/cgi-src40/help.c start_config_ds_SOURCES = admserv/cgi-src40/start_config_ds.c admpw_SOURCES = admserv/cgi-src40/admpw.c security_SOURCES = admserv/cgi-src40/security.c ugdsconfig_SOURCES = admserv/cgi-src40/ugdsconfig.c ReadLog_SOURCES = admserv/cgi-src40/ReadLog.c config_SOURCES = admserv/cgi-src40/config.c statpingserv_SOURCES = admserv/cgi-src40/statpingserv.c viewdata_SOURCES = admserv/cgi-src40/viewdata.c dsconfig_SOURCES = admserv/cgi-src40/dsconfig.c monreplication_SOURCES = admserv/cgi-src40/monreplication.c restartsrv_SOURCES = admserv/cgi-src40/restartsrv.c statusping_SOURCES = admserv/cgi-src40/statusping.c viewlog_SOURCES = admserv/cgi-src40/viewlog.c htmladmin_SOURCES = admserv/cgi-src40/htmladmin.c sec_activate_SOURCES = admserv/cgi-src40/sec-activate.c stopsrv_SOURCES = admserv/cgi-src40/stopsrv.c # libs to use for each program - they are different in some cases - so can't just use global ldflags admpw_LDADD = $(DEFAULT_LIBS) start_config_ds_LDADD = $(DEFAULT_LIBS) security_LDADD = $(DEFAULT_LIBS) ugdsconfig_LDADD = $(DEFAULT_LIBS) ReadLog_LDADD = $(DEFAULT_LIBS) config_LDADD = $(DEFAULT_LIBS) statpingserv_LDADD = $(DEFAULT_LIBS) viewdata_LDADD = $(DEFAULT_LIBS) dsconfig_LDADD = $(DEFAULT_LIBS) monreplication_LDADD = $(DEFAULT_LIBS) restartsrv_LDADD = $(DEFAULT_LIBS) statusping_LDADD = $(DEFAULT_LIBS) viewlog_LDADD = $(DEFAULT_LIBS) htmladmin_LDADD = $(DEFAULT_LIBS) sec_activate_LDADD = $(DEFAULT_LIBS) stopsrv_LDADD = $(DEFAULT_LIBS) admpw_LINK = $(MYLINK) start_config_ds_LINK = $(MYLINK) security_LINK = $(MYLINK) ugdsconfig_LINK = $(MYLINK) ReadLog_LINK = $(MYLINK) config_LINK = $(MYLINK) statpingserv_LINK = $(MYLINK) viewdata_LINK = $(MYLINK) dsconfig_LINK = $(MYLINK) monreplication_LINK = $(MYLINK) restartsrv_LINK = $(MYLINK) statusping_LINK = $(MYLINK) viewlog_LINK = $(MYLINK) htmladmin_LINK = $(MYLINK) sec_activate_LINK = $(MYLINK) stopsrv_LINK = $(MYLINK) # ds admin interfaces ds_start_SOURCES = admserv/cgi-ds/start.c admserv/cgi-ds/init_ds_env.c ds_start_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_start_LDADD = libdsa.a $(DEFAULT_LIBS) ds_start_LINK = $(MYLINK) ds_restart_SOURCES = admserv/cgi-ds/restart.c admserv/cgi-ds/init_ds_env.c ds_restart_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_restart_LDADD = libdsa.a $(DEFAULT_LIBS) ds_restart_LINK = $(MYLINK) ds_shutdown_SOURCES = admserv/cgi-ds/shutdown.c admserv/cgi-ds/init_ds_env.c ds_shutdown_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_shutdown_LDADD = libdsa.a $(DEFAULT_LIBS) ds_shutdown_LINK = $(MYLINK) ds_listdb_SOURCES = admserv/cgi-ds/ds_listdb.c admserv/cgi-ds/init_ds_env.c ds_listdb_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_listdb_LDADD = libdsa.a $(DEFAULT_LIBS) ds_listdb_LINK = $(MYLINK) ds_snmpctrl_SOURCES = admserv/cgi-ds/ds_snmpctrl.c admserv/cgi-ds/init_ds_env.c ds_snmpctrl_CPPFLAGS = -I$(srcdir)/include/libdsa $(AM_CPPFLAGS) ds_snmpctrl_LDADD = libdsa.a $(DEFAULT_LIBS) ds_snmpctrl_LINK = $(MYLINK) ############## mod_admserv ################ mod_admserv_la_SOURCES = mod_admserv/mod_admserv.c mod_admserv_la_CPPFLAGS = -I@apache_inc@ @apr_inc@ $(AM_CPPFLAGS) @extra_cppflags@ mod_admserv_la_LDFLAGS = -module -avoid-version mod_admserv_la_LIBADD = $(DEFAULT_LIBS) mod_admserv_la_LINK = $(MYLINK) $(mod_admserv_la_LDFLAGS) ############## mod_restartd ################ mod_restartd_la_SOURCES = mod_restartd/mod_restartd@ap_ver_suf@.c mod_restartd_la_CPPFLAGS = @apr_inc@ -I@apache_inc@ @extra_cppflags@ mod_restartd_la_LDFLAGS = -module -avoid-version mod_restartd_la_LINK = $(MYLINK) $(mod_restartd_la_LDFLAGS) ############## Data Files ################ HTMLDIR = admserv/html dist_html_DATA = $(HTMLDIR)/htmladmin.html $(HTMLDIR)/monreplication.html $(HTMLDIR)/viewdata.html $(HTMLDIR)/viewlog.html $(HTMLDIR)/admserv.html ICONDIR = admserv/icons40 dist_icon_DATA = $(ICONDIR)/16space.gif $(ICONDIR)/directorysmall.gif $(ICONDIR)/group2.gif $(ICONDIR)/togoff.gif \ $(ICONDIR)/adminics.gif $(ICONDIR)/dms.jpg $(ICONDIR)/help.gif $(ICONDIR)/messagingic.gif $(ICONDIR)/togon.gif \ $(ICONDIR)/cert16.gif $(ICONDIR)/domain16.gif $(ICONDIR)/host.gif $(ICONDIR)/N24b.gif \ $(ICONDIR)/enterpriseic.gif $(ICONDIR)/hr.gif $(ICONDIR)/oldservic.gif $(ICONDIR)/goto.gif \ $(ICONDIR)/spacer.gif dist_help_DATA = admserv/cgi-src40/help.js admserv/cgi-src40/library.html \ admserv/cgi-src40/head.html admserv/cgi-src40/frameset.html nodist_config_DATA = admserv/cfgstuff/console.conf admserv/cfgstuff/admserv.conf \ admserv/cfgstuff/nss.conf admserv/cfgstuff/httpd.conf @APACHE22_FALSE@@APACHE24_FALSE@HTTPD_CONF_SRC = admserv/cfgstuff/httpd.conf.in @APACHE22_TRUE@@APACHE24_FALSE@HTTPD_CONF_SRC = admserv/cfgstuff/httpd-2.2.conf.in # F18 and newer @APACHE24_TRUE@HTTPD_CONF_SRC = admserv/cfgstuff/httpd-2.4.conf.in MOSTLYCLEANFILES = $(nodist_cmdbin_SCRIPTS) $(nodist_config_DATA) \ $(RESOURCE_BUNDLES_ROOT) @WINNT_FALSE@ICU_GENRB = sh -x $(srcdir)/admserv/genrb_wrapper.sh "@icu_bin@" "@icu_libdir@" # Resource Bundle Compiler @WINNT_TRUE@ICU_GENRB = @icu_bin@/genrb.exe # need a reverse sort # on some systems, -e is not used - escape sequences just work # so we have to remove the -e from the stream mysort = $(shell echo -e $(subst $(SPACE),$(NL),$2) | grep -v -- -e | sort $1 -k1,1) # now put it in the canonical form @BUNDLE_FALSE@LIBPATH = $(subst $(SPACE),$(COLON),$(LIBDIRS)) # for a bundle, all of the components will be under libdir (e.g. prefix/lib) # and mod_nss will be in the admin server module directory @BUNDLE_TRUE@LIBPATH = $(subst $(SPACE),$(COLON),$(dslibdir) $(libdir)) # nssmoddir is the same @BUNDLE_FALSE@runtime_nssmoddir = $(nssmoddir) @BUNDLE_TRUE@runtime_nssmoddir = $(admmoddir) @BUNDLE_FALSE@runtime_nss_libdir = $(nss_libdir) @BUNDLE_TRUE@runtime_nss_libdir = $(libdir) @BUNDLE_FALSE@runtime_ldapsdk_libdir = $(openldap_libdir) $(ldapsdk_libdir) @BUNDLE_TRUE@runtime_ldapsdk_libdir = $(libdir) @BUNDLE_FALSE@perlpath = $(perldir) @BUNDLE_TRUE@perlpath = $(perldir) $(libdir)/perl/arch $(libdir)/perl # need to create the LD_LIBRARY_PATH,SHLIB_PATH string to use in scripts # sort also strips out duplicates @BUNDLE_FALSE@LIBDIRLIST = $(nspr_libdir) $(nss_libdir) $(openldap_libdir) $(ldapsdk_libdir) $(sasl_libdir) $(adminutil_libdir) $(icu_libdir) $(libdir) @BUNDLE_FALSE@LIBDIRS = $(call mysort,-ru,$(LIBDIRLIST)) # this is primarily needed for HP-UX and the other platforms # where we bundle all of the components together adminutilpath = $(datadir)/$(PACKAGE_BASE_NAME)/adminutil # The root resource bundle is based on English (en) locale; # This bundle must be always distributed and there is no need to have # *_en.properties resource bundle source files. # ICU resource file installation is handled specially RESOURCE_BUNDLES_ROOT = \ properties/admpw/root.res \ properties/security/root.res properties/config/root.res \ properties/stopsrv/root.res \ properties/dsconfig/root.res properties/monreplication/root.res \ properties/ugdsconfig/root.res properties/htmladmin/root.res \ properties/restartsrv/root.res properties/viewdata/root.res \ properties/sec-activate/root.res properties/viewlog/root.res \ properties/cgicommon/root.res # regular property files go here property_DATA = admserv/newinst/src/setup-ds-admin.res \ admserv/newinst/src/migrate-ds-admin.res \ admserv/newinst/src/register-ds-admin.res \ admserv/cgi-src40/ds_create.res \ admserv/cgi-src40/ds_remove.res @BUNDLE_FALSE@fixupcmd = sed \ @BUNDLE_FALSE@ -e 's,@ECHO_C\@,$(ECHO_C),g' \ @BUNDLE_FALSE@ -e 's,@ECHO_N\@,$(ECHO_N),g' \ @BUNDLE_FALSE@ -e 's,@HTTPD\@,$(HTTPD),g' \ @BUNDLE_FALSE@ -e 's,@bindir\@,$(bindir),g' \ @BUNDLE_FALSE@ -e 's,@sbindir\@,$(sbindir),g' \ @BUNDLE_FALSE@ -e 's,@localstatedir\@,$(localstatedir),g' \ @BUNDLE_FALSE@ -e 's,@cgibindir\@,$(cgibindir),g' \ @BUNDLE_FALSE@ -e 's,@cmdbindir\@,$(cmdbindir),g' \ @BUNDLE_FALSE@ -e 's,@moddir\@,$(moddir),g' \ @BUNDLE_FALSE@ -e 's,@modnssbindir\@,$(modnssbindir),g' \ @BUNDLE_FALSE@ -e 's,@propertydir\@,$(propertydir),g' \ @BUNDLE_FALSE@ -e 's,@htmldir\@,$(htmldir),g' \ @BUNDLE_FALSE@ -e 's,@icondir\@,$(icondir),g' \ @BUNDLE_FALSE@ -e 's,@logdir\@,$(logdir),g' \ @BUNDLE_FALSE@ -e 's,@manualdir\@,$(manualdir),g' \ @BUNDLE_FALSE@ -e 's,@configdir\@,$(configdir),g' \ @BUNDLE_FALSE@ -e 's,@securitydir\@,$(securitydir),g' \ @BUNDLE_FALSE@ -e 's,@httpduser\@,$(httpduser),g' \ @BUNDLE_FALSE@ -e 's,@httpdgroup\@,$(httpdgroup),g' \ @BUNDLE_FALSE@ -e 's,@httpdconfdir\@,$(httpdconfdir),g' \ @BUNDLE_FALSE@ -e 's,@piddir\@,$(piddir),g' \ @BUNDLE_FALSE@ -e 's,@pidfile\@,$(pidfile),g' \ @BUNDLE_FALSE@ -e 's,@admservport\@,$(admservport),g' \ @BUNDLE_FALSE@ -e 's,@admservip\@,$(admservip),g' \ @BUNDLE_FALSE@ -e 's,@LIBPATH\@,$(LIBPATH),g' \ @BUNDLE_FALSE@ -e 's,@nss_libdir\@,$(runtime_nss_libdir),g' \ @BUNDLE_FALSE@ -e 's,@ldapsdk_libdir\@,$(runtime_ldapsdk_libdir),g' \ @BUNDLE_FALSE@ -e 's,@use_openldap\@,$(use_openldap),g' \ @BUNDLE_FALSE@ -e 's,@admmoddir\@,$(admmoddir),g' \ @BUNDLE_FALSE@ -e 's,@nssmoddir\@,$(runtime_nssmoddir),g' \ @BUNDLE_FALSE@ -e 's,@instconfigdir\@,$(instconfigdir),g' \ @BUNDLE_FALSE@ -e 's,@instancename\@,$(instancename),g' \ @BUNDLE_FALSE@ -e 's,@BUILD_NUM\@,$(BUILDNUM),g' \ @BUNDLE_FALSE@ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ @BUNDLE_FALSE@ -e 's,@package_name\@,$(PACKAGE_NAME),g' \ @BUNDLE_FALSE@ -e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \ @BUNDLE_FALSE@ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ @BUNDLE_FALSE@ -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ @BUNDLE_FALSE@ -e 's,@brand\@,$(brand),g' \ @BUNDLE_FALSE@ -e 's,@capbrand\@,$(capbrand),g' \ @BUNDLE_FALSE@ -e 's,@vendor\@,$(vendor),g' \ @BUNDLE_FALSE@ -e 's,@vendorurl\@,$(vendorurl),g' \ @BUNDLE_FALSE@ -e 's,@helpdir\@,$(helpdir),g' \ @BUNDLE_FALSE@ -e 's,@mimemagic\@,$(mimemagic),g' \ @BUNDLE_FALSE@ -e 's,@initdir\@,$(initdir),g' \ @BUNDLE_FALSE@ -e 's,@perlpath\@,$(perlpath),g' \ @BUNDLE_FALSE@ -e 's,@perlexec\@,@perlexec@,g' \ @BUNDLE_FALSE@ -e 's,@infdir\@,$(infdir),g' \ @BUNDLE_FALSE@ -e 's,@dslibdir\@,$(dslibdir),g' \ @BUNDLE_FALSE@ -e 's,@ldifdir\@,$(ldifdir),g' \ @BUNDLE_FALSE@ -e 's,@adminutilpath\@,$(adminutilpath),g' \ @BUNDLE_FALSE@ -e 's,@initconfigdir\@,$(initconfigdir),g' \ @BUNDLE_FALSE@ -e 's,@updatedir\@,$(updatedir),g' \ @BUNDLE_FALSE@ -e 's,@with_selinux\@,@with_selinux@,g' \ @BUNDLE_FALSE@ -e 's,@enable_service\@,@enable_service@,g' \ @BUNDLE_FALSE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \ @BUNDLE_FALSE@ -e 's,@systemddirsrvgroupname\@,$(systemddirsrvgroupname),g' \ @BUNDLE_FALSE@ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \ @BUNDLE_FALSE@ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \ @BUNDLE_FALSE@ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g' # these are for the config files and scripts that we need to generate and replace # the paths and other tokens with the real values set during configure/make # note that we cannot just use AC_OUTPUT to do this for us, since it will do things like this: # ADMConfigDir = ${prefix}/etc/packagename # i.e. it literally copies in '${prefix}' rather than expanding it out - we want this instead: # ADMConfigDir = /etc/packagename # Some of the paths need to be different if we are making a bundled build, # namely the mod_nss bindir. @BUNDLE_TRUE@fixupcmd = sed \ @BUNDLE_TRUE@ -e 's,@ECHO_C\@,$(ECHO_C),g' \ @BUNDLE_TRUE@ -e 's,@ECHO_N\@,$(ECHO_N),g' \ @BUNDLE_TRUE@ -e 's,@HTTPD\@,$(HTTPD),g' \ @BUNDLE_TRUE@ -e 's,@bindir\@,$(bindir),g' \ @BUNDLE_TRUE@ -e 's,@sbindir\@,$(sbindir),g' \ @BUNDLE_TRUE@ -e 's,@localstatedir\@,$(localstatedir),g' \ @BUNDLE_TRUE@ -e 's,@cgibindir\@,$(cgibindir),g' \ @BUNDLE_TRUE@ -e 's,@cmdbindir\@,$(cmdbindir),g' \ @BUNDLE_TRUE@ -e 's,@moddir\@,$(moddir),g' \ @BUNDLE_TRUE@ -e 's,@modnssbindir\@,$(sbindir),g' \ @BUNDLE_TRUE@ -e 's,@propertydir\@,$(propertydir),g' \ @BUNDLE_TRUE@ -e 's,@htmldir\@,$(htmldir),g' \ @BUNDLE_TRUE@ -e 's,@icondir\@,$(icondir),g' \ @BUNDLE_TRUE@ -e 's,@logdir\@,$(logdir),g' \ @BUNDLE_TRUE@ -e 's,@manualdir\@,$(manualdir),g' \ @BUNDLE_TRUE@ -e 's,@configdir\@,$(configdir),g' \ @BUNDLE_TRUE@ -e 's,@securitydir\@,$(securitydir),g' \ @BUNDLE_TRUE@ -e 's,@httpduser\@,$(httpduser),g' \ @BUNDLE_TRUE@ -e 's,@httpdgroup\@,$(httpdgroup),g' \ @BUNDLE_TRUE@ -e 's,@httpdconfdir\@,$(httpdconfdir),g' \ @BUNDLE_TRUE@ -e 's,@piddir\@,$(piddir),g' \ @BUNDLE_TRUE@ -e 's,@pidfile\@,$(pidfile),g' \ @BUNDLE_TRUE@ -e 's,@admservport\@,$(admservport),g' \ @BUNDLE_TRUE@ -e 's,@admservip\@,$(admservip),g' \ @BUNDLE_TRUE@ -e 's,@LIBPATH\@,$(LIBPATH),g' \ @BUNDLE_TRUE@ -e 's,@nss_libdir\@,$(runtime_nss_libdir),g' \ @BUNDLE_TRUE@ -e 's,@ldapsdk_libdir\@,$(runtime_ldapsdk_libdir),g' \ @BUNDLE_TRUE@ -e 's,@use_openldap\@,$(use_openldap),g' \ @BUNDLE_TRUE@ -e 's,@admmoddir\@,$(admmoddir),g' \ @BUNDLE_TRUE@ -e 's,@nssmoddir\@,$(runtime_nssmoddir),g' \ @BUNDLE_TRUE@ -e 's,@instconfigdir\@,$(instconfigdir),g' \ @BUNDLE_TRUE@ -e 's,@instancename\@,$(instancename),g' \ @BUNDLE_TRUE@ -e 's,@BUILD_NUM\@,$(BUILDNUM),g' \ @BUNDLE_TRUE@ -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ @BUNDLE_TRUE@ -e 's,@package_name\@,$(PACKAGE_NAME),g' \ @BUNDLE_TRUE@ -e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \ @BUNDLE_TRUE@ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ @BUNDLE_TRUE@ -e 's,@PACKAGE_BASE_VERSION\@,$(PACKAGE_BASE_VERSION),g' \ @BUNDLE_TRUE@ -e 's,@brand\@,$(brand),g' \ @BUNDLE_TRUE@ -e 's,@capbrand\@,$(capbrand),g' \ @BUNDLE_TRUE@ -e 's,@vendor\@,$(vendor),g' \ @BUNDLE_TRUE@ -e 's,@vendorurl\@,$(vendorurl),g' \ @BUNDLE_TRUE@ -e 's,@helpdir\@,$(helpdir),g' \ @BUNDLE_TRUE@ -e 's,@mimemagic\@,$(mimemagic),g' \ @BUNDLE_TRUE@ -e 's,@initdir\@,$(initdir),g' \ @BUNDLE_TRUE@ -e 's,@perlpath\@,$(perlpath),g' \ @BUNDLE_TRUE@ -e 's,@perlexec\@,@perlexec@,g' \ @BUNDLE_TRUE@ -e 's,@infdir\@,$(infdir),g' \ @BUNDLE_TRUE@ -e 's,@dslibdir\@,$(dslibdir),g' \ @BUNDLE_TRUE@ -e 's,@ldifdir\@,$(ldifdir),g' \ @BUNDLE_TRUE@ -e 's,@adminutilpath\@,$(adminutilpath),g' \ @BUNDLE_TRUE@ -e 's,@initconfigdir\@,$(initconfigdir),g' \ @BUNDLE_TRUE@ -e 's,@updatedir\@,$(updatedir),g' \ @BUNDLE_TRUE@ -e 's,@with_selinux\@,@with_selinux@,g' \ @BUNDLE_TRUE@ -e 's,@enable_service\@,@enable_service@,g' \ @BUNDLE_TRUE@ -e 's,@systemdsystemunitdir\@,$(systemdsystemunitdir),g' \ @BUNDLE_TRUE@ -e 's,@systemddirsrvgroupname\@,$(systemddirsrvgroupname),g' \ @BUNDLE_TRUE@ -e 's,@dsgwcgibindir\@,$(dsgwcgibindir),g' \ @BUNDLE_TRUE@ -e 's,@dsgwconfigdir\@,$(dsgwconfigdir),g' \ @BUNDLE_TRUE@ -e 's,@dsgwcookiedir\@,$(dsgwcookiedir),g' all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) lib/libdsa/$(am__dirstamp): @$(MKDIR_P) lib/libdsa @: > lib/libdsa/$(am__dirstamp) lib/libdsa/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/libdsa/$(DEPDIR) @: > lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_conf.$(OBJEXT): lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_debug.$(OBJEXT): \ lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_tailf.$(OBJEXT): \ lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_confs.$(OBJEXT): \ lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_location.$(OBJEXT): \ lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_updown.$(OBJEXT): \ lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_db.$(OBJEXT): lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) lib/libdsa/libdsa_a-dsalib_util.$(OBJEXT): lib/libdsa/$(am__dirstamp) \ lib/libdsa/$(DEPDIR)/$(am__dirstamp) libdsa.a: $(libdsa_a_OBJECTS) $(libdsa_a_DEPENDENCIES) $(EXTRA_libdsa_a_DEPENDENCIES) -rm -f libdsa.a $(libdsa_a_AR) libdsa.a $(libdsa_a_OBJECTS) $(libdsa_a_LIBADD) $(RANLIB) libdsa.a install-admmodLTLIBRARIES: $(admmod_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(admmod_LTLIBRARIES)'; test -n "$(admmoddir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(admmoddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(admmoddir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(admmoddir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(admmoddir)"; \ } uninstall-admmodLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(admmod_LTLIBRARIES)'; test -n "$(admmoddir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(admmoddir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(admmoddir)/$$f"; \ done clean-admmodLTLIBRARIES: -test -z "$(admmod_LTLIBRARIES)" || rm -f $(admmod_LTLIBRARIES) @list='$(admmod_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } lib/base/$(am__dirstamp): @$(MKDIR_P) lib/base @: > lib/base/$(am__dirstamp) lib/base/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/base/$(DEPDIR) @: > lib/base/$(DEPDIR)/$(am__dirstamp) lib/base/file.lo: lib/base/$(am__dirstamp) \ lib/base/$(DEPDIR)/$(am__dirstamp) lib/base/nscperror.lo: lib/base/$(am__dirstamp) \ lib/base/$(DEPDIR)/$(am__dirstamp) lib/base/system.lo: lib/base/$(am__dirstamp) \ lib/base/$(DEPDIR)/$(am__dirstamp) lib/base/nscputil.lo: lib/base/$(am__dirstamp) \ lib/base/$(DEPDIR)/$(am__dirstamp) lib/libsi18n/$(am__dirstamp): @$(MKDIR_P) lib/libsi18n @: > lib/libsi18n/$(am__dirstamp) lib/libsi18n/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/libsi18n/$(DEPDIR) @: > lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libsi18n/getstrprop.lo: lib/libsi18n/$(am__dirstamp) \ lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libadmin/$(am__dirstamp): @$(MKDIR_P) lib/libadmin @: > lib/libadmin/$(am__dirstamp) lib/libadmin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) lib/libadmin/$(DEPDIR) @: > lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/cluster.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/error.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/form_get.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/httpcon.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/install.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/referer.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/template.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) lib/libadmin/util.lo: lib/libadmin/$(am__dirstamp) \ lib/libadmin/$(DEPDIR)/$(am__dirstamp) libds-admin-serv.la: $(libds_admin_serv_la_OBJECTS) $(libds_admin_serv_la_DEPENDENCIES) $(EXTRA_libds_admin_serv_la_DEPENDENCIES) $(libds_admin_serv_la_LINK) -rpath $(libdir) $(libds_admin_serv_la_OBJECTS) $(libds_admin_serv_la_LIBADD) $(LIBS) mod_admserv/$(am__dirstamp): @$(MKDIR_P) mod_admserv @: > mod_admserv/$(am__dirstamp) mod_admserv/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) mod_admserv/$(DEPDIR) @: > mod_admserv/$(DEPDIR)/$(am__dirstamp) mod_admserv/mod_admserv_la-mod_admserv.lo: \ mod_admserv/$(am__dirstamp) \ mod_admserv/$(DEPDIR)/$(am__dirstamp) mod_admserv.la: $(mod_admserv_la_OBJECTS) $(mod_admserv_la_DEPENDENCIES) $(EXTRA_mod_admserv_la_DEPENDENCIES) $(mod_admserv_la_LINK) -rpath $(admmoddir) $(mod_admserv_la_OBJECTS) $(mod_admserv_la_LIBADD) $(LIBS) mod_restartd/$(am__dirstamp): @$(MKDIR_P) mod_restartd @: > mod_restartd/$(am__dirstamp) mod_restartd/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) mod_restartd/$(DEPDIR) @: > mod_restartd/$(DEPDIR)/$(am__dirstamp) mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo: \ mod_restartd/$(am__dirstamp) \ mod_restartd/$(DEPDIR)/$(am__dirstamp) mod_restartd.la: $(mod_restartd_la_OBJECTS) $(mod_restartd_la_DEPENDENCIES) $(EXTRA_mod_restartd_la_DEPENDENCIES) $(mod_restartd_la_LINK) -rpath $(admmoddir) $(mod_restartd_la_OBJECTS) $(mod_restartd_la_LIBADD) $(LIBS) install-cgibinPROGRAMS: $(cgibin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(cgibin_PROGRAMS)'; test -n "$(cgibindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cgibindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cgibindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cgibindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cgibindir)$$dir" || exit $$?; \ } \ ; done uninstall-cgibinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(cgibin_PROGRAMS)'; test -n "$(cgibindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(cgibindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(cgibindir)" && rm -f $$files clean-cgibinPROGRAMS: @list='$(cgibin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list admserv/cgi-src40/$(am__dirstamp): @$(MKDIR_P) admserv/cgi-src40 @: > admserv/cgi-src40/$(am__dirstamp) admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) admserv/cgi-src40/$(DEPDIR) @: > admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) admserv/cgi-src40/ReadLog.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) ReadLog$(EXEEXT): $(ReadLog_OBJECTS) $(ReadLog_DEPENDENCIES) $(EXTRA_ReadLog_DEPENDENCIES) @rm -f ReadLog$(EXEEXT) $(ReadLog_LINK) $(ReadLog_OBJECTS) $(ReadLog_LDADD) $(LIBS) admserv/cgi-src40/admpw.$(OBJEXT): admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) admpw$(EXEEXT): $(admpw_OBJECTS) $(admpw_DEPENDENCIES) $(EXTRA_admpw_DEPENDENCIES) @rm -f admpw$(EXEEXT) $(admpw_LINK) $(admpw_OBJECTS) $(admpw_LDADD) $(LIBS) admserv/cgi-src40/config.$(OBJEXT): admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) config$(EXEEXT): $(config_OBJECTS) $(config_DEPENDENCIES) $(EXTRA_config_DEPENDENCIES) @rm -f config$(EXEEXT) $(config_LINK) $(config_OBJECTS) $(config_LDADD) $(LIBS) admserv/cgi-src40/download.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) download$(EXEEXT): $(download_OBJECTS) $(download_DEPENDENCIES) $(EXTRA_download_DEPENDENCIES) @rm -f download$(EXEEXT) $(LINK) $(download_OBJECTS) $(download_LDADD) $(LIBS) admserv/cgi-ds/$(am__dirstamp): @$(MKDIR_P) admserv/cgi-ds @: > admserv/cgi-ds/$(am__dirstamp) admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) admserv/cgi-ds/$(DEPDIR) @: > admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_listdb-ds_listdb.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_listdb-init_ds_env.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) ds_listdb$(EXEEXT): $(ds_listdb_OBJECTS) $(ds_listdb_DEPENDENCIES) $(EXTRA_ds_listdb_DEPENDENCIES) @rm -f ds_listdb$(EXEEXT) $(ds_listdb_LINK) $(ds_listdb_OBJECTS) $(ds_listdb_LDADD) $(LIBS) admserv/cgi-ds/ds_restart-restart.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_restart-init_ds_env.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) ds_restart$(EXEEXT): $(ds_restart_OBJECTS) $(ds_restart_DEPENDENCIES) $(EXTRA_ds_restart_DEPENDENCIES) @rm -f ds_restart$(EXEEXT) $(ds_restart_LINK) $(ds_restart_OBJECTS) $(ds_restart_LDADD) $(LIBS) admserv/cgi-ds/ds_shutdown-shutdown.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_shutdown-init_ds_env.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) ds_shutdown$(EXEEXT): $(ds_shutdown_OBJECTS) $(ds_shutdown_DEPENDENCIES) $(EXTRA_ds_shutdown_DEPENDENCIES) @rm -f ds_shutdown$(EXEEXT) $(ds_shutdown_LINK) $(ds_shutdown_OBJECTS) $(ds_shutdown_LDADD) $(LIBS) admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_snmpctrl-init_ds_env.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) ds_snmpctrl$(EXEEXT): $(ds_snmpctrl_OBJECTS) $(ds_snmpctrl_DEPENDENCIES) $(EXTRA_ds_snmpctrl_DEPENDENCIES) @rm -f ds_snmpctrl$(EXEEXT) $(ds_snmpctrl_LINK) $(ds_snmpctrl_OBJECTS) $(ds_snmpctrl_LDADD) $(LIBS) admserv/cgi-ds/ds_start-start.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) admserv/cgi-ds/ds_start-init_ds_env.$(OBJEXT): \ admserv/cgi-ds/$(am__dirstamp) \ admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) ds_start$(EXEEXT): $(ds_start_OBJECTS) $(ds_start_DEPENDENCIES) $(EXTRA_ds_start_DEPENDENCIES) @rm -f ds_start$(EXEEXT) $(ds_start_LINK) $(ds_start_OBJECTS) $(ds_start_LDADD) $(LIBS) admserv/cgi-src40/dsconfig.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) dsconfig$(EXEEXT): $(dsconfig_OBJECTS) $(dsconfig_DEPENDENCIES) $(EXTRA_dsconfig_DEPENDENCIES) @rm -f dsconfig$(EXEEXT) $(dsconfig_LINK) $(dsconfig_OBJECTS) $(dsconfig_LDADD) $(LIBS) admserv/cgi-src40/help.$(OBJEXT): admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) help$(EXEEXT): $(help_OBJECTS) $(help_DEPENDENCIES) $(EXTRA_help_DEPENDENCIES) @rm -f help$(EXEEXT) $(LINK) $(help_OBJECTS) $(help_LDADD) $(LIBS) admserv/cgi-src40/htmladmin.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) htmladmin$(EXEEXT): $(htmladmin_OBJECTS) $(htmladmin_DEPENDENCIES) $(EXTRA_htmladmin_DEPENDENCIES) @rm -f htmladmin$(EXEEXT) $(htmladmin_LINK) $(htmladmin_OBJECTS) $(htmladmin_LDADD) $(LIBS) admserv/cgi-src40/monreplication.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) monreplication$(EXEEXT): $(monreplication_OBJECTS) $(monreplication_DEPENDENCIES) $(EXTRA_monreplication_DEPENDENCIES) @rm -f monreplication$(EXEEXT) $(monreplication_LINK) $(monreplication_OBJECTS) $(monreplication_LDADD) $(LIBS) admserv/cgi-src40/restartsrv.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) restartsrv$(EXEEXT): $(restartsrv_OBJECTS) $(restartsrv_DEPENDENCIES) $(EXTRA_restartsrv_DEPENDENCIES) @rm -f restartsrv$(EXEEXT) $(restartsrv_LINK) $(restartsrv_OBJECTS) $(restartsrv_LDADD) $(LIBS) admserv/cgi-src40/sec-activate.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) sec-activate$(EXEEXT): $(sec_activate_OBJECTS) $(sec_activate_DEPENDENCIES) $(EXTRA_sec_activate_DEPENDENCIES) @rm -f sec-activate$(EXEEXT) $(sec_activate_LINK) $(sec_activate_OBJECTS) $(sec_activate_LDADD) $(LIBS) admserv/cgi-src40/security.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) security$(EXEEXT): $(security_OBJECTS) $(security_DEPENDENCIES) $(EXTRA_security_DEPENDENCIES) @rm -f security$(EXEEXT) $(security_LINK) $(security_OBJECTS) $(security_LDADD) $(LIBS) admserv/cgi-src40/start_config_ds.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) start_config_ds$(EXEEXT): $(start_config_ds_OBJECTS) $(start_config_ds_DEPENDENCIES) $(EXTRA_start_config_ds_DEPENDENCIES) @rm -f start_config_ds$(EXEEXT) $(start_config_ds_LINK) $(start_config_ds_OBJECTS) $(start_config_ds_LDADD) $(LIBS) admserv/cgi-src40/statpingserv.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) statpingserv$(EXEEXT): $(statpingserv_OBJECTS) $(statpingserv_DEPENDENCIES) $(EXTRA_statpingserv_DEPENDENCIES) @rm -f statpingserv$(EXEEXT) $(statpingserv_LINK) $(statpingserv_OBJECTS) $(statpingserv_LDADD) $(LIBS) admserv/cgi-src40/statusping.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) statusping$(EXEEXT): $(statusping_OBJECTS) $(statusping_DEPENDENCIES) $(EXTRA_statusping_DEPENDENCIES) @rm -f statusping$(EXEEXT) $(statusping_LINK) $(statusping_OBJECTS) $(statusping_LDADD) $(LIBS) admserv/cgi-src40/stopsrv.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) stopsrv$(EXEEXT): $(stopsrv_OBJECTS) $(stopsrv_DEPENDENCIES) $(EXTRA_stopsrv_DEPENDENCIES) @rm -f stopsrv$(EXEEXT) $(stopsrv_LINK) $(stopsrv_OBJECTS) $(stopsrv_LDADD) $(LIBS) admserv/cgi-src40/ugdsconfig.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) ugdsconfig$(EXEEXT): $(ugdsconfig_OBJECTS) $(ugdsconfig_DEPENDENCIES) $(EXTRA_ugdsconfig_DEPENDENCIES) @rm -f ugdsconfig$(EXEEXT) $(ugdsconfig_LINK) $(ugdsconfig_OBJECTS) $(ugdsconfig_LDADD) $(LIBS) admserv/cgi-src40/viewdata.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) viewdata$(EXEEXT): $(viewdata_OBJECTS) $(viewdata_DEPENDENCIES) $(EXTRA_viewdata_DEPENDENCIES) @rm -f viewdata$(EXEEXT) $(viewdata_LINK) $(viewdata_OBJECTS) $(viewdata_LDADD) $(LIBS) admserv/cgi-src40/viewlog.$(OBJEXT): \ admserv/cgi-src40/$(am__dirstamp) \ admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) viewlog$(EXEEXT): $(viewlog_OBJECTS) $(viewlog_DEPENDENCIES) $(EXTRA_viewlog_DEPENDENCIES) @rm -f viewlog$(EXEEXT) $(viewlog_LINK) $(viewlog_OBJECTS) $(viewlog_LDADD) $(LIBS) install-cgibinSCRIPTS: $(cgibin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(cgibin_SCRIPTS)'; test -n "$(cgibindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cgibindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cgibindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(cgibindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(cgibindir)$$dir" || exit $$?; \ } \ ; done uninstall-cgibinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(cgibin_SCRIPTS)'; test -n "$(cgibindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(cgibindir)'; $(am__uninstall_files_from_dir) install-cmdbinSCRIPTS: $(cmdbin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(cmdbin_SCRIPTS)'; test -n "$(cmdbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmdbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmdbindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(cmdbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(cmdbindir)$$dir" || exit $$?; \ } \ ; done uninstall-cmdbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(cmdbin_SCRIPTS)'; test -n "$(cmdbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(cmdbindir)'; $(am__uninstall_files_from_dir) install-initSCRIPTS: $(init_SCRIPTS) @$(NORMAL_INSTALL) @list='$(init_SCRIPTS)'; test -n "$(initdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(initdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(initdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(initdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(initdir)$$dir" || exit $$?; \ } \ ; done uninstall-initSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(init_SCRIPTS)'; test -n "$(initdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(initdir)'; $(am__uninstall_files_from_dir) install-nodist_cmdbinSCRIPTS: $(nodist_cmdbin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(nodist_cmdbin_SCRIPTS)'; test -n "$(cmdbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cmdbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cmdbindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(cmdbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(cmdbindir)$$dir" || exit $$?; \ } \ ; done uninstall-nodist_cmdbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(nodist_cmdbin_SCRIPTS)'; test -n "$(cmdbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(cmdbindir)'; $(am__uninstall_files_from_dir) install-updateSCRIPTS: $(update_SCRIPTS) @$(NORMAL_INSTALL) @list='$(update_SCRIPTS)'; test -n "$(updatedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(updatedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(updatedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(updatedir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(updatedir)$$dir" || exit $$?; \ } \ ; done uninstall-updateSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(update_SCRIPTS)'; test -n "$(updatedir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(updatedir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f admserv/cgi-ds/*.$(OBJEXT) -rm -f admserv/cgi-src40/*.$(OBJEXT) -rm -f lib/base/*.$(OBJEXT) -rm -f lib/base/*.lo -rm -f lib/libadmin/*.$(OBJEXT) -rm -f lib/libadmin/*.lo -rm -f lib/libdsa/*.$(OBJEXT) -rm -f lib/libsi18n/*.$(OBJEXT) -rm -f lib/libsi18n/*.lo -rm -f mod_admserv/*.$(OBJEXT) -rm -f mod_admserv/*.lo -rm -f mod_restartd/*.$(OBJEXT) -rm -f mod_restartd/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-ds/$(DEPDIR)/ds_start-start.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/ReadLog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/admpw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/download.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/dsconfig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/htmladmin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/monreplication.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/restartsrv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/sec-activate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/security.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/start_config_ds.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/statpingserv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/statusping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/stopsrv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/ugdsconfig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/viewdata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@admserv/cgi-src40/$(DEPDIR)/viewlog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/base/$(DEPDIR)/file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/base/$(DEPDIR)/nscperror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/base/$(DEPDIR)/nscputil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/base/$(DEPDIR)/system.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/form_get.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/httpcon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/install.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/referer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/template.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libadmin/$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@lib/libsi18n/$(DEPDIR)/getstrprop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mod_admserv/$(DEPDIR)/mod_admserv_la-mod_admserv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@mod_restartd/$(DEPDIR)/mod_restartd_la-mod_restartd@ap_ver_suf@.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< lib/libdsa/libdsa_a-dsalib_conf.o: lib/libdsa/dsalib_conf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_conf.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Tpo -c -o lib/libdsa/libdsa_a-dsalib_conf.o `test -f 'lib/libdsa/dsalib_conf.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_conf.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_conf.c' object='lib/libdsa/libdsa_a-dsalib_conf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_conf.o `test -f 'lib/libdsa/dsalib_conf.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_conf.c lib/libdsa/libdsa_a-dsalib_conf.obj: lib/libdsa/dsalib_conf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_conf.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Tpo -c -o lib/libdsa/libdsa_a-dsalib_conf.obj `if test -f 'lib/libdsa/dsalib_conf.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_conf.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_conf.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_conf.c' object='lib/libdsa/libdsa_a-dsalib_conf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_conf.obj `if test -f 'lib/libdsa/dsalib_conf.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_conf.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_conf.c'; fi` lib/libdsa/libdsa_a-dsalib_debug.o: lib/libdsa/dsalib_debug.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_debug.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Tpo -c -o lib/libdsa/libdsa_a-dsalib_debug.o `test -f 'lib/libdsa/dsalib_debug.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_debug.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_debug.c' object='lib/libdsa/libdsa_a-dsalib_debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_debug.o `test -f 'lib/libdsa/dsalib_debug.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_debug.c lib/libdsa/libdsa_a-dsalib_debug.obj: lib/libdsa/dsalib_debug.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_debug.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Tpo -c -o lib/libdsa/libdsa_a-dsalib_debug.obj `if test -f 'lib/libdsa/dsalib_debug.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_debug.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_debug.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_debug.c' object='lib/libdsa/libdsa_a-dsalib_debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_debug.obj `if test -f 'lib/libdsa/dsalib_debug.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_debug.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_debug.c'; fi` lib/libdsa/libdsa_a-dsalib_tailf.o: lib/libdsa/dsalib_tailf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_tailf.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Tpo -c -o lib/libdsa/libdsa_a-dsalib_tailf.o `test -f 'lib/libdsa/dsalib_tailf.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_tailf.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_tailf.c' object='lib/libdsa/libdsa_a-dsalib_tailf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_tailf.o `test -f 'lib/libdsa/dsalib_tailf.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_tailf.c lib/libdsa/libdsa_a-dsalib_tailf.obj: lib/libdsa/dsalib_tailf.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_tailf.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Tpo -c -o lib/libdsa/libdsa_a-dsalib_tailf.obj `if test -f 'lib/libdsa/dsalib_tailf.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_tailf.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_tailf.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_tailf.c' object='lib/libdsa/libdsa_a-dsalib_tailf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_tailf.obj `if test -f 'lib/libdsa/dsalib_tailf.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_tailf.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_tailf.c'; fi` lib/libdsa/libdsa_a-dsalib_confs.o: lib/libdsa/dsalib_confs.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_confs.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Tpo -c -o lib/libdsa/libdsa_a-dsalib_confs.o `test -f 'lib/libdsa/dsalib_confs.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_confs.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_confs.c' object='lib/libdsa/libdsa_a-dsalib_confs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_confs.o `test -f 'lib/libdsa/dsalib_confs.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_confs.c lib/libdsa/libdsa_a-dsalib_confs.obj: lib/libdsa/dsalib_confs.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_confs.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Tpo -c -o lib/libdsa/libdsa_a-dsalib_confs.obj `if test -f 'lib/libdsa/dsalib_confs.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_confs.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_confs.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_confs.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_confs.c' object='lib/libdsa/libdsa_a-dsalib_confs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_confs.obj `if test -f 'lib/libdsa/dsalib_confs.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_confs.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_confs.c'; fi` lib/libdsa/libdsa_a-dsalib_location.o: lib/libdsa/dsalib_location.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_location.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Tpo -c -o lib/libdsa/libdsa_a-dsalib_location.o `test -f 'lib/libdsa/dsalib_location.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_location.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_location.c' object='lib/libdsa/libdsa_a-dsalib_location.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_location.o `test -f 'lib/libdsa/dsalib_location.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_location.c lib/libdsa/libdsa_a-dsalib_location.obj: lib/libdsa/dsalib_location.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_location.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Tpo -c -o lib/libdsa/libdsa_a-dsalib_location.obj `if test -f 'lib/libdsa/dsalib_location.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_location.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_location.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_location.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_location.c' object='lib/libdsa/libdsa_a-dsalib_location.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_location.obj `if test -f 'lib/libdsa/dsalib_location.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_location.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_location.c'; fi` lib/libdsa/libdsa_a-dsalib_updown.o: lib/libdsa/dsalib_updown.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_updown.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Tpo -c -o lib/libdsa/libdsa_a-dsalib_updown.o `test -f 'lib/libdsa/dsalib_updown.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_updown.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_updown.c' object='lib/libdsa/libdsa_a-dsalib_updown.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_updown.o `test -f 'lib/libdsa/dsalib_updown.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_updown.c lib/libdsa/libdsa_a-dsalib_updown.obj: lib/libdsa/dsalib_updown.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_updown.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Tpo -c -o lib/libdsa/libdsa_a-dsalib_updown.obj `if test -f 'lib/libdsa/dsalib_updown.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_updown.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_updown.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_updown.c' object='lib/libdsa/libdsa_a-dsalib_updown.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_updown.obj `if test -f 'lib/libdsa/dsalib_updown.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_updown.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_updown.c'; fi` lib/libdsa/libdsa_a-dsalib_db.o: lib/libdsa/dsalib_db.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_db.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Tpo -c -o lib/libdsa/libdsa_a-dsalib_db.o `test -f 'lib/libdsa/dsalib_db.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_db.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_db.c' object='lib/libdsa/libdsa_a-dsalib_db.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_db.o `test -f 'lib/libdsa/dsalib_db.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_db.c lib/libdsa/libdsa_a-dsalib_db.obj: lib/libdsa/dsalib_db.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_db.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Tpo -c -o lib/libdsa/libdsa_a-dsalib_db.obj `if test -f 'lib/libdsa/dsalib_db.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_db.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_db.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_db.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_db.c' object='lib/libdsa/libdsa_a-dsalib_db.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_db.obj `if test -f 'lib/libdsa/dsalib_db.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_db.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_db.c'; fi` lib/libdsa/libdsa_a-dsalib_util.o: lib/libdsa/dsalib_util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_util.o -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Tpo -c -o lib/libdsa/libdsa_a-dsalib_util.o `test -f 'lib/libdsa/dsalib_util.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_util.c @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_util.c' object='lib/libdsa/libdsa_a-dsalib_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_util.o `test -f 'lib/libdsa/dsalib_util.c' || echo '$(srcdir)/'`lib/libdsa/dsalib_util.c lib/libdsa/libdsa_a-dsalib_util.obj: lib/libdsa/dsalib_util.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lib/libdsa/libdsa_a-dsalib_util.obj -MD -MP -MF lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Tpo -c -o lib/libdsa/libdsa_a-dsalib_util.obj `if test -f 'lib/libdsa/dsalib_util.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_util.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_util.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Tpo lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lib/libdsa/dsalib_util.c' object='lib/libdsa/libdsa_a-dsalib_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdsa_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lib/libdsa/libdsa_a-dsalib_util.obj `if test -f 'lib/libdsa/dsalib_util.c'; then $(CYGPATH_W) 'lib/libdsa/dsalib_util.c'; else $(CYGPATH_W) '$(srcdir)/lib/libdsa/dsalib_util.c'; fi` mod_admserv/mod_admserv_la-mod_admserv.lo: mod_admserv/mod_admserv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_admserv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mod_admserv/mod_admserv_la-mod_admserv.lo -MD -MP -MF mod_admserv/$(DEPDIR)/mod_admserv_la-mod_admserv.Tpo -c -o mod_admserv/mod_admserv_la-mod_admserv.lo `test -f 'mod_admserv/mod_admserv.c' || echo '$(srcdir)/'`mod_admserv/mod_admserv.c @am__fastdepCC_TRUE@ $(am__mv) mod_admserv/$(DEPDIR)/mod_admserv_la-mod_admserv.Tpo mod_admserv/$(DEPDIR)/mod_admserv_la-mod_admserv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mod_admserv/mod_admserv.c' object='mod_admserv/mod_admserv_la-mod_admserv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_admserv_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mod_admserv/mod_admserv_la-mod_admserv.lo `test -f 'mod_admserv/mod_admserv.c' || echo '$(srcdir)/'`mod_admserv/mod_admserv.c mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo: mod_restartd/mod_restartd@ap_ver_suf@.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_restartd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo -MD -MP -MF mod_restartd/$(DEPDIR)/mod_restartd_la-mod_restartd@ap_ver_suf@.Tpo -c -o mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo `test -f 'mod_restartd/mod_restartd@ap_ver_suf@.c' || echo '$(srcdir)/'`mod_restartd/mod_restartd@ap_ver_suf@.c @am__fastdepCC_TRUE@ $(am__mv) mod_restartd/$(DEPDIR)/mod_restartd_la-mod_restartd@ap_ver_suf@.Tpo mod_restartd/$(DEPDIR)/mod_restartd_la-mod_restartd@ap_ver_suf@.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mod_restartd/mod_restartd@ap_ver_suf@.c' object='mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mod_restartd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mod_restartd/mod_restartd_la-mod_restartd@ap_ver_suf@.lo `test -f 'mod_restartd/mod_restartd@ap_ver_suf@.c' || echo '$(srcdir)/'`mod_restartd/mod_restartd@ap_ver_suf@.c admserv/cgi-ds/ds_listdb-ds_listdb.o: admserv/cgi-ds/ds_listdb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_listdb-ds_listdb.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Tpo -c -o admserv/cgi-ds/ds_listdb-ds_listdb.o `test -f 'admserv/cgi-ds/ds_listdb.c' || echo '$(srcdir)/'`admserv/cgi-ds/ds_listdb.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Tpo admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/ds_listdb.c' object='admserv/cgi-ds/ds_listdb-ds_listdb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_listdb-ds_listdb.o `test -f 'admserv/cgi-ds/ds_listdb.c' || echo '$(srcdir)/'`admserv/cgi-ds/ds_listdb.c admserv/cgi-ds/ds_listdb-ds_listdb.obj: admserv/cgi-ds/ds_listdb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_listdb-ds_listdb.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Tpo -c -o admserv/cgi-ds/ds_listdb-ds_listdb.obj `if test -f 'admserv/cgi-ds/ds_listdb.c'; then $(CYGPATH_W) 'admserv/cgi-ds/ds_listdb.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/ds_listdb.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Tpo admserv/cgi-ds/$(DEPDIR)/ds_listdb-ds_listdb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/ds_listdb.c' object='admserv/cgi-ds/ds_listdb-ds_listdb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_listdb-ds_listdb.obj `if test -f 'admserv/cgi-ds/ds_listdb.c'; then $(CYGPATH_W) 'admserv/cgi-ds/ds_listdb.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/ds_listdb.c'; fi` admserv/cgi-ds/ds_listdb-init_ds_env.o: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_listdb-init_ds_env.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_listdb-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_listdb-init_ds_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_listdb-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c admserv/cgi-ds/ds_listdb-init_ds_env.obj: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_listdb-init_ds_env.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_listdb-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_listdb-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_listdb-init_ds_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_listdb_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_listdb-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` admserv/cgi-ds/ds_restart-restart.o: admserv/cgi-ds/restart.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_restart-restart.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Tpo -c -o admserv/cgi-ds/ds_restart-restart.o `test -f 'admserv/cgi-ds/restart.c' || echo '$(srcdir)/'`admserv/cgi-ds/restart.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Tpo admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/restart.c' object='admserv/cgi-ds/ds_restart-restart.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_restart-restart.o `test -f 'admserv/cgi-ds/restart.c' || echo '$(srcdir)/'`admserv/cgi-ds/restart.c admserv/cgi-ds/ds_restart-restart.obj: admserv/cgi-ds/restart.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_restart-restart.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Tpo -c -o admserv/cgi-ds/ds_restart-restart.obj `if test -f 'admserv/cgi-ds/restart.c'; then $(CYGPATH_W) 'admserv/cgi-ds/restart.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/restart.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Tpo admserv/cgi-ds/$(DEPDIR)/ds_restart-restart.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/restart.c' object='admserv/cgi-ds/ds_restart-restart.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_restart-restart.obj `if test -f 'admserv/cgi-ds/restart.c'; then $(CYGPATH_W) 'admserv/cgi-ds/restart.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/restart.c'; fi` admserv/cgi-ds/ds_restart-init_ds_env.o: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_restart-init_ds_env.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_restart-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_restart-init_ds_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_restart-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c admserv/cgi-ds/ds_restart-init_ds_env.obj: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_restart-init_ds_env.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_restart-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_restart-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_restart-init_ds_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_restart_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_restart-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` admserv/cgi-ds/ds_shutdown-shutdown.o: admserv/cgi-ds/shutdown.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_shutdown-shutdown.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Tpo -c -o admserv/cgi-ds/ds_shutdown-shutdown.o `test -f 'admserv/cgi-ds/shutdown.c' || echo '$(srcdir)/'`admserv/cgi-ds/shutdown.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Tpo admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/shutdown.c' object='admserv/cgi-ds/ds_shutdown-shutdown.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_shutdown-shutdown.o `test -f 'admserv/cgi-ds/shutdown.c' || echo '$(srcdir)/'`admserv/cgi-ds/shutdown.c admserv/cgi-ds/ds_shutdown-shutdown.obj: admserv/cgi-ds/shutdown.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_shutdown-shutdown.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Tpo -c -o admserv/cgi-ds/ds_shutdown-shutdown.obj `if test -f 'admserv/cgi-ds/shutdown.c'; then $(CYGPATH_W) 'admserv/cgi-ds/shutdown.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/shutdown.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Tpo admserv/cgi-ds/$(DEPDIR)/ds_shutdown-shutdown.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/shutdown.c' object='admserv/cgi-ds/ds_shutdown-shutdown.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_shutdown-shutdown.obj `if test -f 'admserv/cgi-ds/shutdown.c'; then $(CYGPATH_W) 'admserv/cgi-ds/shutdown.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/shutdown.c'; fi` admserv/cgi-ds/ds_shutdown-init_ds_env.o: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_shutdown-init_ds_env.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_shutdown-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_shutdown-init_ds_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_shutdown-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c admserv/cgi-ds/ds_shutdown-init_ds_env.obj: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_shutdown-init_ds_env.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_shutdown-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_shutdown-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_shutdown-init_ds_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_shutdown_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_shutdown-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.o: admserv/cgi-ds/ds_snmpctrl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Tpo -c -o admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.o `test -f 'admserv/cgi-ds/ds_snmpctrl.c' || echo '$(srcdir)/'`admserv/cgi-ds/ds_snmpctrl.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Tpo admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/ds_snmpctrl.c' object='admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.o `test -f 'admserv/cgi-ds/ds_snmpctrl.c' || echo '$(srcdir)/'`admserv/cgi-ds/ds_snmpctrl.c admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.obj: admserv/cgi-ds/ds_snmpctrl.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Tpo -c -o admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.obj `if test -f 'admserv/cgi-ds/ds_snmpctrl.c'; then $(CYGPATH_W) 'admserv/cgi-ds/ds_snmpctrl.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/ds_snmpctrl.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Tpo admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-ds_snmpctrl.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/ds_snmpctrl.c' object='admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_snmpctrl-ds_snmpctrl.obj `if test -f 'admserv/cgi-ds/ds_snmpctrl.c'; then $(CYGPATH_W) 'admserv/cgi-ds/ds_snmpctrl.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/ds_snmpctrl.c'; fi` admserv/cgi-ds/ds_snmpctrl-init_ds_env.o: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_snmpctrl-init_ds_env.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_snmpctrl-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_snmpctrl-init_ds_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_snmpctrl-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c admserv/cgi-ds/ds_snmpctrl-init_ds_env.obj: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_snmpctrl-init_ds_env.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_snmpctrl-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_snmpctrl-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_snmpctrl-init_ds_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_snmpctrl_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_snmpctrl-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` admserv/cgi-ds/ds_start-start.o: admserv/cgi-ds/start.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_start-start.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_start-start.Tpo -c -o admserv/cgi-ds/ds_start-start.o `test -f 'admserv/cgi-ds/start.c' || echo '$(srcdir)/'`admserv/cgi-ds/start.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_start-start.Tpo admserv/cgi-ds/$(DEPDIR)/ds_start-start.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/start.c' object='admserv/cgi-ds/ds_start-start.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_start-start.o `test -f 'admserv/cgi-ds/start.c' || echo '$(srcdir)/'`admserv/cgi-ds/start.c admserv/cgi-ds/ds_start-start.obj: admserv/cgi-ds/start.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_start-start.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_start-start.Tpo -c -o admserv/cgi-ds/ds_start-start.obj `if test -f 'admserv/cgi-ds/start.c'; then $(CYGPATH_W) 'admserv/cgi-ds/start.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/start.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_start-start.Tpo admserv/cgi-ds/$(DEPDIR)/ds_start-start.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/start.c' object='admserv/cgi-ds/ds_start-start.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_start-start.obj `if test -f 'admserv/cgi-ds/start.c'; then $(CYGPATH_W) 'admserv/cgi-ds/start.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/start.c'; fi` admserv/cgi-ds/ds_start-init_ds_env.o: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_start-init_ds_env.o -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_start-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_start-init_ds_env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_start-init_ds_env.o `test -f 'admserv/cgi-ds/init_ds_env.c' || echo '$(srcdir)/'`admserv/cgi-ds/init_ds_env.c admserv/cgi-ds/ds_start-init_ds_env.obj: admserv/cgi-ds/init_ds_env.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT admserv/cgi-ds/ds_start-init_ds_env.obj -MD -MP -MF admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Tpo -c -o admserv/cgi-ds/ds_start-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Tpo admserv/cgi-ds/$(DEPDIR)/ds_start-init_ds_env.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='admserv/cgi-ds/init_ds_env.c' object='admserv/cgi-ds/ds_start-init_ds_env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ds_start_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o admserv/cgi-ds/ds_start-init_ds_env.obj `if test -f 'admserv/cgi-ds/init_ds_env.c'; then $(CYGPATH_W) 'admserv/cgi-ds/init_ds_env.c'; else $(CYGPATH_W) '$(srcdir)/admserv/cgi-ds/init_ds_env.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf lib/base/.libs lib/base/_libs -rm -rf lib/libadmin/.libs lib/libadmin/_libs -rm -rf lib/libsi18n/.libs lib/libsi18n/_libs -rm -rf mod_admserv/.libs mod_admserv/_libs -rm -rf mod_restartd/.libs mod_restartd/_libs distclean-libtool: -rm -f libtool config.lt install-man8: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man8dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.8[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-dist_helpDATA: $(dist_help_DATA) @$(NORMAL_INSTALL) @list='$(dist_help_DATA)'; test -n "$(helpdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(helpdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(helpdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(helpdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(helpdir)" || exit $$?; \ done uninstall-dist_helpDATA: @$(NORMAL_UNINSTALL) @list='$(dist_help_DATA)'; test -n "$(helpdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(helpdir)'; $(am__uninstall_files_from_dir) install-dist_htmlDATA: $(dist_html_DATA) @$(NORMAL_INSTALL) @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done uninstall-dist_htmlDATA: @$(NORMAL_UNINSTALL) @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) install-dist_iconDATA: $(dist_icon_DATA) @$(NORMAL_INSTALL) @list='$(dist_icon_DATA)'; test -n "$(icondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icondir)" || exit $$?; \ done uninstall-dist_iconDATA: @$(NORMAL_UNINSTALL) @list='$(dist_icon_DATA)'; test -n "$(icondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(icondir)'; $(am__uninstall_files_from_dir) install-infDATA: $(inf_DATA) @$(NORMAL_INSTALL) @list='$(inf_DATA)'; test -n "$(infdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(infdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(infdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infdir)" || exit $$?; \ done uninstall-infDATA: @$(NORMAL_UNINSTALL) @list='$(inf_DATA)'; test -n "$(infdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(infdir)'; $(am__uninstall_files_from_dir) install-initconfigDATA: $(initconfig_DATA) @$(NORMAL_INSTALL) @list='$(initconfig_DATA)'; test -n "$(initconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(initconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(initconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(initconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(initconfigdir)" || exit $$?; \ done uninstall-initconfigDATA: @$(NORMAL_UNINSTALL) @list='$(initconfig_DATA)'; test -n "$(initconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(initconfigdir)'; $(am__uninstall_files_from_dir) install-ldifDATA: $(ldif_DATA) @$(NORMAL_INSTALL) @list='$(ldif_DATA)'; test -n "$(ldifdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ldifdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ldifdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ldifdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ldifdir)" || exit $$?; \ done uninstall-ldifDATA: @$(NORMAL_UNINSTALL) @list='$(ldif_DATA)'; test -n "$(ldifdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ldifdir)'; $(am__uninstall_files_from_dir) install-nodist_configDATA: $(nodist_config_DATA) @$(NORMAL_INSTALL) @list='$(nodist_config_DATA)'; test -n "$(configdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(configdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(configdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(configdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(configdir)" || exit $$?; \ done uninstall-nodist_configDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_config_DATA)'; test -n "$(configdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(configdir)'; $(am__uninstall_files_from_dir) install-perlDATA: $(perl_DATA) @$(NORMAL_INSTALL) @list='$(perl_DATA)'; test -n "$(perldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(perldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(perldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(perldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(perldir)" || exit $$?; \ done uninstall-perlDATA: @$(NORMAL_UNINSTALL) @list='$(perl_DATA)'; test -n "$(perldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(perldir)'; $(am__uninstall_files_from_dir) install-propertyDATA: $(property_DATA) @$(NORMAL_INSTALL) @list='$(property_DATA)'; test -n "$(propertydir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(propertydir)'"; \ $(MKDIR_P) "$(DESTDIR)$(propertydir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(propertydir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(propertydir)" || exit $$?; \ done uninstall-propertyDATA: @$(NORMAL_UNINSTALL) @list='$(property_DATA)'; test -n "$(propertydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(propertydir)'; $(am__uninstall_files_from_dir) install-systemdsystemunitDATA: $(systemdsystemunit_DATA) @$(NORMAL_INSTALL) @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(systemdsystemunitdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \ done uninstall-systemdsystemunitDATA: @$(NORMAL_UNINSTALL) @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir) install-updateDATA: $(update_DATA) @$(NORMAL_INSTALL) @list='$(update_DATA)'; test -n "$(updatedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(updatedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(updatedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(updatedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(updatedir)" || exit $$?; \ done uninstall-updateDATA: @$(NORMAL_UNINSTALL) @list='$(update_DATA)'; test -n "$(updatedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(updatedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically 'make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ $(MANS) $(DATA) config.h installdirs: for dir in "$(DESTDIR)$(admmoddir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(updatedir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(updatedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f admserv/cgi-ds/$(DEPDIR)/$(am__dirstamp) -rm -f admserv/cgi-ds/$(am__dirstamp) -rm -f admserv/cgi-src40/$(DEPDIR)/$(am__dirstamp) -rm -f admserv/cgi-src40/$(am__dirstamp) -rm -f lib/base/$(DEPDIR)/$(am__dirstamp) -rm -f lib/base/$(am__dirstamp) -rm -f lib/libadmin/$(DEPDIR)/$(am__dirstamp) -rm -f lib/libadmin/$(am__dirstamp) -rm -f lib/libdsa/$(DEPDIR)/$(am__dirstamp) -rm -f lib/libdsa/$(am__dirstamp) -rm -f lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -rm -f lib/libsi18n/$(am__dirstamp) -rm -f mod_admserv/$(DEPDIR)/$(am__dirstamp) -rm -f mod_admserv/$(am__dirstamp) -rm -f mod_restartd/$(DEPDIR)/$(am__dirstamp) -rm -f mod_restartd/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-admmodLTLIBRARIES clean-cgibinPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf admserv/cgi-ds/$(DEPDIR) admserv/cgi-src40/$(DEPDIR) lib/base/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libdsa/$(DEPDIR) lib/libsi18n/$(DEPDIR) mod_admserv/$(DEPDIR) mod_restartd/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-admmodLTLIBRARIES install-cgibinPROGRAMS \ install-cgibinSCRIPTS install-cmdbinSCRIPTS \ install-dist_helpDATA install-dist_htmlDATA \ install-dist_iconDATA install-infDATA install-initSCRIPTS \ install-initconfigDATA install-ldifDATA install-man \ install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ install-perlDATA install-propertyDATA \ install-systemdsystemunitDATA install-updateDATA \ install-updateSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf admserv/cgi-ds/$(DEPDIR) admserv/cgi-src40/$(DEPDIR) lib/base/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libdsa/$(DEPDIR) lib/libsi18n/$(DEPDIR) mod_admserv/$(DEPDIR) mod_restartd/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-admmodLTLIBRARIES uninstall-cgibinPROGRAMS \ uninstall-cgibinSCRIPTS uninstall-cmdbinSCRIPTS \ uninstall-dist_helpDATA uninstall-dist_htmlDATA \ uninstall-dist_iconDATA uninstall-infDATA \ uninstall-initSCRIPTS uninstall-initconfigDATA \ uninstall-ldifDATA uninstall-libLTLIBRARIES uninstall-man \ uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \ uninstall-perlDATA uninstall-propertyDATA \ uninstall-systemdsystemunitDATA uninstall-updateDATA \ uninstall-updateSCRIPTS uninstall-man: uninstall-man8 .MAKE: all check install install-am install-data-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-admmodLTLIBRARIES clean-cgibinPROGRAMS clean-cscope \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLIBRARIES cscope cscopelist ctags dist dist-all \ dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install \ install-admmodLTLIBRARIES install-am install-cgibinPROGRAMS \ install-cgibinSCRIPTS install-cmdbinSCRIPTS install-data \ install-data-am install-data-hook install-dist_helpDATA \ install-dist_htmlDATA install-dist_iconDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigDATA install-ldifDATA \ install-libLTLIBRARIES install-man install-man8 \ install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ install-pdf install-pdf-am install-perlDATA \ install-propertyDATA install-ps install-ps-am install-strip \ install-systemdsystemunitDATA install-updateDATA \ install-updateSCRIPTS installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-admmodLTLIBRARIES \ uninstall-am uninstall-cgibinPROGRAMS uninstall-cgibinSCRIPTS \ uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \ uninstall-dist_htmlDATA uninstall-dist_iconDATA \ uninstall-infDATA uninstall-initSCRIPTS \ uninstall-initconfigDATA uninstall-ldifDATA \ uninstall-libLTLIBRARIES uninstall-man uninstall-man8 \ uninstall-nodist_cmdbinSCRIPTS uninstall-nodist_configDATA \ uninstall-perlDATA uninstall-propertyDATA \ uninstall-systemdsystemunitDATA uninstall-updateDATA \ uninstall-updateSCRIPTS define NL \\n endef install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ progdir=`dirname $$file` ; \ progname=`basename $$progdir` ; \ destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ cp "$$file" "$$destdir" || exit 1 ; \ cp "$$file" "$$destdir/en.res" || exit 1 ; \ cp "$$file" "$$destdir/en_US.res" || exit 1 ; \ done clean-local: -rm -rf selinux-built selinux-built: cp -r $(srcdir)/selinux $@ selinux-built/dirsrv-admin.fc: selinux-built $(fixupcmd) selinux-built/dirsrv-admin.fc.in > $@ # French resource bundles (for the French localization in the future) #RESOURCE_BUNDLES_FR = foo_fr.res # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res properties/%/root.res : admserv/cgi-src40/%.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $+ %/root.res : %.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $+ %_fr.res : %_fr.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-2 $+ %_de.res : %_de.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-2 $+ # because the source may be either httpd.conf.in or httpd-2.2.conf.in admserv/cfgstuff/httpd.conf: $(HTTPD_CONF_SRC) if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $< > $@ wrappers/$(PACKAGE_NAME).service: $(srcdir)/wrappers/systemd.service.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initscript.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ %/$(PACKAGE_NAME): %/initconfig.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $^ > $@ % : %.in if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(fixupcmd) $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: 389-admin-1.1.35/NEWS000066400000000000000000000000001220472121400136720ustar00rootroot00000000000000389-admin-1.1.35/README000066400000000000000000000000001220472121400140530ustar00rootroot00000000000000389-admin-1.1.35/VERSION.sh000066400000000000000000000040211220472121400146630ustar00rootroot00000000000000# brand is lower case - used for names that don't appear to end users # brand is used for file naming - should contain no spaces brand=389 # capbrand is the properly capitalized brand name that appears to end users # may contain spaces capbrand=389 # vendor is the properly formatted vendor/manufacturer name that appears to end users vendor="389 Project" vendorurl=http://port389.org # PACKAGE_VERSION is constructed from these VERSION_MAJOR=1 VERSION_MINOR=1 VERSION_MAINT=35 # if this is a PRERELEASE, set VERSION_PREREL # otherwise, comment it out # be sure to include the dot prefix in the prerel #VERSION_PREREL=.a1 # NOTES on VERSION_PREREL # use aN for an alpha release e.g. a1, a2, etc. # use rcN for a release candidate e.g. rc1, rc2, etc. # for extra clarification, the date can be appended to the prerel e.g. # RC1.`date +%Y%m%d` # a git commit may also be used if test -n "$VERSION_PREREL"; then # if the source is from a git repo, put the last commit # in the version # if this is not a git repo, git log will say # fatal: Not a git repository # to stderr and stdout will be empty # this tells git to print the short commit hash from the last commit COMMIT=`cd $srcdir ; git log -1 --pretty=format:%h 2> /dev/null` if test -n "$COMMIT" ; then VERSION_PREREL=$VERSION_PREREL.git$COMMIT fi fi # the real version used throughout configure and make # NOTE: because of autoconf/automake harshness, we cannot override the settings # below in C code - there is no way to override the default #defines # for these set with AC_INIT - so configure.ac should AC_DEFINE # DS_PACKAGE_VERSION DS_PACKAGE_TARNAME DS_PACKAGE_BUGREPORT # for use in C code - other code (perl scripts, shell scripts, Makefiles) # can use PACKAGE_VERSION et. al. PACKAGE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.${VERSION_MAINT}$VERSION_PREREL # the name of the source tarball - see make dist PACKAGE_TARNAME=${brand}-admin # url for bug reports PACKAGE_BUGREPORT="${PACKAGE_BUGREPORT}enter_bug.cgi?product=$brand" PACKAGE_STRING="$PACKAGE_TARNAME $PACKAGE_VERSION" 389-admin-1.1.35/aclocal.m4000066400000000000000000001305451220472121400150550ustar00rootroot00000000000000# generated automatically by aclocal 1.12.2 -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.12' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.12.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.12.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 17 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 19 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated. For more info, see: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl dnl Support for Objective C++ was only introduced in Autoconf 2.65, dnl but we still cater to Autoconf 2.62. m4_ifdef([AC_PROG_OBJCXX], [AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) 389-admin-1.1.35/admserv/000077500000000000000000000000001220472121400146465ustar00rootroot00000000000000389-admin-1.1.35/admserv/cfgstuff/000077500000000000000000000000001220472121400164555ustar00rootroot00000000000000389-admin-1.1.35/admserv/cfgstuff/admin_ip.pl000077500000000000000000000055731220472121400206070ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK #!../../install/perl -w # change the IP address of the the admin server in the configuration die "Usage: admin_ip.pl [port #]\n" unless (($#ARGV >= 2) && ($#ARGV <= 4)); $dirmgr = $ARGV[0]; $passwd = $ARGV[1]; $oldIPaddr = $ARGV[2]; $newaddr = $ARGV[3]; $port = 389; $port = $ARGV[4] if ($ARGV[4]); $adminconfig = "../../admin-serv/config/"; $ldapsearch = "./ldapsearch"; $ldapmodify = "./ldapmodify"; $baseobject = "o=NetscapeRoot"; $query = "(&(&(cn=configuration)(objectclass=nsConfig))(nsserveraddress=\"$oldIPaddr\"))"; $dn = ""; $oldaddr = ""; $/ = ""; # enable paragraph mode # Find the old IP address in the directory open (LDAP, "$ldapsearch -p $port -b $baseobject -D \"$dirmgr\" -w $passwd \"$query\" |"); while () { s/\n //g; if (/\nnsserveraddress: (.*)\n/) { $oldaddr = $1; print "Old IP in directory: $oldaddr\n"; } if (/^dn: (.*)\n/) { $dn = $1; print "DN: $dn\n"; # Update the IP address stored in the configuration directory open (LDAP2, "| $ldapmodify -p $port -D \"$dirmgr\" -w $passwd"); print LDAP2 "dn: $dn\n"; print LDAP2 "changetype: modify\n"; print LDAP2 "replace: nsserveraddress\n"; print LDAP2 "nsserveraddress: $newaddr\n"; close (LDAP2); } } close (LDAP); # Verify that the IP address has been updated # $testaddr = ""; # pen (LDAP, "$ldapsearch -p $port -b $baseobject -D \"$dirmgr\" -w $passwd \"$query\" |"); # while () { # if (/\nnsserveraddress: (.*)\n/) { # $testaddr = $1; # if ($testaddr eq $newaddr) { # print "The IP address in the directory was updated\n"; # } else { # print "Error updating IP address in the directory!\n"; # } # } # } # Update the admin config file $newconfig=$adminconfig . "local.conf"; $oldconfig = $adminconfig . "local.conf.old"; rename $newconfig, $oldconfig; open (OLD, "<" . $oldconfig); open (NEW, ">" . $newconfig); print "oldaddr: $oldaddr\n"; print "newaddr: $newaddr\n"; while () { s/$oldaddr/$newaddr/g; print NEW; } close(OLD); close(NEW); 389-admin-1.1.35/admserv/cfgstuff/adminserver-start-admin.patch000066400000000000000000000020321220472121400242330ustar00rootroot00000000000000Index: start-admin =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/start-admin,v retrieving revision 1.5 diff -u -8 -r1.5 start-admin --- start-admin 7 Dec 2005 22:13:32 -0000 1.5 +++ start-admin 16 Oct 2006 14:24:56 -0000 @@ -44,14 +44,17 @@ # see if httpd is linked with the openldap libraries - we need to override them OS=`uname -s` if [ $OS = "Linux" ]; then hasol=0 /usr/bin/ldd $HTTPD 2>&1 | grep libldap > /dev/null 2>&1 && hasol=1 if [ $hasol -eq 1 ] ; then - LD_PRELOAD="${SERVER_ROOT}/bin/admin/lib/libssl3.so ${SERVER_ROOT}/bin/admin/lib/libldap50.so" - export LD_PRELOAD + LD_PRELOAD="${SERVER_ROOT}/bin/admin/lib/libssl3.so ${SERVER_ROOT}/bin/admin/lib/libldap60.so" + else +# RHEL3 needs this in order to resolve the libldap60 SASL dependency + LD_PRELOAD="${SERVER_ROOT}/bin/admin/lib/libldap60.so" fi + export LD_PRELOAD fi $HTTPD -k start -d $ADMSERV_ROOT -f $ADMSERV_ROOT/config/httpd.conf "$@" 389-admin-1.1.35/admserv/cfgstuff/admserv-conf-tmpl.patch000066400000000000000000000015211220472121400230330ustar00rootroot00000000000000--- shared/config/template/admserv.conf.tmpl 23 Feb 2006 01:12:11 -0000 1.13 +++ shared/config/template/admserv.conf.tmpl 28 Feb 2006 22:29:39 -0000 1.14 @@ -146,17 +146,17 @@ Order allow,deny Allow from all # Handle Stop, Start, Restart, Instance Creation - invoke mod_restartd # need to add instance creation because you may want to create an instance # of DS on a low port, and instance creation starts the instance as well - AuthUserFile /home/rich/72srv/admin-serv/config/admpw + AuthUserFile %%%sroot%%%/admin-serv/config/admpw AuthType basic AuthName "Admin Server" Require valid-user ## turn off the password pipe when using mod_restartd AdminSDK off Options +ExecCGI RetainPerms on Order allow,deny 389-admin-1.1.35/admserv/cfgstuff/admserv.conf.in000066400000000000000000000072311220472121400213750ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # To get the Admin Express working properly, add the following to # apache, either directly or thru an Include /path/to/this.conf ADMCacheLifeTime 600 ADMServerVersionString "@capbrand@-Administrator/@PACKAGE_VERSION@" ADMConfigDir "@configdir@" ScriptAlias /dist/ "@cgibindir@/" ScriptAlias /manual/help/ "@cgibindir@/" SetEnv LD_LIBRARY_PATH @LIBPATH@ # this is primarily needed for HP-UX and the other platforms # where we bundle all of the components together # so that adminutil can find its property files # In FHS or explicit prefix installs, this is not needed # nor used SetEnv ADMINUTIL_CONF_DIR @adminutilpath@ # all access is explicitly denied by default in httpd.conf # the following Directory directives turn on access for specific # directories AllowOverride None Options FollowSymLinks Order allow,deny Allow from all AllowOverride None Options None Order allow,deny Allow from all AllowOverride None Options None Order allow,deny Allow from all # remap / requests to the download CGI RewriteEngine on RewriteRule ^/$ /dist/download [R,L,QSA] # remap admin server icons Alias /admin-serv/tasks/icons/ @icondir@/ Alias /icons/ @icondir@/ # Handle the initial login SetHandler user-auth AuthUserFile @configdir@/admpw AuthType basic AuthName "Admin Server" Require valid-user Order allow,deny Allow from all # Handle Other Console tasks AuthUserFile @configdir@/admpw AuthType basic AuthName "Admin Server" Require valid-user AdminSDK on ADMCgiBinDir @cgibindir@ Options +ExecCGI Order allow,deny Allow from all # Handle Admin Express AuthUserFile @configdir@/admpw AuthType basic AuthName "Admin Server" Require valid-user AdminSDK on ADMCgiBinDir @cgibindir@ NESCompatEnv on Options +ExecCGI Order allow,deny Allow from all # Handle internal commands AuthUserFile @configdir@/admpw AuthType basic AuthName "Admin Server" Require valid-user Order allow,deny Allow from all # Handle Stop, Start, Restart, Instance Creation - invoke mod_restartd # need to add instance creation because you may want to create an instance # of DS on a low port, and instance creation starts the instance as well AuthUserFile @configdir@/admpw AuthType basic AuthName "Admin Server" Require valid-user ## turn off the password pipe when using mod_restartd AdminSDK off ADMCgiBinDir @cgibindir@ Options +ExecCGI RetainPerms on Order allow,deny Allow from all 389-admin-1.1.35/admserv/cfgstuff/console.conf.in000066400000000000000000000105251220472121400213760ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User @httpduser@ Group @httpdgroup@ # # PidFile: The file in which the server should record its process # identification number when it starts. # PidFile @piddir@/@pidfile@ # # By default, the log files will only log the client IP address, # not the hostname, to avoid having to do a DNS lookup # for each request. If HostnameLookups is off, you will also see # notices in the error log saying that # admserv_host_ip_check: ap_get_remote_host could not resolve the IP address # If you want to have hostnames in the log instead of IP addresses, change # this to "on". Use a value of "double" to make it do double reverse DNS lookups. HostnameLookups off # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog @logdir@/access common # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog @logdir@/error # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # e.g. "Listen 12.34.56.78:80" # # To allow connections to IPv6 addresses add "Listen [::]:80" # Listen @admservip@:@admservport@ # SSL Engine Switch: # Enable/Disable SSL for this virtual host. NSSEngine off # SSL Certificate Nickname: # The nickname of the server certificate you are going to use. NSSNickname server-cert # Server Certificate Database: # The NSS security database directory that holds the certificates and # keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. # Provide the directory that these files exist. NSSCertificateDatabase @securitydir@ # no prefix anymore - assumes securitydir has only the sec files for admin server #NSSDBPrefix %%%instancename%%%- # SSL Cipher Suite: # List the ciphers that the client is permitted to negotiate. # See the mod_nss documentation for a complete list. # SSL 3 ciphers. SSL 2 is disabled by default. NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha NSSProtocol SSLv3,TLSv1 # Client Authentication (Type): # Client certificate verification type. Types are none, optional and # require. NSSVerifyClient none 389-admin-1.1.35/admserv/cfgstuff/ds_removal.in000077500000000000000000000067621220472121400211560ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Usage() { echo "Usage: $0 [-f] -s server_id -w admin_password" echo " server_id: Directory server identifier; slapd-" echo " admin_password: Administration user password" echo " -f - force - optional - ignore errors and force removal of as much as possible" } err0="" err1="" err2="" server_id="" admin_pw="" forceflag=0 while [ "$1" != "" ] do if [ "$1" = "-s" ]; then shift server_id=$1 elif [ "$1" = "-w" ]; then shift admin_pw=$1 elif [ "$1" = "-f" ]; then forceflag=1 elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then Usage exit 0 else err0="Option $1 is not supported. " fi if [ "$1" != "" ]; then shift fi done if [ "$server_id" = "" ]; then err1="Directory Server identifier is missing. " fi if [ "$admin_pw" = "" ]; then err2="Administration user password is missing. " fi if [ "$err0" != "" -o "$err1" != "" -o "$err2" != "" ];then echo Error: ${err0}${err1}${err2} Usage exit 1 fi PASSWORD_PIPE=STDIN; export PASSWORD_PIPE QUERY_STRING="InstanceName=slapd-${server_id}&force=$forceflag"; export QUERY_STRING SERVER_NAMES=slapd-${server_id}; export SERVER_NAMES REQUEST_METHOD=GET; export REQUEST_METHOD if [ -c /dev/null ]; then NULL=/dev/null else NULL=/tmp/ds_remove.out fi @cgibindir@/ds_remove > $NULL << EOF Password: ${admin_pw} EOF exit $? 389-admin-1.1.35/admserv/cfgstuff/ds_unregister.in000077500000000000000000000065041220472121400216720ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # Usage() { echo "Usage: $0 -s server_id -w admin_password" echo " server_id: Directory server identifier; slapd-" echo " admin_password: Administration user password" } err0="" err1="" err2="" server_id="" admin_pw="" while [ "$1" != "" ] do if [ "$1" = "-s" ]; then shift server_id=$1 elif [ "$1" = "-w" ]; then shift admin_pw=$1 elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then Usage exit 0 else err0="Option $1 is not supported. " fi if [ "$1" != "" ]; then shift fi done if [ "$server_id" = "" ]; then err1="Directory Server identifier is missing. " fi if [ "$admin_pw" = "" ]; then err2="Administration user password is missing. " fi if [ "$err0" != "" -o "$err1" != "" -o "$err2" != "" ];then echo Error: ${err0}${err1}${err2} Usage exit 1 fi PASSWORD_PIPE=STDIN; export PASSWORD_PIPE QUERY_STRING="InstanceName=slapd-${server_id}"; export QUERY_STRING SERVER_NAMES=slapd-${server_id}; export SERVER_NAMES REQUEST_METHOD=GET; export REQUEST_METHOD if [ -c /dev/null ]; then NULL=/dev/null else NULL=/tmp/ds_unregister.out fi @cgibindir@/ds_unregister > $NULL << EOF Password: ${admin_pw} EOF exit $? 389-admin-1.1.35/admserv/cfgstuff/httpd-2.2.conf.in000066400000000000000000000625421220472121400213640ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "/path/redhat/apache" will be interpreted by the # server as "/path/redhat/apache/logs/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot This is passed in via the start-admin command line # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 # The console bombs on the x.y.z version format, so omit the .z ServerTokens Minor # start one server in multi threaded mode StartServers 1 # mtm ServerLimit 1 MaxClients 64 MinSpareThreads 32 MaxSpareThreads 64 ThreadsPerChild 64 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so LoadModule authz_host_module @moddir@/mod_authz_host.so LoadModule auth_basic_module @moddir@/mod_auth_basic.so LoadModule authn_file_module @moddir@/mod_authn_file.so LoadModule log_config_module @moddir@/mod_log_config.so LoadModule env_module @moddir@/mod_env.so LoadModule mime_magic_module @moddir@/mod_mime_magic.so LoadModule unique_id_module @moddir@/mod_unique_id.so LoadModule setenvif_module @moddir@/mod_setenvif.so LoadModule mime_module @moddir@/mod_mime.so LoadModule negotiation_module @moddir@/mod_negotiation.so LoadModule dir_module @moddir@/mod_dir.so LoadModule alias_module @moddir@/mod_alias.so LoadModule rewrite_module @moddir@/mod_rewrite.so LoadModule cgi_module @moddir@/mod_cgi.so LoadModule restartd_module @admmoddir@/mod_restartd.so LoadModule nss_module @nssmoddir@/libmodnss.so LoadModule admserv_module @admmoddir@/mod_admserv.so ### Section 2: 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # #ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName www.example.com:80 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot @htmldir@ # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # By default, no one may access anything # Access must be explicitly granted in admserv.conf Order deny,allow Deny from all # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Order allow,deny Deny from all # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # MIMEMagicFile @mimemagic@ # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap # #EnableMMAP off # # EnableSendfile: Control whether the sendfile kernel support is # used to deliver files (assuming that the OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile # #EnableSendfile off # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # You need to enable mod_logio.c to use %I and %O #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature On # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # # # This should be changed to the ServerRoot/manual/. The alias provides # the manual, even if you choose to move your DocumentRoot. You may comment # this out if you do not care for the documentation. # # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # # # Additional to mod_cgid.c settings, mod_cgid has Scriptsock # for setting UNIX socket for communicating with cgid. # Scriptsock @piddir@/admin-serv.cgisock # and this one is for mod_restartd because mod_cgid will consume the other one Scriptsock @piddir@/admin-serv.cgisock # # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://www.example.com/bar # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5 .Big5 .big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-8 .utf8 # The set below does not map to a specific (iso) standard # but works on a fairly wide range of browsers. Note that # capitalization actually matters (it should not, but it # does for some browsers). # # See http://www.iana.org/assignments/character-sets # for a list of sorts. But browsers support few. # AddCharset GB2312 .gb2312 .gb AddCharset utf-7 .utf7 AddCharset utf-8 .utf8 AddCharset big5 .big5 .b5 AddCharset EUC-TW .euc-tw AddCharset EUC-JP .euc-jp AddCharset EUC-KR .euc-kr AddCharset shift_jis .sjis # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # #AddType application/x-tar .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .pl # # For files that include their own HTTP headers: # #AddHandler send-as-is asis # # For server-parsed imagemap files: # #AddHandler imap-file map # # For type maps (negotiated resources): # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /path/to/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. # # The internationalized error documents require mod_alias, mod_include # and mod_negotiation. To activate them, uncomment the following 30 lines. # Alias /error/ "/path/redhat/apache/error/" # # # AllowOverride None # Options IncludesNoExec # AddOutputFilter Includes html # AddHandler type-map var # Order allow,deny # Allow from all # LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr # ForceLanguagePriority Prefer Fallback # # # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully BrowserMatch "^gnome-vfs" redirect-carefully # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # # # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com # # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # # # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com # ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # # # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common # Include @configdir@/admserv.conf Include @configdir@/nss.conf Include @configdir@/console.conf 389-admin-1.1.35/admserv/cfgstuff/httpd-2.4.conf.in000066400000000000000000000633001220472121400213570ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2013 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "/path/redhat/apache" will be interpreted by the # server as "/path/redhat/apache/logs/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot This is passed in via the start-admin command line # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 # The console bombs on the x.y.z version format, so omit the .z ServerTokens Minor # start one server in multi threaded mode StartServers 1 # mtm ServerLimit 1 MaxClients 64 MinSpareThreads 32 MaxSpareThreads 64 ThreadsPerChild 64 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so LoadModule authz_host_module @moddir@/mod_authz_host.so LoadModule auth_basic_module @moddir@/mod_auth_basic.so LoadModule authn_file_module @moddir@/mod_authn_file.so LoadModule log_config_module @moddir@/mod_log_config.so LoadModule env_module @moddir@/mod_env.so LoadModule mime_magic_module @moddir@/mod_mime_magic.so LoadModule unique_id_module @moddir@/mod_unique_id.so LoadModule setenvif_module @moddir@/mod_setenvif.so LoadModule mime_module @moddir@/mod_mime.so LoadModule negotiation_module @moddir@/mod_negotiation.so LoadModule dir_module @moddir@/mod_dir.so LoadModule alias_module @moddir@/mod_alias.so LoadModule rewrite_module @moddir@/mod_rewrite.so LoadModule cgi_module @moddir@/mod_cgi.so LoadModule restartd_module @admmoddir@/mod_restartd.so LoadModule nss_module @nssmoddir@/libmodnss.so LoadModule admserv_module @admmoddir@/mod_admserv.so LoadModule mpm_worker_module @moddir@/mod_mpm_worker.so LoadModule access_compat_module @moddir@/mod_access_compat.so LoadModule authn_core_module @moddir@/mod_authn_core.so LoadModule authz_core_module @moddir@/mod_authz_core.so LoadModule authz_user_module @moddir@/mod_authz_user.so LoadModule unixd_module @moddir@/mod_unixd.so ### Section 2: 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # #ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName www.example.com:80 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot @htmldir@ # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # By default, no one may access anything # Access must be explicitly granted in admserv.conf Order deny,allow Deny from all # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Order allow,deny Deny from all # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType none # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # MIMEMagicFile @mimemagic@ # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap # #EnableMMAP off # # EnableSendfile: Control whether the sendfile kernel support is # used to deliver files (assuming that the OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile # #EnableSendfile off # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # You need to enable mod_logio.c to use %I and %O #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature On # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # # # This should be changed to the ServerRoot/manual/. The alias provides # the manual, even if you choose to move your DocumentRoot. You may comment # this out if you do not care for the documentation. # # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # # # Additional to mod_cgid.c settings, mod_cgid has Scriptsock # for setting UNIX socket for communicating with cgid. # Scriptsock @piddir@/admin-serv.cgisock # and this one is for mod_restartd because mod_cgid will consume the other one Scriptsock @piddir@/admin-serv.cgisock # # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://www.example.com/bar # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5 .Big5 .big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-8 .utf8 # The set below does not map to a specific (iso) standard # but works on a fairly wide range of browsers. Note that # capitalization actually matters (it should not, but it # does for some browsers). # # See http://www.iana.org/assignments/character-sets # for a list of sorts. But browsers support few. # AddCharset GB2312 .gb2312 .gb AddCharset utf-7 .utf7 AddCharset utf-8 .utf8 AddCharset big5 .big5 .b5 AddCharset EUC-TW .euc-tw AddCharset EUC-JP .euc-jp AddCharset EUC-KR .euc-kr AddCharset shift_jis .sjis # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # #AddType application/x-tar .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .pl # # For files that include their own HTTP headers: # #AddHandler send-as-is asis # # For server-parsed imagemap files: # #AddHandler imap-file map # # For type maps (negotiated resources): # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /path/to/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. # # The internationalized error documents require mod_alias, mod_include # and mod_negotiation. To activate them, uncomment the following 30 lines. # Alias /error/ "/path/redhat/apache/error/" # # # AllowOverride None # Options IncludesNoExec # AddOutputFilter Includes html # AddHandler type-map var # Order allow,deny # Allow from all # LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr # ForceLanguagePriority Prefer Fallback # # # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully BrowserMatch "^gnome-vfs" redirect-carefully # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # # # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com # # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # # # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com # ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # # # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common # Include @configdir@/admserv.conf Include @configdir@/nss.conf Include @configdir@/console.conf 389-admin-1.1.35/admserv/cfgstuff/httpd.conf.in000066400000000000000000000634321220472121400210640ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # Based upon the NCSA server configuration files originally by Rob McCool. # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information about # the directives. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections: # 1. Directives that control the operation of the Apache server process as a # whole (the 'global environment'). # 2. Directives that define the parameters of the 'main' or 'default' server, # which responds to requests that aren't handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "/path/redhat/apache" will be interpreted by the # server as "/path/redhat/apache/logs/foo.log". # ### Section 1: Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation (available # at ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # #ServerRoot This is passed in via the start-admin command line # # Timeout: The number of seconds before receives and sends time out. # Timeout 300 # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off # # MaxKeepAliveRequests: The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 # # KeepAliveTimeout: Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 # The console bombs on the x.y.z version format, so omit the .z ServerTokens Minor # start one server in multi threaded mode StartServers 1 # mtm ServerLimit 1 MaxClients 64 MinSpareThreads 32 MaxSpareThreads 64 ThreadsPerChild 64 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so LoadModule access_module @moddir@/mod_access.so LoadModule auth_module @moddir@/mod_auth.so LoadModule log_config_module @moddir@/mod_log_config.so LoadModule env_module @moddir@/mod_env.so LoadModule mime_magic_module @moddir@/mod_mime_magic.so LoadModule expires_module @moddir@/mod_expires.so LoadModule deflate_module @moddir@/mod_deflate.so LoadModule headers_module @moddir@/mod_headers.so LoadModule unique_id_module @moddir@/mod_unique_id.so LoadModule setenvif_module @moddir@/mod_setenvif.so LoadModule mime_module @moddir@/mod_mime.so LoadModule vhost_alias_module @moddir@/mod_vhost_alias.so LoadModule negotiation_module @moddir@/mod_negotiation.so LoadModule dir_module @moddir@/mod_dir.so LoadModule actions_module @moddir@/mod_actions.so LoadModule alias_module @moddir@/mod_alias.so LoadModule rewrite_module @moddir@/mod_rewrite.so LoadModule cache_module @moddir@/mod_cache.so LoadModule disk_cache_module @moddir@/mod_disk_cache.so LoadModule file_cache_module @moddir@/mod_file_cache.so LoadModule mem_cache_module @moddir@/mod_mem_cache.so LoadModule cgi_module @moddir@/mod_cgi.so LoadModule restartd_module @admmoddir@/mod_restartd.so LoadModule nss_module @nssmoddir@/libmodnss.so LoadModule admserv_module @admmoddir@/mod_admserv.so ### Section 2: 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # #ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName www.example.com:80 # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot @htmldir@ # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # By default, no one may access anything # Access must be explicitly granted in admserv.conf Order deny,allow Deny from all # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Order allow,deny Deny from all # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig @httpdconfdir@/mime.types # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # MIMEMagicFile @mimemagic@ # # HostnameLookups: Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it'd be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off # # EnableMMAP: Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap # #EnableMMAP off # # EnableSendfile: Control whether the sendfile kernel support is # used to deliver files (assuming that the OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. Please see # http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile # #EnableSendfile off # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # You need to enable mod_logio.c to use %I and %O #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto: link to the ServerAdmin. # Set to one of: On | Off | EMail # ServerSignature On # # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn't aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # # # This should be changed to the ServerRoot/manual/. The alias provides # the manual, even if you choose to move your DocumentRoot. You may comment # this out if you do not care for the documentation. # # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # # # Additional to mod_cgid.c settings, mod_cgid has Scriptsock # for setting UNIX socket for communicating with cgid. # Scriptsock @piddir@/admin-serv.cgisock # and this one is for mod_restartd because mod_cgid will consume the other one Scriptsock @piddir@/admin-serv.cgisock # # Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example: # Redirect permanent /foo http://www.example.com/bar # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1: The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2: The example entries below illustrate that in some cases # the two character 'Language' abbreviation is not identical to # the two character 'Country' code for its country, # E.g. 'Danmark/dk' versus 'Danish/da'. # # Note 3: In the case of 'ltz' we violate the RFC by using a three char # specifier. There is 'work in progress' to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5 .Big5 .big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-8 .utf8 # The set below does not map to a specific (iso) standard # but works on a fairly wide range of browsers. Note that # capitalization actually matters (it should not, but it # does for some browsers). # # See http://www.iana.org/assignments/character-sets # for a list of sorts. But browsers support few. # AddCharset GB2312 .gb2312 .gb AddCharset utf-7 .utf7 AddCharset utf-8 .utf8 AddCharset big5 .big5 .b5 AddCharset EUC-TW .euc-tw AddCharset EUC-JP .euc-jp AddCharset EUC-KR .euc-kr AddCharset shift_jis .sjis # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # #AddType application/x-tar .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # AddHandler cgi-script .pl # # For files that include their own HTTP headers: # #AddHandler send-as-is asis # # For server-parsed imagemap files: # #AddHandler imap-file map # # For type maps (negotiated resources): # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location # # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_.html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages' appearance without changing any of the # default HTTP_.html.var files by adding the line: # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /path/to/error/include/ files and copying them to /your/include/path/, # even on a per-VirtualHost basis. The default include files will display # your Apache version number and your ServerAdmin email address regardless # of the setting of ServerSignature. # # The internationalized error documents require mod_alias, mod_include # and mod_negotiation. To activate them, uncomment the following 30 lines. # Alias /error/ "/path/redhat/apache/error/" # # # AllowOverride None # Options IncludesNoExec # AddOutputFilter Includes html # AddHandler type-map var # Order allow,deny # Allow from all # LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr # ForceLanguagePriority Prefer Fallback # # # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully BrowserMatch "^gnome-vfs" redirect-carefully # # Allow server status reports generated by mod_status, # with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # # # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com # # # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # # # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com # ### Section 3: Virtual Hosts # # VirtualHost: If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # # # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common # Include @configdir@/admserv.conf Include @configdir@/nss.conf Include @configdir@/console.conf 389-admin-1.1.35/admserv/cfgstuff/initconfig.in000066400000000000000000000016401220472121400211370ustar00rootroot00000000000000# This file is sourced by @package_name@ upon startup to set # the default environment for the admin server. # In order to make more file descriptors available # to the server, first make sure the system # hard limits are raised, then use ulimit - uncomment # out the following line and change the value to the # desired value # note - if using systemd, ulimit won't work - you must edit # the systemd unit file for directory server to add the # LimitNOFILE option - see man systemd.exec for more info # ulimit -n 8192 # In order to use SASL/GSSAPI the # server needs to know where to find its keytab # file - uncomment the following line and set # the path and filename appropriately # if using systemd, omit the "; export VARNAME" at the end # KRB5_KTNAME=@instconfigdir@/admin-serv/keytab ; export KRB5_KTNAME # other environment settings can be added here too # if using systemd, omit the "; export VARNAME" at the end 389-admin-1.1.35/admserv/cfgstuff/nss.conf.in000066400000000000000000000106331220472121400205370ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # This is the Apache server configuration file providing SSL support using. # the mod_nss plugin. It contains the configuration directives to instruct # the server how to serve pages over an https connection. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # ## ## SSL Global Context ## ## All SSL configuration in this context applies both to ## the main server and all SSL-enabled virtual hosts. ## # # Some MIME-types for downloading Certificates and CRLs # AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl # Pass Phrase Dialog: # Configure the pass phrase gathering process. # The filtering dialog program (`builtin' is a internal # terminal dialog) has to provide the pass phrase on stdout. NSSPassPhraseDialog builtin # Pass Phrase Helper: # This helper program stores the token password pins between # restarts of Apache. NSSPassPhraseHelper @modnssbindir@/nss_pcache # Configure the SSL Session Cache. # NSSSessionCacheSize is the number of entries in the cache. # NSSSessionCacheTimeout is the SSL2 session timeout (in seconds). # NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds). NSSSessionCacheSize 10000 NSSSessionCacheTimeout 100 NSSSession3CacheTimeout 86400 ## ## SSL Virtual Host Context ## # Access Control: # With SSLRequire you can do per-directory access control based # on arbitrary complex boolean expressions containing server # variable checks and other lookup directives. The syntax is a # mixture between C and Perl. See the mod_nss documentation # for more details. # #NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ # # SSL Engine Options: # Set various options for the SSL engine. # o FakeBasicAuth: # Translate the client X.509 into a Basic Authorisation. This means that # the standard Auth/DBMAuth methods can be used for access control. The # user name is the `one line' version of the client's X.509 certificate. # Note that no password is obtained from the user. Every entry in the user # file needs this password: `xxj31ZMTZzkVA'. # o ExportCertData: # This exports two additional environment variables: SSL_CLIENT_CERT and # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the # server (always existing) and the client (only existing when client # authentication is used). This can be used to import the certificates # into CGI scripts. # o StdEnvVars: # This exports the standard SSL/TLS related `SSL_*' environment variables. # Per default this exportation is switched off for performance reasons, # because the extraction step is an expensive operation and is usually # useless for serving static content. So one usually enables the # exportation for CGI and SSI requests only. # o StrictRequire: # This denies access when "NSSRequireSSL" or "NSSRequire" applied even # under a "Satisfy any" situation, i.e. when it applies access is denied # and no other module can change it. # o OptRenegotiate: # This enables optimized SSL connection renegotiation handling when SSL # directives are used in per-directory context. #NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire 389-admin-1.1.35/admserv/cfgstuff/restart-ds-admin.in000077500000000000000000000016121220472121400221660ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK @cmdbindir@/stop-ds-admin sleep 3 @cmdbindir@/start-ds-admin 389-admin-1.1.35/admserv/cfgstuff/start-ds-admin.in000066400000000000000000000063761220472121400216500ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # This script sets up the environment for the httpd server and starts it. # for httpd, on RHEL, this will typically be something like /usr/sbin/httpd.worker # On HP-UX, this may be /opt/hpws/apache/bin/httpd. unset PASSWORD_PIPE ldlibpath_add() { [ -z "$1" ] && return LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$1 } shlibpath_add() { [ -z "$1" ] && return SHLIB_PATH=${SHLIB_PATH:+$SHLIB_PATH:}$1 } libpath_add() { [ -z "$1" ] && return LIBPATH=${LIBPATH:+$LIBPATH:}$1 } OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH} OLD_SHLIB_PATH=${SHLIB_PATH} OLD_LIBPATH=${LIBPATH} LD_LIBRARY_PATH= SHLIB_PATH= LIBPATH= ldlibpath_add "@LIBPATH@" ldlibpath_add "${OLD_LD_LIBRARY_PATH}" export LD_LIBRARY_PATH shlibpath_add "@LIBPATH@" shlibpath_add "${OLD_SHLIB_PATH}" export SHLIB_PATH libpath_add "@LIBPATH@" libpath_add "${OLD_LIBPATH}" libpath_add "/usr/threads/lib" libpath_add "/usr/ibmcxx/lib" libpath_add "/usr/lib" libpath_add "/lib" export LIBPATH HTTPD=@HTTPD@ OS=`uname -s` # see if httpd is linked with the openldap libraries - we need to override them if # using mozldap if [ -z "@use_openldap@" ] ; then if [ $OS = "Linux" ]; then hasol=0 /usr/bin/ldd $HTTPD 2>&1 | grep libldap > /dev/null 2>&1 && hasol=1 if [ $hasol -eq 1 ] ; then LD_PRELOAD="@ldapsdk_libdir@/libldap60.so" ssl_lib="@nss_libdir@/libssl3.so" if [ -f "$ssl_lib" ] ; then LD_PRELOAD="$ssl_lib $LD_PRELOAD" fi export LD_PRELOAD fi fi fi # mod_deflate is not supported on HP-UX using the /opt/hpws apache if [ $OS = "HP-UX" ] ; then OMIT_DEFLATE="-DOmitDeflate" fi # source env. for admin server [ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ if [ -z "@with_selinux@" ] ; then if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then SELINUX_CMD="runcon -t unconfined_t --" fi fi $SELINUX_CMD $HTTPD $OMIT_DEFLATE -k start -f @configdir@/httpd.conf "$@" PIDFILE=@localstatedir@/run/@PACKAGE_BASE_NAME@/admin-serv.pid loop_counter=1 # wait for 10 seconds for the pid file to appear max_count=10 while test $loop_counter -le $max_count; do loop_counter=`expr $loop_counter + 1` if test ! -f $PIDFILE ; then sleep 1; else PID=`cat $PIDFILE` fi done if test ! -f $PIDFILE ; then echo Server failed to start !!! Please check errors log for problems exit 1 fi 389-admin-1.1.35/admserv/cfgstuff/stop-ds-admin.in000077500000000000000000000024221220472121400214670ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK PID_FILE=@piddir@/@pidfile@ if test -f $PID_FILE ; then kill -TERM `cat $PID_FILE` if test $? -ne 0 ; then exit 1 fi else echo server not running exit 1 fi loop_counter=1 max_count=30 while test $loop_counter -le $max_count; do loop_counter=`expr $loop_counter + 1` if test -f $PID_FILE ; then sleep 2 else exit 0 fi done echo server not responding to exit command echo killing process group kill -9 `cat $PID_FILE` rm $PID_FILE exit 1 389-admin-1.1.35/admserv/cfgstuff/vlvSetup.pl000066400000000000000000000055531220472121400206520ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK #!../install/perl -w # # Script to setup default directory vlv for admin server # die "Usage: vlvSetup.pl [port #]\n" unless (($#ARGV >= 3) && ($#ARGV <= 4)); if ((!((-e "vlvindex.bat") || (-e "vlvindex"))) || (!((-e "restart-slapd.bat") || (-e "restart-slapd")))) { print "THIS SCRIPT MUST BE RUN FROM DIRECTORY INSTANCE ROOT\n"; exit; } $dirmgr = $ARGV[0]; # directory manager dn $passwd = $ARGV[1]; # directory manager password $baseobject = $ARGV[2]; # directory server host $host = $ARGV[3]; # directory server host $port = 389; # default directory port $port = $ARGV[4] if ($ARGV[4]); # directory port $ldapmodify = "../shared/bin/ldapmodify"; # add default vlv index for user and group open (LDAP, "| $ldapmodify -h $host -p $port -F -c -v -a -D \"$dirmgr\" -w $passwd"); print LDAP "dn: cn=defaultConsoleVLV,cn=config,cn=ldbm\n"; print LDAP "objectclass: top\n"; print LDAP "objectclass: vlvSearch\n"; print LDAP "cn: defaultConsoleVLV\n"; print LDAP "vlvBase: $baseobject\n"; print LDAP "vlvScope: 2\n"; print LDAP "vlvFilter: (|(objectclass=person)(objectclass=groupofuniquenames)(objectclass=organizationalunit))\n"; print LDAP "aci: (target=\"ldap:///cn=defaultConsoleVLV, cn=config, cn=ldbm\")(targetattr = \"*\") (version 3.0; acl \"Config\"; allow( read, search, compare ) userdn = \"ldap:///anyone\";)\n"; print LDAP "\n\n"; print LDAP "dn: cn=defaultConsoleVLVForward_CN,cn=defaultConsoleVLV,cn=config,cn=ldbm\n"; print LDAP "changetype: add\n"; print LDAP "objectclass: top\n"; print LDAP "objectclass: vlvIndex\n"; print LDAP "cn: defaultConsoleVLVForward_CN\n"; print LDAP "vlvSort: cn\n"; print LDAP "\n"; close (LDAP); @args = ("vlvindex", "defaultConsoleVLVForward_CN"); system(@args) == 0 or die "create a vlvindex failed\n"; print "\n"; print "Restart directory server (y/n): "; $choice = ; chomp($choice); if ($choice eq 'y') { @args = ("restart-slapd"); system(@args) == 0 or die "directory restart failed\n"; print "\n"; } 389-admin-1.1.35/admserv/cgi-ds/000077500000000000000000000000001220472121400160145ustar00rootroot00000000000000389-admin-1.1.35/admserv/cgi-ds/ds_listdb.c000066400000000000000000000031051220472121400201260ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * List the database backup directories. * No HTML - this is for DS 4.0. * * Rob Weltman */ #include #include #include "dsalib.h" int main(int argc, char *argv[], char *envp[]) { char **bak_dirs; char **ds_config = NULL; int i = 0; ds_config = ds_get_config (DS_REAL_CONFIG); ds_become_localuser(ds_config); ds_free_config(ds_config); /* Tell the receiver we are about to start sending data */ fprintf(stdout, "\n"); bak_dirs = ds_get_bak_dirs(); if (bak_dirs != NULL ) /* no error */ { for (i = 0; bak_dirs[i]; i++) { fprintf(stdout, "%s\n", bak_dirs[i]); } } ds_become_original(); return 0; } 389-admin-1.1.35/admserv/cgi-ds/ds_snmpctrl.c000066400000000000000000000147711220472121400205220ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * snmpctrl.c - start/stop/restart LDAP-based SNMP subagent * * Steve Ross -- 08/12/97 * */ #include #include #include #include "libadminutil/admutil.h" #include "dsalib.h" #include "init_ds_env.h" #include "nspr.h" #if !defined(_WIN32) #include #include #include #include #include #include #else #include #endif #define SUBAGT_PATH "bin/slapd/server" #define SUBAGT_NAME "ns-ldapagt" #define START 1 #define STOP 2 #define RESTART 3 #define NSLDAPAGT_PID "NSLDAPAGT.LK" #ifdef __cplusplus extern "C" { #endif int nsldapagt_is_running(void); int nsldapagt_shutdown(void); int nsldapagt_start(void); int nsldapagt_restart(void); #ifdef __cplusplus } #endif int main(int argc, char *argv[]) { char *action_type = NULL; int status = 1; fprintf(stdout, "Content-type: text/html\n\n"); if ( init_ds_env() ) return 1; action_type = get_cgi_var("ACTION", "Missing Command", "Need to specify Start, Stop, or Restart"); if (!action_type) return 1; if (!strcmp(action_type, "START")) { status = nsldapagt_start(); } else if (!strcmp(action_type, "STOP")) { status = nsldapagt_shutdown(); } else if (!strcmp(action_type, "RESTART")) { status = nsldapagt_restart(); } else { status = DS_UNKNOWN_SNMP_COMMAND; } if ( !status ) { rpt_success("Success!"); return 0; } else { rpt_err( status, action_type, NULL, NULL ); return 1; } } #if !defined(_WIN32) int get_nsldapagt_pid(pid_t *pid) { char *SLAPD_ROOT; char path[PATH_MAX]; FILE *fp; *pid = -1; SLAPD_ROOT = ds_get_instance_dir(); PR_snprintf(path, sizeof(path), "%s/logs/%s", SLAPD_ROOT, NSLDAPAGT_PID); if (!ds_file_exists(path)) { return(-1); } if ((fp = fopen(path, "r")) != (FILE *) NULL) { if ((fscanf(fp, "%d\n", (int *) pid)) != -1) { (void) fclose(fp); return(0); } (void) fclose(fp); } return(-1); } #endif #if defined(_WIN32) BOOL isServiceRunning(LPCTSTR szServiceId) { BOOL bReturn = FALSE; DWORD dwError = 0; SC_HANDLE schService = NULL; SC_HANDLE schSCManager = NULL; SERVICE_STATUS lpss; if((schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS))) { if((schService = OpenService(schSCManager, szServiceId, SERVICE_ALL_ACCESS))) { bReturn = ControlService(schService, SERVICE_CONTROL_INTERROGATE , &lpss); if(SERVICE_RUNNING == lpss.dwCurrentState) { bReturn = TRUE; } CloseServiceHandle(schService); } dwError = GetLastError(); CloseServiceHandle(schSCManager); } return(bReturn); } #endif /* * This routine returns: * 0 if nsldapagt is NOT running * 1 if nsldapagt is actually running */ int nsldapagt_is_running() { #if defined(_WIN32) if (FALSE == isServiceRunning("SNMP") ) { return(0); } #else pid_t pid; if (get_nsldapagt_pid(&pid) != 0) { return(0); } if (kill(pid, 0) == -1) { return(0); } #endif return(1); } #if !defined(_WIN32) /* * This routine returns: * 0 if magt is NOT running * 1 if magt is actually running * * The run state is determined whether one can successfully bind to the * smux port. * * this is for UNIX only */ int smux_master_is_running() { struct servent *pse; struct protoent *ppe; struct sockaddr_in sin = {0}; int s; sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; if ((pse = getservbyname("smux", "tcp"))) { sin.sin_port = ntohs(pse->s_port); } else { sin.sin_port = 199; } if ((ppe = getprotobyname("tcp")) == 0) { return(0); } if ((s = socket(AF_INET, SOCK_STREAM, ppe->p_proto)) < 0) { return(0); } /* bind expects port number to be in network order we should do this for all platforms, not just OSF. */ sin.sin_port = htons(sin.sin_port); if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { close(s); return(1); } else { } close(s); return(0); } #endif int nsldapagt_start() { if (nsldapagt_is_running()) { return(0); } #if defined(_WIN32) /* NT version -- just try to start the SNMP service */ /* Bug 612322: redirecting the output to null device */ system("net start SNMP > nul"); #else /* * Check if smux master agent is running before firing off the subagent! */ if (!smux_master_is_running()) { return(-1); } else { char *NETSITE_ROOT = getenv("NETSITE_ROOT"); char *SLAPD_ROOT = ds_get_instance_dir(); char command[1024]; PR_snprintf(command, sizeof(command), "cd %s/%s; ./%s -d %s", NETSITE_ROOT, SUBAGT_PATH, SUBAGT_NAME, SLAPD_ROOT); (void) system(command); sleep(2); } #endif if (!nsldapagt_is_running()) { return(-1); } return(0); } int nsldapagt_shutdown() { if (!nsldapagt_is_running()) { rpt_success("NOT_RUNNING"); exit(0); } else { int status = -1; #if defined(_WIN32) /* NT version -- just try to stop the SNMP service */ /* Bug 612322: redirecting the output to null device */ status = system("net stop SNMP > nul"); #else /* UNIX version */ pid_t pid; if (get_nsldapagt_pid(&pid) == 0) { if (kill(pid, SIGTERM) == 0) { sleep(2); if (!nsldapagt_is_running()) { status = 0; } } } #endif return(status); } return(0); } int nsldapagt_restart() { int status; if ( (status = nsldapagt_shutdown()) != 0 ) return status; else return nsldapagt_start(); } 389-admin-1.1.35/admserv/cgi-ds/init_ds_env.c000066400000000000000000000034531220472121400204660ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * Set up environment for CGIs. * * Rob Weltman */ #include #include #include #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "init_ds_env.h" #include "dsalib.h" #include "prprf.h" int init_ds_env() { char *m = getenv("REQUEST_METHOD"); char *qs = NULL; int proceed = 0; (void)ADMUTIL_Init(); if ( m != NULL ) { if( !strcmp(m, "GET") ) { qs = GET_QUERY_STRING(); if ( qs && *qs ) { get_begin(qs); } proceed = 1; } else if(!strcmp(m, "POST")) { if (post_begin(stdin)) { proceed = 0; } else { proceed = 1; } } } if(!proceed) { char msg[2000]; PR_snprintf(msg, sizeof(msg), "ErrorString: REQUEST_METHOD=%s," "QUERY_STRING=%s\n", (m == NULL) ? "" : m, (qs == NULL) ? "" : qs); rpt_err( GENERAL_FAILURE, msg, "", "" ); return 1; } return 0; } 389-admin-1.1.35/admserv/cgi-ds/init_ds_env.h000066400000000000000000000017231220472121400204710ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * Set up environment for CGIs. * * Rob Weltman */ extern int init_ds_env(); 389-admin-1.1.35/admserv/cgi-ds/restart.c000066400000000000000000000032121220472121400176420ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * restart.c: Stops and the starts up the server. * */ #include #include #include #include "libadminutil/admutil.h" #include "dsalib.h" #include "init_ds_env.h" #ifdef XP_WIN32 #define sleep(sec) Sleep(sec) #endif int main(int argc, char *argv[]) { int status = -1; fprintf(stdout, "Content-type: text/html\n\n"); if ( init_ds_env() ) return 1; if (DS_SERVER_UP == ds_get_updown_status()) { status = ds_bring_down_server(); if(status != DS_SERVER_DOWN) { rpt_err( status, "", NULL, NULL ); return 1; } } status = ds_bring_up_server(1); if(status == DS_SERVER_UP) { rpt_success("Success! The server has been restarted."); return 0; } else { rpt_err( status, "", NULL, NULL ); return 1; } } 389-admin-1.1.35/admserv/cgi-ds/shutdown.c000066400000000000000000000027661220472121400200460ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * shutdown.c: Kills the server. * * DS changes: Anil Bhavnani * Removed all HTML output for DS 4.0: Rob Weltman * Mike McCool */ #include #include #include #include "libadminutil/admutil.h" #include "dsalib.h" #include "init_ds_env.h" int main(int argc, char *argv[]) { int status = -1; fprintf(stdout, "Content-type: text/html\n\n"); if ( init_ds_env() ) return 1; status = ds_bring_down_server(); if(status == DS_SERVER_DOWN) { rpt_success("Success! The server has been shut down."); return 0; } else { rpt_err( status, "", NULL, NULL ); return 1; } } 389-admin-1.1.35/admserv/cgi-ds/start.c000066400000000000000000000027621220472121400173240ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * start.c: Starts up the server. * * DS changes: Anil Bhavnani * Removed all HTML output for DS 4.0: Rob Weltman * Mike McCool */ #include #include #include #include "libadminutil/admutil.h" #include "dsalib.h" #include "init_ds_env.h" int main(int argc, char *argv[]) { int status = -1; fprintf(stdout, "Content-type: text/html\n\n"); if ( init_ds_env() ) return 0; status = ds_bring_up_server(1); if(status == DS_SERVER_UP) { rpt_success("Success! The server has been started."); return 0; } else { rpt_err( status, "", NULL, NULL ); return 1; } } 389-admin-1.1.35/admserv/cgi-src40/000077500000000000000000000000001220472121400163415ustar00rootroot00000000000000389-admin-1.1.35/admserv/cgi-src40/NTRestartService.c000066400000000000000000000042541220472121400217210ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ //--------------------------------------------------------------------------// // // // Name: Service Restarter // // Platforms: WIN32 // // ...................................................................... // // Revision History: // // 01-29-98 Initial Version, Andy Hakim (ahakim@netscape.com) // //--------------------------------------------------------------------------// #include #include "ntos.h" //--------------------------------------------------------------------------// // // //--------------------------------------------------------------------------// void RestartService(char *szName) { DWORD dwLastError; SERVICE_StopNTServiceAndWait(szName, &dwLastError); SERVICE_StartNTService(szName); } //--------------------------------------------------------------------------// // // //--------------------------------------------------------------------------// int main(int argc, char *argv[]) { RestartService("admin-serv"); } 389-admin-1.1.35/admserv/cgi-src40/NTStopService.c000066400000000000000000000037471220472121400212300ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ //--------------------------------------------------------------------------// // // // Name: Stop Service // // Platforms: WIN32 // // // //--------------------------------------------------------------------------// #include #include "ntos.h" //--------------------------------------------------------------------------// // // //--------------------------------------------------------------------------// void StopService(char *szName) { DWORD dwLastError; SERVICE_StopNTServiceAndWait(szName, &dwLastError); } //--------------------------------------------------------------------------// // // //--------------------------------------------------------------------------// int main(int argc, char *argv[]) { StopService("admin-serv"); } 389-admin-1.1.35/admserv/cgi-src40/ReadLog.c000066400000000000000000000116241220472121400200260ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /** * CGI Browser test syntax: * * http://host:port/admin-serv/bin/readlog?op=read&name=filename&start=linenum&stop=linenum * Returns log entries in filename, start and stop are optional * * http://host:port/admin-serv/bin/readlog?op=count&name=filename * Returns number of log entries * * @date 11/29/97 * @author ahakim@netscape.com */ #include "libadmin/libadmin.h" #include "libadminutil/admutil.h" #include #include #include #include "nspr.h" #ifndef BIG_LINE #define BIG_LINE 512 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif char errorlog[BIG_LINE]; char accesslog[BIG_LINE]; int readLogFile(char *filename, int startEntry, int endEntry) { char line[BIG_LINE]; int entryIndex = 0; FILE *f = fopen(filename, "r"); if(f != NULL) { while(fgets(line, BIG_LINE, f)) { if(strstr(line, "format=") == NULL) { if((entryIndex >= startEntry) && (entryIndex <= endEntry)) fprintf(stdout, "%s", line); entryIndex++; } } fclose(f); return 0; } return 1; } char *getLogName(char *line) { char *log; char *eol; log = strrchr(line, ':'); log++; log++; eol = strchr(line, '\n'); eol[0] = '\0'; return log; } int getLogNames() { char line[BIG_LINE]; const char *configdir = util_get_conf_dir(); char filename[BIG_LINE]; FILE *f; if (!util_find_file_in_paths(filename, sizeof(filename), "local.conf", configdir, "", "admin-serv/config")) { return 0; } f = fopen(filename, "r"); if(f) { while(!feof(f)) { fgets(line, sizeof(line), f); if(PL_strcasestr(line, "nserrorlog")) { PR_snprintf(errorlog, sizeof(errorlog), "%s", getLogName(line)); } else if(PL_strcasestr(line, "nsaccesslog")) { PR_snprintf(accesslog, sizeof(accesslog), "%s", getLogName(line)); } } fclose(f); } return 0; } int getEntryCount(char *filename, int *value) { char line[BIG_LINE]; int entryIndex = 0; FILE *f = fopen(filename, "r"); if(f != NULL) { while(fgets(line, BIG_LINE, f) != NULL) { if(strstr(line, "format=") == NULL) entryIndex++; } *value = entryIndex; fclose(f); return 0; } return 1; } int main(int argc, char *argv[]) { char *qs = NULL; char *method = NULL; char *operation = NULL; int proceed = FALSE; fprintf(stdout, "Content-type: text/html\n\n"); /*fprintf(stdout, "Number of Entries = %d\n\n", getEntryCount("error"));*/ method = getenv("REQUEST_METHOD"); if(method) { if(!strcmp(method, "GET")) { qs = getenv("QUERY_STRING"); if(qs && *qs) { get_begin(qs); proceed = TRUE; } } else if(!strcmp(method, "POST")) { post_begin(stdin); proceed = TRUE; } } if(!proceed) { fprintf(stdout, "Status: 1\nErrorString: REQUEST_METHOD=%s, QUERY_STRING=%s\n", method, qs); exit(1); } proceed=FALSE; operation = (char *)get_cgi_var("op", NULL, NULL); if(operation) { char *name = NULL; char *start = NULL; char *stop = NULL; getLogNames(); if(!strcmp(operation, "read")) { name = (char *)get_cgi_var("name", NULL, NULL); start = (char *)get_cgi_var("start", NULL, NULL); stop = (char *)get_cgi_var("stop", NULL, NULL); if(name) { if(strstr(name, "access")) name = accesslog; else name = errorlog; if(readLogFile(name, start?atoi(start):0, stop?atoi(stop):99999) == 0) proceed = TRUE; } if(!proceed) { fprintf(stdout, "Status: 1\nErrorString: name=%s\n", name?name:""); exit(1); } } if(!strcmp(operation, "count")) { name = (char *)get_cgi_var("name", NULL, NULL); if(name) { int value; if(strstr(name, "access")) name = accesslog; else name = errorlog; if(getEntryCount(name, &value) == 0) { proceed = TRUE; fprintf(stdout, "count=%d\n", value); } } if(!proceed) { fprintf(stdout, "Status: 1\nErrorString: name=%s\n", name?name:""); exit(1); } } } if(!proceed) { fprintf(stdout, "Status: 1\nErrorString: op=%s\n", operation?operation:""); exit(1); } return 0; } 389-admin-1.1.35/admserv/cgi-src40/admpw.c000066400000000000000000000230441220472121400176200ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Admin Superuser username/password get/set. * * Get Operation * in: op=get * out: admpw.uid= * * Set Operation * in:op=set&admpw.uid=&admpw.pw= * If admpw.uid is found in cgi parameters, update uid in the config/admpw file * If admpw.pw is found in cgi parameters, update password in: * 1) "userPassword" attribute in the SIE on the DS * 2) config/admpw file. The password is stored in encrypted form */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /* for vsprintf */ #include #include #include /* NSS - for password hashing */ #include #include #include /* NSS - for password hashing */ #include #include #include #include "libadminutil/resource.h" #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/libadmin.h" static void output_admuid(AdmldapInfo admInfo); static void update_uidpwd(); static void update_admpwd(char *newuid, char *newpw, const char *filename); static char * sha1_pw_enc(const char *pwd) { unsigned char hash[SHA1_LENGTH]; char *enc; char *retval; int32 pwdlen = strlen(pwd); /* SHA1 hash the user's key */ PK11_HashBuf(SEC_OID_SHA1, hash, (unsigned char *)pwd, pwdlen); /* convert to base64 */ if (!(enc = BTOA_DataToAscii(hash, sizeof(hash)))) { return NULL; } /* add "{SHA}" in front of string */ retval = PR_smprintf("{SHA}%s", enc); PORT_Free(enc); return retval; } /* * Logging function */ static FILE * logfp; static int log_enabled = 0; static void logMsg(char *format, ...) { char logfile[512]; if (!log_enabled) return; if (logfp==NULL) { const char *logdir = util_get_log_dir(); if (logdir) { PR_snprintf(logfile, sizeof(logfile), "%s/admpw.dbg", logdir); logfp = fopen(logfile, "w"); } } if (logfp != NULL) { va_list ap; va_start(ap,format); vfprintf(logfp,format,ap); va_end(ap); fflush(logfp); } } /* * i18n conversions defines and function; * properties file = "admpw.properties" */ #define RESOURCE_FILE "admpw" #define resource_key(a,b) a b #define DBT_NO_METHOD resource_key(RESOURCE_FILE, "1") #define DBT_UNKNOWN_METHOD resource_key(RESOURCE_FILE, "2") #define DBT_NO_QUERY_STRING resource_key(RESOURCE_FILE, "3") #define DBT_NO_OPERATION resource_key(RESOURCE_FILE, "4") #define DBT_UNKNOWN_OPERATION resource_key(RESOURCE_FILE, "5") #define DBT_OPEN_ADMPW resource_key(RESOURCE_FILE, "6") #define DBT_READ_ADMPW resource_key(RESOURCE_FILE, "7") #define DBT_ADMPW_CORRUPTED resource_key(RESOURCE_FILE, "8") #define DBT_NO_PARAM resource_key(RESOURCE_FILE, "9") #define DBT_OPEN_ADMPW_WR resource_key(RESOURCE_FILE, "10") #define DBT_WR_ADMPW resource_key(RESOURCE_FILE, "11") #define DBT_OPEN_ADMCONF_RD resource_key(RESOURCE_FILE, "12") #define DBT_NO_SIEPID resource_key(RESOURCE_FILE, "13") #define DBT_OPEN_ADMCONF_WR resource_key(RESOURCE_FILE, "14") #define DBT_NO_USERNAME resource_key(RESOURCE_FILE, "15") #define DBT_NO_USERDN resource_key(RESOURCE_FILE, "16") #define DBT_SECURITY_INIT resource_key(RESOURCE_FILE, "17") #define DBT_PSET_CREATE resource_key(RESOURCE_FILE, "18") #define DBT_PSET_ERROR resource_key(RESOURCE_FILE, "19") #define DBT_PSET_SET resource_key(RESOURCE_FILE, "20") static char *acceptLanguage = (char*)"en"; static Resource *i18nResource = NULL; static void i18nInit() { i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (getenv("HTTP_ACCEPT_LANGUAGE")) { acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); } } static const char *i18nMsg(char *msgid, char *defaultMsg) { const char *msg=NULL; static char buf[BUFSIZ]; /* ok - not threaded code */ if (i18nResource) { msg = res_getstring(i18nResource, msgid, acceptLanguage, buf, sizeof(buf), NULL); } if (msg == NULL) { msg = (const char*)defaultMsg; } return msg; } /* * Main */ int main(int argc, char *argv[]) { int _ai=ADMUTIL_Init(); char *method = getenv("REQUEST_METHOD"); char *qs = 0, *op=0; char error_info[128]; AdmldapInfo admInfo; int errorcode = 0; char *configdir = util_get_conf_dir(); (void)_ai; /* get rid of unused variable warning */ logMsg(" In %s\n", argv[0]); i18nInit(); admInfo = admldapBuildInfoOnly(configdir, &errorcode); if (!admInfo || errorcode) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_OPEN_ADMPW, "Can not open admpw file"), NULL, NULL); } /* GET or POST method */ if (!method || !*method) { /* non UI CGI */ rpt_err(SYSTEM_ERROR, i18nMsg(DBT_NO_METHOD,"No method is specified"), NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_QUERY_STRING, "NO QUERY_STRING DATA"), NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_METHOD, "Unknown Method (%s)"), method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } logMsg("method=%s\n", method); op=get_cgi_var("op", NULL, NULL); logMsg("op=%s\n", op); if (op == NULL) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_OPERATION, "No operation defined"), NULL, NULL); } else if (strcmp(op,"get")==0) { output_admuid(admInfo); } else if (strcmp(op,"set")==0) { update_uidpwd(admInfo); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_OPERATION, "Unknown Operation (%s)"), op); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } destroyAdmldap(admInfo); exit(0); return 0; } /* * Output user name from the admpwd. The password does not need to be sent */ static void output_admuid(AdmldapInfo admInfo) { char *uid=admldapGetLocalAdminName(admInfo); if (uid == NULL) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_ADMPW_CORRUPTED, "admpw file corrupted"), NULL, NULL); } logMsg("uid=%s, pw=%s\n", uid, "(secret)"); fprintf(stdout, "Content-type: text/html\n\n"); fprintf(stdout, "admpw.uid: %s\n", uid); PL_strfree(uid); } /* * Modify local superuser username and password */ static void update_uidpwd(AdmldapInfo admInfo) { FILE *f; char *uid=NULL, *pw=NULL, *col=NULL; char *newuid=NULL, *newpw=NULL; static char filename[BIG_LINE]; static char inbuf[BIG_LINE]; char *tmpfile = admldapGetAdmpwFilePath(admInfo); PR_snprintf(filename, sizeof(filename), tmpfile); PL_strfree(tmpfile); newuid = get_cgi_var("admpw.uid",NULL, NULL); newpw = get_cgi_var("admpw.pw",NULL, NULL); if (newuid==NULL && newpw==NULL) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_PARAM, "No parameters to set"), NULL, NULL); } logMsg("newuid=%s, newpw=%s\n", newuid ? newuid:"", newpw ? newpw : ""); if ((f=fopen(filename, "r"))==NULL) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_OPEN_ADMPW,"Can not open admpw file"), NULL, NULL); } if (fgets(inbuf, sizeof(inbuf), f) == NULL) { fclose(f); rpt_err(SYSTEM_ERROR, i18nMsg(DBT_READ_ADMPW, "Can not read admpw file"), NULL, NULL); } logMsg("line=%s@\n", inbuf); fclose(f); col = strchr(inbuf, ':'); if (col == NULL) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_ADMPW_CORRUPTED,"admpw file corrupted"), NULL, NULL); } uid = inbuf; *col=0; pw=col+1; logMsg("uid=%s, pw=%s\n", uid, pw); if (newuid == NULL) { newuid = uid; } if (newpw != NULL) { char *configdir = util_get_conf_dir(); char *secdir = util_get_security_dir(); int errorCode = ADMSSL_InitSimple(configdir, secdir, 1 /* force to use hashing */); if (errorCode) { rpt_err(APP_ERROR, i18nMsg(DBT_SECURITY_INIT, "Security Initialization Failed"), NULL, NULL); } update_admpwd(newuid, sha1_pw_enc(newpw), filename); } else { update_admpwd(newuid, pw, filename); } rpt_success(NULL); } /* * Modify admpw. */ static void update_admpwd(char *newuid, char *newpw, const char *filename) { FILE *f; int cnt; static char outbuf[BIG_LINE]; f = fopen(filename, "w"); if (f==NULL) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_OPEN_ADMPW_WR, "Can not open admpw file for writing"), NULL, NULL); } PR_snprintf(outbuf, sizeof(outbuf),"%s:%s", newuid, newpw); logMsg("output=%s\n", outbuf); cnt = fprintf(f,"%s", outbuf); if (cnt != (int)strlen(outbuf)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_WR_ADMPW, "Failed to write to admpw"), NULL, NULL); } fclose(f); } 389-admin-1.1.35/admserv/cgi-src40/admpw.properties000066400000000000000000000032231220472121400215670ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { admpw1 { "No method is specified" } admpw2 { "Unknown Method (%s)" } admpw3 { "No data in QUERY_STRING environment variable" } admpw4 { "No operation is defined" } admpw5 { "Unknown Operation (%s)" } admpw6 { "Can not open admpw file" } admpw7 { "Can not read admpw file" } admpw8 { "admpw file is corrupted" } admpw9 { "No parameters to set" } admpw10 { "Can not open admpw file for writing" } admpw11 { "Failed to write to admpw" } admpw12 { "Can not open adm.conf for reading" } admpw13 { "Parameter siepid: not found in adm.conf" } admpw14 { "Can not open adm.conf for writing" } admpw15 { "No User Name" } admpw16 { "No User DN" } admpw17 { "Security Initialization Failed" } admpw18 { "PSET Creation Failed" } admpw19 { "PSETERROR: %d" } admpw20 { "PSET SET Failed" } } 389-admin-1.1.35/admserv/cgi-src40/cgicommon.h000066400000000000000000000027421220472121400204720ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef CGICOMMON_H #define CGICOMMON_H #define COMMON_RESOURCE_FILE "cgicommon" #define resource_key(a,b) a b /* These are the defines to use in C code for localized messages */ #define CMN_CONFIGPROBLEM resource_key(COMMON_RESOURCE_FILE, "1") #define CMN_SSL_INIT_ERROR resource_key(COMMON_RESOURCE_FILE, "2") #define CMN_NSS_SHUTDOWN_ERROR resource_key(COMMON_RESOURCE_FILE, "3") /* These are other properties */ #define DSOBJECTCLASS "nsdirectoryserver" /* name of table in cgicommon */ #define DSCONFIGENTRY "cn=config" #define DSSECURITYDIR "nsslapd-certdir" #define DSERRORLOGDIR "nsslapd-errorlog" #endif /* CGICOMMON_H */ 389-admin-1.1.35/admserv/cgi-src40/cgicommon.properties000066400000000000000000000023611220472121400224340ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file // This file contains resources common to all CGI programs // see cgicommon.h root { // messages displayed to user - these can be localized cgicommon1 { "Could not read the Admin Server CGI config file %s/adm.conf: error code %d" } cgicommon2 { "NSS initialization failed for security directory %s: error %d:%s" } cgicommon3 { "NSS shutdown failed: error %d:%s" } } 389-admin-1.1.35/admserv/cgi-src40/config.c000066400000000000000000000773631220472121400177720ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Description (config.c) * * This module contains routines used by administration CGI * programs to set/get the attribute(s) of Admin server * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef XP_UNIX #include #include #include #include #include #include #include #endif #include #include "libadminutil/resource.h" #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/install.h" #include "libadmin/libadmin.h" #ifdef XP_WIN32 #define EADDRINUSE WSAEADDRINUSE #endif static char msgbuf[BUFSIZ]; /* ok - not threaded code */ /* properties file name = "config.properties" */ #define RESOURCE_FILE "config" #define resource_key(a,b) a b #define DBT_NO_METHOD resource_key(RESOURCE_FILE, "1") #define DBT_UNKNOWN_METHOD resource_key(RESOURCE_FILE, "2") #define DBT_NO_QUERY_STRING resource_key(RESOURCE_FILE, "3") #define DBT_NO_USER_NAME resource_key(RESOURCE_FILE, "4") #define DBT_NO_USER_DN resource_key(RESOURCE_FILE, "5") #define DBT_PSET_CREATE_ERROR resource_key(RESOURCE_FILE, "6") #define DBT_NO_OP resource_key(RESOURCE_FILE, "7") #define DBT_ILLEGAL_OP resource_key(RESOURCE_FILE, "8") #define DBT_NO_ATTRS resource_key(RESOURCE_FILE, "9") #define DBT_PSET_GET_ERROR resource_key(RESOURCE_FILE, "10") #define DBT_PSET_PARTIAL_GET resource_key(RESOURCE_FILE, "11") #define DBT_ATTR_NOT_EXIST resource_key(RESOURCE_FILE, "12") #define DBT_ATTR_NO_VALUE resource_key(RESOURCE_FILE, "13") #define DBT_PSET_SET_ERROR resource_key(RESOURCE_FILE, "14") #define DBT_PSET_ADD_ERROR resource_key(RESOURCE_FILE, "15") #define DBT_PSET_SET_NOT_EXIST resource_key(RESOURCE_FILE, "16") #define DBT_SSL_INIT_ERROR resource_key(RESOURCE_FILE, "17") #define DBT_ATTR_INVALID_VALUE resource_key(RESOURCE_FILE, "18") #define DBT_PORT_INVALID resource_key(RESOURCE_FILE, "19") #define DBT_PORT_INUSE resource_key(RESOURCE_FILE, "20") #define DBT_PORT_EACCESS resource_key(RESOURCE_FILE, "21") #define DBT_PORT_NOT_AVAIL resource_key(RESOURCE_FILE, "22") #define DBT_ERROR_OPENING_LOG resource_key(RESOURCE_FILE, "23") #define DBT_LOG_INVALID resource_key(RESOURCE_FILE, "24") static char * read_conf(char *file, char *name); static int update_conf(char *file, char *name, char *val); static int validate_addr(char* ip); static int validate_logfile(char *logdir, char* name); #ifdef XP_UNIX static int rename_pidlog_file(PsetHndl pset, char* newname); static int change_uid_all(char *dir, int curuid, int newuid); static int change_uid(char *fpath, int curuid, int newuid); static int verify_server_uname(char *newuname); static int change_server_uid(PsetHndl pset, char* newuname); #endif static int update_port_addr(char *port, char *addr) { char line[BIG_LINE]; char *val = read_conf("console.conf", "Listen"); char *ptr = NULL; int err; if (val) { ptr = strchr(val, ':'); } if (ptr) { *ptr = '\0'; ++ptr; /* ptr points to the start of the port number in host:port */ } else if (val) { ptr = val; /* Listen only specifies the port number */ val = "0.0.0.0"; /* default listen on all interfaces */ } else { /* console.conf should always have Listen with the server port */ ptr = "80"; /* default httpd port? */ val = "0.0.0.0"; } /* If ip address is not defined, it means that server should listen on all interfaces. This is dependant upon console to always include the port string first. */ PR_snprintf(line, sizeof(line), "%s:%s", (addr && *addr) ? addr : val, (port && *port) ? port : ptr); err = update_conf("console.conf", "Listen", line); PL_strfree(val); return err; } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); PsetHndl pset; char *method; int rv, cnt, i, j, x, errorCode; int err; int *errp = &err; char *username = 0; char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; char **inputs = 0; char *operation = 0; char *qs = 0; char *nameptr, *valptr; char error_info[128]; int setFlag = 0, getFlag = 0, forceSetFlag = 0; int ignorePsetErrors = 0; AttributeList resultList, nvl; AttributeList updateList = NULL; AttributeList addList = NULL; AttrNameList nl; AttributePtr nv; char *acceptLanguage = (char*)"en"; Resource *i18nResource = NULL; char *configdir = util_get_conf_dir(); char *secdir = util_get_security_dir(); char *logdir = util_get_log_dir(); #if 0 int waitforever = 1; while (waitforever); #endif (void)_ai; /* get rid of unused variable warning */ i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); /* Get new port number */ if (!method || !*method) { /* run from command line - args are attr=value .... attr=value */ /* fake out code below to set */ operation = "set"; inputs = &argv[1]; /* everything after argv[0] */ ignorePsetErrors = 1; /* we don't care about pset errors during install/upgrade */ } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { if (i18nResource) rpt_err(INCORRECT_USAGE, res_getstring(i18nResource, DBT_NO_QUERY_STRING, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(INCORRECT_USAGE, "NO QUERY_STRING DATA", NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_UNKNOWN_METHOD, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), method); else PR_snprintf(error_info, sizeof(error_info), "Unknown Method (%s)", method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } /* Get UserDN and User Password */ rv = ADM_GetUserDNString(&err, &binddn); if (rv < 0 || !binddn || !*binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) { if (i18nResource) rpt_err(ELEM_MISSING, res_getstring(i18nResource, DBT_NO_USER_NAME, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER NAME", NULL, NULL); } else { /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(NULL, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) { if (i18nResource) rpt_err(ELEM_MISSING, res_getstring(i18nResource, DBT_NO_USER_DN, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER DN!", NULL, NULL); } else { binddn = NULL; bindpw = NULL; } } else { if (i18nResource) rpt_err(ELEM_MISSING, res_getstring(i18nResource, DBT_NO_USER_DN, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER DN!", NULL, NULL); } } } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); errorCode = ADMSSL_InitSimple(configdir, secdir, 1); if (errorCode) { if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_SSL_INIT_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } /* Initialize the pset */ pset = psetCreateSSL("admin-serv", /* configRoot */ configdir, /* userDN */ binddn, /* passwd */ bindpw, /* errorcode */ &rv); if (!pset && !ignorePsetErrors) { PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s", rv, psetErrorString(rv, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_PSET_CREATE_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, error_info); else rpt_err(APP_ERROR, "PSET Creation Failed", NULL, error_info); } /* Process the input */ if (!inputs) { inputs = get_input_ptr(); } if (!operation) { operation = get_cgi_var("op", NULL, NULL); } if (!operation) { psetDelete(pset); if (i18nResource) rpt_err(INCORRECT_USAGE, res_getstring(i18nResource, DBT_NO_OP, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(INCORRECT_USAGE, "No operation defined", NULL, NULL); } if (!strcmp(operation, "get")) getFlag = 1; else if (!strcmp(operation, "set")) setFlag = 1; else if (!strcmp(operation, "force_set")) { setFlag = 1; forceSetFlag = 1; } else { if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ILLEGAL_OP, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), operation); else PR_snprintf(error_info, sizeof(error_info), "Illegal operation defined (%s)", operation); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } cnt = 0; x = 0; while (inputs[x] && *(inputs[x++]) != '\0') cnt++; if (cnt <= 1) { psetDelete(pset); if (i18nResource) rpt_err(INCORRECT_USAGE, res_getstring(i18nResource, DBT_NO_ATTRS, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(INCORRECT_USAGE, "No attribute specified ", NULL, NULL); } if (getFlag) { /* get operation */ nl = createAttrNameList(cnt); x = 0; i = 0; while (inputs[x] && *(inputs[x]) != '\0') { char *begin, *end; begin = inputs[x]; end = strchr(inputs[x++], '='); if (end) { char *name = PL_strndup(begin, end-begin); /* Ignore "op" */ if (strncasecmp(name, "op", 2)) addName(nl, i++, name); PL_strfree(name); } } resultList = psetGetAttrList(pset, nl, &errorCode); if (errorCode && errorCode != PSET_PARTIAL_OP && errorCode != PSET_PARTIAL_GET ) { psetDelete(pset); PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s", errorCode, psetErrorString(errorCode, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_PSET_GET_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, error_info); else rpt_err(APP_ERROR, "PSET Get Failed", NULL, error_info); } deleteAttrNameList(nl); if (errorCode) { if (resultList) { if (i18nResource) rpt_warning(WARNING, res_getstring(i18nResource, DBT_PSET_PARTIAL_GET, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_warning(WARNING, "Partial Get\n", NULL, NULL); } else { psetDelete(pset); pset = NULL; if (i18nResource) rpt_warning(APP_ERROR, res_getstring(i18nResource, DBT_ATTR_NOT_EXIST, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(APP_ERROR, "Attribute(s) does not exist", NULL, NULL); } } else rpt_success(NULL); if (resultList) { nvl = resultList; while ((nv = *nvl++)) { fprintf(stdout, "%s: %s\n", nv->attrName, nv->attrVal ? (nv->attrVal[0] ? nv->attrVal[0] : "") : ""); } deleteAttributeList(resultList); } #if 0 if (execPath) fprintf(stdout, "execPath: %s\n", execPath); else fprintf(stdout, "execPath: EMPTY\n"); if (resPath[0] != '\0') fprintf(stdout, "resPath: %s\n", resPath); else fprintf(stdout, "resPath: EMPTY\n"); if (i18nResource) fprintf(stdout, "info1: Property file OK!"); else fprintf(stdout, "info1: Can not find Property file!"); #endif psetDelete(pset); exit(0); } else if (setFlag) { /* Set/Force_Set operation */ updateList = createAttributeList(cnt); if (forceSetFlag) addList = createAttributeList(cnt); x = 0; i = 0; j = 0; while (inputs[x]) { valptr = strchr(inputs[x], '='); if (valptr) { *valptr = '\0'; valptr++; while(*valptr != '\0' && *valptr == ' ') valptr++; if (*valptr == '\0') { /* some values are allowed to be empty string*/ if ((strcasecmp(inputs[x], "configuration.nsAdminAccessHosts") != 0) && (strcasecmp(inputs[x], "configuration.nsAdminAccessAddresses") != 0) && (strcasecmp(inputs[x], "configuration.nsServerAddress") != 0) && (strcasecmp(inputs[x], "configuration.nsAdminEnableDSGW") != 0) && (strcasecmp(inputs[x], "configuration.nsAdminEnableEnduser") != 0)) { psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ATTR_NO_VALUE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), inputs[x]); else PR_snprintf(error_info, sizeof(error_info), "Attribute[%s] does not have value", inputs[x]); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } } } else { psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ATTR_NO_VALUE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), inputs[x]); else PR_snprintf(error_info, sizeof(error_info), "Attribute[%s] does not have value", inputs[x]); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } nameptr = inputs[x]; /* Ignore the OP */ if (strncasecmp(nameptr, "op", 2)) { /* Check if port is being changed */ if (strcasecmp(nameptr,"configuration.nsServerPort") == 0) { int port; port = atoi(valptr); err = 0; if (port < 1 || port > 65535) { err = -1; } if (try_bind(NULL, port) == -1) { if(errno == EADDRINUSE) err = -2; else if(errno == EACCES) err = -3; else err = -4; } if(err == 0) { err = update_port_addr(valptr, NULL); /* update port only */ } if (err < 0) { psetDelete(pset); if (i18nResource) { if (err == -1) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_PORT_INVALID, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); else if (err == -2) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_PORT_INUSE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); else if (err == -3) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_PORT_EACCESS, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); else PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_PORT_NOT_AVAIL, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); } else { PR_snprintf(error_info, sizeof(error_info), "Port %s is either in use or invalid", valptr); } rpt_err(APP_ERROR, error_info, NULL, NULL); } } /* Check if the IP address is valid */ if (strcasecmp(nameptr,"configuration.nsserveraddress") == 0) { if (!validate_addr(valptr)) { /* report error */ psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ATTR_INVALID_VALUE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), nameptr); else PR_snprintf(error_info, sizeof(error_info), "Attribute[%s] has invalid value", nameptr); rpt_err(APP_ERROR, error_info, NULL, NULL); } else { err = update_port_addr(NULL, valptr); /* update address only */ } } /* Check if access log file is being changed */ if (strcasecmp(nameptr,"configuration.nsaccesslog") == 0) { int rc = validate_logfile(logdir, valptr); if (rc == 1) { /* report error */ psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_LOG_INVALID, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), "Access", nameptr); else PR_snprintf(error_info, sizeof(error_info), "%s log file name must be a valid file name and must not include the path. [%s] is invalid.", "Access", nameptr); rpt_err(APP_ERROR, error_info, NULL, NULL); } else if (rc == 2) { /* report error */ psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ERROR_OPENING_LOG, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), "access", nameptr, strerror(errno)); else PR_snprintf(error_info, sizeof(error_info), "Could not open %s log file [%s]. Error: %s", "access", nameptr, strerror(errno)); rpt_err(APP_ERROR, error_info, NULL, NULL); } else { char *pathline = PR_smprintf("%s %s", valptr, "common"); err = update_conf("console.conf", "CustomLog", pathline); PR_smprintf_free(pathline); } } /* Check if error log file is being changed */ if (strcasecmp(nameptr,"configuration.nserrorlog") == 0) { int rc = validate_logfile(logdir, valptr); if (rc == 1) { /* report error */ psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_LOG_INVALID, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), "Error", nameptr); else PR_snprintf(error_info, sizeof(error_info), "%s log file name must be a valid file name and must not include the path. [%s] is invalid.", "Error", nameptr); rpt_err(APP_ERROR, error_info, NULL, NULL); } else if (rc == 2) { /* report error */ psetDelete(pset); if (i18nResource) PR_snprintf(error_info, sizeof(error_info), res_getstring(i18nResource, DBT_ERROR_OPENING_LOG, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), "error", nameptr, strerror(errno)); else PR_snprintf(error_info, sizeof(error_info), "Could not open %s log file [%s]. Error: %s", "error", nameptr, strerror(errno)); rpt_err(APP_ERROR, error_info, NULL, NULL); } else { err = update_conf("console.conf", "ErrorLog", valptr); } } #ifdef XP_UNIX /* Check if pidlog is being changed */ if (strcasecmp(nameptr,"configuration.nsPidLog") == 0) { if (!rename_pidlog_file(pset, valptr)) { rpt_err(APP_ERROR, "Failed to rename log file", NULL, NULL); } } /* Check if server uid is being changed */ if (strcasecmp(nameptr,"configuration.nsSuiteSpotUser") == 0) { if (change_server_uid(pset, valptr) < 0) { rpt_err(APP_ERROR, "Failed to change server uid", NULL, NULL); } } #endif errorCode = PSET_OP_OK; (void)psetGetAttrSingleValue(pset, nameptr, &errorCode); if (errorCode && !ignorePsetErrors) { if (forceSetFlag) addSingleValueAttribute(addList, j++, nameptr, valptr); else j++; } else { addSingleValueAttribute(updateList, i++, nameptr, valptr); } } x++; } errorCode = PSET_OP_OK; if (i) errorCode = psetSetAttrList(pset, updateList); if (errorCode && !ignorePsetErrors) { psetDelete(pset); PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s\n", errorCode, psetErrorString(errorCode, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_PSET_SET_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, error_info); else rpt_err(APP_ERROR, "PSET Set Failed", NULL, error_info); } if (forceSetFlag) { if (j) { for (i=0; i < j; i++) { errorCode = psetAddAttribute(pset, addList[i]->attrName, addList[i]->attrVal); if (errorCode && !ignorePsetErrors) { psetDelete(pset); pset = NULL; PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s\n", errorCode, psetErrorString(errorCode, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_PSET_ADD_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, error_info); else rpt_err(APP_ERROR, "PSET Add Failed", NULL, error_info); } } } } else { if (j) { psetDelete(pset); pset = NULL; if (i18nResource) rpt_err(APP_ERROR, res_getstring(i18nResource, DBT_PSET_SET_NOT_EXIST, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(APP_ERROR, "PSET SET OP Failed for setting non-existing attribute", NULL, NULL); } } rpt_success(NULL); psetDelete(pset); if (i18nResource != NULL) { res_destroy_resource(i18nResource); } exit (0); } if (updateList) deleteAttributeList(updateList); if (addList) deleteAttributeList(addList); psetDelete(pset); return 1; } /* * Get Val from the specified conf file * The returned value is allocated - caller must free */ static char * read_conf(char *file, char *name) { FILE *f; static char filename[BIG_LINE]; static char inbuf[BIG_LINE]; char * retval = NULL; char *configdir = util_get_conf_dir(); util_find_file_in_paths(filename, sizeof(filename), file, configdir, "", "admin-serv/config"); f = fopen(filename, "r"); if (f==NULL) { char msg[BIG_LINE]; PR_snprintf(msg, BIG_LINE, "Cannot open file %s for reading", filename); rpt_err(SYSTEM_ERROR, msg, NULL, NULL); } while(fgets(inbuf, sizeof(inbuf), f) != NULL) { if (strncasecmp(inbuf,name,strlen(name)) == 0) { /* Line starts with name */ char *p = strtok(inbuf, " "); p = strtok(NULL, " "); retval = PL_strdup(p); } } fclose(f); return retval; } #define CONF_LINES 16*1024 /* * Modify any attribute in a configuration file with a name/value pair * If the attribute value is NULL, remove it from the file completely. */ static int update_conf(char *file, char *name, char *val) { FILE *f; int i, modified=0; static char filename[BIG_LINE]; static char inbuf[BIG_LINE]; static char buf[BIG_LINE]; int linecnt=0; char *lines[CONF_LINES]; char *configdir = util_get_conf_dir(); int rc = 0; util_find_file_in_paths(filename, sizeof(filename), file, configdir, "", "admin-serv/config"); f = fopen(filename, "r"); if (f==NULL) { char msg[BIG_LINE]; PR_snprintf(msg, BIG_LINE, "Cannot open file %s for reading", filename); rpt_err(SYSTEM_ERROR, msg, NULL, NULL); } while(fgets(inbuf, sizeof(inbuf), f) != NULL) { if (linecnt >= CONF_LINES) { rc = 1; /* our buffer ran out, give up */ goto bail; } if (strncasecmp(inbuf,name,strlen(name)) == 0) { /* Line starts with the attribute name */ if(val && *val != '\0') { PR_snprintf(buf, sizeof(buf), "%s %s\n", name, val); lines[linecnt++] = strdup(buf); modified=1; } else { modified=1; } } else { lines[linecnt++] = strdup(inbuf); } } fclose(f); if (!modified && (val && *val != '\0')) { /* Add the attribute name/val pair*/ PR_snprintf(buf, sizeof(buf), "%s %s\n", name, val); lines[linecnt++] = strdup(buf); } f = fopen(filename, "w"); if (f==NULL) { char msg[BIG_LINE]; PR_snprintf(msg, sizeof(msg), "Cannot open file %s for writing", filename); rpt_err(SYSTEM_ERROR, msg, NULL, NULL); } for (i=0; i < linecnt; i++) { fprintf(f, "%s", lines[i]); } bail: fclose(f); return rc; } /* * Rename logs/pid file when configuration.nsPidLog is changed */ #ifdef XP_UNIX static int rename_pidlog_file(PsetHndl pset, char* newname) { char oldpath[BIG_LINE]; char newpath[BIG_LINE]; int errorCode; if (!newname || !*newname || !util_is_valid_path_string(newname)) { return 0; } char *oldname = psetGetAttrSingleValue(pset, "configuration.nsPidLog", &errorCode); if (oldname != NULL && strcmp(oldname, newname) != 0) { char *piddir = util_get_pid_dir(); PR_snprintf(oldpath, sizeof(oldpath), "%s/%s", piddir, oldname); PR_snprintf(newpath, sizeof(newpath), "%s/%s", piddir, newname); if(rename (oldpath, newpath) != 0) return 0; return !update_conf("console.conf", "PidFile", newname); } else return 1; } #endif /* * Change admin server uiuserd */ #ifdef XP_UNIX static int change_server_uid(PsetHndl pset, char* newuname) { int errorCode; int newuid; char *configdir = util_get_conf_dir(); char *secdir = util_get_security_dir(); char *logdir = util_get_log_dir(); char *olduname = psetGetAttrSingleValue(pset, "configuration.nsSuiteSpotUser", &errorCode); char *pidfile = psetGetAttrSingleValue(pset, "configuration.nsPidLog", &errorCode); newuid = verify_server_uname(newuname); if (newuid < 0) { return -1; } else if (update_conf("console.conf", "User", newuname)) { return -1; } else if ((olduname != NULL) && (strcmp(olduname, newuname) != 0)) { /* Can change uid only id running as a root */ if (getuid() != 0) { rpt_err(SYSTEM_ERROR, "Can not change Server UID, " "Admin Server instance in not running under ROOT UID", NULL,NULL); } if (change_uid_all(configdir, 0, newuid) || change_uid_all(secdir, 0, newuid) || change_uid_all(logdir, 0, newuid) || (pidfile && change_uid(pidfile, 0, newuid))) { return -1; } } else return 0; return -1; } #endif /* * Verify if newuname can be used as the admin server uid. The new uid must * belong to the sysgroup (recorded in adm.conf) * * Returns error : -1 * ok : uid for the newuname */ #ifdef XP_UNIX static int verify_server_uname(char *newuname) { AdmldapInfo admInfo = NULL; char *grpname; struct group *grp; struct passwd *pwd; int errorcode = 0; int i = 0; int grmem_found = 0; char buf[BUFSIZ]; char *configdir = util_get_conf_dir(); admInfo = admldapBuildInfoOnly(configdir, &errorcode); if (!admInfo || errorcode) { rpt_err(SYSTEM_ERROR, "Can not open adm.conf for reading", NULL, NULL); return -1; } grpname = admldapGetSysGroup(admInfo); /* makes a copy */ destroyAdmldap(admInfo); if (!grpname) { rpt_err(SYSTEM_ERROR, "sysgroup not found in adm.conf", NULL, NULL); return -1; } grp = getgrnam(grpname); if (grp == NULL) { PR_snprintf(buf, sizeof(buf), "sysgroup '%s' does not exist", grpname); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); PL_strfree(grpname); return -1; } /* * newuname must belong to the admin server group */ pwd = getpwnam(newuname); if (pwd == NULL) { PR_snprintf(buf, sizeof(buf), "Can not change Server UID, " "User '%s' does not exist", newuname); rpt_err(INCORRECT_USAGE, buf, NULL, NULL); PL_strfree(grpname); return -1; } /* Check all grp members */ while (grp->gr_mem[i] && !grmem_found) { if (strcmp(grp->gr_mem[i], newuname) == 0) { grmem_found = 1; } else i++; } if (!grmem_found && pwd->pw_gid != grp->gr_gid) { PR_snprintf(buf, sizeof(buf), "Can not change Server UID, " "User '%s' does not belong to the group '%s'", newuname, grpname); rpt_err(INCORRECT_USAGE, buf, NULL, NULL); PL_strfree(grpname); return -1; } PL_strfree(grpname); return pwd->pw_uid; } #endif /* * Change recursivly file ownership to newuid for all files and subdirecrories * for wich the current owner is olduid */ #ifdef XP_UNIX static int change_uid_all(char *dir, int olduid, int newuid) { DIR *dirp; struct dirent *dp; char fpath[BIG_LINE]; char buf[BIG_LINE]; struct stat filestat; dirp = opendir(dir); if (dirp == NULL) { PR_snprintf(buf, sizeof(buf), "Change Server UID: opendir(%s) failed, errno=%d\n", dir, errno); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); return -1; } if (change_uid(dir, olduid, newuid) != 0) { closedir(dirp); return -1; } for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { if (strcmp(dp->d_name,".") == 0 || strcmp(dp->d_name, "..") == 0) { continue; } PR_snprintf(fpath, sizeof(fpath), "%s/%s", dir, dp->d_name); if (stat(fpath, &filestat) != 0) { closedir(dirp); PR_snprintf(buf, sizeof(buf), "Change Server UID: stat(%s) failed, errno=%d\n", fpath, errno); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); return -1; } if (S_ISDIR(filestat.st_mode)) { if (change_uid_all(fpath, olduid, newuid) != 0) { closedir(dirp); return -1; } } else if (change_uid(fpath, olduid, newuid) != 0) { closedir(dirp); return -1; } } closedir(dirp); return 0; } #endif #ifdef XP_UNIX /* * Change file ownership for a files */ static int change_uid(char *fpath, int olduid, int newuid) { struct stat filestat; char buf[BIG_LINE]; int fd = -1; if (0 > (fd = open(fpath, O_RDONLY))) { PR_snprintf(buf, sizeof(buf), "Change Server UID: open(%s) failed, errno=%d\n", fpath, errno); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); return -1; } if (fstat(fd, &filestat) != 0) { close(fd); PR_snprintf(buf, sizeof(buf), "Change Server UID: stat(%s) failed, errno=%d\n", fpath, errno); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); return -1; } if (filestat.st_uid == olduid) { int rc = fchown(fd, newuid, -1); if (rc != 0) { close(fd); PR_snprintf(buf, sizeof(buf), "Change Server UID: Can not change file owner for %s, errno=%d\n", fpath, errno); rpt_err(SYSTEM_ERROR, buf, NULL, NULL); return -1; } } close(fd); return 0; } #endif static int validate_addr(char* ip) { PRNetAddr netaddr; PRFileDesc *sock = NULL; int ret = 0; /* If ip address is not define, it means that server should listen on all interfaces */ if (ip==NULL || *ip=='\0') return 1; /* If ip address is equal to localhost (127.0.0.1), no need to validate the address */ if (!strcmp(ip, "127.0.0.1")) return 1; if (!strcmp(ip, "0.0.0.0")) return 1; if (PR_StringToNetAddr(ip, &netaddr) == PR_SUCCESS) { if ((sock = PR_NewTCPSocket()) != NULL) { if (PR_Bind(sock, &netaddr) == PR_SUCCESS) { ret = 1; } PR_Close(sock); } } return ret; } /* * Try to open a log file in append mode. If the file is not present, it will be created * Returns : 1 ok * 0 error * */ static int validate_logfile(char *logdir, char *name) { FILE *f; char *filename; int n; if (!name || !*name) { return 1; /* invalid path */ } n = strlen(logdir); if (strncmp(logdir, name, n)) { return 1; /* invalid path */ } filename = &name[n+1]; if (!util_is_valid_path_string(filename)) { return 1; /* invalid path */ } f = fopen(name, "a+"); if (!f) { return 2; /* can't open file */ } fclose(f); return 0; /* ok */ } 389-admin-1.1.35/admserv/cgi-src40/config.properties000066400000000000000000000037621220472121400217340ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { config1 { "No method is specified" } config2 { "Unknown Method (%s)" } config3 { "No data in QUERY_STRING environment variable" } config4 { "No user name is specified" } config5 { "No user distinguished name is specified" } config6 { "PSET Creation Failed" } config7 { "No operation is defined" } config8 { "Illegal operation is defined" } config9 { "No attribute specified" } config10 { "PSET get operation failed" } config11 { "PSET get partial results" } config12 { "Attribute(s) does not exist" } config13 { "Attribute[%s] does not have value" } config14 { "PSET set operation failed" } config15 { "PSET add operation failed" } config16 { "PSET set operation try to set non-exist attribute" } config17 { "SSL related initialization failed" } config18 { "Attribute[%s] has invalid value" } config19 { "Invalid port number" } config20 { "Port is already in use" } config21 { "Inadequate permission. Port is protected." } config22 { "Port is not available" } config23 { "Could not open %s log file [%s]. Error: %s" } config24 { "%s log file name must be a valid file name and must not include the path. [%s] is invalid." } } 389-admin-1.1.35/admserv/cgi-src40/dbtcgiadmin.h000066400000000000000000000165421220472121400207670ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define LIBRARY_NAME "cgiadmin" static char dbtcgiadminid[] = "$DBT: cgiadmin referenced v1 $"; #include "i18n.h" BEGIN_STR(cgiadmin) ResDef( DBT_LibraryID_, -1, dbtcgiadminid )/* extracted from dbtcgiadmin.h*/ ResDef( DBT_missingRequestMethod_, 1, "Missing REQUEST_METHOD" )/*extracted from cladd.c*/ ResDef( DBT_thisShouldOnlyBeInvokedAsCgiProg_, 2, "This should only be invoked as CGI program" )/*extracted from cladd.c*/ ResDef( DBT_missingAdmservRoot_, 3, "Missing ADMSERV_ROOT" )/*extracted from cladd.c*/ ResDef( DBT_thisShouldOnlyBeInvokedAsCgiProg_1, 4, "This should only be invoked as CGI program" )/*extracted from cladd.c*/ ResDef( DBT_unrecognizedRequestType_, 5, "Unrecognized request type." )/*extracted from cladd.c*/ ResDef( DBT_startup_, 6, "Startup" )/*extracted from cladd.c*/ ResDef( DBT_failedToInitializeWinsock_, 7, "Failed to initialize WinSock" )/*extracted from cladd.c*/ ResDef( DBT_badFile_, 8, "Bad file" )/*extracted from cladd.c*/ ResDef( DBT_expectedServersLst_, 9, "Expected servers.lst" )/*extracted from cladd.c*/ ResDef( DBT_clusterMergeProductLstFromS_, 10, "Cluster: merge product.lst from %s" )/*extracted from cladd.c*/ ResDef( DBT_IObtainingProductInformationFrom_, 11, "Obtaining product information from %s://%s:%d
\n" )/*extracted from cladd.c*/ ResDef( DBT_updatedSBrN_, 12, "Updated %s
\n" )/*extracted from cladd.c*/ ResDef( DBT_badFile_1, 13, "Bad file" )/*extracted from cladd.c*/ ResDef( DBT_expectedServersInstanceLst_, 14, "Expected servers-instance.lst" )/*extracted from cladd.c*/ ResDef( DBT_warningSAlreadyExistsInformation_, 15, "Warning: %s already exists, information not added
\n" )/*extracted from cladd.c*/ ResDef( DBT_errorFailedToCreateFileSBrN_, 16, "Error: failed to create file %s
\n" )/*extracted from cladd.c*/ ResDef( DBT_warningDirectorySWillBeRemovedBe_, 17, "Warning: directory %s will be removed because of above error
\n" )/*extracted from cladd.c*/ ResDef( DBT_errorSSErrnoDBrN_, 19, "Error: %s %s (errno = %d)
\n" )/*extracted from cladd.c*/ ResDef( DBT_errorSSSBrN_, 20, "Error: %s %s, %s
\n" )/*extracted from cladd.c*/ ResDef( DBT_allowAllOperations_, 21, "ALLOW ALL OPERATIONS" )/*extracted from snmpcomm.c*/ ResDef( DBT_allowGetOperations_, 22, "ALLOW GET OPERATIONS" )/*extracted from snmpcomm.c*/ ResDef( DBT_allowSetOperations_, 23, "ALLOW SET OPERATIONS" )/*extracted from snmpcomm.c*/ ResDef( DBT_youAccessedThisFormWithAnInvalid_, 24, "You accessed this form with an invalid query string." )/*extracted from snmpcomm.c*/ ResDef( DBT_communityHasBeenRemoved_, 25, "community has been removed." )/*extracted from snmpcomm.c*/ ResDef( DBT_communityStrings_, 26, "Community Strings" )/*extracted from snmpcomm.c*/ ResDef( DBT_editACommunity_, 27, "Edit a Community" )/*extracted from snmpcomm.c*/ ResDef( DBT_addAnotherCommunity_, 28, "Add Another Community" )/*extracted from snmpcomm.c*/ ResDef( DBT_edit_, 30, "Edit" )/*extracted from snmpcomm.c*/ ResDef( DBT_remove_, 31, "Remove" )/*extracted from snmpcomm.c*/ ResDef( DBT_doYouReallyWantToRemoveThisEntry_, 32, "Do you really want to remove this entry?" )/*extracted from snmpcomm.c*/ ResDef( DBT_BCommunityBSN_, 33, "Community: %s\n" )/*extracted from snmpcomm.c*/ ResDef( DBT_BrBOperationBSN_, 34, "
Operation: %s\n" )/*extracted from snmpcomm.c*/ ResDef( DBT_noCommunitiesExist_, 35, "No communities exist." )/*extracted from snmpcomm.c*/ ResDef( DBT_youShouldEnterACommunityString_, 36, "You should enter a community string." )/*extracted from snmpcomm.c*/ ResDef( DBT_youShouldEnterOperationYouWantFo_, 37, "You should enter operation you want for this community." )/*extracted from snmpcomm.c*/ ResDef( DBT_theCommunityEntryHasBeenChanged_, 38, "the community entry has been changed" )/*extracted from snmpcomm.c*/ ResDef( DBT_SHasBeenAdded_, 39, "%s has been added" )/*extracted from snmpcomm.c*/ ResDef( DBT_failsToStartUpMasterAgent_, 40, "fails to start up master agent" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsToStartIt_, 41, "Please refer to documents to start it" )/*extracted from snmpcomm.c*/ ResDef( DBT_masterAgentStartUp_, 42, "master agent start up" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTOpenConfigFile_, 43, "can't open config file" )/*extracted from snmpcomm.c*/ ResDef( DBT_openTempFileFails_, 44, "open temp file fails" )/*extracted from snmpcomm.c*/ ResDef( DBT_openConfigFails_, 45, "open CONFIG fails" )/*extracted from snmpcomm.c*/ ResDef( DBT_openConfigFails_1, 46, "open CONFIG fails" )/*extracted from snmpcomm.c*/ ResDef( DBT_noPermissionToStartMasterAgent_, 47, "No permission to start master agent" )/*extracted from snmpcomm.c*/ ResDef( DBT_youMustBeRunningAsSuperUserPleas_, 48, "You must be running as super user. Please refer to documents" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTGetTcpProtocolEntryN_, 49, "can't get tcp protocol entry\n" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTCreateASockect_, 50, "can't create a sockect" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_, 51, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ ResDef( DBT_aSmuxMasterAgentIsRunningOrTheSm_, 52, "a smux master agent is running or the smux port is not free yet" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_1, 53, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTGetUdpProtocolEntryN_, 54, "can't get udp protocol entry\n" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTCreateASocket_, 55, "can't create a socket" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_2, 56, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ ResDef( DBT_aSnmpdIsRunningOrSnmpPortIsNotFr_, 57, "a snmpd is running or snmp port is not free yet" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_3, 58, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTGetUdpProtocolEntryN_1, 59, "can't get udp protocol entry\n" )/*extracted from snmpcomm.c*/ ResDef( DBT_canTCreateASocket_1, 60, "can't create a socket" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_4, 61, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ ResDef( DBT_failToStart_, 62, "Fail to start" )/*extracted from snmpcomm.c*/ ResDef( DBT_pleaseReferToDocumentsForItsConf_5, 63, "Please refer to documents for its configuration" )/*extracted from snmpcomm.c*/ END_STR(cgiadmin) 389-admin-1.1.35/admserv/cgi-src40/dbtconfig.h000066400000000000000000000042541220472121400204560ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "config" static char dbtconfigid[] = "$DBT: config referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(config) /* external string used in config.c */ ResDef( DBT_CGIID_, -1, dbtcgiconfigid ) ResDef( DBT_NO_METHOD, 1, "No method is specified" ) ResDef( DBT_UNKNOWN_METHOD, 2, "Unknown Method (%s)" ) ResDef( DBT_NO_QUERY_STRING, 3, "No data in QUERY_STRING environment variable" ) ResDef( DBT_NO_USER_NAME, 4, "No user name is specified" ) ResDef( DBT_NO_USER_DN, 5, "No user distinguished name is specified" ) ResDef( DBT_PSET_CREATE_ERROR, 6, "PSET Creation Failed" ) ResDef( DBT_NO_OP, 7, "No operation is defined" ) ResDef( DBT_ILLEGAL_OP, 8, "Illegal operation is defined" ) ResDef( DBT_NO_ATTRS, 9, "No attribute specified" ) ResDef( DBT_PSET_GET_ERROR, 10, "PSET get operation failed" ) ResDef( DBT_PSET_PARTIAL_GET, 11, "PSET get partial results" ) ResDef( DBT_ATTR_NOT_EXIST, 12, "Attribute(s) does not exist" ) ResDef( DBT_ATTR_NO_VALUE, 13, "Attribute[%s] does not have value" ) ResDef( DBT_PSET_SET_ERROR, 14, "PSET set operation failed" ) ResDef( DBT_PSET_ADD_ERROR, 15, "PSET add operation failed" ) ResDef( DBT_PSET_SET_NOT_EXIST, 16, "PSET set operation try to set non-exist attribute" ) ResDef( DBT_SSL_INIT_ERROR, 17, "SSL related initialization failed" ) END_STR(config) 389-admin-1.1.35/admserv/cgi-src40/dbtlistSrvList.h000066400000000000000000000031511220472121400215060ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "listOldSrvs" static char dbtlistOldSrvsid[] = "$DBT: listOldSrvs referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(listOldSrvs) /* external string used in listOldSrvs.c */ ResDef( DBT_CGIID_, -1, dbtlistOldSrvsid ) ResDef( DBT_NO_METHOD, 1, "No method is specified" ) ResDef( DBT_UNKNOWN_METHOD, 2, "Unknown Method (%s)" ) ResDef( DBT_NO_QUERY_STRING, 3, "No data in QUERY_STRING environment variable" ) ResDef( DBT_ERROR_OPEN_FILE, 4, "Error open file: %s" ) ResDef( DBT_ERROR_READ_FILE, 5, "Error readiong file: %s" ) ResDef( DBT_ERROR_OPEN_DIR, 6, "Error open directory: %s" ) ResDef( DBT_DBT_NO_OLD_SERVER_ROOT, 7, "No old server root specified" ) ResDef( DBT_NO_SERVER_FOUND, 8, "No server found" ) END_STR(listOldSrvs) 389-admin-1.1.35/admserv/cgi-src40/dbtmigrateconfig.h000066400000000000000000000040041220472121400220200ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "migrateConfig" static char dbtmigrateConfigid[] = "$DBT: migrateConfig referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(migrateConfig) /* external string used in migrateConfig.c */ ResDef( DBT_CGIID_, -1, dbtmigrateConfigid ) ResDef( DBT_NO_METHOD, 1, "No method is specified" ) ResDef( DBT_UNKNOWN_METHOD, 2, "Unknown Method (%s)" ) ResDef( DBT_NO_QUERY_STRING, 3, "No data in QUERY_STRING environment variable" ) ResDef( DBT_ERROR_OPEN_FILE, 4, "Error open file: %s" ) ResDef( DBT_ERROR_READ_FILE, 5, "Error readiong file: %s" ) ResDef( DBT_ERROR_OPEN_DIR, 6, "Error open directory: %s" ) ResDef( DBT_DBT_NO_OLD_SERVER_ROOT, 7, "No old server root specified" ) ResDef( DBT_NO_SERVER_FOUND, 8, "No server found" ) ResDef( DBT_NO_USER_NAME, 9, "No user name is specified" ) ResDef( DBT_NO_USER_DN, 10, "No user distinguished name is specified" ) ResDef( DBT_PSET_CREATE_ERROR, 11, "PSET Creation Failed" ) ResDef( DBT_PSET_SET_ERROR, 12, "PSET set operation failed" ) ResDef( DBT_PSET_ADD_ERROR, 13, "PSET add operation failed" ) ResDef( DBT_SSL_INIT_ERROR, 14, "SSL related initialization failed" ) END_STR(migrateConfig) 389-admin-1.1.35/admserv/cgi-src40/dbtrestartsrv.h000066400000000000000000000025361220472121400214310ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "restartsrv" static char dbtrestartsrvid[] = "$DBT: restartsrv referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(restartsrv) /* external string used in migrateConfig.c */ ResDef( DBT_CGIID_, -1, dbtrestartsrvid ) ResDef( DBT_NO_NEW_PROCESS, 1, "Couldn't create a new process to stop admin server" ) ResDef( DBT_RESTART_ACK, 2, "Admin server should restart on user request" ) ResDef( DBT_CANT_STOP_SRV, 3, "Couldn't stop the administration server" ) END_STR(restartsrv) 389-admin-1.1.35/admserv/cgi-src40/dbtstopsrv.h000066400000000000000000000025211220472121400207240ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "stopsrv" static char dbtstopsrvid[] = "$DBT: stopsrv referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(stopsrv) /* external string used in migrateConfig.c */ ResDef( DBT_CGIID_, -1, dbtstopsrvid ) ResDef( DBT_NO_NEW_PROCESS, 1, "Couldn't create a new process to stop admin server" ) ResDef( DBT_SHUTDOWN_ACK, 2, "Admin server should be shutdown on user request" ) ResDef( DBT_CANT_STOP_SRV, 3, "Couldn't stop the administration server" ) END_STR(stopsrv) 389-admin-1.1.35/admserv/cgi-src40/dbtuserauth.h000066400000000000000000000024521220472121400210470ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define CGI_NAME "userauth" static char dbtuserauthid[] = "$DBT: userAuth referenced v1 $"; #include "libadminutil/resource.h" BEGIN_STR(userauth) /* external string used in migrateConfig.c */ ResDef( DBT_CGIID_, -1, dbtuserauthid ) ResDef( DBT_NO_USER_NAME, 1, "No user name is specified" ) ResDef( DBT_NO_LDAP_INFO, 2, "No LDAP information is available" ) ResDef( DBT_NO_SR_INFO, 3, "No Server Root information is available" ) END_STR(userauth) 389-admin-1.1.35/admserv/cgi-src40/download.c000066400000000000000000000116451220472121400203230ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /*///////////////////////////////////////////////////////*/ /*/ /*/ /*/ David Tompkins (mailto:dt@netscape.com) /*/ /*/ Netscape Communications Corp. /*/ /*/ 3/4/97 /*/ /*/ /*/ /*/ download: returns the available nmcc downloads /*/ /*/ /*/ /*/ 4/13/98: Changed to return the entire page... /*/ /*/ 4/27/98: Now reads the page from start-console.html /*/ /*/ and inserts the menu options. /*/ /*/ /*/ /*///////////////////////////////////////////////////////*/ #include #include #include #include #ifdef XP_UNIX # include # define SYS_DIR DIR # define SYS_DIRENT struct dirent # define dir_open opendir # define dir_read readdir # define dir_close closedir # define dir_name(de) (de->d_name) # define FILE_SEP '/' # define STRNCASECMP strncasecmp # define STRCASECMP strcasecmp # define STRNCMP strncmp # define STRDUP strdup #else /* XP_WIN32 */ # include # define SYS_DIR PRDir # define SYS_DIRENT PRDirEntry # define dir_open PR_OpenDir # define dir_read(d) PR_ReadDir(d, PR_SKIP_BOTH) # define dir_close PR_CloseDir # define dir_name(de) (de->name) # define FILE_SEP '/' # define STRNCASECMP _strnicmp # define STRCASECMP _stricmp # define STRNCMP strncmp # define STRDUP strdup #endif #include "config.h" #define PATH_LENGTH 1024 #define MYHTMLFILE "admserv.html" static int safe_snprintf(char *buf, size_t size, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vsnprintf(buf, size, fmt, ap); va_end(ap); buf[size-1] = 0; return ret; } int error_exit(char *msg) { printf("Content-type: text/plain\n\n"); printf("Error: %s\n", msg); exit(0); } int main(int argc, char *argv[]) { char line[PATH_LENGTH]; FILE *html; char *acceptLanguage = NULL; char *loc; acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); if (acceptLanguage == NULL) { acceptLanguage = "en"; } /* * Search for list of accept language for a match */ loc = strtok(strdup(acceptLanguage), ","); while (1) { safe_snprintf(line, sizeof(line), "%s%c%c%c%c%s", HTMLDIR, FILE_SEP, loc[0],loc[1], FILE_SEP, MYHTMLFILE); if ((html = fopen(line, "r")) != NULL) { loc[2] = '\0'; break; } else { loc = strtok(NULL, ", "); if (loc == NULL) { safe_snprintf(line, sizeof(line), "%s%c%s", HTMLDIR, FILE_SEP, MYHTMLFILE); if ((html = fopen(line, "r")) == NULL) { error_exit(MYHTMLFILE " not found"); } loc = ""; break; } } } printf("Content-type: text/html\n\n"); while (fgets(line, PATH_LENGTH, html)) { #define INCLUDEIFEXISTS ""); if (p && *p && end) { char includefile[PATH_LENGTH]; FILE *includedhtml = NULL; *end = '\0'; safe_snprintf(includefile, sizeof(includefile), "%s%c%s%s%s", HTMLDIR, FILE_SEP, loc ? loc : "", loc ? "/" : "", p); includedhtml = fopen(includefile, "r"); while (includedhtml && fgets(line, PATH_LENGTH, includedhtml)) { printf("%s", line); } if (includedhtml) { fclose(includedhtml); includedhtml = NULL; } } continue; } printf("%s", line); } fflush(stdout); fclose(html); return 0; } 389-admin-1.1.35/admserv/cgi-src40/ds_create.in000066400000000000000000000102241220472121400206210ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use Mozilla::LDAP::API qw(ldap_explode_dn); use CGI qw(:cgi :oldstyle_urls); use Inf; use AdminUtil; use DSUtil; use Resource; use DSCreate; my $res = new Resource("@propertydir@/ds_create.res", "@propertydir@/setup-ds-admin.res", "@propertydir@/setup-ds.res"); # parse the input parameters my $query = new CGI; # look at arguments # save old start_server param # set start_server=0 my $start_server = $query->param('start_server'); # create inf from CGI parameters my $inf = createInfFromCGIParams($query); # get the group from adm.conf before we create the instance my $admConf = getAdmConf("@instconfigdir@/admin-serv"); $inf->{General}->{SuiteSpotGroup} = $admConf->{sysgroup}; # create the instance my @errs = createDSInstance($inf); if (@errs) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: \n", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; exit 1; } # set up new DS to be managed by config DS - acis, pta config # add the parmeters necessary to configure this DS to be managed # by the console and to be registered with the config DS - these # are usually passed in via the CGI params, or use reasonable # default values $inf->{General}->{ConfigDirectoryLdapURL} = $query->param('ldap_url') || $admConf->{ldapurl}; $inf->{General}->{ConfigDirectoryAdminID} = $query->param('cfg_sspt_uid'); $inf->{General}->{ConfigDirectoryAdminPwd} = $query->param('cfg_sspt_uid_pw'); $inf->{General}->{AdminDomain} = $query->param('admin_domain') || $admConf->{AdminDomain}; # need to get the admin uid if (!$inf->{admin}->{ServerAdminID}) { my @rdns = ldap_explode_dn($inf->{General}->{ConfigDirectoryAdminID}, 1); $inf->{admin}->{ServerAdminID} = $rdns[0]; } if (!createSubDSNoConn($inf, \@errs)) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: \n", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; exit 1; } my $servid = $query->param('servid'); # now start the server $inf->{slapd}->{start_server} = 1; if (@errs = DSCreate::startServer($inf)) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: \n", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; exit 1; } # add the aci that allows the admin user to administer the server if (!addConfigACIsToSubDS($inf, \@errs)) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: \n", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; exit 1; } # register the new server with the configuration ds if (!registerDSWithConfigDS($servid, \@errs, $inf)) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: \n", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; exit 1; } # if we got here, report success print "Content-type: text/plain\n\n"; print "NMC_Status: 0\n"; exit 0; sub createInfFromCGIParams { my $query = shift; my $inf = new Inf; $inf->{General}->{FullMachineName} = $query->param('servname'); $inf->{General}->{SuiteSpotUserID} = $query->param('servuser'); $inf->{slapd}->{ServerPort} = $query->param('servport'); $inf->{slapd}->{RootDN} = $query->param('rootdn'); $inf->{slapd}->{RootDNPwd} = $query->param('rootpw'); $inf->{slapd}->{ServerIdentifier} = $query->param('servid'); $inf->{slapd}->{Suffix} = $query->param('suffix'); $inf->{slapd}->{start_server} = 0; # we will start it explicitly later return $inf; } 389-admin-1.1.35/admserv/cgi-src40/ds_create.res000066400000000000000000000000321220472121400210000ustar00rootroot00000000000000# resources for ds_create 389-admin-1.1.35/admserv/cgi-src40/ds_remove.in000077500000000000000000000100771220472121400206640ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use File::Basename; use File::Path; use CGI qw(:cgi :oldstyle_urls); use POSIX qw(:errno_h); use Inf; use AdminUtil; use DSUtil; use Resource; use DSCreate qw(removeDSInstance); print "Content-type: text/plain\n\n"; my $res = new Resource("@propertydir@/ds_remove.res", "@propertydir@/setup-ds-admin.res", "@propertydir@/setup-ds.res"); # parse the input parameters my $query = new CGI; my @errs; my $force = $query->param('force'); if (!defined($force) || (length($force) == 0)) { $force = 1; # force use of force for CGI } my $instname = $query->param('InstanceName'); my ($slapd, $inst) = split(/-/, $instname, 2); my $baseconfigdir = $ENV{DS_CONFIG_DIR} || "@instconfigdir@"; my $configdir = "$baseconfigdir/slapd-$inst"; my $status = 0; if ( ! -d $configdir ) { print "NMC_ErrInfo: could not read $configdir - Error: $!\n"; print STDERR "Error: could not read $configdir - Error: $!\n"; # look for error other than "not found" if ($! != ENOENT) { # not found is ok $status = 1; } if (!$force) { exit 1; } } # NOTE about @errs - the return value will be an array # or an array of array refs - usually the last element # of the array will be the errno # first, gather the information needed by unregister my $inf = createInfFromConfig($configdir, $inst, \@errs); if (@errs) { print "NMC_ErrInfo: ", $res->getText(@errs), "\n"; print STDERR "Error: ", $res->getText(@errs), "\n"; # look for error other than "not found" if ($errs[-1] != ENOENT) { # not found is ok $status = 1; } if (!$force) { exit 1; } } if (!$inf) { $inf = new Inf; # create empty one } # next, remove the instance @errs = removeDSInstance($inst, $force); if (@errs) { my $realerror; for (@errs) { my $text = $res->getText($_); print "NMC_ErrInfo: $text\n"; print STDERR "Error: $text\n"; if ($_->[-1] != ENOENT) { # not found is ok $realerror = 1; } } if ($realerror) { $status = 1; } if (!$force) { exit 1; } } # add the parmeters necessary to configure this DS to be managed # by the console and to be registered with the config DS - these # are usually passed in via the CGI params, or use reasonable # default values my $admConf = getAdmConf("$baseconfigdir/admin-serv"); $inf->{General}->{ConfigDirectoryLdapURL} = $query->param('ldap_url') || $admConf->{ldapurl}; $inf->{General}->{AdminDomain} = $query->param('admin_domain') || $admConf->{AdminDomain}; # Unregister the server from the configuration ds # get config ds url from input or admconf # get admin id from input or admconf # get admin domain # config ds info if (!unregisterDSWithConfigDS($inst, \@errs, $inf) && !$force) { print "NMC_ErrInfo: ", $res->getText(@errs), "\n"; $status = 1; print STDERR "Error:", $res->getText(@errs), "\n"; if (!$force) { exit 1; } } if ( 1 == isConfigDS($instname, "$baseconfigdir/admin-serv") ) { # if it is the Config DS, adm.conf and local.conf needs to be removed. unlink("$baseconfigdir/admin-serv/adm.conf"); unlink("$baseconfigdir/admin-serv/local.conf"); } exit 0; END { # report status, no matter where or when exit was called print "NMC_Status: $status\n"; } 389-admin-1.1.35/admserv/cgi-src40/ds_remove.res000066400000000000000000000000321220472121400210320ustar00rootroot00000000000000# resources for ds_remove 389-admin-1.1.35/admserv/cgi-src40/ds_unregister.in000077500000000000000000000055521220472121400215600ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use CGI qw(:cgi :oldstyle_urls); use Inf; use AdminUtil; use DSUtil; use Resource; my $res = new Resource("@propertydir@/ds_remove.res", "@propertydir@/setup-ds-admin.res", "@propertydir@/setup-ds.res"); # parse the input parameters my $query = new CGI; # call ds_newinst as a GET (GET or POST works, GET is simpler) $ENV{REQUEST_METHOD} = "GET"; $ENV{QUERY_STRING} = $query->query_string(); my $instname = $query->param('InstanceName'); my ($slapd, $inst) = split(/-/, $instname, 2); my $configdir = "@instconfigdir@/slapd-$inst"; if ( ! -d $configdir ) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: $configdir does not exist\n"; print "NMC_Status: 1\n"; print STDERR "Error: $configdir does not exist\n"; exit 1; } my @errs; my $inf = createInfFromConfig($configdir, $inst, \@errs); if (@errs) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: ", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; print STDERR "Error: ", $res->getText(@errs), "\n"; exit 1; } # add the parmeters necessary to configure this DS to be managed # by the console and to be registered with the config DS - these # are usually passed in via the CGI params, or use reasonable # default values my $admConf = getAdmConf("@instconfigdir@/admin-serv"); $inf->{General}->{ConfigDirectoryLdapURL} = $query->param('ldap_url') || $admConf->{ldapurl}; $inf->{General}->{AdminDomain} = $query->param('admin_domain') || $admConf->{AdminDomain}; # Unregister the server from the configuration ds # get config ds url from input or admconf # get admin id from input or admconf # must get admin password from input (PASSWORD_PIPE?) # get admin domain # config ds info if (!unregisterDSWithConfigDS($inst, \@errs, $inf)) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: ", $res->getText(@errs), "\n"; print "NMC_Status: 1\n"; print STDERR "Error:", $res->getText(@errs), "\n"; exit 1; } # if we got here, report success print "Content-type: text/plain\n\n"; print "NMC_Status: 0\n"; exit 0; 389-admin-1.1.35/admserv/cgi-src40/dsconfig.c000066400000000000000000000255671220472121400203200ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * dsconfig.c -- CGI configuration update handler -- directory gateway * * Copyright (c) 1996 Netscape Communications Corp. * All rights reserved. */ /* * Default Directory Server setting get/set. Read/modify DS ldap url from adm.conf * * Get Operation * in: op=getconfig * out: dsconfig.host= * out: dsconfig.port= * out: dsconfig.basedn= * out: dsconfig.ssl= 'true' if ldaps used, 'false' if ldap used * * Set Operation * in:op=setconfig&dsconfig.host=&dsconfig.port=& * dsconfig.ssl= * 1) modify DS ldap url in adm.conf with supplied parameters */ #include "libadmin/libadmin.h" #include "string.h" #include "libadminutil/resource.h" #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadmsslutil/certmgt.h" #include "cert.h" #include "config.h" /*#ifdef XP_WIN32 #define strcasecmp stricmp #define strncasecmp _strnicmp #endif*/ static void handle_getconfig(); static void handle_setconfig(); static char *create_new_ldapurl(char *new_host, int new_port, char *new_basedn, int new_ssl); static void update_adm_conf(char *ldapURL, char *sieDN, char *isieDN); static char *nonull_value(char *str); /* * Logging function */ static FILE * logfp; static int log_enabled = 0; static void logMsg(char *format, ...) { char logfile[512]; if (!log_enabled) return; if (!util_get_log_dir()) { return; } if (logfp==NULL) { PR_snprintf(logfile, sizeof(logfile), "%s/dsconfig.dbg", util_get_log_dir()); logfp = fopen(logfile, "w"); } if (logfp != NULL) { va_list ap; va_start(ap,format); vfprintf(logfp,format,ap); va_end(ap); fflush(logfp); } } /* * i18n conversions defines and function; * properties file = "dsconfig.properties" */ #define RESOURCE_FILE "dsconfig" #define resource_key(a,b) a b #define DBT_NO_METHOD resource_key(RESOURCE_FILE, "1") #define DBT_UNKNOWN_METHOD resource_key(RESOURCE_FILE, "2") #define DBT_NO_QUERY_STRING resource_key(RESOURCE_FILE, "3") #define DBT_NO_OPERATION resource_key(RESOURCE_FILE, "4") #define DBT_UNKNOWN_OPERATION resource_key(RESOURCE_FILE, "5") #define DBT_BAD_PORT resource_key(RESOURCE_FILE, "9") #define DBT_NO_CERTDB resource_key(RESOURCE_FILE, "10") #define DBT_OPEN_CERTDB resource_key(RESOURCE_FILE, "11") #define DBT_BAD_SSL resource_key(RESOURCE_FILE, "12") #define DBT_OPEN_ADM_RD resource_key(RESOURCE_FILE, "16") #define DBT_NO_LDAPURL resource_key(RESOURCE_FILE, "17") #define DBT_BAD_LDAPURL resource_key(RESOURCE_FILE, "18") #define DBT_OPEN_ADM_WR resource_key(RESOURCE_FILE, "19") #define DBT_NO_SIE resource_key(RESOURCE_FILE, "20") #define DBT_NO_ISIE resource_key(RESOURCE_FILE, "21") static char *acceptLanguage = "en"; static Resource *i18nResource = NULL; static void i18nInit() { i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (getenv("HTTP_ACCEPT_LANGUAGE")) { acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); } } static const char *i18nMsg(char *msgid, char *defaultMsg) { const char *msg=NULL; static char msgbuf[BUFSIZ]; /* ok - not threaded code */ if (i18nResource) { msg = res_getstring(i18nResource, msgid, acceptLanguage, msgbuf, sizeof(msgbuf), NULL); } if (msg == NULL) { msg = (const char*)defaultMsg; } return msg; } static char * nonull_value(char *str) { return (str!=NULL) ? str : (char *)""; } /* * Main */ int main(int argc, char *argv[]) { int _ai=ADMUTIL_Init(); char *method = getenv("REQUEST_METHOD"); char *qs = 0, *op=0; char error_info[128]; logMsg(" In %s\n", argv[0]); (void)_ai; /* get rid of unused variable warning */ i18nInit(); /* GET or POST method */ if (!method || !*method) { /* non UI CGI */ rpt_err(SYSTEM_ERROR, i18nMsg(DBT_NO_METHOD,"No method is specified"), NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_QUERY_STRING ,"NO QUERY_STRING DATA"), NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_METHOD,"Unknown Method (%s)"), method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } logMsg("method=%s\n", method); op=get_cgi_var("op", NULL, NULL); logMsg("op=%s\n", op); if (op == NULL) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_OPERATION,"No operation is defined"), NULL, NULL); } if (strcmp(op,"getconfig") == 0) { handle_getconfig(); } else if (strcmp(op,"setconfig") == 0) { handle_setconfig(); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_OPERATION,"Unknown Operation (%s)"), op); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } return 0; } static char * get_ldap_url() { char *ldapurl = NULL; int errorcode = 0; AdmldapInfo admInfo = NULL; char *configdir = util_get_conf_dir(); logMsg("In get_ldap_url\n"); admInfo = admldapBuildInfoOnly(configdir, &errorcode); if (!admInfo || errorcode) { logMsg("Could not get ldap info from config - %d", errorcode); return NULL; } ldapurl = admldapGetDirectoryURL(admInfo); /* returns a copy */ destroyAdmldap(admInfo); logMsg("Finished get_ldap_url, url is %s\n", ldapurl); return ldapurl; } /* * Return current ldap url setting */ static void handle_getconfig() { int rc; LDAPURLDesc *ludp; char *ldapurl = NULL; int ssl; logMsg("In handle_getconfig\n"); ldapurl = get_ldap_url(); logMsg("baseurl=%s\n", ldapurl); if (( rc = util_ldap_url_parse( ldapurl, &ludp, 0, &ssl )) != 0 ) { char error_info[128]; PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_BAD_LDAPURL, "LDAP URL (%s) is invalid"), ldapurl); logMsg("ldap_url_parse(%s) failed, rc=%d\n", ldapurl, rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } else { fprintf(stdout, "Content-type: text/html\n\n"); fprintf(stdout, "dsconfig.host:%s\n", nonull_value(ludp->lud_host)); logMsg("dsconfig.host:%s\n", nonull_value(ludp->lud_host)); fprintf(stdout, "dsconfig.port:%d\n", ludp->lud_port); logMsg("dsconfig.port:%d\n", ludp->lud_port); fprintf(stdout, "dsconfig.ssl:%s\n", ssl ? "true" : "false"); logMsg("dsconfig.ssl:%s\n", ssl ? "true" : "false"); fprintf(stdout, "dsconfig.basedn:%s\n", nonull_value(ludp->lud_dn)); logMsg("dsconfig.basedn:%s\n", nonull_value(ludp->lud_dn)); fprintf(stdout, "NMC_Status: 0\n"); } PL_strfree(ldapurl); } /* * Modify ldap url setting */ static void handle_setconfig() { char *sieDN=NULL, *isieDN=NULL, *host=NULL, *basedn=NULL, *ldapURL=NULL, *port_s=NULL, *ssl_s=NULL; int ssl=-1, port=-1; sieDN = get_cgi_var( "dsconfig.sieDN", NULL, NULL ); isieDN = get_cgi_var( "dsconfig.isieDN", NULL, NULL ); host = get_cgi_var( "dsconfig.host", NULL, NULL ); port_s = get_cgi_var( "dsconfig.port", NULL, NULL ); ssl_s = get_cgi_var( "dsconfig.ssl", NULL, NULL ); if (port_s != NULL) { port = atoi( port_s); if (port < 1 || port > 65535) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_BAD_PORT,"Bad value for dsconfig.port"), NULL, NULL); } } if (ssl_s != NULL) { if (strcasecmp(ssl_s, "true") == 0) { ssl = 1; } else if (strcasecmp(ssl_s, "false") == 0) { ssl = 0; } else { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_BAD_SSL,"Bad value for dsconfig.ssl"), NULL, NULL); } } ldapURL = create_new_ldapurl(host, port, basedn, ssl); logMsg("new ldap url = %s", nonull_value(ldapURL)); if (ldapURL != NULL) { update_adm_conf(ldapURL, sieDN, isieDN); fprintf(stdout, "Content-type: text/html\n\n"); fprintf(stdout, "NMC_Status: 0\n"); } } /* * Create new ldap url */ static char* create_new_ldapurl(char *new_host, int new_port, char *new_basedn, int new_ssl) { int rc; LDAPURLDesc *ludp; int sslflag; char url[BIG_LINE]; char *curldapurl = NULL; char *host, *basedn, *ssl; int port; curldapurl = get_ldap_url(); logMsg("baseurl=%s\n", curldapurl); if (( rc = util_ldap_url_parse( curldapurl, &ludp, 0, &sslflag )) != 0 ) { logMsg("ldap_url_parse(%s) failed, rc=%d\n", curldapurl, rc); rpt_err(SYSTEM_ERROR, i18nMsg(DBT_BAD_LDAPURL,"Bad ldap url in adm.conf"), NULL, NULL); } else { host = (new_host != NULL) ? new_host : ludp->lud_host; port = (new_port != -1) ? new_port : ludp->lud_port; basedn = (new_basedn != NULL) ? new_basedn : ludp->lud_dn; sslflag = (new_ssl != -1) ? new_ssl : sslflag; ssl = (sslflag) ? (char *)"s" : (char *)""; PR_snprintf(url, sizeof(url), "ldap%s://%s:%d/%s", ssl, host, port, basedn); } PL_strfree(curldapurl); return strdup(url); } /* * Modify adm.conf */ static void update_adm_conf(char *ldapURL, char *sieDN, char *isieDN) { AdmldapInfo admInfo = NULL; int errorcode = 0; char *configdir = util_get_conf_dir(); /* get a handle to the current one */ admInfo = admldapBuildInfoOnly(configdir, &errorcode); if (!admInfo || errorcode) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_OPEN_ADM_RD, "Can not open adm.conf for reading"), NULL, NULL); } if (ldapURL) { if (admldapSetDirectoryURL(admInfo, ldapURL)) { char error_info[128]; PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_BAD_LDAPURL, "LDAP URL (%s) is invalid"), ldapURL); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } } if (sieDN && admldapSetSIEDN(admInfo, sieDN)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_NO_SIE, "Parameter sie: not found in adm.conf"), NULL, NULL); } if (isieDN && admldapSetISIEDN(admInfo, isieDN)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_NO_ISIE, "Parameter isie: not found in adm.conf"), NULL, NULL); } if (admldapWriteInfoFile(admInfo)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_OPEN_ADM_WR, "Can not open adm.conf for writing"), NULL, NULL); } destroyAdmldap(admInfo); } 389-admin-1.1.35/admserv/cgi-src40/dsconfig.properties000066400000000000000000000032001220472121400222460ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { dsconfig1 { "No method is specified" } dsconfig2 { "Unknown Method (%s)" } dsconfig3 { "No data in QUERY_STRING environment variable" } dsconfig4 { "No operation is defined" } dsconfig5 { "Unknown Operation (%s)" } dsconfig9 { "Bad value for dsconfig.port" } dsconfig10 { "No certificate database specified for LDAP/SSL usage!" } dsconfig11 { "Cannot open certificate database for LDAP/SSL usage!" } dsconfig12 { "Bad value for dsconfig.ssl" } dsconfig16 { "Can not open adm.conf for reading" } dsconfig17 { "Parameter ldapurl: not found in adm.conf" } dsconfig18 { "LDAP URL (%s) is invalid" } dsconfig19 { "Can not open adm.conf for writing" } dsconfig20 { "Parameter sie: not found in adm.conf" } dsconfig21 { "Parameter isie: not found in adm.conf" } } 389-admin-1.1.35/admserv/cgi-src40/frameset.html000066400000000000000000000020341220472121400210340ustar00rootroot00000000000000 Help Viewer 389-admin-1.1.35/admserv/cgi-src40/getport.c000066400000000000000000000064461220472121400202030ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Description (getport.c) * * This module contains routines used by administration CGI * programs to get the port number of Admin server * */ #include #include #include #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); PsetHndl pset; char *method; int rv; char *url; int err; int *errp = &err; char *username = 0; char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; char *newValue = 0; char *portVal = 0; char error_info[128]; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); /* Get UserDN and User Password */ rv = ADM_GetUserDNString(&err, &binddn); if (rv < 0 || !binddn || !*binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) { rpt_err(INCORRECT_USAGE, "NO USER NAME!", NULL, NULL); exit(0); } else { /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(NULL, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) { rpt_err(INCORRECT_USAGE, "NO USER DN", NULL, NULL); } else { binddn = NULL; bindpw = NULL; } } else { rpt_err(INCORRECT_USAGE, "NO USER DN", NULL, NULL); } } } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); /* Initialize the pset */ rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } pset = psetCreateSSL("admin-serv", /* configRoot */ configdir, /* userDN */ binddn, /* passwd */ bindpw, /* errorcode */ &rv); if (!pset) { PR_snprintf(error_info, sizeof(error_info), "PSETERROR: %d", rv); rpt_err(APP_ERROR, "PSET CREATE FAILED", NULL, error_info); exit(0); } portVal = psetGetAttrSingleValue(pset,"configuration.nsServerPort", &rv); if (rv != 0) { PR_snprintf(error_info, sizeof(error_info), "PSETERROR: %d", rv); rpt_err(APP_ERROR, "PSET GET FAILED", NULL, error_info); } else { rpt_success(NULL); fprintf(stdout, "Value: %s\n", portVal); } } 389-admin-1.1.35/admserv/cgi-src40/head.html000066400000000000000000000016601220472121400201330ustar00rootroot00000000000000 389-admin-1.1.35/admserv/cgi-src40/help.c000066400000000000000000000511361220472121400174430ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /*///////////////////////////////////////////////////////*/ /*/ /*/ /*/ David Tompkins (mailto:dt@netscape.com) /*/ /*/ Netscape Communications Corp. /*/ /*/ 10/7/97 /*/ /*/ /*/ /*/ Help.cgi: a supercharged tutor.cgi /*/ /*/ /*/ /*///////////////////////////////////////////////////////*/ #include #include #include #include #include #include #ifdef XP_UNIX # include # define SYS_DIR DIR # define SYS_DIRENT struct dirent # define dir_open opendir # define dir_read readdir # define dir_close closedir # define dir_name(de) (de->d_name) # define FILE_SEP '/' # define STRNCASECMP strncasecmp # define STRCASECMP strcasecmp #else /* XP_WIN32 */ # include # define SYS_DIR PRDir # define SYS_DIRENT PRDirEntry # define dir_open PR_OpenDir # define dir_read(d) PR_ReadDir(d, PR_SKIP_BOTH) # define dir_close PR_CloseDir # define dir_name(de) (de->name) # define FILE_SEP '/' # define STRNCASECMP _strnicmp # define STRCASECMP _stricmp #endif #include "config.h" #define PATH_LENGTH 1024 #define DIR_ARG "helpdir" #define TOKEN_ARG "token" #define GENLIB_ARG "genlib" #define MAPFILE_ARG "mapfile" #define DEBUG_ARG "debug" #define FRAMESET_FILE "frameset.html" #define CONTENTS_FILE "contents.htm" #define LIBRARY_FILE "library.html" #define CONTENT_FRAME "infotopic" #define DIR_VAR "HelpDirectory" #define HELPWIN_VAR "HelpWindow" #define TOKEN_FILE "index.map" #define HEADER_FILE "header.html" #define SKIN_HEADER_FILE "skin-header.html" #define FOOTER_FILE "footer.html" #define HEAD_BLOCK "" #define FRAME_BLOCK "" #define DOCLIST_BLOCK "" #define DOC_BLOCK "" #define DOCLIST_EBLOCK "" #define COMMENT_CHAR ';' #define BASE_DIR ".." /* for relative URLs */ #define HELPSUBDIR "help" /* subdirectory of MANUALDIR */ #define TEST_DEPTH 10 #define DEFAULT_LANG "en" static char *localeList; static char *locale; static int debugPrintout = 0; static int didContentHeader = 0; static int safe_snprintf(char *buf, size_t size, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vsnprintf(buf, size, fmt, ap); va_end(ap); buf[size-1] = 0; return ret; } int parse_query_string(char *qs, char **name[], char **val[]) { char *t, *p; int cnt = 1; if (!qs) return -1; /* count args */ t = qs; while ((t = strchr(t, '&'))) { t++; cnt++; } *name = (char**)malloc(sizeof(char *) * cnt); *val = (char**)malloc(sizeof(char *) * cnt); if (!*name || !*val) return -1; cnt = 0; for (t = strtok(strdup(qs), "&") ; t != NULL ; t = strtok(NULL, "&")) { if ((p = strchr(t, '='))) { (*name)[cnt] = (char*)malloc(sizeof(char) * ((p-t) + 1)); strncpy((*name)[cnt], t, (p-t)); (*name)[cnt][(p-t)] = '\0'; (*val)[cnt++] = strdup(p+1); continue; } (*name)[cnt] = strdup(t); (*val)[cnt++] = strdup(""); } return (cnt); } char * find_arg(char *nm, char *name[], char *val[], int cnt) { int i; for (i = 0 ; i < cnt ; i++) { if (!STRCASECMP(name[i], nm)) return val[i]; } return (NULL); } void error(char *msg) { printf("Help Error: %s\n", msg); } int error_exit(char *msg) { printf("Content-type: text/html\n\n"); printf("Help Error

Help Error

"); printf("Your request could not be fulfilled.

"); printf("Reason : %s
", msg); exit(0) ; } static char * caseless_strstr(char *string, char *pattern) { char *p; if (!string || !pattern) return (NULL); for (p = string ; *p ; p++) { if (!STRNCASECMP(p, pattern, strlen(pattern))) return (p); } return (NULL); } static char * getProductName(const char *nickname) { if (!strcmp(nickname, "admin")) { return "Administration"; } if (!strcmp(nickname, "https")) { return "Enterprise"; } if (!strcmp(nickname, "httpd")) { return "FastTrack"; } if (!strcmp(nickname, "msg")) { return "Messaging"; } if (!strcmp(nickname, "news")) { return "News"; } if (!strcmp(nickname, "proxy")) { return "Proxy"; } if (!strcmp(nickname, "lmspd")) { return "Media"; } if (!strcmp(nickname, "slapd")) { return "Directory"; } if (!strcmp(nickname, "cert")) { return "Certificate"; } if (!strcmp(nickname, "compass")) { return "Compass"; } if (!strcmp(nickname, "catalog")) { return "Catalog"; } if (!strcmp(nickname, "rds")) { return "Rds"; } if (!strcmp(nickname, "calendar")) { return "Calendar"; } return NULL; } /* determine the locale supported from from the list obtained from the client */ char *getLocale() { char *loc; char path[PATH_LENGTH]; SYS_DIR *dir = NULL; /* Go through the list of locales in the HTTP_ACCEPT_LANGUAGE env var and check if at least one of them is available in the server installation */ loc = strtok(strdup(localeList), ","); while (1){ if (loc) { safe_snprintf(path, sizeof(path), "%s%c%c%c", MANUALDIR, FILE_SEP, loc[0], loc[1]); if ((dir = dir_open(path))) { /* return only the first 2 characters of the language code e.g. return en for en-US */ loc[2] = '\0'; dir_close(dir); return loc; } } loc = strtok(NULL, ","); if (!loc) { /* default to English (en) */ safe_snprintf(path, sizeof(path), "%s%c%s", MANUALDIR, FILE_SEP, DEFAULT_LANG); if ((dir = dir_open(path))) { dir_close(dir); return DEFAULT_LANG; } else { error_exit("No help available for any of the languages set for the browser"); } } } } /* the standard help response handler for clients as of Console 4.5 */ static int no_frame_help(char *name[], char *val[], int cnt, char *product, char *content) { char path[PATH_LENGTH]; char base[PATH_LENGTH]; FILE *file = NULL; if (debugPrintout) { printf( "New help

\n" ); } /* read and flush the header to stdout */ /* try to read the "skin" header file first, then fall back to the default */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, SKIN_HEADER_FILE); if (!(file = fopen(path, "r"))) { safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, HEADER_FILE); } if (!file && (!(file = fopen(path, "r")))) { safe_snprintf(base, sizeof(base), "unable to open file: %s", path); if (debugPrintout) { printf("%s

\n", base); fflush( stdout ); } return error_exit(base); } if (debugPrintout) { printf("reading file: %s

\n", path); } if (!didContentHeader) { printf("Content-type: text/html\n\n"); } while (fgets(path, PATH_LENGTH, file)) { fputs(path, stdout); } fclose(file); /* Open the target file and return the contents */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, content); if (!(file = fopen(path, "r"))) { safe_snprintf(base, sizeof(base), "unable to open file: %s", path); if (debugPrintout) { printf("%s

\n", base); fflush( stdout ); } return error_exit(base); } if (debugPrintout) { printf("reading file: %s

\n", path); } while (fgets(path, PATH_LENGTH, file)) { fputs(path, stdout); } fclose(file); /* read and flush the footer to stdout */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, FOOTER_FILE); if (!(file = fopen(path, "r"))) { safe_snprintf(base, sizeof(base), "unable to open file: %s", path); if (debugPrintout) { printf("%s

\n", base); fflush( stdout ); } return error_exit(base); } if (debugPrintout) { printf("reading file: %s

\n", path); } while (fgets(path, PATH_LENGTH, file)) { fputs(path, stdout); } /* finished */ fflush(stdout); fclose(file); return 0; } /* the standard help response handler for clients prior to Console 4.5 */ static int oldhelp(char *name[], char *val[], int cnt, char *product, char *content, char *token) { char path[PATH_LENGTH]; FILE *frameset = NULL; if (debugPrintout) { printf( "Old help\n\n" ); } /* open a frameset file, either from the product dir, or the master file * in the help dir. */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, FRAMESET_FILE); if (debugPrintout) { printf("opening frameset file: %s

\n", path); } if (!(frameset = fopen(path, "r"))) { /* product frameset failed, so try global one */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, HELPSUBDIR, FILE_SEP, FRAMESET_FILE); if (!(frameset = fopen(path, "r"))) { if (debugPrintout) { printf("unable to open a valid frameset file: %s

\n", path); fflush( stdout ); } return error_exit("unable to open a valid frameset file"); } } if (debugPrintout) { printf("reading frameset file: %s

\n", path); } /* spit out the output, inserting src= into the CONTENT_FRAME frame block */ if (!didContentHeader) { printf("Content-type: text/html\n\n"); } while (fgets(path, PATH_LENGTH, frameset)) { char *f, *p; if ((f = caseless_strstr(path, HEAD_BLOCK))) { /* insert some javascript in the head block */ p = path; while (p < f + strlen(HEAD_BLOCK)) putchar(*(p++)); printf("\n"); while (*p) putchar(*(p++)); continue; } if (!(f = caseless_strstr(path, FRAME_BLOCK)) || !caseless_strstr(path, CONTENT_FRAME)) { fputs(path, stdout); continue; } /* insert src= element into CONTENT_FRAME frame block */ p = path; while (p < f + strlen(FRAME_BLOCK)) putchar(*(p++)); printf("src=\"%s%c%s%c%s%c%s\" ", BASE_DIR, FILE_SEP, locale, FILE_SEP, product, FILE_SEP, content); while (*p) putchar(*(p++)); } /* finished */ fflush(stdout); fclose(frameset); return 0; } /* given the name of a directory and the name of a file/directory in that parent return true if the given file/directory exists */ static int file_or_dir_exists(const char *parent, const char *name) { SYS_DIR *dp; SYS_DIRENT *d; int ret = 0; /* default to false */ dp = dir_open(parent); /* loop through all directory entries until we find the one that matches */ while (dp && name && !ret && (d = dir_read(dp))) { const char *entname = dir_name(d); /* exclude "." and ".." from scanning */ if (strcmp(entname, ".") && strcmp(entname, "..")) { /* set ret to true if the name matches, which terminates the while loop */ ret = !strcmp(name, entname); } } if (dp) { dir_close(dp); } return ret; } /* the standard help response handler */ static int help(char *name[], char *val[], int cnt) { char *product = NULL; char *token = NULL; char *content = NULL; char *mapfile = NULL; char path[PATH_LENGTH]; FILE *tokenfile = NULL; int newstyle = 1; if (!(product = find_arg(DIR_ARG, name, val, cnt))) { if (debugPrintout) { printf( "product argument not in URL

\n" ); fflush(stdout); } return error_exit("product argument not found"); } if (!(token = find_arg(TOKEN_ARG, name, val, cnt))) { if (debugPrintout) { printf( "token argument not in URL

\n" ); fflush(stdout); } return error_exit("token argument not found"); } if (find_arg(DEBUG_ARG, name, val, cnt)) { debugPrintout = 1; } if (debugPrintout) { printf("Content-type: text/html\n\n"); didContentHeader = 1; } if (debugPrintout) { printf( "Product: %s

\n", product?product:"" ); printf( "Token: %s

\n", token?token:"" ); } /* Newer clients can specify a token map file */ mapfile = find_arg(MAPFILE_ARG, name, val, cnt); if ((NULL == mapfile) || (0 == *mapfile)) { mapfile = TOKEN_FILE; newstyle = 0; } else if (debugPrintout) { printf( "Map file parameter: %s

\n", mapfile ); } /* first, see if locale directory exists in its parent */ safe_snprintf(path, sizeof(path), "%s", MANUALDIR); if (!file_or_dir_exists(path, locale)) { if (debugPrintout) { printf( "No help files for locale [%s]

\n", locale?locale:""); fflush(stdout); } return error_exit("Failed to open help for locale."); } /* ok, locale directory is good, check product directory */ safe_snprintf(path, sizeof(path), "%s%c%s", MANUALDIR, FILE_SEP, locale); if (!file_or_dir_exists(path, product)) { if (debugPrintout) { printf( "No help files for product [%s] in locale [%s]

\n", product?product:"", locale); fflush(stdout); } return error_exit("Failed to open help for given product."); } /* Ok, product directory exists, check for the mapfile */ safe_snprintf(path, sizeof(path), "%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product); if (!file_or_dir_exists(path, mapfile)) { if (debugPrintout) { printf( "No map file [%s] for product [%s] in locale [%s]

\n", mapfile?mapfile:"", product, locale); fflush(stdout); } return error_exit("Failed to open help for given product."); } safe_snprintf(path, sizeof(path), "%s%c%s%c%s%c%s", MANUALDIR, FILE_SEP, locale, FILE_SEP, product?product:"", FILE_SEP, mapfile); if (debugPrintout) { printf( "Opening map file: %s

\n", path ); } if (!(tokenfile = fopen(path, "r"))) { if (debugPrintout) { printf( "Failed to open map file: %s

\n", path ); fflush( stdout ); } return error_exit("Failed to open Token file."); } /* translate token */ /* match the token from the appropriate token.map file */ while (token && fgets(path, PATH_LENGTH, tokenfile)) { char *p, *q; if (path[0] == COMMENT_CHAR) continue; if (STRNCASECMP(path, token, strlen(token))) continue; if (!(p = strchr(path, '='))) continue; p++; /* snip leading whitespace */ while ((*p == ' ') || (*p == '\t')) p++; /* snip trailing junk */ q = p + strlen(p) - 1; while ((*q == '\n') || (*q == '\r') || (*q == ' ') || (*q == '\t')) *(q--) = '\0'; content = strdup(p); break; } fclose(tokenfile); if (!content) { if (debugPrintout) { printf( "Failed to translate the token: %s\n
\n", token?token:"" ); fflush( stdout ); } return error_exit("unable to translate the token"); } if (debugPrintout) { fflush( stdout ); } /* Older clients use the frameset model, newer ones just want the undecorated Help file */ if (newstyle) { no_frame_help( name, val, cnt, product, content ); } else { oldhelp( name, val, cnt, product, content, token ); } return 0; } static void dumpTitle(char *name) { printf(""); printf(""); printf(""); printf("" CAPBRAND " %s Server", name); printf(""); printf(""); } static void check_directory(char *dirpath, char *prefix, char *suffix, int dirDepth) { char path[PATH_LENGTH]; FILE *fp; SYS_DIR *dp; SYS_DIRENT *d; /* first, check for contents.htm in this directory */ safe_snprintf(path, sizeof(path), "%s%c%s", dirpath, FILE_SEP, CONTENTS_FILE); if ((fp = fopen(path, "r"))) { /* look for the title block within the first TEST_DEPTH lines */ char line[PATH_LENGTH]; char *title, *p; int i = 0; while ((i++ < TEST_DEPTH) && fgets(line, PATH_LENGTH, fp)) { if (!(title = caseless_strstr(line, TITLE_BLOCK))) continue; title += strlen(TITLE_BLOCK); if ((p = strchr(title, '<'))) *p = '\0'; printf("%s%s%s\n", prefix, path, title, suffix); break; } fclose(fp); } /* now, try to recurse through lower directories */ if (!(dp = dir_open(dirpath))) return; while ((d = dir_read(dp))) { /* We should try to check if it is a directory first...*/ /* don't check anything starting with . */ if (dir_name(d)[0] == '.') continue; if (dirDepth == 0) { if (getProductName(dir_name(d)) != NULL) dumpTitle(getProductName(dir_name(d))); } safe_snprintf(path, sizeof(path), "%s%c%s", dirpath, FILE_SEP, dir_name(d)); check_directory(path, prefix, suffix, dirDepth+1); if (dirDepth == 0) printf("     "); } dir_close(dp); } /* generates the library contents list */ static int genlib() { FILE *template; char line[PATH_LENGTH]; char base[PATH_MAX]; char library_file[PATH_MAX]; printf("Content-type: text/html\n\n"); /* open the library template file from the help dir. */ safe_snprintf(library_file, sizeof(library_file), "%s%c%s%c%s", MANUALDIR, FILE_SEP, HELPSUBDIR, FILE_SEP, LIBRARY_FILE); if (!(template = fopen(library_file, "r"))) return error_exit("unable to open a valid library template file"); /* Spit the template file back out, except substitute the generate * listings for the block */ while (fgets(line, PATH_LENGTH, template)) { char *prefix; char *suffix; char *endp; if (STRNCASECMP(line, DOCLIST_BLOCK, strlen(DOCLIST_BLOCK))) { fputs(line, stdout); continue; } prefix = line + strlen(DOCLIST_BLOCK); if (!(endp = caseless_strstr(prefix, DOC_BLOCK))) { error("invalid <doclist> block in library template"); continue; } suffix = endp + strlen(DOC_BLOCK); *endp = '\0'; if (!(endp = caseless_strstr(suffix, DOCLIST_EBLOCK))) { error("invalid <doclist> block in library template"); continue; } *endp = '\0'; safe_snprintf(base, sizeof(base), "%s%c%s", MANUALDIR, FILE_SEP, locale); check_directory(base, prefix, suffix, 0); } fflush(stdout); fclose(template); return 0; } int main(int argc, char *argv[]) { char **name; char **val; int cnt; if (!(localeList = getenv("HTTP_ACCEPT_LANGUAGE"))) /* default to en */ localeList = strdup("en"); cnt = parse_query_string(getenv("QUERY_STRING"), &name, &val); locale = getLocale(); if (find_arg(GENLIB_ARG, name, val, cnt)) return genlib(); return help(name, val, cnt); } 389-admin-1.1.35/admserv/cgi-src40/help.js000066400000000000000000000041461220472121400176340ustar00rootroot00000000000000// BEGIN COPYRIGHT BLOCK // Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. // Copyright (C) 2005 Red Hat, Inc. // All rights reserved. // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // of the License. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // END COPYRIGHT BLOCK // // Help Editor Prototype // 10/7/97 // David Tompkins // dt@netscape.com // // Utility help functions // manualBaseURL = document.location.protocol + "//" + document.location.host + "/"; function manualBase() { return manualBaseURL+"manual"; } function help(helpdir, token) { newlocation = manualBase()+"/help/" + helpCommand() + "?helpdir="+helpdir+"&token="+token+"&mapfile=tokens.map"; if (top.HelpWindow) { top.HelpWindow.focus(); top.HelpWindow.location = newlocation; return; } window.open(newlocation, 'helpwin', 'resizable=1,width=640,height=480'); } function helpCommand() { return "help"; } function findDirectory() { return parent.HelpDirectory; } function back() { parent.frames.HelpContent.history.back(); } function forward() { parent.frames.HelpContent.history.forward(); } function dismiss() { parent.close(); } function goTOC() { parent.frames.HelpContent.location = manualBase()+"/"+findDirectory()+"/help/contents.htm"; } function goIndex() { parent.frames.HelpContent.location = manualBase()+"/"+findDirectory()+"/help/index.htm"; } function goLibrary() { parent.frames.HelpContent.location = manualBase()+"/help/" + helpCommand() + "?genlib"; } function print() { parent.frames.HelpContent.print(); } 389-admin-1.1.35/admserv/cgi-src40/htmladmin.c000066400000000000000000001514601220472121400204710ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * htmladmin.c - HTML Administration framework. * * All blame to Adam Prishtina (adam@netscape.com) */ #include #include #include #include #include "libadmin/libadmin.h" #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadminutil/resource.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/cluster.h" #include "ldap.h" #include "prnetdb.h" #include "plstr.h" #include "config.h" /* properties file name = "htmladmin.properties" */ #define RESOURCE_FILE "htmladmin" #define resource_key(a,b) a b /* define strings here */ #define DBT_STOP_CONFIRM resource_key(RESOURCE_FILE, "1") #define DBT_ADMIN_STOP_CONFIRM resource_key(RESOURCE_FILE, "2") #define DBT_DIRECTORY_STOP_CONFIRM resource_key(RESOURCE_FILE, "3") /* html string used under main()*/ #define DBT_MAIN_CONTENT_TYPE resource_key(RESOURCE_FILE, "10") #define DBT_MAIN_PAGE_HEADER resource_key(RESOURCE_FILE, "11") #define DBT_MAIN_FRAME_HEADER resource_key(RESOURCE_FILE, "12") #define DBT_MAIN_FRAME_FOOTER resource_key(RESOURCE_FILE, "13") #define DBT_MAIN_MESSAGE_FRAME resource_key(RESOURCE_FILE, "14") #define DBT_MAIN_FRAMESET_HEADER resource_key(RESOURCE_FILE, "15") #define DBT_MAIN_FRAMESET_BODY resource_key(RESOURCE_FILE, "16") #define DBT_MAIN_FRAMESET_FOOTER resource_key(RESOURCE_FILE, "17") #define DBT_MAIN_BODY_HEADER resource_key(RESOURCE_FILE, "18") #define DBT_MAIN_OPTION_VALUE resource_key(RESOURCE_FILE, "19") #define DBT_MAIN_SELECTED resource_key(RESOURCE_FILE, "20") #define DBT_MAIN_DEFAULT_VIEW resource_key(RESOURCE_FILE, "21") #define DBT_MAIN_BODY_FOOTER resource_key(RESOURCE_FILE, "22") #define DBT_MAIN_TOPOLOGY_HEADER resource_key(RESOURCE_FILE, "23") #define DBT_MAIN_IMAP resource_key(RESOURCE_FILE, "24") #define DBT_MAIN_POP resource_key(RESOURCE_FILE, "25") #define DBT_MAIN_SMTP resource_key(RESOURCE_FILE, "26") #define DBT_MAIN_TOPOLOGY_BODY_HEADER resource_key(RESOURCE_FILE, "28") #define DBT_MAIN_LDAP_ERROR resource_key(RESOURCE_FILE, "29") #define DBT_MAIN_TOPOLOGY_BODY_FOOTER resource_key(RESOURCE_FILE, "30") #define DBT_MAIN_PAGE_FOOTER resource_key(RESOURCE_FILE, "31") /* html string used under stop_server()*/ #define DBT_STOP_SERVER_MESSAGING resource_key(RESOURCE_FILE, "40") #define DBT_STOP_SERVER_CMS resource_key(RESOURCE_FILE, "41") #define DBT_STOP_SERVER_AS resource_key(RESOURCE_FILE, "42") #define DBT_STOP_SERVER_ERROR resource_key(RESOURCE_FILE, "43") /* html string used under start_server()*/ #define DBT_START_SERVER_MESSAGING resource_key(RESOURCE_FILE, "50") #define DBT_START_SERVER_CMS resource_key(RESOURCE_FILE, "51") #define DBT_START_SERVER_AS resource_key(RESOURCE_FILE, "52") #define DBT_START_SERVER_ERROR resource_key(RESOURCE_FILE, "53") /* html string used uder output_topology() */ #define DBT_OUTPUT_TOPOLOGY_JAVA_SCRIPT resource_key(RESOURCE_FILE, "60") #define DBT_OUTPUT_TOPOLOGY_TABLE_HEADER resource_key(RESOURCE_FILE, "61") #define DBT_OUTPUT_TOPOLOGY_DOMAIN_IMAGE resource_key(RESOURCE_FILE, "62") #define DBT_OUTPUT_TOPOLOGY_HOST_IMAGE resource_key(RESOURCE_FILE, "63") #define DBT_OUTPUT_TOPOLOGY_SERVER_GROUP_IMAGE resource_key(RESOURCE_FILE, "64") #define DBT_OUTPUT_TOPOLOGY_SERVER_IMAGE resource_key(RESOURCE_FILE, "65") #define DBT_OUTPUT_TOPOLOGY_LEGACY_SERVER_ID resource_key(RESOURCE_FILE, "66") #define DBT_OUTPUT_TOPOLOGY_SERVER_ID resource_key(RESOURCE_FILE, "67") #define DBT_OUTPUT_TOPOLOGY_LOCAL_SERVER_ENTRY resource_key(RESOURCE_FILE, "68") #define DBT_OUTPUT_TOPOLOGY_SERVER_ENTRY resource_key(RESOURCE_FILE, "69") #define DBT_OUTPUT_TOPOLOGY_ADMIN_INFO_LINK resource_key(RESOURCE_FILE, "70") #define DBT_OUTPUT_TOPOLOGY_ADMIN_LOG_LINK resource_key(RESOURCE_FILE, "71") #define DBT_OUTPUT_TOPOLOGY_STATUS resource_key(RESOURCE_FILE, "72") #define DBT_OUTPUT_TOPOLOGY_ON resource_key(RESOURCE_FILE, "73") #define DBT_OUTPUT_TOPOLOGY_OFF resource_key(RESOURCE_FILE, "74") #define DBT_OUTPUT_TOPOLOGY_UNKNOWN resource_key(RESOURCE_FILE, "75") #define DBT_OUTPUT_TOPOLOGY_SERVER_RUNNING resource_key(RESOURCE_FILE, "76") #define DBT_OUTPUT_TOPOLOGY_SERVER_STOP resource_key(RESOURCE_FILE, "77") #define DBT_OUTPUT_TOPOLOGY_DIRECTORY_INFO_LINK resource_key(RESOURCE_FILE, "78") #define DBT_OUTPUT_TOPOLOGY_DIRECTORY_LOG_LINK resource_key(RESOURCE_FILE, "79") #define DBT_OUTPUT_TOPOLOGY_MSG_INFO_LINK resource_key(RESOURCE_FILE, "80") #define DBT_OUTPUT_TOPOLOGY_MSG_LOG_LINK resource_key(RESOURCE_FILE, "81") #define DBT_OUTPUT_TOPOLOGY_MSG_LINKS resource_key(RESOURCE_FILE, "82") #define DBT_OUTPUT_TOPOLOGY_MSG_SERVICE resource_key(RESOURCE_FILE, "83") #define DBT_OUTPUT_TOPOLOGY_MSG_OFF resource_key(RESOURCE_FILE, "84") #define DBT_OUTPUT_TOPOLOGY_MSG_ON resource_key(RESOURCE_FILE, "85") #define DBT_OUTPUT_TOPOLOGY_MSG_STATUS resource_key(RESOURCE_FILE, "86") #define DBT_OUTPUT_TOPOLOGY_ES_ON resource_key(RESOURCE_FILE, "87") #define DBT_OUTPUT_TOPOLOGY_ES_OFF resource_key(RESOURCE_FILE, "88") #define DBT_OUTPUT_TOPOLOGY_ES_INFO_LINK resource_key(RESOURCE_FILE, "89") #define DBT_OUTPUT_TOPOLOGY_ES_LOG_LINK resource_key(RESOURCE_FILE, "90") #define DBT_OUTPUT_TOPOLOGY_CMS_ON resource_key(RESOURCE_FILE, "91") #define DBT_OUTPUT_TOPOLOGY_CMS_OFF resource_key(RESOURCE_FILE, "92") #define DBT_OUTPUT_TOPOLOGY_CMS_INFO_LINK resource_key(RESOURCE_FILE, "93") #define DBT_OUTPUT_TOPOLOGY_CMS_LOG_LINK resource_key(RESOURCE_FILE, "94") #define DBT_OUTPUT_TOPOLOGY_OTHER_ON resource_key(RESOURCE_FILE, "95") #define DBT_OUTPUT_TOPOLOGY_OTHER_OFF resource_key(RESOURCE_FILE, "96") #define DBT_OUTPUT_TOPOLOGY_OTHER_INFO_LINK resource_key(RESOURCE_FILE, "97") #define DBT_OUTPUT_TOPOLOGY_OTHER_LOG_LINK resource_key(RESOURCE_FILE, "98") #define DBT_OUTPUT_TOPOLOGY_TABLE_FOOTER resource_key(RESOURCE_FILE, "99") #define DBT_OUTPUT_TOPOLOGY_STATUS_WITH_REPL resource_key(RESOURCE_FILE,"100") #define DBT_OUTPUT_TOPOLOGY_DIRECTORY_REPL_LINK resource_key(RESOURCE_FILE,"101") Resource *i18nResource; char *acceptLanguage; char* getResourceString(char *key) { return (char *)(res_getstring(i18nResource, key, acceptLanguage, NULL, 0, NULL)); } /* * Define constants for topology tree in DS. */ #define NETSCAPE_ROOT "o=NetscapeRoot" #define DOMAIN_OBJTYPE "(objectclass=nsadmindomain)" #define DOMAIN_ATTR "nsadmindomainname" #define HOST_OBJTYPE "(objectclass=nshost)" #define HOST_ATTR "serverhostname" #define SERVERGROUP_OBJTYPE "(|(objectclass=nsadmingroup)(objectclass=nslegacyadmingroup))" #define SERVERGROUP_ATTR "nsadmingroupname" #define ISIE_OBJTYPE "(|(objectclass=nsapplication)(objectclass=nslegacyapplication))" #define ISIE_PRODNAME_ATTR "nsproductname" #define ISIE_PRODVER_ATTR "nsproductversion" #define SIE_OBJTYPE "(|(objectclass=netscapeserver)(objectclass=nslegacyserver))" #define SIE_SERVERID_ATTR "nsserverid" #define ADMIN_OBJTYPE "(|(objectclass=nsadminserver)(objectclass=nslegacyadminserver))" #define ADMIN_HOST "serverhostname" #define ADMIN_LEGACY_URL "url" #define ADMINCONF_OBJTYPE "(objectclass=nsadminconfig)" #define ADMINCONF_SECURITY "nsserversecurity" #define ADMINCONF_PORT "nsserverport" #define ADMINCONF_ACCESSLOG "nsaccesslog" #define ADMINCONF_ERRORLOG "nserrorlog" #define MSGCONF_OBJTYPE "(objectclass=nsmsgcfglog)" #define MSGCONF_LOGDIR "nsmsglogdir" #define MSGCONF_PORT "nsmsgport" #define MY_PAGE "htmladmin.html" #define NBUF_SIZE 1024 #define SERVER_PING_RATE 5 /* stolen from ldapserver util.c - need to escape values that may go into ldap search filters */ #define UTIL_ESCAPE_NONE 0 #define UTIL_ESCAPE_HEX 1 #define UTIL_ESCAPE_BACKSLASH 2 static int special_filter(unsigned char c) { /* * Escape all non-printing chars and double-quotes in addition * to those required by RFC 2254 */ return (c < 32 || c > 126 || c == '*' || c == '(' || c == ')' || c == '\\' || c == '"') ? UTIL_ESCAPE_HEX : UTIL_ESCAPE_NONE; } static const char* do_escape_string ( const char* str, int len, /* -1 means str is nul-terminated */ char buf[BIG_LINE], int (*special)(unsigned char) ) { const char* s; const char* last; int esc; if (str == NULL) { *buf = '\0'; return buf; } if (len == -1) len = strlen (str); if (len == 0) return str; last = str + len - 1; for (s = str; s <= last; ++s) { if ( (esc = (*special)((unsigned char)*s))) { const char* first = str; char* bufNext = buf; int bufSpace = BIG_LINE - 4; while (1) { if (bufSpace < (s - first)) s = first + bufSpace - 1; if (s > first) { memcpy (bufNext, first, s - first); bufNext += (s - first); bufSpace -= (s - first); } if (s > last) { break; } do { *bufNext++ = '\\'; --bufSpace; if (bufSpace < 2) { memcpy (bufNext, "..", 2); bufNext += 2; goto bail; } if (esc == UTIL_ESCAPE_BACKSLASH) { *bufNext++ = *s; --bufSpace; } else { /* UTIL_ESCAPE_HEX */ sprintf (bufNext, "%02x", (unsigned)*(unsigned char*)s); bufNext += 2; bufSpace -= 2; } } while (++s <= last && (esc = (*special)((unsigned char)*s))); if (s > last) break; first = s; while ( (esc = (*special)((unsigned char)*s)) == UTIL_ESCAPE_NONE && s <= last) ++s; } bail: *bufNext = '\0'; return buf; } } return str; } const char* escape_filter_value(const char* str, int len, char buf[BIG_LINE]) { return do_escape_string(str,len,buf,special_filter); } /* * Get bind DN and bind PW info. */ int get_bindinfo(char **binddn, char **bindpw) { int rv; int err; char *username = 0; char *localAdmin = 0; rv = ADM_GetUserDNString(&err, binddn); /* & of (*binddn) */ if (rv < 0 || !*binddn || !**binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) exit(0); else { /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(NULL, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) exit(0); else { *binddn = NULL; *bindpw = NULL; } } else exit(0); } } if (*binddn) rv = ADM_GetCurrentPassword(&err, bindpw); return 1; } /* * Get the AdmldapInfo struct for ldap SDK API. */ AdmldapInfo get_adm_ldapinfo(const char *configdir, const char *securitydir) { AdmldapInfo ldapInfo = NULL; int rv; ldapInfo = admldapBuildInfo((char *)configdir, &rv); if(!ldapInfo) exit(0); rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); return(ldapInfo); } int sorted_search( char *sortattr, LDAP *ld, const char *base, int scope, const char *filter, char **attrs, int attrsonly, LDAPMessage **res ) { int rv; #if defined(USE_OPENLDAP) LDAPSortKey **key; #else LDAPsortkey **key; #endif LDAPControl *control; LDAPControl **controls; struct timeval tv; tv.tv_sec=600; tv.tv_usec=600; if((rv = ldap_create_sort_keylist(&key, sortattr)) != LDAP_SUCCESS) return rv; if((rv = ldap_create_sort_control(ld, key, 0, &control)) != LDAP_SUCCESS) return rv; controls = (LDAPControl **)malloc(2*sizeof(LDAPControl *)); controls[0] = control; controls[1] = NULL; ldap_free_sort_keylist(key); rv = ldap_search_ext_s(ld, base, scope, filter, attrs, attrsonly, controls, NULL, &tv, 1000, res); /* free the controls */ ldap_controls_free(controls); return rv; } /* * Given an SIE, figure out what the URL of its local Admin Server is. */ char *get_admin_url(LDAP *server, char *sie) { LDAPMessage *result; LDAPMessage *entry; int ldapError; char *group; char *security = NULL; char *host = NULL; char *port = NULL; char **vals; char url[BIG_LINE]; char *isie; char *temp; group = strtok(sie, ","); group = strtok(NULL, ","); group = strtok(NULL, "\0"); if (!group) { /* invalid sie */ return NULL; } while(*group == ' ') group++; /* eliminate spaces */ /* * Now we're at the server group level. Search for the nsAdminServer object (should only be 1 per server group). * Get the server host here. */ if((ldapError = ldap_search_ext_s(server, group, LDAP_SCOPE_SUBTREE, ADMIN_OBJTYPE, NULL, 0, NULL, NULL, NULL, -1, &result)) != LDAP_SUCCESS) return NULL; entry = ldap_first_entry(server, result); if (!entry) { return NULL; } if((vals = util_ldap_get_values(server, entry, ADMIN_HOST)) != NULL) { host = strdup(vals[0]); util_ldap_value_free(vals); } temp = ldap_get_dn(server, entry); isie = strtok(temp, ","); isie = strtok(NULL, "\0"); while(*isie == ' ') isie++; /* eliminate spaces */ /* * Get the ISIE entry */ if((ldapError = ldap_search_ext_s(server, isie, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &result)) != LDAP_SUCCESS) return NULL; entry = ldap_first_entry(server, result); if (!entry) { return NULL; } /* * Now search the SIE's configuration object to get the port and the security status. */ if((ldapError = ldap_search_ext_s(server, ldap_get_dn(server, entry), LDAP_SCOPE_SUBTREE, ADMINCONF_OBJTYPE, NULL, 0, NULL, NULL, NULL, -1, &result)) != LDAP_SUCCESS) return NULL; entry = ldap_first_entry(server, result); if (!entry) { return NULL; } if((vals = util_ldap_get_values(server, entry, ADMINCONF_PORT)) != NULL) { port = strdup(vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, ADMINCONF_SECURITY)) != NULL) { security = strdup(vals[0]); util_ldap_value_free(vals); } /* Construct URL. */ PR_snprintf(url, BIG_LINE, "http%s://%s:%s", (security && !strcmp(security, "on")) ? "s" : "", host, port); free(security); free(host); free(port); return strdup(url); } int get_host_and_port(LDAP *server, char *sie, LDAPMessage *sie_entry, char **host, int **port) { LDAPMessage *result; LDAPMessage *entry; int ldapError; char **vals; char sie_conf[BIG_LINE]; *host=NULL; *port=NULL; if((vals = util_ldap_get_values(server, sie_entry, ADMIN_HOST)) != NULL) { *host = strdup(vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, sie_entry, ADMINCONF_PORT)) != NULL) { *port = (int *)malloc(sizeof(int)); (*port)[0] = atoi(vals[0]); util_ldap_value_free(vals); } if(*host && *port) return 1; PR_snprintf(sie_conf, BIG_LINE, "cn=configuration, %s", sie); if((ldapError = ldap_search_ext_s(server, sie_conf, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &result)) != LDAP_SUCCESS) return 0; entry = ldap_first_entry(server, result); if((vals = util_ldap_get_values(server, entry, ADMIN_HOST)) != NULL) { *host = strdup(vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, ADMINCONF_PORT)) != NULL) { *port = (int *)malloc(sizeof(int)); (*port)[0] = atoi(vals[0]); util_ldap_value_free(vals); } if(*host && *port) return 1; else return 0; } int within_view(char **view_list, char *current_dn) { int i; /* * No views? Then everything's within view. */ if(!view_list) return 1; /* * First, check if current_dn is a subset of any of the dn's in the view list. * (i.e. we haven't gotten to the actual view area, but we're on the right path * down the tree and need to print the current dn in the topology) * If so, we're within the view. */ i=0; while(view_list[i] != NULL) { if(strstr(view_list[i], current_dn)) return 1; i++; } /* * If we got here, we're not on our way - check if we're already within the actual view area. * Check if any of the view list are a subset of the current dn, * and if so we're within the view. */ i=0; while(view_list[i] != NULL) { if(strstr(current_dn, view_list[i])) return 1; i++; } /* We're completely outside of the view */ return 0; } /* * Gets all of a user's "private" views, in addition to all the "public" views. */ char **get_all_users_views(LDAP *server, char *binddn, AdmldapInfo ldapInfo) { int ldapError; char **vals; char dn[BIG_LINE]; char filter[BIG_LINE]; char *ptr, *ptr2, *ptr3; LDAPMessage *entry; LDAPMessage *result; char **return_array = NULL; char **tmp = NULL; int i; int error = 0; char *escaped_binddn = NULL; if(!binddn) return NULL; /* anonymous bind, no user prefs, no views */ /* get the last 2 items from SIE DN - this is the domain we'll use to search for Custom Views */ ptr = admldapGetSIEDN(ldapInfo); ptr2 = strrchr(ptr, ','); ptr2[0] = '\0'; ptr3 = strrchr(ptr, ','); ptr2[0] = ','; ptr3++; while(ptr3[0] == ' ') ptr3++; /* remove spaces */ /* First, search private views */ ldapError = escape_for_dn(binddn, &escaped_binddn); if (ldapError) { return NULL; /* failed to escape binddn; bail */ } if (NULL == escaped_binddn) { PR_snprintf(dn, BIG_LINE, "ou=%s, ou=UserPreferences, %s", binddn, ptr3); } else { PR_snprintf(dn, BIG_LINE, "ou=%s, ou=UserPreferences, %s", escaped_binddn, ptr3); PR_Free(escaped_binddn); } PR_snprintf(filter, BIG_LINE, "(&(objectclass=nscustomview))"); ldapError = ldap_search_ext_s(server, dn, LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, NULL, -1, &result); if(ldapError != LDAP_SUCCESS) { /* fatal error, bail */ error = 1; goto bail; } i=0; for(entry = ldap_first_entry(server, result); entry != NULL; entry = ldap_next_entry(server, entry)) { vals = util_ldap_get_values(server, entry, "nsdisplayname"); if(!vals || !vals[0]) break; if(!return_array) { return_array = (char **)malloc(sizeof(char *)); if (!return_array) { error = 1; goto bail; } return_array[0] = strdup(vals[0]); } else { tmp = (char **)realloc(return_array, (i+1)*sizeof(char *)); if (!tmp) { error = 1; goto bail; } return_array = tmp; return_array[i] = strdup(vals[0]); } i++; } tmp = (char **)realloc(return_array, (i+1)*sizeof(char *)); if (!tmp) { error = 1; goto bail; } return_array = tmp; return_array[i] = NULL; /* Next, search public views */ PR_snprintf(dn, BIG_LINE, "ou=Global Preferences, %s", ptr3); ldapError = ldap_search_ext_s(server, dn, LDAP_SCOPE_SUBTREE, filter, NULL, 0, NULL, NULL, NULL, -1, &result); if((ldapError != LDAP_SUCCESS) && (ldapError != LDAP_NO_SUCH_OBJECT)) { /* fatal error, free array, bail */ for (i=0; return_array && return_array[i]; i++) { free((void *)return_array[i]); } free((void *)return_array); return NULL; } for(entry = ldap_first_entry(server, result); entry != NULL; entry = ldap_next_entry(server, entry)) { vals = util_ldap_get_values(server, entry, "nsdisplayname"); if(!vals || !vals[0]) break; tmp = (char **)realloc(return_array, (i+1)*sizeof(char *)); if (!tmp) { error = 1; goto bail; } return_array = tmp; return_array[i] = strdup(vals[0]); i++; } tmp = (char **)realloc(return_array, (i+1)*sizeof(char *)); if (!tmp) { error = 1; goto bail; } return_array = tmp; return_array[i] = NULL; bail: if (error) { /* An error occurred, so free the array. */ for (i=0; return_array && return_array[i]; i++) { free((void *)return_array[i]); } free((void *)return_array); return_array = NULL; } return return_array; } char **get_view_list(LDAP *server, char *view, char *binddn, AdmldapInfo ldapInfo) { int ldapError; char **vals; char dn[BIG_LINE]; char filter[BIG_LINE]; char escaped_filter[BIG_LINE]; char *ptr, *ptr2, *ptr3; LDAPMessage *result; char **return_array = NULL; char *current_view; int i; if(!view) return NULL; /* get the last 2 items from SIE DN - this is the domain we'll use to search for Custom Views */ ptr = admldapGetSIEDN(ldapInfo); ptr2 = strrchr(ptr, ','); ptr2[0] = '\0'; ptr3 = strrchr(ptr, ','); ptr2[0] = ','; ptr3++; while(ptr3[0] == ' ') ptr3++; /* remove spaces */ PR_snprintf(dn, sizeof(dn), "ou=\"%s\", ou=UserPreferences, %s", binddn, ptr3); PR_snprintf(filter, sizeof(filter), "(&(objectclass=nscustomview)(nsdisplayname=%s))", view); /* need to escape the filter value because the view value was given by the user and may contain values like = () etc. */ escape_filter_value(filter, -1, escaped_filter); ldapError = ldap_search_ext_s(server, dn, LDAP_SCOPE_SUBTREE, escaped_filter, NULL, 0, NULL, NULL, NULL, -1, &result); if(ldapError != LDAP_SUCCESS) /* fatal error, bail */ return NULL; vals = util_ldap_get_values(server, result, "nsviewconfiguration"); if(!vals || !strcmp(vals[0], "")) { /* not in the private views, maybe in the public views? */ PR_snprintf(dn, sizeof(dn), "ou=Global Preferences, %s", ptr3); ldapError = ldap_search_ext_s(server, dn, LDAP_SCOPE_SUBTREE, escaped_filter, NULL, 0, NULL, NULL, NULL, -1, &result); if(ldapError != LDAP_SUCCESS) /* fatal error, bail */ return NULL; vals = util_ldap_get_values(server, result, "nsviewconfiguration"); if(!vals || !strcmp(vals[0], "")) return NULL; } /* Parse string and put into array. views delimited by "|" */ current_view = strtok(vals[0], "|"); if(current_view) { return_array = (char **)malloc(sizeof(char *)); return_array[0] = strdup(current_view); i=1; while((current_view = strtok(NULL, "|"))) { return_array = (char **)realloc(return_array, (i+1)*sizeof(char *)); return_array[i] = strdup(current_view); i++; } return_array = (char **)realloc(return_array, (i+1)*sizeof(char *)); return_array[i] = NULL; } return return_array; } LDAP *server_bind(const char *securitydir, char *host, int port, int security, char *binddn, char *bindpw) { int ldapError; LDAP *server; if(!(server = util_ldap_init(securitydir, NULL, host, port, security, 0, NULL))) { return NULL; } if ((ldapError = util_ldap_bind(server, binddn, bindpw, LDAP_SASL_SIMPLE, NULL, NULL, NULL, NULL)) != LDAP_SUCCESS ) { switch (ldapError) { case LDAP_INAPPROPRIATE_AUTH: case LDAP_INVALID_CREDENTIALS: case LDAP_INSUFFICIENT_ACCESS: /* authenticate failed: Should not continue */ #ifdef LDAP_DEBUG util_ldap_perror( ld, "util_ldap_bind:" ); #endif ldap_unbind_ext(server, NULL, NULL); return NULL; case LDAP_NO_SUCH_OBJECT: case LDAP_ALIAS_PROBLEM: case LDAP_INVALID_DN_SYNTAX: #ifdef LDAP_DEBUG util_ldap_perror( ld, "util_ldap_bind:" ); #endif /* Not a good DN */ ldap_unbind_ext(server, NULL, NULL); return NULL; default: ldap_unbind_ext(server, NULL, NULL); return NULL; } } return server; } #if 0 /* NOT USED */ /* rate is specified in seconds */ static int get_topology_refresh_rate(AdmldapInfo admInfo) { char *val = NULL; char *endptr = NULL; int rate = 300; if ((val = admldapGetExpressRefreshRate(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } return rate; } #endif /* rate is specified in seconds */ static int get_cgi_timeout_rate(AdmldapInfo admInfo) { char *endptr = NULL; char *val = NULL; int rate = 60; if ((val = admldapGetExpressCGITimeout(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } return rate; } /* * Given a server's host and port, try to connect to it using PR_Connect() * Return values: * 1 = running * 0 = stopped * -1 = unknown error */ int server_status(char *host, int port) { PRNetAddr *netaddr = NULL; PRStatus err; PRFileDesc *req_socket= NULL; int retcode = 0; if (NULL == host) { return -1; } netaddr = (PRNetAddr *)calloc(1, sizeof(PRNetAddr)); if (NULL == netaddr) { rpt_err(APP_ERROR, "Failed to allocate PRNetAddr", NULL, NULL); return -1; } err = PR_StringToNetAddr(host, netaddr); if (PR_SUCCESS == err) { PR_InitializeNetAddr(PR_IpAddrNull, (PRUint16)port, netaddr); } else { PRAddrInfo *infop = PR_GetAddrInfoByName(host, PR_AF_UNSPEC, (PR_AI_ADDRCONFIG|PR_AI_NOCANONNAME)); if (infop) { void *iter = NULL; memset( netaddr, 0, sizeof( PRNetAddr )); /* need just one address */ iter = PR_EnumerateAddrInfo(iter, infop, (PRUint16)port, netaddr); if (NULL == iter) { rpt_err(APP_ERROR, "Failed to enumerate addrinfo", NULL, NULL); retcode = -1; } PR_FreeAddrInfo(infop); } else { rpt_err(APP_ERROR, "Failed to get addrinfo", NULL, NULL); retcode = -1; } } if (retcode < 0) { free(netaddr); return retcode; } else { req_socket = PR_NewTCPSocket(); err = PR_Connect(req_socket, netaddr, 10000); free(netaddr); if (PR_SUCCESS == err) { return 1; } else { return 0; } } } int output_topology(AdmldapInfo ldapInfo, char *binddn, char *bindpw, char *view) { char *host = admldapGetHost(ldapInfo); int port = admldapGetPort(ldapInfo); int security = admldapGetSecurity(ldapInfo); char *securitydir = admldapGetSecurityDir(ldapInfo); LDAP *server; int ldapError; char **vals; char **vals2; LDAPMessage *domain_result, *host_result, *servergroup_result, *isie_result, *sie_result; LDAPMessage *domain_entry, *host_entry, *servergroup_entry, *isie_entry, *sie_entry; char viewparam[BIG_LINE]; char **view_list; int first_servergroup; int legacy; int i = 0; int rc = 0; server = server_bind(securitydir, host, port, security, binddn, bindpw); PL_strfree(securitydir); securitydir = NULL; if(!server) return -1; fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_JAVA_SCRIPT), getResourceString(DBT_STOP_CONFIRM), getResourceString(DBT_ADMIN_STOP_CONFIRM), getResourceString(DBT_DIRECTORY_STOP_CONFIRM)); /* Get the view list */ view_list = get_view_list(server, view, binddn, ldapInfo); /* DOMAIN */ if((ldapError = sorted_search(DOMAIN_ATTR, server, NETSCAPE_ROOT, LDAP_SCOPE_ONELEVEL, DOMAIN_OBJTYPE, NULL, 0, &domain_result)) != LDAP_SUCCESS) { rc = -1; goto bail; } fprintf(stdout, "%s", getResourceString(DBT_OUTPUT_TOPOLOGY_TABLE_HEADER)); for(domain_entry = ldap_first_entry(server, domain_result); domain_entry != NULL; domain_entry = ldap_next_entry(server, domain_entry)) { if(!within_view(view_list, ldap_get_dn(server, domain_entry))) continue; if((vals = util_ldap_get_values(server, domain_entry, DOMAIN_ATTR)) != NULL) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_DOMAIN_IMAGE), vals[0]); util_ldap_value_free(vals); } else { rc = -1; goto bail; } /* HOST */ if((ldapError = sorted_search(HOST_ATTR, server, ldap_get_dn(server, domain_entry), LDAP_SCOPE_ONELEVEL, HOST_OBJTYPE, NULL, 0, &host_result)) != LDAP_SUCCESS) { rc = -1; goto bail; } for(host_entry = ldap_first_entry(server, host_result); host_entry != NULL; host_entry = ldap_next_entry(server, host_entry)) { if(!within_view(view_list, ldap_get_dn(server, host_entry))) continue; if((vals = util_ldap_get_values(server, host_entry, HOST_ATTR)) != NULL) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_HOST_IMAGE), vals[0]); util_ldap_value_free(vals); } else { rc = -1; goto bail; } /* SERVER GROUP */ if((ldapError = sorted_search(SERVERGROUP_ATTR, server, ldap_get_dn(server, host_entry), LDAP_SCOPE_ONELEVEL, SERVERGROUP_OBJTYPE, NULL, 0, &servergroup_result)) != LDAP_SUCCESS) { rc = -1; goto bail; } first_servergroup = 1; for(servergroup_entry = ldap_first_entry(server, servergroup_result); servergroup_entry != NULL; servergroup_entry = ldap_next_entry(server, servergroup_entry)) { if(!within_view(view_list, ldap_get_dn(server, servergroup_entry))) continue; legacy = 0; if((vals = util_ldap_get_values(server, servergroup_entry, "objectclass")) != NULL) { int count=0; while(vals[count]) { if(!strcasecmp(vals[count], "nslegacyadmingroup")) { legacy = 1; break; } count++; } util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, servergroup_entry, SERVERGROUP_ATTR)) != NULL) { if(first_servergroup) { first_servergroup = 0; } fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_GROUP_IMAGE), vals[0]); util_ldap_value_free(vals); } else { rc = -1; goto bail; } /* ISIE */ if((ldapError = sorted_search(ISIE_PRODNAME_ATTR, server, ldap_get_dn(server, servergroup_entry), LDAP_SCOPE_ONELEVEL, ISIE_OBJTYPE, NULL, 0, &isie_result)) != LDAP_SUCCESS) { rc = -1; goto bail; } for(isie_entry = ldap_first_entry(server, isie_result); isie_entry != NULL; isie_entry = ldap_next_entry(server, isie_entry)) { if(!within_view(view_list, ldap_get_dn(server, isie_entry))) continue; if((vals = util_ldap_get_values(server, isie_entry, ISIE_PRODNAME_ATTR)) != NULL) { char *img; char *version; if(legacy) { img = strdup("oldservic.gif"); } else { if(strstr(ldap_get_dn(server, isie_entry), "Administration")) img = strdup("adminics.gif"); else if(strstr(ldap_get_dn(server, isie_entry), "Directory")) img = strdup("directorysmall.gif"); else if(strstr(ldap_get_dn(server, isie_entry), "Messaging")) img = strdup("messagingic.gif"); else if(strstr(ldap_get_dn(server, isie_entry), "Enterprise")) img = strdup("enterpriseic.gif"); else if(strstr(ldap_get_dn(server, isie_entry), "Certificate")) img = strdup("cert16.gif"); else img = strdup("oldservic.gif"); } if((vals2 = util_ldap_get_values(server, isie_entry, ISIE_PRODVER_ATTR))) { version = (char *)malloc(4+strlen(vals2[0])); sprintf(version, " %s", vals2[0]); } else { version = strdup(""); } fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_IMAGE), img, vals[0], version); free(img); free(version); util_ldap_value_free(vals); util_ldap_value_free(vals2); } else { rc = -1; goto bail; } /* SIE */ if((ldapError = sorted_search(SIE_SERVERID_ATTR, server, ldap_get_dn(server, isie_entry), LDAP_SCOPE_ONELEVEL, SIE_OBJTYPE, NULL, 0, &sie_result)) != LDAP_SUCCESS) { rc = -1; goto bail; } for(sie_entry = ldap_first_entry(server, sie_result); sie_entry != NULL; sie_entry = ldap_next_entry(server, sie_entry)) { if(!within_view(view_list, ldap_get_dn(server, sie_entry))) continue; if(view) PR_snprintf(viewparam, sizeof(viewparam), "&view=%s", view); if((vals = util_ldap_get_values(server, sie_entry, SIE_SERVERID_ATTR)) != NULL) { char *admin_url; char *server_host; int *server_port; int running = 0; char *href = NULL; char *info_link; char *log_link; if(legacy) { /* show server id, link to 3.x Admin Server page and move on */ if((vals2 = util_ldap_get_values(server, sie_entry, ADMIN_LEGACY_URL)) != NULL) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_LEGACY_SERVER_ID), vals[0], vals2[0] ); util_ldap_value_free(vals2); } util_ldap_value_free(vals); continue; } if(!(admin_url = get_admin_url(server, ldap_get_dn(server, sie_entry)))) continue; if(!get_host_and_port(server, ldap_get_dn(server, sie_entry), sie_entry, &server_host, &server_port)) continue; fprintf(stdout, getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_ID), vals[0]); /* directories to pass info log CGI based on product */ if(strstr(ldap_get_dn(server, sie_entry), "Administration")) { char *dn_escaped = htmladmin_strdup_escaped(ldap_get_dn(server, sie_entry)); char *val_escaped = htmladmin_strdup_escaped(vals[0]); running = server_status(server_host, server_port[0]); if(running == 1) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_ENTRY), dn_escaped, view ? viewparam : ""); } info_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ADMIN_INFO_LINK), admin_url, dn_escaped); log_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ADMIN_LOG_LINK), admin_url, val_escaped); fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_STATUS), info_link, log_link, (running == 1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_ON) : ((running == -1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_UNKNOWN) : getResourceString(DBT_OUTPUT_TOPOLOGY_OFF)), (running == 1) ? href : ""); free((void *)dn_escaped); free((void *)val_escaped); if (running == 1) { PR_smprintf_free((char *)href); href = NULL; } PR_smprintf_free((char *)info_link); PR_smprintf_free((char *)log_link); } else if(strstr(ldap_get_dn(server, sie_entry), "Directory")) { /* * Directory Server - local config file. * Can't figure out directories from here so pass in the server id and have the CGI guess */ char *repl_link; char *dn_escaped = htmladmin_strdup_escaped(ldap_get_dn(server, sie_entry)); char *val_escaped = htmladmin_strdup_escaped(vals[0]); char *host_escaped = htmladmin_strdup_escaped(host); running = server_status(server_host, server_port[0]); if(running == 1) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_RUNNING), dn_escaped, view ? viewparam : ""); } else if(running == 0) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_SERVER_STOP), dn_escaped, view ? viewparam : ""); } info_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_DIRECTORY_INFO_LINK), admin_url, dn_escaped); log_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_DIRECTORY_LOG_LINK), admin_url, val_escaped); repl_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_DIRECTORY_REPL_LINK), admin_url, host_escaped, server_port[0], admin_url); fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_STATUS_WITH_REPL), repl_link, info_link, log_link, (running == 1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_ON) : ((running == 0) ? getResourceString(DBT_OUTPUT_TOPOLOGY_OFF) : getResourceString(DBT_OUTPUT_TOPOLOGY_UNKNOWN)), (running == 1 || running == 0) ? href : ""); free((void *)dn_escaped); free((void *)val_escaped); free((void *)host_escaped); if (href) { PR_smprintf_free((char *)href); } PR_smprintf_free((char *)info_link); PR_smprintf_free((char *)log_link); PR_smprintf_free((char *)repl_link); } else if(strstr(ldap_get_dn(server, sie_entry), "Enterprise")) { /* * Enterprise Server - local config file. * Can't figure out directories from here so pass in the server id and have the CGI guess */ char *dn_escaped = htmladmin_strdup_escaped(ldap_get_dn(server, sie_entry)); char *val_escaped = htmladmin_strdup_escaped(vals[0]); running = server_status(server_host, server_port[0]); if(running == 1) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ES_ON), dn_escaped, view ? viewparam : ""); } else if(running == 0) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ES_OFF), dn_escaped, view ? viewparam : ""); } info_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ES_INFO_LINK), admin_url, dn_escaped); log_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_ES_LOG_LINK), admin_url, val_escaped); fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_STATUS), info_link, log_link, (running == 1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_ON) : ((running == -1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_UNKNOWN) : getResourceString(DBT_OUTPUT_TOPOLOGY_OFF)), (running == 1) ? href : ""); free((void *)dn_escaped); free((void *)val_escaped); PR_smprintf_free((char *)href); PR_smprintf_free((char *)info_link); PR_smprintf_free((char *)log_link); } else if(strstr(ldap_get_dn(server, sie_entry), "Certificate")) { /* * Certificate Server - local config file. * Can't figure out directories from here so pass in the server id and have the CGI guess */ char *dn_escaped = htmladmin_strdup_escaped(ldap_get_dn(server, sie_entry)); char *val_escaped = htmladmin_strdup_escaped(vals[0]); running = server_status(server_host, server_port[0]); if(running == 1) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_CMS_ON), dn_escaped, view ? viewparam : ""); } else if(running == 0) { href = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_CMS_OFF), dn_escaped, view ? viewparam : ""); } info_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_CMS_INFO_LINK), admin_url, dn_escaped); log_link = PR_smprintf(getResourceString(DBT_OUTPUT_TOPOLOGY_CMS_LOG_LINK), admin_url, val_escaped); fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_TOPOLOGY_STATUS), info_link, log_link, (running == 1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_ON) : ((running == -1) ? getResourceString(DBT_OUTPUT_TOPOLOGY_UNKNOWN) : getResourceString(DBT_OUTPUT_TOPOLOGY_OFF)), (running == 1) ? href : ""); free((void *)dn_escaped); free((void *)val_escaped); PR_smprintf_free((char *)href); PR_smprintf_free((char *)info_link); PR_smprintf_free((char *)log_link); } fprintf(stdout, "%s", getResourceString(DBT_OUTPUT_TOPOLOGY_TABLE_FOOTER)); util_ldap_value_free(vals); } else { rc = -1; goto bail; } } /* SIE LOOP */ } /* ISIE LOOP */ } /* SERVER GROUP LOOP */ } /* HOST LOOP */ } /* DOMAIN LOOP */ fprintf(stdout, "\n"); bail: for (i=0; view_list && view_list[i]; i++) { free((void *)view_list[i]); } free((void *)view_list); return rc; } /* output_topology */ void start_server(char *admin_url, char *binddn, char *bindpw, char *serverid, char *service, AdmldapInfo ldapInfo) { PRFileDesc *sockd; char *admin_host = NULL; char *admin_port = NULL; char *buf = strdup(admin_url); char *request = NULL; char *cgi_result; int errorcode; bufstruct *nbuf; unsigned char *tmp, *auth; nbuf = (bufstruct *) new_buffer(NBUF_SIZE); tmp = (unsigned char *)PR_smprintf("%s:%s", binddn, bindpw); auth = (unsigned char *)malloc(strlen((char *)tmp)*2+1); do_uuencode(tmp, auth, strlen((char *)tmp)); PR_smprintf_free((char *)tmp); if(strstr(admin_url, "https")) { admin_host = strtok(buf+8, ":"); admin_port = strtok(NULL, "\0"); } else { admin_host = strtok(buf+7, ":"); admin_port = strtok(NULL, "\0"); } if(service) { /* start a messaging request */ request = PR_smprintf(getResourceString(DBT_START_SERVER_MESSAGING), serverid, service, (char *)auth); } else { if(!strncmp(serverid, "cert-", 5)) { int content_length; char *serverid_trimmed_escaped = htmladmin_strdup_escaped(&(serverid[5])); content_length = strlen("instanceID=") + strlen(serverid) - 5; /* minus "cert-" */ /* start a CMS server - why the heck does it need all these parameters ?!?! */ request = PR_smprintf(getResourceString(DBT_START_SERVER_CMS), serverid, admin_host, atoi(admin_port), (char *)auth, content_length, serverid_trimmed_escaped); free((void *)serverid_trimmed_escaped); } else { request = PR_smprintf(getResourceString(DBT_START_SERVER_AS), serverid, (char *)auth); } } if(strstr(admin_url, "https")) { sockd = make_http_request("https", admin_host, atoi(admin_port), request, get_cgi_timeout_rate(ldapInfo), &errorcode); } else { sockd = make_http_request("http", admin_host, atoi(admin_port), request, get_cgi_timeout_rate(ldapInfo), &errorcode); } if (sockd == NULL) { goto bail; } if (parse_http_header(sockd, nbuf, "Administrator") < 0) { goto bail; } while( (cgi_result = get_line_from_fd(sockd, nbuf)) != (char *) NULL) { } bail: free((void *)auth); PR_smprintf_free((char *)request); return; } void stop_server(char *admin_url, char *binddn, char *bindpw, char *serverid, char *service, AdmldapInfo ldapInfo) { PRFileDesc *sockd; char *admin_host = NULL; char *admin_port = NULL; char *buf = strdup(admin_url); char *request = NULL; char *cgi_result; int errorcode; bufstruct *nbuf; unsigned char *tmp, *auth; nbuf = (bufstruct *) new_buffer(NBUF_SIZE); tmp = (unsigned char *)PR_smprintf("%s:%s", binddn, bindpw); auth = (unsigned char *)malloc(strlen((char *)tmp)*2+1); do_uuencode(tmp, auth, strlen((char *)tmp)); PR_smprintf_free((char *)tmp); if(strstr(admin_url, "https")) { admin_host = strtok(buf+8, ":"); admin_port = strtok(NULL, "\0"); } else { admin_host = strtok(buf+7, ":"); admin_port = strtok(NULL, "\0"); } if(service) { /* stop a messaging service */ request = PR_smprintf(getResourceString(DBT_STOP_SERVER_MESSAGING), serverid, service, (char *)auth); } else { if(!strncmp(serverid, "cert-", 5)) { int content_length; char *serverid_trimmed_escaped = htmladmin_strdup_escaped(&(serverid[5])); content_length = strlen("instanceID=") + strlen(serverid) - 5; /* minus "cert-" */ /* stop a CMS server - why the heck does it need all these parameters ?!?! */ request = PR_smprintf(getResourceString(DBT_STOP_SERVER_CMS), serverid, admin_host, atoi(admin_port), (char *)auth, content_length, serverid_trimmed_escaped); free((void *)serverid_trimmed_escaped); } else { request = PR_smprintf(getResourceString(DBT_STOP_SERVER_AS), serverid, (char *)auth); } } if(strstr(admin_url, "https")) { sockd = make_http_request("https", admin_host, atoi(admin_port), request, get_cgi_timeout_rate(ldapInfo), &errorcode); } else { sockd = make_http_request("http", admin_host, atoi(admin_port), request, get_cgi_timeout_rate(ldapInfo), &errorcode); } if (sockd == NULL) { goto bail; } if (parse_http_header(sockd, nbuf, "Administrator") < 0) { goto bail; } while( (cgi_result = get_line_from_fd(sockd, nbuf)) != (char *) NULL) { } bail: PR_smprintf_free((char *)request); free((void *)auth); return; } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); char *m; char *operation; char *object; char *view; char viewparam[BIG_LINE]; char *qs=getenv("QUERY_STRING"); char *lang=getenv("HTTP_ACCEPT_LANGUAGE"); char line[BIG_LINE]; AdmldapInfo ldapInfo; char *binddn; char *bindpw; int rv; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); (void)_ai; /* get rid of unused variable warning */ i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); acceptLanguage = "en"; if (lang) acceptLanguage = strdup(lang); m = getenv("REQUEST_METHOD"); fprintf(stdout, "%s", getResourceString(DBT_MAIN_CONTENT_TYPE)); if(m && !strcmp(m, "GET")) { get_begin(qs); operation = get_cgi_var("op", NULL, NULL); object = get_cgi_var("obj", NULL, NULL); view = get_cgi_var("view", NULL, NULL); if(view) PR_snprintf(viewparam, sizeof(viewparam), "&view=%s", view); /* In all cases, get the custom view. */ fprintf(stdout, getResourceString(DBT_MAIN_PAGE_HEADER), CAPBRAND); if(operation && !strcmp(operation, "index")) { /* * Load the frames. */ fprintf(stdout, "%s", getResourceString(DBT_MAIN_FRAME_HEADER)); fprintf(stdout, "%s", view ? viewparam : ""); fprintf(stdout, "%s", getResourceString(DBT_MAIN_FRAME_FOOTER)); } else if(operation && !strcmp(operation, "empty")) { /* Message frame */ fprintf(stdout, "%s", getResourceString(DBT_MAIN_MESSAGE_FRAME)); } else if(operation && !strcmp(operation, "topframepaint")) { FILE *html = open_html_file(MY_PAGE); while(next_html_line(html, line)) { if(parse_line(line, NULL)) { fputs(line, stdout); } } } else if(operation && !strcmp(operation, "framepaint")) { fprintf(stdout, "%s", getResourceString(DBT_MAIN_FRAMESET_HEADER)); fprintf(stdout, "%s", view ? viewparam : ""); fprintf(stdout, "%s", getResourceString(DBT_MAIN_FRAMESET_BODY)); fprintf(stdout, "%s", view ? viewparam : ""); fprintf(stdout, "%s", getResourceString(DBT_MAIN_FRAMESET_FOOTER)); } else if(operation && !strcmp(operation, "viewselect")) { /* * Load the custom view frame. */ LDAP *server; char **selections = NULL; int i; int found; char *securitydir; ldapInfo = get_adm_ldapinfo(configdir, secdir); if(!get_bindinfo(&binddn, &bindpw)) exit(0); securitydir = admldapGetSecurityDir(ldapInfo); server = server_bind(securitydir, admldapGetHost(ldapInfo), admldapGetPort(ldapInfo), admldapGetSecurity(ldapInfo), binddn, bindpw); PL_strfree(securitydir); if(server) selections = get_all_users_views(server, binddn, ldapInfo); fprintf(stdout, "%s", getResourceString(DBT_MAIN_BODY_HEADER)); found=0; i=0; while(selections && selections[i] != NULL) { fprintf(stdout, (const char*)getResourceString(DBT_MAIN_OPTION_VALUE), /*"\n",*/ selections[i], (view && !strcmp(selections[i], view)) ? getResourceString(DBT_MAIN_SELECTED) : "", selections[i]); if(view && (!strcmp(selections[i], view))) found=1; i++; } /* default view */ fprintf(stdout, (const char*)getResourceString(DBT_MAIN_DEFAULT_VIEW), (!view || !found) ? getResourceString(DBT_MAIN_SELECTED) : ""); fprintf(stdout, "%s", getResourceString(DBT_MAIN_BODY_FOOTER)); } else { /* * Load the topology. */ ldapInfo = get_adm_ldapinfo(configdir, secdir); /* Fixing html warning: is already emitted. fprintf(stdout, getResourceString(DBT_MAIN_TOPOLOGY_HEADER), get_topology_refresh_rate(ldapInfo), view ? viewparam : ""); */ if(!get_bindinfo(&binddn, &bindpw)) exit(0); if(operation && !strcmp(operation, "serveractivate")) { /* first turn on or off the server, then load the topology. */ int rv; LDAP *server; LDAPMessage *sie_entry, *result; int ldapError; char *host; int *ports, active_port; char *service = NULL; char *admin_url; char **serverid; char *sie; int count, max_count; char *securitydir; if (object) { sie = strdup(object); } else { sie = NULL; goto output_topology; } securitydir = admldapGetSecurityDir(ldapInfo); server = server_bind(securitydir, admldapGetHost(ldapInfo), admldapGetPort(ldapInfo), admldapGetSecurity(ldapInfo), binddn, bindpw); PL_strfree(securitydir); if(!server) goto output_topology; if((ldapError = ldap_search_ext_s(server, sie, LDAP_SCOPE_BASE, SIE_OBJTYPE, NULL, 0, NULL, NULL, NULL, -1, &result)) != LDAP_SUCCESS) goto output_topology; sie_entry = ldap_first_entry(server, result); if((serverid = util_ldap_get_values(server, sie_entry, SIE_SERVERID_ATTR)) == NULL) goto output_topology; if(!get_host_and_port(server, sie, sie_entry, &host, &ports)) goto output_topology; active_port = ports[0]; if((admin_url = get_admin_url(server, sie)) == NULL) goto output_topology; count=0; max_count=get_cgi_timeout_rate(ldapInfo)/SERVER_PING_RATE; rv = server_status(host, active_port); if(rv == 1) { /* Server's running, shut it down */ stop_server(admin_url, binddn, bindpw, serverid[0], service, ldapInfo); while((server_status(host, active_port) == 1) && (count < max_count)) { sleep(SERVER_PING_RATE); count++; } if(count == max_count) { fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_HEADER)); fprintf(stdout, "%s", getResourceString(DBT_STOP_SERVER_ERROR)); fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_FOOTER)); fprintf(stdout, "%s", getResourceString(DBT_MAIN_PAGE_FOOTER)); return 1; } } else if((rv == 0) && (!strstr(sie, "Administration"))) { /* Server's down, start it up (except for Admin Servers) */ start_server(admin_url, binddn, bindpw, serverid[0], service, ldapInfo); while((server_status(host, active_port) == 0) && (count < max_count)) { sleep(SERVER_PING_RATE); count++; } if(count == max_count) { fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_HEADER)); fprintf(stdout, "%s", getResourceString(DBT_START_SERVER_ERROR)); fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_FOOTER)); fprintf(stdout, "%s", getResourceString(DBT_MAIN_PAGE_FOOTER)); return 1; } } /* if unknown, do nothing */ } /* turn server on/off */ output_topology: fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_HEADER)); rv = output_topology(ldapInfo, binddn, bindpw, view); if(rv == -1) { fprintf(stdout, "%s", getResourceString(DBT_MAIN_LDAP_ERROR)); } fprintf(stdout, "%s", getResourceString(DBT_MAIN_TOPOLOGY_BODY_FOOTER)); } fprintf(stdout, "%s", getResourceString(DBT_MAIN_PAGE_FOOTER)); } return 0; } 389-admin-1.1.35/admserv/cgi-src40/htmladmin.properties000066400000000000000000000300621220472121400224350ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { htmladmin1 { "Are you sure you want to stop the server?" } htmladmin2 { "Once the Administration Server is stopped,\\nit cannot be started remotely.\\n\\nAre you sure you want to stop the server?" } htmladmin3 { "Stopping the Directory Server may impact\\nother servers that depend on it.\\n\\nAre you sure you want to stop the server?" } //#/* html resource string - main()*/ htmladmin10 { "Content-type: text/html;charset=utf-8\n\n" } htmladmin11 { "\n\n\n\n%s Administration Express\n\n" } htmladmin12 { "\n\n \n\n\n\n\n\"" } htmladmin14 { "\n\n" } htmladmin15 { "\n\n\n\n \n \n" } htmladmin18 { "\n

\n\n\n\n\n
\n  View: \n\n\n\n
\n
\n\n" } htmladmin23 { "\n\n\n" } htmladmin24 { "imap" } htmladmin25 { "pop" } htmladmin26 { "smtp" } //#htmladmin27 htmladmin28 { "\n \n" } htmladmin29 { "

LDAP Error

\n

Either the Configuration Directory is down/unreachable, authentication to the Directory is denied, or the Directory is missing configuration data." } htmladmin30 { "\n" } htmladmin31 { "\n" } //#/* html resource string - stop_server()*/ htmladmin40 { "GET /%s/tasks/operation/cgi_service?cmd=stop&object=|service|%s HTTP/1.0\nAuthorization: Basic %s\n\n" } htmladmin41 { "POST /%s/tasks/operation/Stop HTTP/1.0\nHost: %s:%d\nAuthorization: Basic %s\nContent-length: %d\nContent-Type: application/x-www-form-urlencoded\n\ninstanceID=%s\n\n" } htmladmin42 { "GET /%s/tasks/operation/Stop HTTP/1.0\nAuthorization: Basic %s\n\n" } htmladmin43 { "

Server Error

\n

The server could not be stopped. Please reload the page and check the error logs for more details." } //#/* html resource string - start_server()*/ htmladmin50 { "GET /%s/tasks/operation/cgi_service?cmd=start&object=|service|%s HTTP/1.0\nAuthorization: Basic %s\n\n" } htmladmin51 { "POST /%s/tasks/operation/Start HTTP/1.0\nHost: %s:%d\nAuthorization: Basic %s\nContent-length: %d\nContent-Type: application/x-www-form-urlencoded\n\ninstanceID=%s\n\n" } htmladmin52 { "GET /%s/tasks/operation/Start HTTP/1.0\nAuthorization: Basic %s\n\n" } htmladmin53 { "

Server Error

\n

The server could not be started. Please reload the page and check the error logs for more details." } //#/* html resource string - output_topology() */ htmladmin60 { "\n\n" } htmladmin61 { "\n" } htmladmin62 { "\n\n\n\n" } htmladmin63 { "\n\n\n\n" } htmladmin64 { "\n\n\n\n" } htmladmin65 { "\n\n\n\n" } htmladmin66 { "\n\n\n\n\n\"" } htmladmin67 { "\n\n\n\n\n\n\n\n" } viewdata21 { "\n\n\n\n" } viewdata22 { "\n\n\n\n" } viewdata23 { "\n\n\n\n" } viewdata24 { "\n\n\n\n" } viewdata25 { "\n\n\n\n" } viewdata26 { "\n\n\n\n" } viewdata27 { "\n\n\n\n" } viewdata28 { "\n\n\n\n" } viewdata29 { "\n\n\n\n" } viewdata30 { "\n\n\n\n" } viewdata31 { "
 %s
 %s
 %s
 %s%s
\n* %s Server Manager
\n* %s\n

\n\n" } htmladmin68 { " " } htmladmin69 { " " } htmladmin70 { "Server Info |\n" } htmladmin71 { "Logs |\n" } htmladmin72 { "%s%s Status=%s%s\n\n" } htmladmin73 { "On" } htmladmin74 { "Off" } htmladmin75 { "Unknown" } htmladmin76 { " " } htmladmin77 { " " } htmladmin78 { "Server Info |\n" } htmladmin79 { "Logs |\n" } htmladmin80 { "Server Info |\n" } htmladmin81 { "Logs\n" } htmladmin82 { "%s%s\n\n" } htmladmin83 { "

\n\n\n\n\n\n\n" } htmladmin84 { " " } htmladmin85 { " " } htmladmin86 { " Status=%s%s\n\n" } htmladmin87 { " " } htmladmin88 { " " } htmladmin89 { "Server Info |\n" } htmladmin90 { "Logs |\n" } htmladmin91 { " " } htmladmin92 { " " } htmladmin93 { "Server Info |\n" } htmladmin94 { "Logs |\n" } htmladmin95 { " " } htmladmin96 { " " } htmladmin97 { "\n" } htmladmin98 { "\n" } htmladmin99 { "

\n\n\n\n" } htmladmin100 { "%s%s%s Status=%s%s\n\n" } htmladmin101 { "Replication Status |\n" } } 389-admin-1.1.35/admserv/cgi-src40/library.html.in000066400000000000000000000034661220472121400213110ustar00rootroot00000000000000@capbrand@ Bookshelf @capbrand@ Bookshelf

The following is a list of the online documentation for all installed @capbrand@ servers.

\n\n\n\n\n
*%s
\n
Server Info |Logs |
 
389-admin-1.1.35/admserv/cgi-src40/migrateConfig.c000066400000000000000000000302131220472121400212620ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Description (config.c) * * This module contains routines used by administration CGI * programs to set/get the attribute(s) of Admin server * */ #ifdef XP_UNIX #include #include #include #include #endif #ifdef XP_UNIX # define STRNCASECMP strncasecmp # define STRCASECMP strcasecmp # define STRNCMP strncmp # define STRDUP strdup #else /* XP_WIN32 */ # define STRNCASECMP _strnicmp # define STRCASECMP _stricmp # define STRNCMP strncmp # define STRDUP strdup #endif #include #include #include #include "plstr.h" #include "libadminutil/resource.h" #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadminutil/resource.h" #include "config.h" static char msgbuf[BUFSIZ]; /* ok - not threaded code */ /* properties file name = "config.properties" */ #define RESOURCE_FILE "migrateconfig" #define resource_key(a,b) a b #define DBT_NO_METHOD resource_key(RESOURCE_FILE, "1") #define DBT_UNKNOWN_METHOD resource_key(RESOURCE_FILE, "2") #define DBT_NO_QUERY_STRING resource_key(RESOURCE_FILE, "3") #define DBT_ERROR_OPEN_FILE resource_key(RESOURCE_FILE, "4") #define DBT_ERROR_READ_FILE resource_key(RESOURCE_FILE, "5") #define DBT_ERROR_OPEN_DIR resource_key(RESOURCE_FILE, "6") #define DBT_NO_OLD_SERVER_ROOT resource_key(RESOURCE_FILE, "7") #define DBT_NO_SERVER_FOUND resource_key(RESOURCE_FILE, "8") #define DBT_NO_USER_NAME resource_key(RESOURCE_FILE, "9") #define DBT_NO_USER_DN resource_key(RESOURCE_FILE, "10") #define DBT_PSET_CREATE_ERROR resource_key(RESOURCE_FILE, "11") #define DBT_PSET_SET_ERROR resource_key(RESOURCE_FILE, "12") #define DBT_PSET_ADD_ERROR resource_key(RESOURCE_FILE, "13") #define DBT_SSL_INIT_ERROR resource_key(RESOURCE_FILE, "14") #define CONVERT_NUMBER 8 char* getAttributeName(char* oldName) { if (!PL_strcasecmp(oldName, "port")) return "configuration.nsServerPort"; else if (!PL_strcasecmp(oldName, "user")) return "configuration.nsSuiteSpotUser"; else if (!PL_strcasecmp(oldName, "servername")) return "serverhostname"; else if (!PL_strcasecmp(oldName, "hosts")) return "configuration.nsAdminAccesshosts"; else if (!PL_strcasecmp(oldName, "addresses")) return "configuration.nsAdminAccessaddresses"; else if (!PL_strcasecmp(oldName, "CGIWaitPid")) return "configuration.nsAdminCGIWaitPid"; else if (!PL_strcasecmp(oldName, "DefaultLanguage")) return "configuration.nsdefaultacceptlanguage."; else return NULL; } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); FILE *fstream; char fileName[256]; int ln; int stop; int t; char *oldSR = 0; char error_info[128]; PsetHndl pset; char *method; int rv, cnt, i, j, x, errorCode; char *url; int err; int *errp = &err; char *username = 0; char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; char **inputs = 0; char *qs = 0; char *nameptr, *valptr, *val; int setFlag = 0, getFlag = 0, forceSetFlag = 0; Resource *i18nResource = NULL; char *acceptLanguage = "en", *lang=getenv("HTTP_ACCEPT_LANGUAGE"); AttributeList resultList, updateList=NULL, addList=NULL; AttrNameList nl; AttributePtr nv; char buf[1024], cpcmd[1024], *tmpptr; const char *errMsg = NULL; PRFileInfo fileInfo; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); #if 0 int waitforever = 1; while (waitforever); #endif i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (lang) acceptLanguage = strdup(lang); memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); /* Get new port number */ if (!method || !*method) { /* non UI CGI */ if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_METHOD, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(SYSTEM_ERROR, errMsg, NULL, NULL); else rpt_err(SYSTEM_ERROR, "No method is specified", NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_QUERY_STRING, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(INCORRECT_USAGE, errMsg, NULL, NULL); else rpt_err(INCORRECT_USAGE, "NO QUERY_STRING DATA", NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_UNKNOWN_METHOD, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) PR_snprintf(error_info, sizeof(error_info), errMsg, method); else PR_snprintf(error_info, sizeof(error_info), "Unknown Method (%s)", method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } /* Get UserDN and User Password */ rv = ADM_GetUserDNString(&err, &binddn); if (rv < 0 || !binddn || !*binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_USER_NAME, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(ELEM_MISSING, errMsg, NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER NAME", NULL, NULL); } else { /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(NULL, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_USER_DN, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(ELEM_MISSING,errMsg, NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER DN!", NULL, NULL); } else { binddn = NULL; bindpw = NULL; } } else { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_USER_DN, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(ELEM_MISSING, errMsg, NULL, NULL); else rpt_err(ELEM_MISSING, "NO USER DN!", NULL, NULL); } } } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_SSL_INIT_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(APP_ERROR, errMsg, NULL, NULL); else rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } /* Initialize the pset */ pset = psetCreateSSL("admin-serv", /* configRoot */ configdir, /* userDN */ binddn, /* passwd */ bindpw, /* errorcode */ &rv); if (!pset) { PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s", rv, psetErrorString(rv, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_PSET_CREATE_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(APP_ERROR, errMsg, NULL, error_info); else rpt_err(APP_ERROR, "PSET Creation Failed", NULL, error_info); } /* Process the input */ inputs = get_input_ptr(); oldSR = get_cgi_var("oldServerRoot", NULL, NULL); if (!oldSR) { if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_NO_OLD_SERVER_ROOT, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(INCORRECT_USAGE, errMsg, NULL, NULL); else rpt_err(INCORRECT_USAGE, "No old server root specified", NULL, NULL); } PR_snprintf(fileName, sizeof(fileName), "%s/admin-serv/config/ns-admin.conf", oldSR); if(!(fstream = fopen(fileName, "r"))) { psetDelete(pset); if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_ERROR_OPEN_FILE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) PR_snprintf(error_info, sizeof(error_info), errMsg, fileName); else PR_snprintf(error_info, sizeof(error_info), "Error open file: %s", fileName); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } updateList = createAttributeList(CONVERT_NUMBER); if (forceSetFlag) addList = createAttributeList(CONVERT_NUMBER); i = 0; j = 0; stop=0; ln=0; while(!stop) { ++ln; switch( (t = admutil_getline(fstream, 1024, ln, buf))) { case -1: fclose(fstream); psetDelete(pset); if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_ERROR_OPEN_FILE, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) PR_snprintf(error_info, sizeof(error_info), errMsg, fileName); else PR_snprintf(error_info, sizeof(error_info), "Error reading file: %s", fileName); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); return 0; case 1: fclose(fstream); stop=1; break; default: valptr = strchr(buf, ' '); if (valptr) { *valptr = '\0'; valptr++; nameptr = getAttributeName(buf); if (nameptr) { errorCode = PSET_OP_OK; val = psetGetAttrSingleValue(pset, nameptr, &errorCode); if (errorCode) { if (forceSetFlag) { addSingleValueAttribute(addList, j++, nameptr, valptr); } else j++; } else { addSingleValueAttribute(updateList, i++, nameptr, valptr); } if (!PL_strcmp(nameptr, "configuration.nsServerPort")) { val = psetGetAttrSingleValue(pset, "adminurl", &errorCode); if (val) { char urlBuf[256]; char *tmpptr; PL_strncpyz(urlBuf, val, sizeof(urlBuf)); tmpptr = PL_strrchr(urlBuf, ':'); if (tmpptr) { tmpptr++; *tmpptr = '\0'; PL_strcatn(urlBuf, sizeof(urlBuf), valptr); addSingleValueAttribute(updateList, i++, "adminurl", urlBuf); } } } } } } } errorCode = PSET_OP_OK; if (i) errorCode = psetSetAttrList(pset, updateList); if (errorCode) { psetDelete(pset); PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s\n", errorCode, psetErrorString(errorCode, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_PSET_SET_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(APP_ERROR, errMsg, NULL, error_info); else rpt_err(APP_ERROR, "PSET Set Failed", NULL, error_info); } if (j) { for (i=0; i < j; i++) { errorCode = psetAddAttribute(pset, addList[i]->attrName, addList[i]->attrVal); if (errorCode) { psetDelete(pset); PR_snprintf(error_info, sizeof(error_info), "PSET_ERROR_NUMBER: %d\nPSET_ERROR_INFO: %s\n", errorCode, psetErrorString(errorCode, NULL, msgbuf, sizeof(msgbuf), NULL)); if (i18nResource && (errMsg = res_getstring(i18nResource, DBT_PSET_ADD_ERROR, acceptLanguage, msgbuf, sizeof(msgbuf), NULL))) rpt_err(APP_ERROR, errMsg, NULL, error_info); else rpt_err(APP_ERROR, "PSET Add Failed", NULL, error_info); } } } rpt_success(NULL); if (updateList) deleteAttributeList(updateList); if (addList) deleteAttributeList(addList); psetDelete(pset); if (i18nResource) res_destroy_resource(i18nResource); } 389-admin-1.1.35/admserv/cgi-src40/migrateConfig.properties000066400000000000000000000030561220472121400232410ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { migrateConfig1 { "No method is specified" } migrateConfig2 { "Unknown Method (%s)" } migrateConfig3 { "No data in QUERY_STRING environment variable" } migrateConfig4 { "Error open file: %s" } migrateConfig5 { "Error readiong file: %s" } migrateConfig6 { "Error open directory: %s" } migrateConfig7 { "No old server root specified" } migrateConfig8 { "No server found" } migrateConfig9 { "No user name is specified" } migrateConfig10 { "No user distinguished name is specified" } migrateConfig11 { "PSET Creation Failed" } migrateConfig12 { "PSET set operation failed" } migrateConfig13 { "PSET add operation failed" } migrateConfig14 { "SSL related initialization failed" } } 389-admin-1.1.35/admserv/cgi-src40/monreplication.c000066400000000000000000000073421220472121400215360ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * monreplication.c: Generate form for replication monitoring */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "libadminutil/resource.h" #include "libadminutil/distadm.h" #include #include #include #include #include #include #include "libadmin/libadmin.h" #define MY_PAGE "monreplication.html" #define DEF_SIZE "25" /* * i18n conversions defines and function; * properties file = "monreplication.properties" */ #define RESOURCE_FILE "monreplication" #define resource_key(a,b) a b #define DBT_REFRESH_URL resource_key(RESOURCE_FILE, "1") #define DBT_REFRESH_INTERVAL resource_key(RESOURCE_FILE, "2") #define DBT_CONFIG_FILE resource_key(RESOURCE_FILE, "3") static char *acceptLanguage = (char*)"en"; static Resource *i18nResource = NULL; char* getResourceString(char *key) { static char msgbuf[BUFSIZ]; /* ok - not threaded code */ return (char *)(res_getstring(i18nResource, key, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); } static void i18nInit() { i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (getenv("HTTP_ACCEPT_LANGUAGE")) { acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); } } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); char *qs = getenv("QUERY_STRING"); char line[BIG_LINE]; FILE *html = open_html_file(MY_PAGE); char *host = NULL; char *port = NULL; char *admurl = NULL; char refreshurl[256] = {'\0'}; char refreshinterval[16]; char configfile[256] = {'\0'}; char *resstr; (void)_ai; /* get rid of unused variable warning */ i18nInit(); fprintf(stdout, "Content-type: text/html;charset=utf-8\n\n"); if(qs) { get_begin(qs); host = get_cgi_var("servhost", NULL, NULL); port = get_cgi_var("servport", NULL, NULL); admurl = get_cgi_var("admurl", NULL, NULL); } if ((resstr = getResourceString(DBT_REFRESH_URL))) { PR_snprintf(refreshurl, sizeof(refreshurl), resstr, admurl ? admurl : ""); } if ((resstr = getResourceString(DBT_REFRESH_INTERVAL))) { PR_snprintf(refreshinterval, sizeof(refreshinterval), resstr); } else { PR_snprintf(refreshinterval, sizeof(refreshinterval), "300"); } if ((resstr = getResourceString(DBT_CONFIG_FILE))) { PR_snprintf(configfile, sizeof(configfile), resstr); } while(next_html_line(html, line)) { if(parse_line(line, NULL)) { if(directive_is(line, "SERVHOST")) { output_input("hidden", "servhost", host, NULL); } else if(directive_is(line, "SERVPORT")) { output_input("hidden", "servport", port, NULL); } else if(directive_is(line, "ADMURL")) { output_input("hidden", "admurl", refreshurl, NULL); } else if(directive_is(line, "CONFIGFILE")) { output_input("text", "configfile", configfile, "size=80"); } else if(directive_is(line, "REFRESHINTERVAL")) { output_input("text", "refreshinterval", refreshinterval, NULL); } else fputs(line, stdout); } } return 0; } 389-admin-1.1.35/admserv/cgi-src40/monreplication.properties000066400000000000000000000017061220472121400235060ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { monreplication1 { "%s/admin-serv/tasks/configuration/repl-monitor-cgi.pl" } monreplication2 { "300" } monreplication3 { "" } } 389-admin-1.1.35/admserv/cgi-src40/repl-monitor-cgi.pl.in000077500000000000000000000064241220472121400225030ustar00rootroot00000000000000#!@perlexec@ # # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use CGI; my $query = CGI->new; @ARGV = (); # clear it out if ( $query->url_param('configfile') eq "" ) { my $configfile; if ($ENV{DS_CONFIG_DIR} and -d $ENV{DS_CONFIG_DIR}) { $configfile = "$ENV{DS_CONFIG_DIR}/@instancename@/replmon.conf"; } elsif ("@instconfigdir@" and -d "@instconfigdir@") { $configfile = "@instconfigdir@/replmon.conf"; } push @ARGV, '-f', $configfile; } else { push @ARGV, '-f', $query->url_param('configfile'); } my $refreshinterval = $query->url_param('refreshinterval') ? int($query->url_param('refreshinterval')) : "300"; push @ARGV, '-t', $refreshinterval; if ( $query->url_param('admurl') eq "" ) { my $admurl = "http://"; if ($ENV{HTTPS} and (lc($ENV{HTTPS}) eq "on")) { $admurl = "https://"; } $admurl .= $ENV{HTTP_HOST} . $ENV{SCRIPT_NAME} . "?refreshinterval=$refreshinterval"; push @ARGV, '-u', $admurl; } else { push @ARGV, '-u', $query->url_param('admurl'); } if ( $query->url_param('servhost') ne "" ) { push @ARGV, '-h', $query->url_param('servhost'); } if ( $query->url_param('servport') ne "" ) { push @ARGV, '-p', $query->url_param('servport'); } # Now the real work require "@bindir@/repl-monitor.pl"; 389-admin-1.1.35/admserv/cgi-src40/restartsrv.c000066400000000000000000000212431220472121400207260ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Restart Admin Server * * The CGI supports two commands. The first one is 'restart' which enables * the client to make a restart request. Because the restart does not * take place immediately, the client can poll to detect the actual restart * by issuing the second command 'getpid' and comparing the pid with the one * returned by 'restart' op. * * Restart operation * in: op=restart * out: pid= * * Get PID Operation * in: op=getpid * out: pid= */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include #include #include #include #include #include #ifdef XP_UNIX #include #include "prthread.h" #endif #include "libadminutil/resource.h" #include "libadmin/libadmin.h" #define RESOURCE_FILE "restartsrv" #define resource_key(a,b) a b #define DBT_NO_NEW_PROCESS resource_key(RESOURCE_FILE, "1") #define DBT_RESTART_ACK resource_key(RESOURCE_FILE, "2") #define DBT_CANT_STOP_SRV resource_key(RESOURCE_FILE, "3") static char * get_admserv_pid(); static char * get_pid_file(); #if defined(XP_UNIX) static void restart(char const * line) { int i; int pid; PR_Sleep(5); setsid(); for (i = 0; i < 5; i++) { pid = fork(); switch (pid) { case -1: PR_Sleep(1); continue; case 0: break; default: _exit (0); } break; } if (pid) { fprintf(stderr, "Environment would not permit fork to succeed."); _exit(0); } // if we're here then we're the child of the child and we've // lost our controlling terminal and are disassociated from our // process group which is exactly what we want. system(line); /* now call the script */ } #endif int main(int argc, char *argv[]) { int _ai=ADMUTIL_Init(); char *method = getenv("REQUEST_METHOD"); char error_info[128]; char *qs = 0, *op=0; #ifdef XP_UNIX char line[BIG_LINE]; #endif char msgbuf[BUFSIZ]; char *acceptLanguage = (char*)"en", *lang=getenv((char*)"HTTP_ACCEPT_LANGUAGE"); Resource *i18nResource = NULL; (void)_ai; /* get rid of unused variable warning */ i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (lang) acceptLanguage = strdup(lang); /* GET or POST method */ if (!method || !*method) { /* non UI CGI */ rpt_err(SYSTEM_ERROR, "No method is specified", NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { rpt_err(INCORRECT_USAGE, "NO QUERY_STRING DATA", NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { PR_snprintf(error_info, sizeof(error_info), "Unknown Method (%s)", method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } op=get_cgi_var("op", NULL, NULL); if (op == NULL) { rpt_err(INCORRECT_USAGE, "No operation defined", NULL, NULL); } else if (strcmp(op,"getpid")==0) { rpt_success(NULL); fprintf(stdout, "pid: %s\n", get_admserv_pid()); return 0; } else if (strcmp(op,"restart")!=0) { PR_snprintf(error_info, sizeof(error_info), "Unknown Operation (%s)", op); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } #ifdef XP_UNIX switch(fork()) { case -1: if (i18nResource) rpt_err(SYSTEM_ERROR, res_getstring(i18nResource, DBT_NO_NEW_PROCESS, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); else rpt_err(SYSTEM_ERROR, "Couldn't create a new process to stop admin server", NULL, NULL); break; case 0: #if defined(WITH_SYSTEMD) PL_strncpyz(line, "/bin/systemctl restart " PACKAGE_NAME ".service", sizeof(line)); restart(line); #elif defined(ENABLE_SERVICE) PL_strncpyz(line, "service " PACKAGE_NAME " restart", sizeof(line)); restart(line); #else if (util_find_file_in_paths(line, sizeof(line), "restart-ds-admin", CMDBINDIR, "../..", "")) { restart(line); } #endif exit(0); break; default: /* comment out temporily, should be back later log_change(TO_ADMIN, "Admin server restart on user request"); */ if (i18nResource) rpt_unknown(res_getstring(i18nResource, DBT_RESTART_ACK, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); else rpt_unknown("Admin server should restart on user request"); break; } /* Return current server pid so that restart can be detected */ fprintf(stdout, "pid: %s\n", get_admserv_pid()); fflush(stdout); return 0; #else /* XP_WIN32 */ if (i18nResource) rpt_unknown(res_getstring(i18nResource, DBT_RESTART_ACK, acceptLanguage)); else rpt_unknown("Admin server should restart on user request"); /* Return current server pid so that restart can be detected */ fprintf(stdout, "pid: %s\n", get_admserv_pid()); { // bug 105053 STARTUPINFO sui; PROCESS_INFORMATION pi; sui.cb = sizeof(STARTUPINFO); sui.lpReserved = 0; sui.lpDesktop = NULL; sui.lpTitle = NULL; sui.dwX = 0; sui.dwY = 0; sui.dwXSize = 0; sui.dwYSize = 0; sui.dwXCountChars = 0; sui.dwYCountChars = 0; sui.dwFillAttribute = 0; sui.dwFlags = STARTF_USESHOWWINDOW; sui.wShowWindow = SW_HIDE; sui.cbReserved2 = 0; sui.lpReserved2 = 0; sui.hStdInput = 0; sui.hStdOutput = 0; sui.hStdError = 0; if(CreateProcess(NULL, "NTRestartService.exe", NULL, NULL, FALSE, DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP, NULL, NULL, &sui, &pi) > 0) return 0; // success } /* comment out temporily, should be back later log_change(TO_ADMIN, "Admin server restart on user request"); */ return 1; #endif /* XP_WIN32 */ } /* * Return the current admin server PID. Client need this to detect the actual * restart. For NT, return ADMSERV_PID environment variable. For Unix, get * pid from the log file, as ADMSERV_PID is 1 (parent has exited). */ #ifdef XP_UNIX static char * get_admserv_pid() { char path[BIG_LINE]; char *pidlog = (char*)get_pid_file(); char inbuf[16]; FILE *f; PR_snprintf(path, sizeof(path), "%s", pidlog); f = fopen(path, "r"); if (f==NULL) { rpt_err(SYSTEM_ERROR, "Can not open pidlog file", NULL, NULL); } if(fgets(inbuf, sizeof(inbuf), f) == NULL) { rpt_err(SYSTEM_ERROR, "pidlog file is empty", NULL, NULL); } fclose(f); /* Remove trailing '\n' */ if (inbuf[strlen(inbuf)-1] == '\n') { inbuf[strlen(inbuf)-1] = 0; } return strdup(inbuf); } #else /* WIN NT */ static char * get_admserv_pid() { return getenv("ADMSERV_PID"); } #endif static char * get_pid_file() { FILE *f; static char inbuf[BIG_LINE]; static char filename[BIG_LINE]; static char buf[BIG_LINE]; char * p = NULL; const char *configdir = util_get_conf_dir(); const char *piddir = util_get_pid_dir(); util_find_file_in_paths(filename, sizeof(filename), "console.conf", configdir, "", "admin-serv/config"); f = fopen(filename, "r"); if (f==NULL) { rpt_err(SYSTEM_ERROR, "Can not open file console.conf for reading", NULL, NULL); } while(fgets(inbuf, sizeof(inbuf), f) != NULL) { if (strncasecmp(inbuf,"PidFile",7) == 0) { char *t; p = strtok(inbuf, " "); p = strdup(strtok(NULL, " ")); t = strchr(p, '\n'); if (*t) *t='\0'; } } fclose(f); if (p && *p != '\0') { if (*p == '/') { PR_snprintf(buf, sizeof(buf),"%s",p); } else { util_find_file_in_paths(buf, sizeof(buf), p, piddir, "..", "admin-serv"); } free(p); p = strdup(buf); } return p; } 389-admin-1.1.35/admserv/cgi-src40/restartsrv.properties000066400000000000000000000021111220472121400226710ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { restartsrv1 { "Couldn't create a new process to stop admin server" } restartsrv2 { "Admin server should restart on user request" } restartsrv3 { "Couldn't stop the administration server" } } 389-admin-1.1.35/admserv/cgi-src40/sec-activate.c000066400000000000000000000613731220472121400210670ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * sec-activate.c * * Sets the Admin Server encryption information into DS. * All blame to Adam Prishtina (adam@netscape.com) * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef __cplusplus extern "C" { #endif #include "cert.h" #include "key.h" #include "certdb.h" #include "keyt.h" #include "secport.h" #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadminutil/resource.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/libadmin.h" #ifdef __cplusplus } #endif /* properties file name = "sec-activate.properties" */ #define RESOURCE_FILE "sec-activate" #define resource_key(a,b) a b /* define strings here */ #define DBT_PSET_INIT_NO_USERNAME resource_key(RESOURCE_FILE, "1") #define DBT_PSET_INIT_NO_USERDN resource_key(RESOURCE_FILE, "2") #define DBT_CMDLINE_USAGE resource_key(RESOURCE_FILE, "3") #define DBT_INV_SR resource_key(RESOURCE_FILE, "4") #define DBT_PSET_INIT_FAILURE resource_key(RESOURCE_FILE, "5") #define DBT_ADMSSL_INIT_FAIL resource_key(RESOURCE_FILE, "6") #define DBT_PSET_CREATE_FAIL resource_key(RESOURCE_FILE, "7") #define DBT_CMDLINE_STATUS_USAGE resource_key(RESOURCE_FILE, "8") #define DBT_SUCCESS resource_key(RESOURCE_FILE, "9") #define DBT_CGI_INVALID_ARGS resource_key(RESOURCE_FILE, "10") #define DBT_CGI_MISSING_ARGS resource_key(RESOURCE_FILE, "11") #define DBT_CGI_UNKNOWN_METH resource_key(RESOURCE_FILE, "12") #define DBT_GENERIC_PSET_FAILURE resource_key(RESOURCE_FILE, "13") #define DBT_PSET_ATTR_CREATE resource_key(RESOURCE_FILE, "14") #define DBT_PSET_ATTR_MODIFY resource_key(RESOURCE_FILE, "15") #define DBT_PSET_INV_ATTR resource_key(RESOURCE_FILE, "16") #define DBT_ADMIN_CONF_MOD resource_key(RESOURCE_FILE, "17") static int update_conf(char *configdir, char *file, char *name, char *val, int quoted); Resource *i18nResource; char *acceptLanguage; char* getResourceString(char *key) { return (char *)(res_getstring(i18nResource, key, acceptLanguage, NULL, 0, NULL)); } typedef struct family_input_s family_input; struct family_input_s { char *family_name; char *token_name; char *personality; char *activated; /* "on" or "off" */ struct family_input_s *next; }; /* * set_attribute * Checks if attribute exists. If it does, change the entry. * If it doesn't, create the entry and set it. */ void set_attribute(PsetHndl pset, char *name, char *value) { int rv; if(psetCheckAttribute(pset, name) == PSET_OP_FAIL) { /* create entry */ rv = psetAddSingleValueAttribute(pset, name, value); if(rv != PSET_OP_OK) rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_ATTR_CREATE), NULL); } else { /* modify entry */ rv = psetSetSingleValueAttr(pset, name, value); if(rv != PSET_OP_OK) rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_ATTR_MODIFY), NULL); } } static char * get_cgi_var_must(char * var, char * x, char * y) { char * value; value = get_cgi_var(var, x, y); if (value) { } else { char * scratch = PR_smprintf(getResourceString(DBT_CGI_MISSING_ARGS), var); rpt_err(INCORRECT_USAGE, scratch, 0, 0); PR_smprintf_free(scratch); /* never executed */ } return value; } /* * int get_family_input * Reads and parses cipher family input from front end. * Returns 0 on success, -1 on failure. */ void get_family_input(family_input **family_head) { family_input *family_ptr; char *list_of_families; char *family_name; char *temp; char cgi_var_name[BIG_LINE]; list_of_families = get_cgi_var_must("familyList", "", ""); family_name = PORT_Strtok(list_of_families, ","); while (family_name) { if (*family_head) { family_ptr->next = (family_input *) malloc(sizeof(family_input)); family_ptr = family_ptr->next; } else { *family_head = (family_input *) malloc(sizeof(family_input)); family_ptr = *family_head; } family_ptr->next = NULL; family_ptr->family_name = PORT_Strdup(family_name); PR_snprintf(cgi_var_name, sizeof(cgi_var_name), "%s-token", family_name); temp = get_cgi_var_must(cgi_var_name, "", ""); family_ptr->token_name = PORT_Strdup(temp); PR_snprintf(cgi_var_name, sizeof(cgi_var_name), "%s-cert", family_name); temp = get_cgi_var_must(cgi_var_name, "", ""); family_ptr->personality = PORT_Strdup(temp); PR_snprintf(cgi_var_name, sizeof(cgi_var_name), "%s-activated", family_name); temp = get_cgi_var_must(cgi_var_name, "", ""); family_ptr->activated = PORT_Strdup(temp); family_name = PORT_Strtok(NULL, ","); } } /* * int get_cert_nickname * Reads and parses cipher family input from front end * Returns 0 on success, -1 on failure. */ int get_cert_nickname(char *buf, size_t bufsize) { char *list_of_families; char *family_name; char *temp; char cgi_var_name[BIG_LINE]; list_of_families = get_cgi_var("familyList", "", ""); if(!list_of_families) { return -1; } family_name = PORT_Strtok(list_of_families, ","); while(family_name != NULL) { PR_snprintf(cgi_var_name, sizeof(cgi_var_name), "%s-cert", family_name); if((temp = get_cgi_var(cgi_var_name, "", "")) == NULL) { return -1; } PL_strncpyz(buf, temp, bufsize); return 0; /*family_name = PORT_Strtok(NULL, ",");*/ } return -1; } /* * int GetSSLFamilyAttributes * Reads all LDAP entries relating to cipher family information. * Returns return_string, a string of all information found, and * 0 on success, -1 on failure. */ int GetSSLFamilyAttributes(PsetHndl pset, char **return_string) { AttrNameList family_list; int errorCode; char temp_return[5000]; char temp[1000]; char **family; char family_attribute[1024]; char *token; char *personality; char *val; char *family_name; *return_string = NULL; strcpy(temp_return, ""); val = psetGetAttrSingleValue(pset, "configuration.nsServerSecurity", &errorCode); if(val) PR_snprintf(temp, sizeof(temp), "security=%s\n", val); else PR_snprintf(temp, sizeof(temp), "security=off\n"); PL_strcatn(temp_return, sizeof(temp_return), temp); if((family_list = psetGetChildren(pset, "configuration.Encryption", &errorCode))) { for (family = family_list; *family; family++) { val = NULL; token = NULL; personality = NULL; PR_snprintf(family_attribute, sizeof(family_attribute), "%s.nsSSLActivation", *family); val = psetGetAttrSingleValue(pset, family_attribute, &errorCode); PR_snprintf(family_attribute, sizeof(family_attribute), "%s.nsSSLToken", *family); token = psetGetAttrSingleValue(pset, family_attribute, &errorCode); PR_snprintf(family_attribute, sizeof(family_attribute), "%s.nsSSLPersonalityssl", *family); personality = psetGetAttrSingleValue(pset, family_attribute, &errorCode); if((!val) || (!token) || (!personality)) { PL_strcatn(temp_return, sizeof(temp_return), "familyList=NULL\n"); *return_string = PORT_Strdup(temp_return); return -1; } family_name = strrchr(*family, '.'); family_name++; PR_snprintf(temp, sizeof(temp), "familyList=%s\n", family_name); PL_strcatn(temp_return, sizeof(temp_return), temp); PR_snprintf(temp, sizeof(temp), "%s-activated=%s\n", family_name, val); PL_strcatn(temp_return, sizeof(temp_return), temp); PR_snprintf(temp, sizeof(temp), "%s-token=%s\n", family_name, token); PL_strcatn(temp_return, sizeof(temp_return), temp); PR_snprintf(temp, sizeof(temp), "%s-cert=%s\n", family_name, personality); PL_strcatn(temp_return, sizeof(temp_return), temp); } } PL_strcatn(temp_return, sizeof(temp_return), "familyList=NULL\n"); /* get cipher preferences */ val = NULL; val = psetGetAttrSingleValue(pset, "configuration.encryption.nsSSL2", &errorCode); PL_strcatn(temp_return, sizeof(temp_return), "ssl2-activated="); if(val) PL_strcatn(temp_return, sizeof(temp_return), val); PL_strcatn(temp_return, sizeof(temp_return), "\n"); val = NULL; val = psetGetAttrSingleValue(pset, "configuration.encryption.nsSSL2Ciphers", &errorCode); PL_strcatn(temp_return, sizeof(temp_return), "ssl2="); if(val) PL_strcatn(temp_return, sizeof(temp_return), val); PL_strcatn(temp_return, sizeof(temp_return), "\n"); val = NULL; val = psetGetAttrSingleValue(pset, "configuration.encryption.nsSSL3", &errorCode); PL_strcatn(temp_return, sizeof(temp_return), "ssl3-activated="); if(val) PL_strcatn(temp_return, sizeof(temp_return), val); PL_strcatn(temp_return, sizeof(temp_return), "\n"); val = NULL; val = psetGetAttrSingleValue(pset, "configuration.encryption.nsSSL3Ciphers", &errorCode); PL_strcatn(temp_return, sizeof(temp_return), "ssl3="); if(val) PL_strcatn(temp_return, sizeof(temp_return), val); PL_strcatn(temp_return, sizeof(temp_return), "\n"); val = NULL; val = psetGetAttrSingleValue(pset, "configuration.encryption.nsSSLClientAuth", &errorCode); PL_strcatn(temp_return, sizeof(temp_return), "clientauth="); if(val) PL_strcatn(temp_return, sizeof(temp_return), val); PL_strcatn(temp_return, sizeof(temp_return), "\n"); *return_string = PORT_Strdup(temp_return); return 0; } /* * int SetSSLFamilyAttributes * Changes or adds LDAP entries relating to cipher family information. * Returns 0 on success, -1 on failure. */ int SetSSLFamilyAttributes(PsetHndl pset, family_input *family_head, char *ssl2, char *ssl3, char *ssl2_act, char *ssl3_act) { family_input *family_ptr = family_head; family_input *delete_ptr; char family_sie_entry[BIG_LINE]; char family_token_attr[BIG_LINE]; char family_cert_attr[BIG_LINE]; char family_activated_attr[BIG_LINE]; AttrNameList list_name; AttributeList initlist; int rv, rv2; while(family_ptr != NULL) { PR_snprintf(family_sie_entry, sizeof(family_sie_entry), "configuration.encryption.%s", family_ptr->family_name); if((rv = psetCheckAttribute(pset, family_sie_entry)) == PSET_OP_FAIL) { /* family entry doesn't exist, create it */ /* create encryption first if it doesn't exist */ if((rv2 = psetCheckAttribute(pset, "configuration.encryption")) == PSET_OP_FAIL) { AttrNameList list_name2; AttributeList initlist2; list_name2 = createAttrNameList(1); addName(list_name2, 0, "nsEncryptionConfig"); initlist2 = createAttributeList(9); addSingleValueAttribute(initlist2, 0, "nsCertfile", "blank"); addSingleValueAttribute(initlist2, 1, "nsKeyfile", "blank"); addSingleValueAttribute(initlist2, 2, "nsSSL2", "off"); /* by default */ addSingleValueAttribute(initlist2, 3, "nsSSL3", "off"); /* by default */ addSingleValueAttribute(initlist2, 4, "nsSSLSessionTimeout", "0"); addSingleValueAttribute(initlist2, 5, "nsSSL3SessionTimeout", "0"); addSingleValueAttribute(initlist2, 6, "nsSSLClientAuth", "off"); /* hardcoded for now */ addSingleValueAttribute(initlist2, 7, "nsSSL2Ciphers", "blank"); addSingleValueAttribute(initlist2, 8, "nsSSL3Ciphers", "blank"); if(psetAddEntry(pset, "configuration", "encryption", list_name2, initlist2) != PSET_OP_OK) { rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_ATTR_CREATE), NULL); } } else if(rv2 == PSET_ATTR_EXIST) /* it exists, but as an attribute?! */ rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_INV_ATTR), NULL); list_name = createAttrNameList(1); addName(list_name, 0, "nsEncryptionModule"); initlist = createAttributeList(3); addSingleValueAttribute(initlist, 0, "nsSSLToken", "blank"); addSingleValueAttribute(initlist, 1, "nsSSLPersonalityssl", "blank"); addSingleValueAttribute(initlist, 2, "nsSSLActivation", "blank"); if(psetAddEntry(pset, "configuration.encryption", family_ptr->family_name, list_name, initlist) != PSET_OP_OK) { rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_ATTR_CREATE), NULL); } } else if(rv == PSET_ATTR_EXIST) /* it exists, but as an attribute?! */ rpt_err(APP_ERROR, getResourceString(DBT_GENERIC_PSET_FAILURE), getResourceString(DBT_PSET_INV_ATTR), NULL); PR_snprintf(family_token_attr, sizeof(family_token_attr), "%s.nsSSLToken", family_sie_entry); PR_snprintf(family_cert_attr, sizeof(family_cert_attr), "%s.nsSSLPersonalityssl", family_sie_entry); PR_snprintf(family_activated_attr, sizeof(family_activated_attr), "%s.nsSSLActivation", family_sie_entry); set_attribute(pset, family_token_attr, family_ptr->token_name); set_attribute(pset, family_cert_attr, family_ptr->personality); set_attribute(pset, family_activated_attr, family_ptr->activated); /* delete current object and advance pointer */ delete_ptr = family_ptr; family_ptr = family_ptr->next; free(delete_ptr->family_name); free(delete_ptr->token_name); free(delete_ptr->personality); free(delete_ptr->activated); free(delete_ptr); } /* Record cipher prefs */ if(ssl2) set_attribute(pset, "configuration.encryption.nsSSL2Ciphers", ssl2); if(ssl3) set_attribute(pset, "configuration.encryption.nsSSL3Ciphers", ssl3); if(ssl2_act) set_attribute(pset, "configuration.encryption.nsSSL2", ssl2_act); if(ssl3_act) set_attribute(pset, "configuration.encryption.nsSSL3", ssl3_act); return 0; } static char * pwdCbk() { char *pwd; pwd = ADM_GetPassword("Enter Admin Server Administrator password: "); if (!pwd) return NULL; admSetCachedSIEPWD(pwd); memset(pwd, 0, strlen(pwd)); free(pwd); return admGetCachedSIEPWD(); } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); PsetHndl pset; char *method; int rv; int err; int *errp = &err; char *username = 0; char *localAdmin = 0; char *binddn = 0; char *security = NULL; char *ssl2 = NULL; char *ssl3 = NULL; char *tls = NULL; char *merged_ssl3 = NULL; char *ssl2_act = NULL; char *ssl3_act = NULL; char *clientauth = NULL; char *configdir; /* where to find config files */ char *securitydir = NULL; /* where to find security files */ family_input *family_head = NULL; char error_info[BIG_LINE]; AdmldapInfo ldapInfo = NULL; char *lang; (void)_ai; /* get rid of unused variable warning */ memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); if(method && *method) { lang=getenv("HTTP_ACCEPT_LANGUAGE"); } else { if(!argv[1] || !argv[2]) { rpt_err(INCORRECT_USAGE, "Usage: sec-activate [configdir] [SSL enabled]\n[configdir] = The location of the config and security files of the target Admin Server\n[SSL enabled] = 'on' or 'off'", NULL, NULL); } lang = NULL; } i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if(!i18nResource) rpt_err(INCORRECT_USAGE, "Localized property files not found in " PROPERTYDIR, NULL, NULL); acceptLanguage = "en"; if (lang) acceptLanguage = strdup(lang); /* Initialize PSET for reading/writing */ /* Get UserDN and User Password */ rv = ADM_GetUserDNString(&err, &binddn); if (rv < 0 || !binddn || !*binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) rpt_err(ELEM_MISSING, getResourceString(DBT_PSET_INIT_NO_USERNAME), NULL, NULL); else { /* No DN, maybe it is local super */ configdir = util_get_conf_dir(); localAdmin = admGetLocalAdmin(configdir, &rv); if (localAdmin) { if (PORT_Strcmp(username, localAdmin)) rpt_err(ELEM_MISSING, getResourceString(DBT_PSET_INIT_NO_USERDN), NULL, NULL); else { binddn = NULL; } } else rpt_err(ELEM_MISSING, getResourceString(DBT_PSET_INIT_NO_USERDN), NULL, NULL); } } if(!method || !*method) { /* non-UI CGI - can't call ADMSSL_InitSimple() */ securitydir = strdup(argv[1]); configdir = strdup(argv[1]); /* same as securitydir */ ldapInfo = admldapBuildInfoCbk(configdir, pwdCbk, &rv); if (!ldapInfo) { rpt_err(INCORRECT_USAGE, getResourceString(DBT_INV_SR), NULL, NULL); } rv = ADMSSL_Init(ldapInfo, SECURITYDIR, 1); if (rv) { PR_snprintf(error_info, sizeof(error_info), getResourceString(DBT_PSET_INIT_FAILURE), rv); rpt_err(APP_ERROR, error_info, NULL, NULL); } } else { configdir = util_get_conf_dir(); securitydir = util_get_security_dir(); rv = ADMSSL_InitSimple(configdir, securitydir, 1); if (rv) { rpt_err(APP_ERROR, getResourceString(DBT_ADMSSL_INIT_FAIL), NULL, NULL); } } /* Initialize the pset */ pset = psetCreateSSL("admin-serv", configdir, /* userDN */ NULL, /* passwd */ NULL, /* errorcode */ &rv); if (!pset) rpt_err(APP_ERROR, getResourceString(DBT_PSET_CREATE_FAIL), NULL, NULL); /* Process GET/POST */ if (!method || !*method) { /* non UI CGI */ security = strdup(argv[2]); if((strcmp(security, "on") != 0) && (strcmp(security, "off") != 0)) { rpt_err(INCORRECT_USAGE, getResourceString(DBT_CMDLINE_STATUS_USAGE), NULL, NULL); } /* change "security" in LDAP and adm.conf to "on"/"off" */ set_security(pset, configdir, security); rpt_success(getResourceString(DBT_SUCCESS)); } else if (!PORT_Strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ char *return_string; fprintf(stdout, "Content-type: text/html\n\n"); /* get all variables */ rv = GetSSLFamilyAttributes(pset, &return_string); fputs(return_string, stdout); free(return_string); } else if (!PORT_Strcmp(method, "POST")) { fprintf(stdout, "Content-type: text/html\n\n"); post_begin(stdin); security = get_cgi_var("security", "", ""); ssl2 = get_cgi_var("ssl2", "", ""); ssl3 = get_cgi_var("ssl3", "", ""); tls = get_cgi_var("tls", "", ""); ssl2_act = get_cgi_var("ssl2-activated", "", ""); ssl3_act = get_cgi_var("ssl3-activated", "", ""); clientauth = get_cgi_var("clientauth", "", ""); /* change "security" in LDAP and adm.conf to "on"/"off" */ set_security(pset, configdir, security); /* change security parameters in console.conf */ if (strcmp(security, "off")==0) { rv = update_conf(configdir, "console.conf", "NSSEngine", "off", 0); if (rv < 0) { rpt_err(APP_ERROR, NULL, getResourceString(DBT_ADMIN_CONF_MOD), NULL); } } else if (strcmp(security, "on")==0) { char certnickname[BIG_LINE]; char protocols[BIG_LINE]; char ciphers[BIG_LINE]; /* Parse out complete family list */ get_family_input(&family_head); /* set cipher family info */ if (ssl3 && (strlen(ssl3) > 0)) { if (tls && (strlen(tls) > 0)) { merged_ssl3 = PR_smprintf("%s,%s", ssl3, tls); } else { merged_ssl3 = strdup(ssl3); } } else { if (tls && (strlen(tls) > 0)) { merged_ssl3 = strdup(tls); } else { merged_ssl3 = strdup(""); } } SetSSLFamilyAttributes(pset, family_head, ssl2, merged_ssl3, ssl2_act, ssl3_act); set_attribute(pset, "configuration.encryption.nsSSLClientAuth", clientauth); if (get_cert_nickname(certnickname, sizeof(certnickname)) < 0) { char * scratch = PR_smprintf(getResourceString(DBT_CGI_MISSING_ARGS), certnickname); rpt_err(ELEM_MISSING, NULL, scratch, NULL); PR_smprintf_free(scratch); /* never executed */ } if (strlen(clientauth) == 0) { clientauth = (char*)"off"; } rv = update_conf(configdir, "console.conf", "NSSEngine", "on", 0); rv = update_conf(configdir, "console.conf", "NSSNickname", certnickname, 1); strcpy(protocols, ""); if (strlen(ssl2_act) > 0 && !strcmp(ssl2_act, "on")) strcat(protocols, "SSLv2,"); if (strlen(ssl3_act) > 0 && !strcmp(ssl3_act, "on")) strcat(protocols, "SSLv3,TLSv1,"); protocols[strlen(protocols) - 1] = '\0'; /* remove trailing comma */ rv = update_conf(configdir, "console.conf", "NSSProtocol", protocols, 0); snprintf(ciphers, sizeof(ciphers), "%s,%s", ssl2, merged_ssl3); PR_smprintf_free(merged_ssl3); ciphers[sizeof(ciphers)-1] = 0; rv = update_conf(configdir, "console.conf", "NSSCipherSuite", ciphers, 0); if (!strcmp(clientauth, "on")) rv = update_conf(configdir, "console.conf", "NSSVerifyClient", "require", 0); else rv = update_conf(configdir, "console.conf", "NSSVerifyClient", "none", 0); if (rv < 0) { rpt_err(APP_ERROR, NULL, getResourceString(DBT_ADMIN_CONF_MOD), NULL); } } else { rpt_err(INCORRECT_USAGE, getResourceString(DBT_CGI_INVALID_ARGS), NULL, NULL); } rpt_success(getResourceString(DBT_SUCCESS)); } else { fprintf(stdout, "Content-type: text/html\n\n"); PR_snprintf(error_info, sizeof(error_info), getResourceString(DBT_CGI_UNKNOWN_METH), method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } return 0; } /* * Modify any attribute in a configuration file with a name/value pair * If the attribute value is NULL, remove it from the file completely. */ static int update_conf(char *configdir, char *file, char *name, char *val, int quoted) { FILE *f; int i, modified=0; static char filename[BIG_LINE]; static char inbuf[BIG_LINE]; static char buf[BIG_LINE]; int linecnt=0; char *lines[2048]; if (!configdir) return -1; PR_snprintf(filename, sizeof(filename), "%s/%s", configdir, file); f = fopen(filename, "r"); if (f==NULL) { rpt_err(SYSTEM_ERROR, "Can not open file for reading", NULL, NULL); } while(fgets(inbuf, sizeof(inbuf), f) != NULL) { if (strncasecmp(inbuf,name,strlen(name)) == 0) { /* Line starts with the attribute name */ if(val && *val != '\0') { if (quoted) { PR_snprintf(buf, sizeof(buf), "%s \"%s\"\n", name, val); } else { PR_snprintf(buf, sizeof(buf), "%s %s\n", name, val); } lines[linecnt++] = strdup(buf); modified=1; } else { modified=1; } } else { lines[linecnt++] = strdup(inbuf); } } fclose(f); if (!modified && (val && *val != '\0')) { /* Add the attribute name/val pair*/ if (quoted) { PR_snprintf(buf, sizeof(buf), "%s \"%s\"\n", name, val); } else { PR_snprintf(buf, sizeof(buf), "%s %s\n", name, val); } lines[linecnt++] = strdup(buf); } f = fopen(filename, "w"); if (f==NULL) { fclose(f); rpt_err(SYSTEM_ERROR, "Can not open file for writing", NULL, NULL); } for (i=0; i < linecnt; i++) { fprintf(f, "%s", lines[i]); } fclose(f); return 0; } 389-admin-1.1.35/admserv/cgi-src40/sec-activate.properties000066400000000000000000000041361220472121400230330ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { sec-activate1 { "NO USER NAME!" } sec-activate2 { "NO USER DN!" } sec-activate3 { "Usage: sec-activate [configdir] [SSL enabled]\n[configdir] = The directory containing the configuration and security database files for the target Admin Server\n[SSL enabled] = 'on' or 'off'" } sec-activate4 { "ERROR: Invalid configdir specified." } sec-activate5 { "ERROR: Failed to perform security initialization for communication with LDAP in SSL mode (error code = %d)" } sec-activate6 { "SSL related initialization failed" } sec-activate7 { "PSET Creation Failed" } sec-activate8 { "ERROR: [SSL enabled] must be 'on' or 'off'" } sec-activate9 { "The SSL enabled setting has successfully been saved. Please restart the Admin Server from the command line for the changes to take effect and then restart the Console. " } sec-activate10 { "Invalid arguments passed into CGI" } sec-activate11 { "missing CGI argument (%s)." } sec-activate12 { "Unknown Method (%s)" } sec-activate13 { "PSET failure" } sec-activate14 { "PSET attribute creation or local cache update failed!" } sec-activate15 { "PSET attribute modification failed!" } sec-activate16 { "Invalid SIE attribute found!" } sec-activate17 { "Failed to modify admin server configuration!" } } 389-admin-1.1.35/admserv/cgi-src40/security.c000066400000000000000000002221311220472121400203550ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef __cplusplus extern "C" { #endif #include "nss.h" #include "pkcs11.h" #include "ssl.h" #include "cert.h" #include "certdb.h" #include "certt.h" #include "key.h" #include "secport.h" #include "secder.h" #include "plstr.h" #include "prsystem.h" #include "pk11func.h" #include "base64.h" #include "secoidt.h" #include "secoid.h" #include "cryptohi.h" #include "prerror.h" #include "secmod.h" #include "seccomon.h" #include "secasn1t.h" #include "secder.h" #include "secasn1.h" #include "prio.h" #include "prtypes.h" #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadminutil/resource.h" #include "libadmsslutil/admsslutil.h" #include "libadmsslutil/certmgt.h" #include "libadmsslutil/psetcssl.h" #include "cgicommon.h" #include "libadmin/libadmin.h" #ifdef __cplusplus } #endif #define DEFAULT_KEY_BITS 2048 #define MAX_KEY_BITS 4096 #define SUBJECT_NEW "Certificate request" #define SUBJECT_OLD "Certificate renewal" #define CERTREQ_NEW "NEW" #define CERTREQ_OLD "RENEWAL" #define TOTAL_BITS 180 /* Define parameters for key generation */ /* 2^16+1=0x10001 you can obtain more information about public exponent at WWW.RSA.COM */ #define DEFAULT_PUBLIC_EXPONENT 0x10001 /*#ifdef XP_UNIX*/ #define HEADER "-----BEGIN CERTIFICATE-----" #define FOOTER "-----END CERTIFICATE-----" #define HEADERREQUEST "-----BEGIN %s CERTIFICATE REQUEST-----\n" #define FOOTERREQUEST "\n-----END %s CERTIFICATE REQUEST-----\n" #define X509CRLHEADER "-----BEGIN X509 CRL-----" #define X509CRLFOOTER "-----END X509 CRL-----" #define CRLHEADER "-----BEGIN CERTIFICATE REVOCATION LIST-----\n" #define CRLFOOTER "-----END CERTIFICATE REVOCATION LIST-----\n" #define NEWCRLHEADER "-----BEGIN CRL-----" #define NEWCRLFOOTER "-----END CRL-----" /*#else #define HEADER "-----BEGIN CERTIFICATE----\n" #define FOOTER "\n-----END CERTIFICATE-----\n" #define HEADERREQUEST "-----BEGIN %s CERTIFICATE REQUEST-----\n" #define FOOTERREQUEST "\n-----END %s CERTIFICATE REQUEST-----\r\n" #endif*/ int expired = 0; CERTCertDBHandle *certdb = NULL; char line[BIG_LINE]; static char *securitydir; /* based on the sie - security dir for ds or as */ #define RESOURCE_FILE "security" /* main resource string */ #define DBT_PARAMETERMISSING resource_key(RESOURCE_FILE, "1") #define DBT_MISSING_THIS resource_key(RESOURCE_FILE, "2") #define DBT_INTERNAL_ERROR resource_key(RESOURCE_FILE, "3") #define DBT_ALLOCATE_ERROR resource_key(RESOURCE_FILE, "4") #define DBT_NO_OP resource_key(RESOURCE_FILE, "5") #define DBT_OPEN_KEYDB_FAIL resource_key(RESOURCE_FILE, "6") #define DBT_OPEN_CERTDB_FAIL resource_key(RESOURCE_FILE, "7") #define DBT_INVALID_PWD resource_key(RESOURCE_FILE, "9") #define DBT_ERROR_OCCURED resource_key(RESOURCE_FILE, "10") #define DBT_READ_ALIAS resource_key(RESOURCE_FILE, "11") /* cert install */ #define DBT_NO_SLOT resource_key(RESOURCE_FILE, "20") #define DBT_DECODE_FAIL resource_key(RESOURCE_FILE, "21") #define DBT_NO_PRIVATE_KEY resource_key(RESOURCE_FILE, "22") #define DBT_INSTALL_FAIL resource_key(RESOURCE_FILE, "23") #define DBT_NO_PRIVATE_KEY_WHY resource_key(RESOURCE_FILE, "24") #define DBT_INVALID_DER_CERT resource_key(RESOURCE_FILE, "25") #define DBT_NO_CERT_IN_PACKAGE resource_key(RESOURCE_FILE, "26") #define DBT_INVALID_CA_CERT resource_key(RESOURCE_FILE, "27") #define DBT_CERT_CHAIN_ERR resource_key(RESOURCE_FILE, "28") /* cert request */ #define DBT_INVALID_KEY_PAIR resource_key(RESOURCE_FILE, "30") #define DBT_CSR_GEN_FAIL resource_key(RESOURCE_FILE, "31") #define DBT_DN_CONVERT_FAIL resource_key(RESOURCE_FILE, "32") #define DBT_PUB_KEY_GEN_FAIL resource_key(RESOURCE_FILE, "33") /* cert op */ #define DBT_CERT_NOT_FOUND resource_key(RESOURCE_FILE, "40") #define DBT_TRUST_SET_FAIL resource_key(RESOURCE_FILE, "41") #define DBT_CERT_LIST_FAIL resource_key(RESOURCE_FILE, "42") #define DBT_CERT_DELETE_FAIL resource_key(RESOURCE_FILE, "43") #define DBT_CRL_DELETE_FAIL resource_key(RESOURCE_FILE, "44") #define DBT_CRL_CKL_NOT_FOUND resource_key(RESOURCE_FILE, "45") /* module operation */ #define DBT_NO_FILE_EXISTS resource_key(RESOURCE_FILE, "50") #define DBT_MODUTIL_FAILURE resource_key(RESOURCE_FILE, "51") #define DBT_SUCCESS resource_key(RESOURCE_FILE, "52") #define DBT_MISSING_FILE resource_key(RESOURCE_FILE, "53") #define DBT_MISSING_FORMAT resource_key(RESOURCE_FILE, "54") #define DBT_INVALID_FORMAT resource_key(RESOURCE_FILE, "55") #define DBT_MISSING_MODULE_NAME resource_key(RESOURCE_FILE, "56") #define DBT_SUCCESS_REMOVED resource_key(RESOURCE_FILE, "57") #define DBT_FAIL_REMOVED resource_key(RESOURCE_FILE, "58") #define DBT_ADDITIONAL_INFO resource_key(RESOURCE_FILE, "59") /* possible parameters */ #define DBT_SIE resource_key(RESOURCE_FILE, "70") #define DBT_PASSWORD resource_key(RESOURCE_FILE, "71") #define DBT_DN resource_key(RESOURCE_FILE, "72") #define DBT_OP resource_key(RESOURCE_FILE, "73") #define DBT_DER_CERT resource_key(RESOURCE_FILE, "74") #define DBT_CERT_NAME resource_key(RESOURCE_FILE, "75") #define DBT_TOKEN_NAME resource_key(RESOURCE_FILE, "76") #define DBT_TRUST resource_key(RESOURCE_FILE, "77") #define DBT_INSTALL_OP resource_key(RESOURCE_FILE, "78") #define DBT_CERTIFICATE_TYPE resource_key(RESOURCE_FILE, "79") #define DBT_CRL_NAME resource_key(RESOURCE_FILE, "80") #define DBT_MODULE_OP_TYPE resource_key(RESOURCE_FILE, "81") #define DBT_OLD_PWD resource_key(RESOURCE_FILE, "82") #define DBT_NEW_PWD resource_key(RESOURCE_FILE, "83") #define DBT_CONFIRM_PWD resource_key(RESOURCE_FILE, "84") #define DBT_SESSION_DATA resource_key(RESOURCE_FILE, "85") #define DBT_OLD_SERVER_ROOT resource_key(RESOURCE_FILE, "86") #define DBT_CERT_FINGERPRINT resource_key(RESOURCE_FILE, "87") /* change password and init pin*/ #define DBT_FAIL_CHANG_PWD resource_key(RESOURCE_FILE, "100") #define DBT_INVALID_OLD_PWD resource_key(RESOURCE_FILE, "101") #define DBT_INVALID_CONFIRM_PWD resource_key(RESOURCE_FILE, "102") #define DBT_INIT_FAIL resource_key(RESOURCE_FILE, "103") /* crl/ckl */ #define DBT_DECODE_CRL_ERROR resource_key(RESOURCE_FILE, "110") #define DBT_REMOVE_ERROR resource_key(RESOURCE_FILE, "111") #define DBT_INSTALL_ERROR resource_key(RESOURCE_FILE, "112") #define DBT_INVALID_CRL resource_key(RESOURCE_FILE, "113") /* key and certificate migration */ #define DBT_ALIAS resource_key(RESOURCE_FILE, "120") #define DBT_KEY_OR_CERT_NOTFOUND resource_key(RESOURCE_FILE, "121") #define DBT_UNABLE_TO_MIGRATE resource_key(RESOURCE_FILE, "122") #define DBT_INVALID_SERVER_ROOT resource_key(RESOURCE_FILE, "123") #define DBT_MIGRATION_NOT_SUPPORTED resource_key(RESOURCE_FILE, "124") /* more module codes */ #define DBT_INVALID_OP resource_key(RESOURCE_FILE, "150") Resource *i18nResource; Resource *i18nResource_common; char *acceptLanguage; static char * cur_pwd = 0; /* for use in changePassword and getPassword_cb */ static char* getResourceString(char *key) { if (key && !strncmp(key, COMMON_RESOURCE_FILE, strlen(COMMON_RESOURCE_FILE))) { return (char *)(res_getstring(i18nResource_common, key, acceptLanguage, NULL, 0, NULL)); } else { return (char *)(res_getstring(i18nResource, key, acceptLanguage, NULL, 0, NULL)); } } static char * getParameter(char *key, char *keyName) { PR_snprintf(line, sizeof(line), getResourceString(DBT_MISSING_THIS), keyName); return get_cgi_var(key, getResourceString(DBT_PARAMETERMISSING), line); } static void closeAllSecurityDB() { /* close all db */ if (NSS_IsInitialized()) { SSL_ClearSessionCache(); } if (NSS_Shutdown()) { PR_snprintf(line, sizeof(line), getResourceString(CMN_NSS_SHUTDOWN_ERROR), PR_GetError(), SSL_Strerror(PR_GetError()) ? SSL_Strerror(PR_GetError()) : "unknown"); rpt_warning(GENERAL_FAILURE, line, NULL, NULL); } } static void errorAllocateMem() { rpt_err(MEMORY_ERROR, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_ALLOCATE_ERROR), NULL); } static void errorRpt(int type, char* detailInfo) { closeAllSecurityDB(); rpt_err(type, getResourceString(DBT_ERROR_OCCURED), detailInfo, NULL); } static void errorRptExtended(int type, char* detail, char* extra) { closeAllSecurityDB(); rpt_err(type, getResourceString(DBT_ERROR_OCCURED), detail, extra); } /* return true if all of the chars in s are valid chars for use in a secmod module name. This string is passed to the shell in double quotes, so the user should not have to pass in any odd chars or quoting. Look for chars which would indicate someone is attempting something fishy. */ static int is_valid_name_string(const char *s) { int isvalid = 1; for(;isvalid && s && *s; ++s) { isvalid = (isalnum(*s) || (*s == ' ') || (*s == '.') || (*s == ',') || (*s == '+') || (*s == '=') || (*s == '@') || (*s == '-') || (*s == '_')); } return isvalid; } /* ** Convert a der-encoded integer to a hex printable string form */ static char * Hexify(SECItem *i) { unsigned char *cp, *end; char *rv, *o; /* Stuff copied from libsec/securl.c */ char *hex = "0123456789ABCDEF"; if (!i->len) { return PORT_Strdup("00"); } rv = o = (char*) PORT_Alloc(i->len * 3); if (!rv) return rv; cp = i->data; end = cp + i->len; while (cp < end) { unsigned char ch = *cp++; *o++ = hex[(ch >> 4) & 0xf]; *o++ = hex[ch & 0xf]; if (cp != end) { *o++ = ':'; } else { *o++ = 0; } } return rv; } /* Get a representative string for a given SECName */ PR_IMPLEMENT(char *) constructNameDesc(CERTName * name) { char * s; s = CERT_GetCommonName(name); if (s == 0) { s = CERT_GetOrgUnitName(name); if (s == 0) { s = CERT_GetOrgName(name); if (s == 0) { CERT_GetLocalityName(name); if (s == 0) { s = CERT_GetStateName(name); if (s == 0) s = ""; } } } } return PORT_Strdup(s); } /* HCL call pack function so we can pass back password */ static char * getPassword_cb(PK11SlotInfo* slot, PRBool retry, void* wincx) { char *pwd=0; char *tokenname = PK11_GetTokenName(slot); char tokenpwd_var[BIG_LINE]; /* The client might supply a password for a specific token. */ PR_snprintf(tokenpwd_var, sizeof(tokenpwd_var), "%s.keypwd", tokenname); if (cur_pwd) { pwd = cur_pwd; } if (!pwd) { pwd = get_cgi_var(tokenpwd_var, NULL, NULL); } if (!pwd) { pwd = get_cgi_var("keypwd", NULL, NULL); } if (!pwd) { char extra[BIG_LINE]; PR_snprintf(extra, sizeof(extra), "SEC_Token: %s\nSEC_Error: NO_PASSWORD\n", tokenname); errorRptExtended(ELEM_MISSING, getResourceString(DBT_PASSWORD), extra); return 0; } if (PK11_CheckUserPassword(slot, pwd) != SECSuccess) { if (cur_pwd) { ;/* calling routine will handle this case */ } else { char extra[BIG_LINE], detail[BIG_LINE]; PR_snprintf(extra, sizeof(extra), "SEC_Token: %s\nSEC_Error: INVALID_PASSWORD\n", tokenname); PR_snprintf(detail, sizeof(detail), getResourceString(DBT_INVALID_PWD), tokenname); errorRptExtended(INCORRECT_USAGE, detail, extra); return 0; } } /* do not relogin if this is a retry */ return retry ? 0 : pwd; } static void printCertUsageInfo(char* description, SECCertUsage usage, CERTCertificate* cert) { if (SECSuccess==CERT_VerifyCertNow(certdb, cert, PR_TRUE, usage, NULL)) { fprintf(stdout, "%s", description); } } static char * formatDateTime(SECItem *timechoice) { PRTime decodedTime = 0; /* decode the time into the integral value */ if (SECSuccess != DER_DecodeTimeChoice(&decodedTime, timechoice)) { return NULL; } switch (timechoice->type) { case siUTCTime: return DER_UTCTimeToAscii(timechoice); break; case siGeneralizedTime: return CERT_GenTime2FormattedAscii(decodedTime, "%a %b %d %H:%M:%S %Y"); break; default: return NULL; } return NULL; } /* * Fingerprint (MD5) for a cert */ static char *getMD5Fingerprint(CERTCertificate *cert) { unsigned char fingerprint[16]; /* result of MD5, always 16 bytes */ SECItem fpitem; PK11_HashBuf(SEC_OID_MD5, fingerprint, cert->derCert.data, cert->derCert.len); fpitem.data = fingerprint; fpitem.len = sizeof(fingerprint); return Hexify(&fpitem); } /* for some reason if I try to print a null string on solaris, the program will crash... so I need to post process any string and filter out null string */ static char* processNullString(char* str) { return (str==NULL?(char *)"(null)":str); } /* * With the FHS work, plus the injunction against * paths in CGI parameters, we should get the * securitydir (key/cert db file dir) from the server config, * using the pset interface */ static char * getSecurityDir(AdmldapInfo info, const char *sie) { int rval = 0; char *securitydir = NULL; PsetHndl pset; char *configdir = util_get_conf_dir(); if (!PL_strncasecmp(sie, "admin-serv", strlen("admin-serv"))) { return PL_strdup(util_get_security_dir()); /* same as admin server security dir */ } #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 6\n"); nss_DumpCertificateCacheInfo(); } #endif /* create pset with this dn */ pset = psetCreateSSL((char *)sie, configdir, NULL, NULL, &rval); #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 7\n"); nss_DumpCertificateCacheInfo(); } #endif if (pset && ((rval == PSET_OP_OK) || (rval == PSET_LOCAL_OPEN_FAIL))) { /* only admin-serv uses local file */ securitydir = psetGetAttrSingleValue(pset, "configuration.encryption.certdir", &rval); if (!securitydir && util_psetHasObjectClass(pset, DSOBJECTCLASS)) { char *host = psetGetAttrSingleValue(pset, "serverHostName", &rval); char *sport = psetGetAttrSingleValue(pset, "nsServerPort", &rval); char *ssecport = psetGetAttrSingleValue(pset, "nsSecureServerPort", &rval); char *ssecurity = psetGetAttrSingleValue(pset, "nsServerSecurity", &rval); int port, security; char *user = NULL; char *binddn = NULL; char *bindpw = admldapGetSIEPWD(info); int freebindpw = 1; ADM_GetUserDNString(&rval, &user); if (!user) { ADM_GetCurrentUsername(&rval, &user); } /* if user is just attr val, get dn */ binddn = admldapGetUserDN(info, user); if (!bindpw) { freebindpw = 0; ADM_GetCurrentPassword(&rval, &bindpw); } security = (ssecurity && !PL_strcasecmp(ssecurity, "on")) ? 1 : 0; if (security) { if (ssecport) { port = atoi(ssecport); } else { port = 636; } } else { if (sport) { port = atoi(sport); } else { port = 389; } } psetDelete(pset); #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 8\n"); nss_DumpCertificateCacheInfo(); } #endif pset = psetRealCreateSSL(info, host, port, security, DSCONFIGENTRY, binddn, bindpw, NULL, &rval); #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 9\n"); nss_DumpCertificateCacheInfo(); } #endif securitydir = psetGetAttrSingleValue(pset, DSSECURITYDIR, &rval); PL_strfree(host); PL_strfree(sport); PL_strfree(ssecport); PL_strfree(ssecurity); PL_strfree(binddn); if (freebindpw) { memset(bindpw, 0, strlen(bindpw)); PL_strfree(bindpw); } } } psetDelete(pset); #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 10\n"); nss_DumpCertificateCacheInfo(); } #endif return securitydir; } /* * Print cert attributes */ static SECStatus printCert(CERTCertificate * cert, PRBool showDetail, char* forcePrint_CertType) { CERTCertTrust trust; int flags = 0; SECStatus rv; int trustBit = 0; PRBool isCA = PR_FALSE; unsigned int rettype; /* get trust bit */ rv = CERT_GetCertTrust(cert, &trust); if (rv == SECSuccess) { flags = trust.sslFlags; } else { flags = 0; } /* determine what type of certificate this is */ if (flags & CERTDB_INVISIBLE_CA) { /* since it is invisible, should not allow user to see it. */ goto looser; } else if ((flags & CERTDB_USER) == CERTDB_USER) { fprintf(stdout, "\n"); /*} else if ((flags & CERTDB_VALID_CA) == CERTDB_VALID_CA) {*/ } else if (CERT_IsCACert(cert, &rettype) == PR_TRUE) { fprintf(stdout, "\n"); isCA = PR_TRUE; } else if (forcePrint_CertType != NULL) { fprintf(stdout, "<%s>\n", forcePrint_CertType); } else { return SECSuccess; /*fprintf(stdout, "\n");*/ } /* print out nickname */ fprintf(stdout, "\t%s\n", processNullString(cert->nickname)); /* print out subject (recipient) info */ if (showDetail || ((flags & CERTDB_USER) == CERTDB_USER)){ fprintf(stdout, "\t\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\n", processNullString(CERT_GetCommonName(&cert->subject)), processNullString(CERT_GetOrgUnitName(&cert->subject)), processNullString(CERT_GetOrgName(&cert->subject)), processNullString(CERT_GetLocalityName(&cert->subject)), processNullString(CERT_GetStateName(&cert->subject)), processNullString(CERT_GetCountryName(&cert->subject)), processNullString(CERT_GetCertEmailAddress(&cert->subject))); /*print out subject dn*/ fprintf(stdout, "\t%s\n", processNullString(CERT_NameToAscii(&cert->subject))); } /* print out issuer (CA) info */ if (showDetail || ((flags & CERTDB_USER) == CERTDB_USER)){ fprintf(stdout, "\t\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\t%s\n\t\n", processNullString(CERT_GetCommonName(&cert->issuer)), processNullString(CERT_GetOrgUnitName(&cert->issuer)), processNullString(CERT_GetOrgName(&cert->issuer)), processNullString(CERT_GetLocalityName(&cert->issuer)), processNullString(CERT_GetStateName(&cert->issuer)), processNullString(CERT_GetCountryName(&cert->issuer)), processNullString(CERT_GetCertEmailAddress(&cert->issuer))); /*print out issuer dn*/ fprintf(stdout, "\t%s\n", processNullString(CERT_NameToAscii(&cert->issuer))); } /* print der cert */ if (showDetail){ fprintf(stdout, "\t%s\n", BTOA_DataToAscii((unsigned char *)(cert->derCert.data), (unsigned int)(cert->derCert.len))); } /* print trust information */ if ((flags & CERTDB_VALID_CA) | (flags & CERTDB_TRUSTED_CA) | (flags & CERTDB_TRUSTED_CLIENT_CA)) { if (flags & CERTDB_TRUSTED_CA) { trustBit |= CERTDB_TRUSTED_CA; } if (flags & CERTDB_TRUSTED_CLIENT_CA) { trustBit |= CERTDB_TRUSTED_CLIENT_CA; } } fprintf(stdout, "\t%d\n\t%s\n", trustBit, processNullString((char*)formatDateTime(&cert->validity.notAfter))); fprintf(stdout, "\t%s\n", processNullString(getMD5Fingerprint(cert))); if (showDetail) { fprintf(stdout, "\t%s\n", processNullString((char*)formatDateTime(&cert->validity.notBefore))); fprintf(stdout, "\t%s\n", processNullString(Hexify((&cert->serialNumber)))); fprintf(stdout, "\t%s\n", processNullString(Hexify(&cert->version))); /* key related info */ { SECKEYPublicKey *pubk = CERT_ExtractPublicKey(cert); int keyType = SECKEY_GetPublicKeyType(pubk); if (keyType == nullKey) { fprintf(stdout, "\tNULL\n"); } else if (keyType == rsaKey) { fprintf(stdout, "\tRSA\n"); } else if (keyType == dsaKey) { fprintf(stdout, "\tDSA\n"); } else if (keyType == fortezzaKey) { fprintf(stdout, "\tFORTEZZA\n"); } else if (keyType == dhKey) { fprintf(stdout, "\tDH\n"); } else if (keyType == keaKey) { fprintf(stdout, "\tKEA\n"); } fprintf(stdout, "\t%d bits\n", SECKEY_PublicKeyStrength(pubk)*8); fprintf(stdout, "\t%s\n", processNullString((char*)SECOID_FindOIDTagDescription( SECOID_GetAlgorithmTag(&cert->signature)))); fprintf(stdout, "\t%s\n", processNullString((char*)SECOID_FindOIDTagDescription( SECOID_GetAlgorithmTag(&(SECKEY_CreateSubjectPublicKeyInfo(pubk)->algorithm))))); } /* shihcm: the usage check disable below are the one that might cause NSS to crash. I don't know why, but some cert will cause a crash if we verify those usage. bug - http://scopus/bugsplat/show_bug.cgi?id=379853 */ fprintf(stdout, "\t\n"); printCertUsageInfo("\t\t\n", certUsageSSLClient, cert); printCertUsageInfo("\t\t\n", certUsageSSLServer, cert); /*printCertUsageInfo("\t\t\n", certUsageSSLServerWithStepUp, cert);*/ printCertUsageInfo("\t\t\n", certUsageSSLCA, cert); printCertUsageInfo("\t\t\n",certUsageEmailSigner, cert); printCertUsageInfo("\t\t\n", certUsageEmailRecipient, cert); printCertUsageInfo("\t\t\n", certUsageObjectSigner, cert); /*printCertUsageInfo("\t\t\n", certUsageUserCertImport, cert);*/ /*printCertUsageInfo("\t\t\n", certUsageVerifyCA, cert);*/ /*printCertUsageInfo("\t\t\n", certUsageProtectedObjectSigner, cert);*/ /*printCertUsageInfo("\t\t\n", certUsageStatusResponder, cert);*/ /*printCertUsageInfo("\t\t\n", certUsageAnyCA, cert);*/ fprintf(stdout, "\t\n"); { /* print our cert chain */ int count = 1; CERTCertificate *issuerCert = cert; fprintf(stdout, "\t\n"); /*leaf cert*/ fprintf(stdout, "\t\t%s\n", processNullString(CERT_GetCommonName(&cert->subject))); /*fprintf(stdout, "\t\t<%s>%s\n", CERT_GetCommonName(&cert->subject), cert->nickname ,CERT_GetCommonName(&cert->subject));*/ while (SECITEM_CompareItem(&issuerCert->derIssuer, &issuerCert->derSubject) != SECEqual) { issuerCert = CERT_FindCertIssuer(issuerCert, PR_Now(), certUsageAnyCA); if (NULL != issuerCert) { fprintf(stdout, "\t\t%s\n", count, processNullString(CERT_GetCommonName(&issuerCert->issuer)), count); count++; } else { fprintf(stdout, "\t\tBROKEN_CERTIFICATE_CHAIN\n", count, count); break; } /*fprintf(stdout, "\t\t<%s>%s\n", CERT_GetCommonName(&issuerCert->subject), issuerCert->nickname ,CERT_GetCommonName(&issuerCert->subject));*/ } fprintf(stdout, "\t\n"); } } if ((flags & CERTDB_USER)==CERTDB_USER) { fprintf(stdout, "\n"); } else if (isCA == PR_TRUE) { fprintf(stdout, "\n"); } else if (forcePrint_CertType != NULL) { fprintf(stdout, "<%s>\n", forcePrint_CertType); } looser: return SECSuccess; } /* * Print CRL/CKL information */ static void showCRLRow(CERTSignedCrl *crl, PRBool detail, int list_type) { /* display crl or ckl */ if (!crl) { return; } fprintf(stdout, "\t%s\n", constructNameDesc(&crl->crl.name)); if (detail) { fprintf(stdout, "\t\n"); fprintf(stdout, "\t\t%s\n", CERT_GetCommonName(&crl->crl.name)); fprintf(stdout, "\t\t%s\n", CERT_GetOrgName(&crl->crl.name)); fprintf(stdout, "\t\t%s\n", CERT_GetOrgUnitName(&crl->crl.name)); fprintf(stdout, "\t\t%s\n", CERT_GetLocalityName(&crl->crl.name)); fprintf(stdout, "\t\t%s\n", CERT_GetStateName(&crl->crl.name)); fprintf(stdout, "\t\t%s\n", CERT_GetCountryName(&crl->crl.name)); fprintf(stdout, "\t\n"); fprintf(stdout, "\t%s\n", processNullString(CERT_NameToAscii(&crl->crl.name))); /*fprintf(stdout, "\t%s\n", processNullString(Hexify(&crl->crl->serialNumber)));*/ { int version; switch ((int)DER_GetInteger(&(crl->crl.version))) { case SEC_CRL_VERSION_1: version = 1; break; case SEC_CRL_VERSION_2: version = 2; break; default: version = (int)(DER_GetInteger(&(crl->crl.version))+1); break; } fprintf(stdout, "\t%d\n", version); } fprintf(stdout, "\t%s\n", processNullString((char*)SECOID_FindOIDTagDescription( SECOID_GetAlgorithmTag(&crl->crl.signatureAlg)))); if (crl->crl.entries != NULL) { int x = 0; while (1) { CERTCrlEntry *entry = crl->crl.entries[x]; if (entry != NULL) { fprintf(stdout, "\t\n", x); fprintf(stdout, "\t\t%s\n", processNullString(Hexify(&entry->serialNumber))); fprintf(stdout, "\t\t%s\n",formatDateTime(&entry->revocationDate)); fprintf(stdout, "\t\n", x); x++; } else { break; } } } } fprintf(stdout, "\t%s\n\t%s\n\t%s\n", formatDateTime(&crl->crl.lastUpdate), formatDateTime(&crl->crl.nextUpdate), list_type==SEC_CRL_TYPE?"CRL":"CKL"); } /* * Print CRL/CKL information */ void showCRL(CERTCertDBHandle *handle, int list_type) { CERTCrlHeadNode *CrlListHead; CERTCrlNode *node; SECStatus rv; /* obtain a crl/ckl list */ rv = SEC_LookupCrls(handle, &CrlListHead, list_type); if(rv != SECSuccess) return; /* traverse crl/ckl list */ for(node = CrlListHead->first; node != NULL; node = node->next) { if (list_type == SEC_CRL_TYPE) { fprintf(stdout, "\n"); } else if (list_type == SEC_KRL_TYPE) { fprintf(stdout, "\n"); } showCRLRow(node->crl, PR_FALSE, list_type); if (list_type == SEC_CRL_TYPE) { fprintf(stdout, "\n"); } else if (list_type == SEC_KRL_TYPE) { fprintf(stdout, "\n"); } } } /* * Find cert by its MD5 Fingerprint. * The cert nickname is not guaranted to be unique. An existing cert * should be always identified by it's fingerprint (bug 558903). */ static CERTCertificate *findCertByFingerprint(char *fingerprint) { CERTCertList *certList; CERTCertListNode *cln; CERTCertificate *cert = NULL; certList = PK11_ListCerts(PK11CertListUnique, NULL); if (certList == NULL) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_LIST_FAIL)); } for (cln = CERT_LIST_HEAD(certList); !CERT_LIST_END(cln,certList); cln = CERT_LIST_NEXT(cln)) { char *fingerprint2 = processNullString(getMD5Fingerprint(cln->cert)); /* Output the cert if it belongs to this token */ if (strcmp(fingerprint, fingerprint2) == 0) { cert = CERT_DupCertificate(cln->cert); break; } } CERT_DestroyCertList(certList); return cert; } /* * Llist all the certificate under the specified token */ static void listCert(char* tokenName) { /* int expired = 0; */ CERTCertList *certList; CERTCertListNode *cln; PK11SlotInfo *slot = PK11_FindSlotByName(tokenName); PK11SlotInfo *internal_slot; char *internalTokenName; if (!slot) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_TOKEN_NAME)); return; } if (PK11_IsInternal(slot)) { internal_slot = slot; } else { internal_slot = PK11_GetInternalKeySlot(); if (!internal_slot) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_INIT_FAIL)); return; } } internalTokenName = PK11_GetTokenName(internal_slot); if (PK11_NeedUserInit(internal_slot) == PR_TRUE) { fprintf(stdout, "TRUE\n"); } else { fprintf(stdout, "FALSE\n"); } certList = PK11_ListCerts(PK11CertListUnique, NULL); if (certList == NULL) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_LIST_FAIL)); } for (cln = CERT_LIST_HEAD(certList); !CERT_LIST_END(cln,certList); cln = CERT_LIST_NEXT(cln)) { char *certTokenName=NULL; if (cln->cert->slot == NULL) { certTokenName = internalTokenName; } else { certTokenName = PK11_GetTokenName(cln->cert->slot); } /* Output the cert if it belongs to this token */ if (strcmp(tokenName, certTokenName) == 0) { printCert(cln->cert, /*showDetail=*/PR_FALSE, NULL); } /* * List "Builtin Object Token" as if it is the internal token * This is a special NSS read-only token for storing predefined CA certs */ else if ((strcmp(tokenName, internalTokenName) == 0) && (strcmp(certTokenName, "Builtin Object Token") == 0)) { printCert(cln->cert, /*showDetail=*/PR_FALSE, NULL); } } CERT_DestroyCertList(certList); if (PK11_IsInternal(slot)) { showCRL(certdb, SEC_CRL_TYPE); showCRL(certdb, SEC_KRL_TYPE); } if (slot != internal_slot) { PK11_FreeSlot(internal_slot); } PK11_FreeSlot(slot); } /* * Find a certificate and print in detail mode. */ static void printCertDetail(char *certFingerprint) { CERTCertificate* cert = findCertByFingerprint(certFingerprint); /* see if certificate if found */ if (!cert) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_NOT_FOUND)); } /* if found print it out */ printCert(cert, /*showDetail=*/PR_TRUE, NULL); CERT_DestroyCertificate(cert); } /* * Set the trust bit of a certificate */ static void setTrust(char *certFingerprint, int trust) { CERTCertTrust certTrust; CERTCertificate* cert = findCertByFingerprint(certFingerprint); /* see if certificate if found */ if (cert) { } else { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_NOT_FOUND)); } memset((char *)&certTrust, 0, sizeof(certTrust)); /* obtain the trust bit */ if (cert->trust) { certTrust = *cert->trust; } /* set client trusted ca bit */ if (CERTDB_TRUSTED_CLIENT_CA & trust) { certTrust.sslFlags |= CERTDB_TRUSTED_CLIENT_CA; } else if (certTrust.sslFlags & CERTDB_TRUSTED_CLIENT_CA) { certTrust.sslFlags ^= CERTDB_TRUSTED_CLIENT_CA; } /* set trusted ca bit */ if (CERTDB_TRUSTED_CA & trust) { certTrust.sslFlags |= CERTDB_TRUSTED_CA; } else if (certTrust.sslFlags & CERTDB_TRUSTED_CA) { certTrust.sslFlags ^= CERTDB_TRUSTED_CA; } /* commit the trust bit change */ if (CERT_ChangeCertTrust(certdb, cert, &certTrust) != SECSuccess) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_TRUST_SET_FAIL)); } #if DEBUG printCert(cert, /*showDetail=*/PR_FALSE, NULL); #endif CERT_DestroyCertificate(cert); } /* * Initialize NSS */ static void securityInitialization(char* securitydir) { PRUint32 flags = 0; char *db_name; int const minPwdLen = 8; int const pwdRequired = 1; /* PKSC11 module must be configured before NSS is initialized */ db_name = strdup("internal (software) "); PK11_ConfigurePKCS11(NULL,NULL,NULL,db_name,NULL,NULL,NULL,NULL, minPwdLen, pwdRequired); /* init NSS */ if (NSS_Initialize(securitydir, NULL, NULL, SECMOD_DB, flags)) { PR_snprintf(line, sizeof(line), getResourceString(CMN_SSL_INIT_ERROR), securitydir ? securitydir : "(null)", PR_GetError(), SSL_Strerror(PR_GetError()) ? SSL_Strerror(PR_GetError()) : "unknown"); errorRpt(GENERAL_FAILURE, line); } /* Set certdb handle */ certdb = CERT_GetDefaultCertDB(); /* set password function */ PK11_SetPasswordFunc(getPassword_cb); /* Set domestic policy, there is no more export builds */ NSS_SetDomesticPolicy(); } /* * Generate a certificate request for the given private key * */ static SECItem* generateCertificateRequest(SECKEYPrivateKey* privateKey, SECKEYPublicKey* pubKey, char* subjectName) { SECItem *der = NULL; SECItem *result = NULL; CERTName* certName = NULL; CERTSubjectPublicKeyInfo* keyInfo = NULL; CERTCertificateRequest* request = NULL; PRArenaPool *arena = NULL; PRBool error = PR_FALSE; char *line; char *sSignAlgo = NULL; int signAlgo = 0; /*DebugBreak();*/ /* convert subject name(DN) */ certName = CERT_AsciiToName(subjectName); if (!certName) { line = getResourceString(DBT_DN_CONVERT_FAIL); error = PR_TRUE; goto loser; } keyInfo = SECKEY_CreateSubjectPublicKeyInfo(pubKey); if (!keyInfo) { line = getResourceString(DBT_PUB_KEY_GEN_FAIL); error = PR_TRUE; goto loser; } /* Create certificate request blob */ request = CERT_CreateCertificateRequest(certName, keyInfo, NULL); if (!request) { line = getResourceString(DBT_CSR_GEN_FAIL); error = PR_TRUE; goto loser; } arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if (!arena) { line = getResourceString(DBT_ALLOCATE_ERROR); error = PR_TRUE; goto loser; } result = (SECItem*) PORT_ZAlloc(sizeof(SECItem)); /* Encode the result will get a "request blob" */ der = (SECItem *)SEC_ASN1EncodeItem(arena, result, request, SEC_ASN1_GET(CERT_CertificateRequestTemplate)); /* Determine the signing algorithm to use. We default * to SHA-1 and support SHA-256, SHA-384, and SHA-512. */ sSignAlgo = get_cgi_var("signingalgo", NULL, NULL); if (!sSignAlgo || !PORT_Strcmp(sSignAlgo, "SHA-1")) { signAlgo = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; } else if (!PORT_Strcmp(sSignAlgo, "SHA-256")) { signAlgo = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION; } else if (!PORT_Strcmp(sSignAlgo, "SHA-384")) { signAlgo = SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION; } else if (!PORT_Strcmp(sSignAlgo, "SHA-512")) { signAlgo = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION; } else { /* Unknown algorithm, so just use the default. */ signAlgo = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION; } /* Sign certificate request(the blob) with private key */ if (SEC_DerSignData(arena, result, der->data, der->len, privateKey, signAlgo) != SECSuccess) { rpt_err(GENERAL_FAILURE, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_CSR_GEN_FAIL), NULL); } /* destroy all */ loser: if (privateKey) SECKEY_DestroyPrivateKey(privateKey); if (pubKey) SECKEY_DestroyPublicKey(pubKey); if (keyInfo) SECKEY_DestroySubjectPublicKeyInfo(keyInfo); if (request) CERT_DestroyCertificateRequest(request); if (certName) CERT_DestroyName(certName); /*for debug purpose */ /*fprintf(stdout, "%s\n", BTOA_ConvertItemToAscii(result));*/ if (error == PR_TRUE) { /*{ char tmpLine[BIG_LINE]; PR_GetErrorText(tmpLine); PR_snprintf(line, sizeof(line), "%d:%s", PR_GetError(), tmpLine); }*/ errorRpt(GENERAL_FAILURE, line); } return result; } /* Generate an RSA key pair */ static SECKEYPrivateKey* generateKey(SECKEYPublicKey** publicKey, char* tokenName) { SECKEYPrivateKey* privateKey = NULL; PK11RSAGenParams params; unsigned char *rand_buffer = NULL; PK11SlotInfo *slot; /* Add the secure info to the context before we create the key. */ /* Do it here so that we can zero it immediately and keep it in */ /* memory for as little time as possible. */ /*get_random_user_input();*/ rand_buffer = ( unsigned char *) PORT_Alloc(TOTAL_BITS*sizeof(char)); /* This function will try to seed it self with good random value if possible */ PK11_GenerateRandom(rand_buffer, TOTAL_BITS); /* This function assume you going to pass in a random number generateor */ /* will use this method if HCL can't provide a good random number generator */ PK11_RandomUpdate(rand_buffer, TOTAL_BITS); /*slot = PK11_GetInternalKeySlot();*/ /*DebugBreak();*/ slot = PK11_FindSlotByName(tokenName); if (slot == NULL) { goto loser; } /*private key can't be generated until you call PK11_Authenticate. If password is set to null, or not set at all then it doen't matter if you call PK11_Authenticate or not*/ PK11_Authenticate(slot, PR_FALSE, 0); /* generate key pair */ { char *sKeySize = get_cgi_var("keysize", NULL, NULL); int keySize = 0; if (sKeySize) { keySize = atoi(sKeySize); } if (keySize > MAX_KEY_BITS) { params.keySizeInBits = MAX_KEY_BITS; } else if (keySize <= 0) { params.keySizeInBits = DEFAULT_KEY_BITS; } else { params.keySizeInBits = keySize; } } params.pe = DEFAULT_PUBLIC_EXPONENT; privateKey = PK11_GenerateKeyPair(slot, CKM_RSA_PKCS_KEY_PAIR_GEN, ¶ms, publicKey, PR_TRUE, PR_TRUE, 0); /*PK11_ImportPublicKey(slot, publicKey);*/ loser: if (privateKey==NULL) { PR_snprintf(line, sizeof(line), "%d:%s", PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_EN)); rpt_err(GENERAL_FAILURE, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_INVALID_KEY_PAIR), line); } return privateKey; } /* generate an CSR, dn most be provided */ static void generateCSR(char* tokenName) { int _new = (get_cgi_var("renewal", NULL, NULL) == NULL); /* need to find dn here */ char *DN = getParameter("dn",getResourceString(DBT_DN)); SECKEYPrivateKey *privateKey; SECKEYPublicKey* publicKey = NULL; /*DebugBreak();*/ /* Generate key pair */ /* to do token here */ privateKey = generateKey(&publicKey, tokenName); /* can be done in place */ unescape_entities(DN); /* e.g. convert " to " */ /* since DN now contains unescaped entities, it must never be displayed */ fprintf(stdout, HEADERREQUEST, _new?CERTREQ_NEW:CERTREQ_OLD); fprintf(stdout, "%s", BTOA_ConvertItemToAscii(generateCertificateRequest(privateKey, publicKey, DN))); fprintf(stdout, FOOTERREQUEST, _new?CERTREQ_NEW:CERTREQ_OLD); } /* this is where we collected chained certificate, this function will get call once for every certificate that was found in the DER cert package */ static SECStatus collect_certs(void *arg, SECItem **certs, int numcerts) { CERTDERCerts *collectArgs; SECItem *cert; SECStatus rv; collectArgs = (CERTDERCerts *)arg; collectArgs->numcerts = numcerts; collectArgs->rawCerts = (SECItem*)PORT_ArenaZAlloc(collectArgs->arena, sizeof(SECItem) * numcerts); if ( collectArgs->rawCerts == NULL ) { return(SECFailure); } cert = collectArgs->rawCerts; while ( numcerts-- ) { rv = SECITEM_CopyItem(collectArgs->arena, cert, *certs); if ( rv != SECSuccess) { return(SECFailure); } cert++; certs++; } return(SECSuccess); } /* * Decode a DER certificate */ static CERTDERCerts* decodeDERCert(char *derCertBase64) { SECStatus rv; PRArenaPool *arena; CERTDERCerts *collectArgs; char *DERCert = NULL; int DERCertLen = PORT_Strlen(derCertBase64); /* allocate memory to store the decoded certificate */ arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); if ( arena == NULL ) { errorAllocateMem(); } collectArgs = (CERTDERCerts *)PORT_ArenaZAlloc(arena, sizeof(CERTDERCerts)); if ( collectArgs == NULL ) { errorAllocateMem(); } collectArgs->arena = arena; /*pre process to filter out all the junks, this will leave us only with begin cert and end cert header*/ { char* begin = (char*) PORT_Strstr((const char*)derCertBase64, HEADER); char* end = (char*) PORT_Strstr((const char*)derCertBase64, FOOTER); if ((begin == NULL) || (end == NULL)) { /*return error message*/ errorRpt(INCORRECT_USAGE, getResourceString(DBT_INVALID_DER_CERT)); } else { end += PORT_Strlen(FOOTER); *end = '\0'; } DERCertLen=PORT_Strlen(begin)+1; /* +1 for trailing null */ DERCert = (char*)PORT_ZAlloc(DERCertLen); strcpy(DERCert, begin); } /* decoded the packaged DER certificate */ rv = CERT_DecodeCertPackage(DERCert, DERCertLen, collect_certs, (void *)collectArgs); if (rv != SECSuccess) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_DECODE_FAIL)); } if (collectArgs->numcerts == 0) { errorRpt(APP_ERROR, getResourceString(DBT_NO_CERT_IN_PACKAGE)); } return collectArgs; } /* * Decode and display a DER certificate. */ static void printDERCert(int isCACert) { SECStatus rv; char *derCertBase64 = getParameter("dercert",getResourceString(DBT_DER_CERT)); CERTDERCerts *collectArgs = decodeDERCert(derCertBase64); if (collectArgs->numcerts > 1) { errorRpt(INCORRECT_USAGE, getResourceString(DBT_CERT_CHAIN_ERR)); } /* Print cert information */ { char *certType = (isCACert) ? (char *)"CA" : (char *)"SERVER"; CERTCertificate **retCerts; PRBool keepCerts = PR_FALSE; PRBool caOnly = PR_FALSE; char *nickname = NULL; /*add all cert to temp */ rv = CERT_ImportCerts(certdb, certUsageSSLServer, collectArgs->numcerts, &collectArgs->rawCerts, &retCerts, keepCerts, caOnly, nickname); if (rv == SECSuccess) { printCert(retCerts[collectArgs->numcerts-1], /*showDetail=*/PR_TRUE, certType); } else { PR_snprintf(line, sizeof(line), "%d:%s", PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_EN)); /* if unable to import report error */ rpt_err(SYSTEM_ERROR, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_INSTALL_FAIL), line); } } } /* * Install a server certificate. */ static void installServerCert(char *tokenName, char *certname) { SECStatus rv; CERTCertificate *cert; CERTCertTrust trust; PK11SlotInfo *slot = PK11_FindSlotByName(tokenName); /* need to decode der cert */ char *derCertBase64 = getParameter("dercert",getResourceString(DBT_DER_CERT)); CERTDERCerts *collectArgs = decodeDERCert(derCertBase64); /* if slot can not be found, then certificate can not be added */ if (slot == NULL) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_NO_SLOT)); } /* import just the first certificate */ { CERTCertificate **retCerts; unsigned int ncerts = 1; PRBool keepCerts = PR_FALSE; PRBool caOnly = PR_FALSE; char *nickname = certname; rv = CERT_ImportCerts(certdb, certUsageSSLServer, ncerts, &collectArgs->rawCerts, &retCerts, keepCerts, caOnly, nickname); if (rv != SECSuccess) { goto bail; } cert = retCerts[0]; } /* * if the user didn't specify certificate name then * Try using fields from the subject name as the certificate name */ if (!certname) { certname = constructNameDesc(&cert->subject); } /* remove leading space in certificate name */ if (certname) { while (isspace(*certname)) ++certname; } /* A server cert must have a matching private key in the keydb */ { /*check to see if certificate has a matching private key under the key db*/ SECKEYPrivateKey *key = PK11_FindKeyByDERCert(slot, cert, NULL); if (!key) { PR_snprintf(line, sizeof(line), getResourceString(DBT_NO_PRIVATE_KEY_WHY), tokenName); rpt_err(INCORRECT_USAGE, getResourceString(DBT_NO_PRIVATE_KEY), line, NULL); } } /* set thust bits */ memset((char *)&trust, 0, sizeof(trust)); trust.sslFlags = CERTDB_USER;; cert->trust = &trust; /* import certificate to the PKCS11 module */ rv = PK11_ImportCertForKeyToSlot(slot, cert, certname, PR_TRUE, 0); bail: if (rv != SECSuccess) { PR_snprintf(line, sizeof(line), "%d:%s", PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_EN)); /* if unable to import report error */ rpt_err(SYSTEM_ERROR, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_INSTALL_FAIL), line); } } /* * Install a CA cert and set its trust */ static void installCACert(char *tokenName, char *certname) { /* need to decode der cert */ CERTCertificate *cert; char *derCertBase64 = NULL; CERTDERCerts *collectArgs = NULL; PK11SlotInfo *slot = NULL; CERTCertificate **retCerts = 0; PRBool keepCerts = PR_TRUE; PRBool caOnly = PR_TRUE; char *nickname = certname; char *truststr = NULL; char *endptr = NULL; int trustflag; int trustedCA; SECStatus rc = 0; derCertBase64 = getParameter("dercert",getResourceString(DBT_DER_CERT)); collectArgs = decodeDERCert(derCertBase64); truststr = getParameter("trust_flag",getResourceString(DBT_TRUST)); trustflag = strtol(truststr, &endptr, 0); if (tokenName) { slot = PK11_FindSlotByName(tokenName); } else { slot = PK11_GetInternalKeySlot(); } /* remove leading space in certificate name */ if (certname) { while (isspace(*certname)) ++certname; } /* Import CA Cert and set trust */ if ((*truststr == '\0') || !endptr || (*endptr != '\0')) { /* invalid trust flags */ errorRpt(GENERAL_FAILURE, getResourceString(DBT_TRUST_SET_FAIL)); } trustedCA = (trustflag & CERTDB_TRUSTED_CA); rc = CERT_ImportCerts(certdb, (trustedCA ? certUsageSSLCA : certUsageAnyCA), collectArgs->numcerts, &collectArgs->rawCerts, &retCerts, keepCerts, caOnly, nickname); if (rc != SECSuccess) { goto bail; } CERT_FindCertByDERCert(certdb, collectArgs->rawCerts); cert = retCerts[0]; rc = PK11_ImportCert(slot, cert, CK_INVALID_HANDLE, certname, PR_FALSE); bail: if (rc != SECSuccess) { PR_snprintf(line, sizeof(line), "%d:%s", PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_EN)); /* if unable to import report error */ rpt_err(SYSTEM_ERROR, getResourceString(DBT_INTERNAL_ERROR), getResourceString(DBT_INSTALL_FAIL), line); } if(CK_INVALID_HANDLE == PK11_FindCertInSlot(slot, cert, NULL)) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_INSTALL_FAIL)); } setTrust(processNullString(getMD5Fingerprint(retCerts[0])), trustflag); } /* * Check if internal token needs to be initialized. */ static void needInit() { PK11SlotInfo *slot = PK11_GetInternalKeySlot(); char *tokenName = get_cgi_var("tokenname", NULL, NULL); if (tokenName != NULL) { slot= PK11_FindSlotByName(tokenName); } if (slot && (PK11_NeedUserInit(slot) == PR_TRUE)) { /*errorRpt(INCORRECT_USAGE, getResourceString(DBT_INVALID_CONFIRM_PWD));*/ rpt_success("TRUE"); } else { rpt_success("FALSE"); } } /* * Initialize internal token's (key3.db) password */ static void initPin(char* keypwd, char* confirm) { PK11SlotInfo *slot= PK11_GetInternalKeySlot(); char *tokenName = get_cgi_var("tokenname", NULL, NULL); if (tokenName != NULL) { slot= PK11_FindSlotByName(tokenName); } /* set password */ if (PORT_Strcmp(keypwd, confirm)) { errorRpt(INCORRECT_USAGE, getResourceString(DBT_INVALID_CONFIRM_PWD)); } if (!slot || (PK11_InitPin(slot, 0, keypwd) != SECSuccess)) { errorRpt(APP_ERROR, getResourceString(DBT_INIT_FAIL)); } } /* * Delete a certificate */ static void deleteCertificate(char *certFingerprint) { CERTCertificate* cert = findCertByFingerprint(certFingerprint); if (!cert) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_NOT_FOUND)); } /* Need to call DestroyTokenObject in case it is a cert in an external slot */ if (cert->slot) { if (PK11_DestroyTokenObject(cert->slot, PK11_FindCertInSlot(cert->slot, cert, NULL)) == SECFailure) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_DELETE_FAIL)); } } else if (SEC_DeletePermCertificate(cert) == SECFailure) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CERT_DELETE_FAIL)); } } /* * Delete crl/krl */ static void deleteCRL(char* crlname, char* type) { int list_type = (type && !PORT_Strcmp(type, "CKL"))? SEC_KRL_TYPE : SEC_CRL_TYPE; CERTSignedCrl* crl = cmgFindCrlByName(certdb, crlname, list_type); if (!crl) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CRL_CKL_NOT_FOUND)); } if (SEC_DeletePermCRL(crl) == SECFailure) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_CRL_DELETE_FAIL)); } } /* * install crl/krl from file */ static void installCRL(char* filename, char* type) { unsigned char *ascii = NULL; int asciiLen = 0; CERTSignedCrl *signed_crl, *excrl, *crl_rv = NULL; SECItem derCrl; char msg[BIG_LINE]; char full_path[PATH_MAX]; int list_type = (type && !PORT_Strcmp(type, "CKL"))? SEC_KRL_TYPE : SEC_CRL_TYPE; if (!filename || !*filename || !util_is_valid_path_string(filename) || !util_verify_file_or_dir(securitydir, PR_FILE_DIRECTORY, filename, -1, PR_FILE_FILE)) { /* invalid file */ PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), filename); errorRpt(FILE_ERROR, msg); } {/*try open the file*/ FILE *f; PR_snprintf(full_path, sizeof(full_path), "%s%c%s", securitydir, FILE_PATHSEP, filename); if( !(f = fopen(full_path, "rb")) ) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), full_path); errorRpt(FILE_ERROR, msg); } else { int size; #define BLOCK_SIZE 2048 char buf[BLOCK_SIZE]; while (!feof(f)) { size= fread(buf,1,BLOCK_SIZE,f); if (size == 0) break; if (ascii) { ascii = (unsigned char*) PORT_Realloc(ascii, asciiLen + size); } else { ascii = (unsigned char*) PORT_Alloc(size); } memcpy(ascii+asciiLen, buf, size); asciiLen += size; } ascii = (unsigned char*) PORT_Realloc(ascii, asciiLen + 1); ascii[asciiLen] = '\0'; /* null terminate string */ fclose(f); } } derCrl.data = ascii; derCrl.len = asciiLen; /*pre process to filter out all the junks, this will leave us only with begin cert crl and end crl footer this part of code is to handle the case user enter a base64 encoded ascii text file. */ { int headerlen = 0; char *DERCert = NULL; char* begin = (char*) PORT_Strstr((const char*)ascii, CRLHEADER); char* end = (char*) PORT_Strstr((const char*)ascii, CRLFOOTER); /* Check for the alternate CRL header and footer format */ if (begin == NULL) { begin = (char*) PORT_Strstr((const char*)ascii, X509CRLHEADER); headerlen = strlen(X509CRLHEADER); if (begin == NULL) { begin = (char*) PORT_Strstr((const char*)ascii, NEWCRLHEADER); headerlen = strlen(NEWCRLHEADER); } } else { headerlen = strlen(CRLHEADER); } if (end == NULL) { end = (char*) PORT_Strstr((const char*)ascii, X509CRLFOOTER); if (end == NULL) { end = (char*) PORT_Strstr((const char*)ascii, NEWCRLFOOTER); } } if ((begin != NULL) && (end != NULL)) { /* chop the footer off */ *end = '\0'; /* don't copy the header */ DERCert = (char*)PORT_ZAlloc(PORT_Strlen(begin) - headerlen + 1); strcpy(DERCert, (begin + headerlen)); if ( SECFailure == ATOB_ConvertAsciiToItem(&derCrl, DERCert) ) { errorRpt(SYSTEM_ERROR, getResourceString(DBT_DECODE_CRL_ERROR)); } } else { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_INVALID_CRL), full_path); errorRpt(FILE_ERROR, msg); } } signed_crl = CERT_DecodeDERCrl(NULL, &derCrl, list_type); if ( signed_crl == NULL ) { errorRpt(SYSTEM_ERROR, getResourceString(DBT_DECODE_CRL_ERROR)); } if (get_cgi_var("installmethod", NULL, NULL) == NULL) { /* Decode/View only */ showCRLRow(signed_crl, PR_TRUE, list_type); return; } /*remove old crl*/ { /*char *name;*/ excrl = (CERTSignedCrl *)SEC_FindCrlByDERCert((CERTCertDBHandle *)certdb, &derCrl, list_type); if (excrl) { if (SEC_DeletePermCRL(excrl) != SECSuccess) { errorRpt(SYSTEM_ERROR, getResourceString(DBT_REMOVE_ERROR)); } } } crl_rv = (CERTSignedCrl *)SEC_NewCrl(certdb, NULL, &derCrl, list_type); if (!crl_rv) { errorRpt(APP_ERROR, getResourceString(DBT_INSTALL_ERROR)); } } /* * List pkcs 11 modules */ void listModule() { SECMODModuleList *mlp; SECMODModuleList *modules; SECMODListLock *moduleLock; modules = SECMOD_GetDefaultModuleList(); moduleLock = SECMOD_GetDefaultModuleListLock(); SECMOD_GetReadLock(moduleLock); fprintf(stdout, "\n"); for(mlp = modules; mlp != NULL; mlp = mlp->next) { fprintf(stdout, "\t<%s>\n", mlp->module->commonName, mlp->module->commonName); } fprintf(stdout, "\n"); SECMOD_ReleaseReadLock(moduleLock); } /* Returns true if the cert is a user cert and has been printed */ static int printNickName(int certIdx, CERTCertificate *cert) { char *cert_name = cert->nickname; CERTCertTrust trust; int flags = 0; SECStatus rv; if (!cert_name) { cert_name = constructNameDesc(&cert->subject); if (!cert_name) { return 0; } } rv = CERT_GetCertTrust(cert, &trust); if (rv == SECSuccess) { flags = trust.sslFlags; } if(flags & CERTDB_USER) { fprintf(stdout, "\t\t\t%s\n", certIdx, cert_name, certIdx); return 1; } return 0; } /* * List server certs per token. Do not show tokens without certs. */ static void listCertsPerToken(const char *pkcs11TokenFamily, PK11SlotList* pk11SlotList) { PK11SlotListElement *token; CERTCertList *certList; CERTCertListNode *cln; char *internalTokenName = PK11_GetTokenName(PK11_GetInternalKeySlot()); int totalCertCount=0; if(pk11SlotList->head) { fprintf(stdout, "\t<%s>\n", pkcs11TokenFamily); certList = PK11_ListCerts(PK11CertListUser, NULL); for(token = pk11SlotList->head; certList && token; token = token->next) { int tokenCertCount = 0; char *tokenName = PK11_GetTokenName(token->slot); for (cln = CERT_LIST_HEAD(certList); !CERT_LIST_END(cln,certList); cln = CERT_LIST_NEXT(cln)) { char *certTokenName=NULL; /* * Print cert if it is in this (cln) token; For certs on the internal * token, the cert reference to a slot/token is NULL. */ if (cln->cert->slot == NULL) { certTokenName = internalTokenName; } else { certTokenName = PK11_GetTokenName(cln->cert->slot); } /* Output the cert if it belongs to this token */ if (strcmp(tokenName, certTokenName) == 0) { if (tokenCertCount == 0) { fprintf(stdout, "\t\t<%s>\n", PK11_GetTokenName(token->slot)); } if (printNickName(tokenCertCount, cln->cert)) { tokenCertCount++; totalCertCount++; } } } if (tokenCertCount > 0) { fprintf(stdout, "\t\t\n", PK11_GetTokenName(token->slot)); } } /* Output at least the intrnal token name if there are no certs */ if (totalCertCount == 0) { fprintf(stdout, "\t\t<%s>\n", internalTokenName); fprintf(stdout, "\t\t\n", internalTokenName); } fprintf(stdout, "\t\n", pkcs11TokenFamily); } } /* * List all the possible tokens resides under any pkcs11 device */ void listToken() { PK11SlotList *list; fprintf(stdout, "\n"); #ifdef NS_DOMESTIC if(SECMOD_IsModulePresent(PUBLIC_CIPHER_FORTEZZA_FLAG)) fprintf(stdout, "\tfortezza\n"); else fprintf(stdout, "\tdomestic\n"); #else fprintf(stdout, "\texport\n"); #endif /* NS_DOMESTIC */ /*RSA token list*/ list = PK11_GetAllTokens(CKM_RSA_PKCS, PR_FALSE, PR_FALSE, NULL); listCertsPerToken("RSA_TOKEN", list); PK11_FreeSlotList(list); list = PK11_GetAllTokens(CKM_SKIPJACK_CBC64, PR_FALSE, PR_FALSE, NULL); listCertsPerToken("FORTEZZA_TOKEN", list); PK11_FreeSlotList(list); fprintf(stdout, "\n"); } /* * List all the possible tokens resides under any pkcs11 device */ void tokenInfo() { PK11SlotList* slotList; PK11SlotListElement *slot; slotList = PK11_GetAllTokens(CKM_RSA_PKCS, PR_FALSE, PR_FALSE, NULL); fprintf(stdout, "\n"); for(slot = slotList->head; slot != NULL; slot = slot->next) { fprintf(stdout, "\t<%s>\n", PK11_GetTokenName(slot->slot)); fprintf(stdout, "\t\t%s\n", PK11_GetModule(slot->slot)->commonName); fprintf(stdout, "\t\t%s\n", PK11_IsInternal(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\t%s\n", PK11_IsHW(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\t%s\n", PK11_IsReadOnly(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\t%s\n", PK11_NeedLogin(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\t%s\n", PK11_IsFriendly(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\t%s\n", PK11_NeedUserInit(slot->slot) ? "TRUE" : "FALSE"); fprintf(stdout, "\t\n", PK11_GetTokenName(slot->slot)); } fprintf(stdout, "\n"); PK11_FreeSlotList(slotList); } /* * Add/remove pkcs 11 module from the secmod db */ static void moduleOperation(char* op) { const char *binary = "modutil"; /* PATH and LD_LIBRARY_PATH must already be set correctly */ const char *install_dir = LIBDIR; char *filename, *filetype, *dllname; char cmd[BIG_LINE] = ""; char msg[BIG_LINE]; dllname = get_cgi_var("dllname", NULL, NULL); if (!PORT_Strcmp(op, "remove")) { if (!dllname || !*dllname || !is_valid_name_string(dllname)) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_MISSING_MODULE_NAME)); rpt_err(INCORRECT_USAGE, msg, NULL, NULL); } PR_snprintf(cmd, sizeof(cmd), "%s -dbdir %s -force -nocertdb -delete \"%s\" 2>&1", binary, securitydir, dllname); } else if (!PORT_Strcmp(op, "add")) { filename = getParameter("filename",getResourceString(DBT_MISSING_FILE)); filetype = getParameter("format",getResourceString(DBT_MISSING_FORMAT)); /* see if filename exists in securitydir */ if(!util_is_valid_path_string(filename) || !util_verify_file_or_dir(securitydir, PR_FILE_DIRECTORY, filename, -1, PR_FILE_FILE)) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), filename); rpt_err(FILE_ERROR, msg, NULL, NULL); } /* Bail if the format wasn't specified. */ if (!filetype) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_MISSING_FORMAT)); rpt_err(INCORRECT_USAGE, msg, NULL, NULL); } /* dllname is the internal name of the module - the user must have specified a valid name */ if((filetype && (!PORT_Strcmp(filetype, "dll"))) && (!dllname || !PORT_Strcmp(dllname, "") || !is_valid_name_string(dllname))) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_MISSING_MODULE_NAME)); rpt_err(INCORRECT_USAGE, msg, NULL, NULL); } /* * NOTE: The UI version of installing PKCS #11 modules will * NOT check jar signatures (hence "-noverify"). * If the administrator really wants to do this, * run modutil from the command line. */ if(!PORT_Strcmp(filetype, "jar")) PR_snprintf(cmd, sizeof(cmd), "%s -jar %s -installdir %s -dbdir %s -force -nocertdb 2>&1", binary, filename, install_dir, securitydir); else if (!PORT_Strcmp(filetype, "dll")) PR_snprintf(cmd, sizeof(cmd), "%s -dbdir %s -add \"%s\" -libfile %s -force -nocertdb 2>&1", binary, securitydir, dllname, filename); else { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_INVALID_FORMAT)); rpt_err(INCORRECT_USAGE, msg, NULL, NULL); } } else { /* invalid op */ PR_snprintf(msg, sizeof(msg), getResourceString(DBT_INVALID_OP), op); rpt_err(INCORRECT_USAGE, msg, NULL, NULL); } if(*cmd && (system(cmd) != 0)) { if (!PORT_Strcmp(op, "add")) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_MODUTIL_FAILURE), filename); } else if (!PORT_Strcmp(op, "remove")) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_FAIL_REMOVED)); } rpt_err(APP_ERROR, msg, NULL, NULL); } } /* * Change password for a token */ static void changePassword(char* oldPwd, char* newPwd, char* confirmPwd) { SECStatus rv; PK11SlotInfo *slot= PK11_GetInternalKeySlot(); char *tokenName = get_cgi_var("tokenname", NULL, NULL); if (tokenName != NULL) { slot= PK11_FindSlotByName(tokenName); } if (slot == NULL) { errorRpt(GENERAL_FAILURE, getResourceString(DBT_NO_SLOT)); } if(PORT_Strcmp(newPwd, confirmPwd)) { errorRpt(INCORRECT_USAGE, getResourceString(DBT_INVALID_CONFIRM_PWD)); } cur_pwd = PORT_Strdup(oldPwd); rv = PK11_Authenticate(slot, PR_FALSE, 0); if (rv != SECSuccess) { errorRpt(INCORRECT_USAGE, getResourceString(DBT_INVALID_OLD_PWD)); } rv = PK11_ChangePW(slot, oldPwd, newPwd); if (rv != SECSuccess) { char err_text[BIG_LINE]; PR_snprintf(err_text, sizeof(err_text), getResourceString(DBT_FAIL_CHANG_PWD), PR_GetError()); errorRpt(APP_ERROR, err_text); } } /* Makes a list of the aliases installed on machine. */ static void listAlias() { errorRpt(INCORRECT_USAGE, getResourceString(DBT_MIGRATION_NOT_SUPPORTED)); } /* migration via CGI is no longer supported - migration is performed as part of install/upgrade or as a separate command line utility */ static void keyCertMigrate() { errorRpt(INCORRECT_USAGE, getResourceString(DBT_MIGRATION_NOT_SUPPORTED)); } int main(int argc, char *argv[]) { /* cgi env setup */ char *m = NULL; char msg[BIG_LINE]; AdmldapInfo ldapInfo; /* our config */ int rc = 0; char *sie; char *configdir = NULL; const char *secdir = NULL; #if 0 CGI_Debug("security"); #endif ADMUTIL_Init(); m = getenv("REQUEST_METHOD"); configdir = util_get_conf_dir(); secdir = util_get_security_dir(); /*setup i18n stuff*/ { char *lang=getenv("HTTP_ACCEPT_LANGUAGE"); i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); i18nResource_common = res_find_and_init_resource(PROPERTYDIR, COMMON_RESOURCE_FILE); acceptLanguage = "en"; if (lang) acceptLanguage = strdup(lang); /*nss 2.8 suppose to handle universal string...*/ /*PORT_SetUCS4_UTF8ConversionFunction(MC_nlsConvertUCS4UTF8);*/ } /*standard html header*/ fprintf(stdout, "Content-type: text/html\n\n"); fflush(stdout); /* This cgi only handle post request*/ if(!m || PORT_Strcmp(m, "POST")) { return 0; } post_begin(stdin); sie = getParameter("sie", getResourceString(DBT_SIE)); ldapInfo = admldapBuildInfoOnly(configdir, &rc); if (rc || !ldapInfo) { PR_snprintf(line, sizeof(line), getResourceString(CMN_CONFIGPROBLEM), configdir ? configdir : "(null)", rc); errorRpt(FILE_ERROR, line); } #ifdef DUMP_CACHE_INFO if (NSS_IsInitialized()) { printf("nss_DumpCertificateCacheInfo 1\n"); nss_DumpCertificateCacheInfo(); } #endif if(ADMSSL_InitSimple((char *)configdir, (char *)secdir, 1)) { PR_snprintf(line, sizeof(line), getResourceString(CMN_SSL_INIT_ERROR), secdir ? secdir : "(null)", PR_GetError(), SSL_Strerror(PR_GetError()) ? SSL_Strerror(PR_GetError()) : "unknown"); errorRpt(SYSTEM_ERROR, line); } securitydir = getSecurityDir(ldapInfo, sie); { char* operation = getParameter("formop",getResourceString(DBT_OP)); if (!operation) { /* if we got here it means front end pass back a bogus operation string */ PR_snprintf(line, sizeof(line), getResourceString(DBT_NO_OP), operation); errorRpt(INCORRECT_USAGE, line); } else if (!PORT_Strcmp(operation, "MIGRATE_DB")) { keyCertMigrate(); } else { /*only initialize db when we are not trying to migrate if we initialize db then we won't be able to migrate because security library will hog up the file and we can not remove it.*/ if (!util_verify_file_or_dir(securitydir, PR_FILE_DIRECTORY, NULL, 0, PR_FILE_FILE)) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), securitydir ? securitydir : "(null)"); errorRpt(INCORRECT_USAGE, msg); } /* we got here, we think sie is a valid prefix */ /* close all db - we may have had to open the admin server key/cert db in order to use LDAPS before - now have to shut down NSS and reinit */ closeAllSecurityDB(); securityInitialization(securitydir); if (!PORT_Strcmp(operation, "LIST_CERTIFICATE")) { /* list cert */ listCert(getParameter("tokenname",getResourceString(DBT_TOKEN_NAME))); /* fprintf(stdout, "total_cert:%d",num_of_certs++); */ } else if (!PORT_Strcmp(operation, "CHANGE_TRUST")) { char *endptr = NULL; char *truststr = getParameter("trust_flag",getResourceString(DBT_TRUST)); int trustflag = strtol(truststr, &endptr, 0); if ((*truststr == '\0') || !endptr || (*endptr != '\0')) { /* invalid trust flags */ errorRpt(GENERAL_FAILURE, getResourceString(DBT_TRUST_SET_FAIL)); } /* change trust */ setTrust(getParameter("certfingerprint",getResourceString(DBT_CERT_FINGERPRINT)), trustflag); } else if (!PORT_Strcmp(operation, "FIND_CERTIFICATE")) { /* view cert */ printCertDetail(getParameter("certfingerprint",getResourceString(DBT_CERT_FINGERPRINT))); } else if (!PORT_Strcmp(operation, "GENERATE_CSR")) { /* generate a CSR (certificate signing request) */ generateCSR(getParameter("tokenname",getResourceString(DBT_TOKEN_NAME))); } else if (!PORT_Strcmp(operation, "INSTALL_CERT")) { int viewOnly = (get_cgi_var("installmethod", NULL, NULL) == NULL); /* certtype=0 - server certificate, certtype=1 - ca certificate */ char *certType = getParameter("certtype",getResourceString(DBT_CERTIFICATE_TYPE)); int isCACert = (atoi(certType) == 1); if (viewOnly) { printDERCert(isCACert); /* show decoded certificate */ } else { /* install a certificate */ char *certName = get_cgi_var("certname", NULL, NULL); char *tokenName = getParameter("tokenname",getResourceString(DBT_TOKEN_NAME)); if (isCACert) { installCACert(tokenName, certName); } else { installServerCert(tokenName, certName); } } } else if (!PORT_Strcmp(operation, "NEED_INIT")) { /* see if the db need init (set the password) */ needInit(); } else if (!PORT_Strcmp(operation, "INIT_PIN")) { /* initialize internal token pin */ /* We fetch the paramters here for the benefit of the Console. If we call * getParameter() as an argument to initPin, the calling order causes the * error message that is returned to be out of order with the display in * the UI. */ char *newpwd = getParameter("newpwd",getResourceString(DBT_PASSWORD)); char *confirmpwd = getParameter("confirmpwd",getResourceString(DBT_PASSWORD)); initPin(newpwd, confirmpwd); } else if (!PORT_Strcmp(operation, "DELETE_CACERT")) { /* remove a ca certificate */ deleteCertificate(getParameter("certfingerprint",getResourceString(DBT_CERT_FINGERPRINT))); } else if (!PORT_Strcmp(operation, "DELETE_CRL_CKL")) { /* remove a crl or ckl certificate */ deleteCRL(getParameter("crlname", getResourceString(DBT_CRL_NAME)), get_cgi_var("list_type", NULL, NULL)); } else if (!PORT_Strcmp(operation, "LIST_MODULE")) { /* list all loaded pkcs#11 modules */ listModule(); } else if (!PORT_Strcmp(operation, "LIST_TOKEN")) { /* list all avaliable security device*/ listToken(); } else if (!PORT_Strcmp(operation, "TOKEN_INFO")) { /* get info on all available tokens */ tokenInfo(); } else if (!PORT_Strcmp(operation, "MODULE_OPERATION")) { /* operate on pkcs#11 module */ /* current there is only 2 op type, add or delete */ moduleOperation(getParameter("op_type", getResourceString(DBT_MODULE_OP_TYPE))); } else if (!PORT_Strcmp(operation, "CHANGE_PASSWORD")) { /* change internal db password */ /* currently change password only apply to key3.db, and we do not deal with change password for external token. User can do that via the software that comes with the hardware */ /* We fetch the paramters here for the benefit of the Console. If we call * getParameter() as an argument to initPin, the calling order causes the * error message that is returned to be out of order with the display in * the UI. */ char *oldpwd = getParameter("oldpwd", getResourceString(DBT_OLD_PWD)); char *newpwd = getParameter("newpwd", getResourceString(DBT_NEW_PWD)); char *confirmpwd = getParameter("confirmpwd", getResourceString(DBT_CONFIRM_PWD)); changePassword(oldpwd, newpwd, confirmpwd); } else if (!PORT_Strcmp(operation, "INSTALL_CRL_CKL")) { /* install a crl/ckl certificate */ installCRL(getParameter("filename", getResourceString(DBT_MISSING_FILE)), get_cgi_var("list_type", NULL, NULL)); } else if (!PORT_Strcmp(operation, "FIND_CRL_CKL")) { /* print detail information of a crl/ckl */ char *type = get_cgi_var("list_type", NULL, NULL); fprintf(stdout, "<%s>\n", type?type:""); showCRLRow(cmgFindCrlByName(certdb, getParameter("crlname", getResourceString(DBT_MISSING_FILE)), (type && !PORT_Strcmp(type, "CKL"))? SEC_KRL_TYPE : SEC_CRL_TYPE), PR_TRUE, ((type && !PORT_Strcmp("CRL", type))?SEC_CRL_TYPE:SEC_KRL_TYPE)); fprintf(stdout, "\n", type); } else if (!PORT_Strcmp(operation, "LIST_ALIAS")) { /* list old server root's alias */ listAlias(); } else { /* if we got here it means front end pass back a bogus operation string */ PR_snprintf(line, sizeof(line), getResourceString(DBT_NO_OP), operation); errorRpt(INCORRECT_USAGE, line); } /* close all db */ closeAllSecurityDB(); } } /* report success since no error occured */ rpt_success(NULL); return 0; } 389-admin-1.1.35/admserv/cgi-src40/security.properties000066400000000000000000000125461220472121400223360ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { security1 { "Missing parameters" } security2 { "You should enter a %s." } security3 { "Internal error" } security4 { "Unable to allocate memory." } security5 { "No such operation: %s." } security6 { "Unable to open key database." } security7 { "Unable to open certificate database." } security8 { "Fail to init internal token." } security9 { "Invalid password for the token \"%s\"." } security10 { "An error has occured." } security11 { "Unable to read alias directory." } //#/* cert install */ security20 { "Slot not found." } security21 { "Unable to decode the certificate." } security22 { "Private key not found." } security23 { "Failed to install certificate." } security24 { "Either this certificate is for another server, or this certificate was not requested using this server and the selected security device \"%s\"." } security25 { "Invalid DER certificate." } security26 { "Unable to extract any certificates." } security27 { "The certificate specified is not a valid CA Certificate; installation aborted." } security28 { "Can not install a certificate chain; You need to install one certificate at a time." } //#/* cert request */ security30 { "Unable to generate a valid key pair." } security31 { "Unable to generate PKCS #10 (CSR)." } security32 { "Unable to convert DN to certificate name." } security33 { "Unable to generate public key information." } //#/* cert op */ security40 { "Unable to find the certificate specified." } security41 { "Unable to set the trust infomation." } security42 { "Unable to list certificates." } security43 { "Unable to delete the certificate specified." } security44 { "Unable to delete the CRL or CKL specified." } security45 { "Unable to find the CRL or CKL specified." } //#/* module operation */ security50 { "Could not open file %s. File does not exist or filename is invalid. A filename that exists in the server security directory must be specified. Absolute or relative paths should not be specified." } security51 { "Could not add module found in file %s." } security52 { "The module has been successfully added. Please restart the console for changes to take effect." } security53 { "No file specified. Enter the full path of a file." } security54 { "No file format specified." } security55 { "Invalid file format." } security56 { "No module name or incorrect module name specified. Please enter a valid module name." } security57 { "The module has been successfully removed. Please restart the console for changes to take effect." } security58 { "Module might not have been removed." } security59 { "Additional information available in %s." } //#/* Possible parameters */ security70 { "SIE" } security71 { "Password" } security72 { "Distinguish Name (DN)" } security73 { "Operation name" } security74 { "DER encoded certficate" } security75 { "Certificate name" } security76 { "Token name" } security77 { "Trust flag" } security78 { "Install operation method" } security79 { "Certificate type" } security80 { "CRL or CKL name" } security81 { "Add or Remove" } security82 { "Old password" } security83 { "New password" } security84 { "New password (again)" } security85 { "Session data" } security86 { "Server root" } security87 { "Certificate fingerprint (MD5)" } //#/* change password */ security100 { "Unable to change the key file password, error=%d." } security101 { "The old password is incorrect." } security102 { "The new password you type do not match." } security103 { "Unable to init the internal (software) token." } //#/* crl/krl */ security110 { "Error decoding the CRL/CKL file. Please make sure it is valid." } security111 { "Error deleting the existing CRL/CKL in replacement process." } security112 { "Error writing the new CRL/CKL into the certificate database." } security113 { "The file %s does not contain a valid CRL/CKL. Please make sure it is in the PEM format (base64 encoded DER)." } //#/* key/cert migration */ security120 { "Alias" } security121 { "Key or Certificate database doesn't exist in the old server root specified" } security122 { "Unable to migrate old Key or certificate database to new server. Make sure there aren't any server using the key and certificate database." } security123 { "Invalid server specified." } security124 { "Migration of old key and certificate databases is no longer supported." " Migration will usually be performed as part of upgrade installation, or" " as a separate migration command. Please refer to the Admin Server guide" " for more information." } security150 { "The module operation code \"%s\" is not valid." } } 389-admin-1.1.35/admserv/cgi-src40/setport.c000066400000000000000000000106071220472121400202110ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Description (setport.c) * * This module contains routines used by administration CGI * programs to set the port number of Admin server * * This is just a prototype */ #include #include #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); PsetHndl pset; char *method; int rv; char *url; int err; int *errp = &err; char *username = 0; char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; char *newValue = 0; char *portVal = 0; char error_info[128]; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); /* Get new port number */ if (!method || !*method) { rpt_err(SYSTEM_ERROR, "No method is specified", NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ char *qs = getenv("QUERY_STRING"); if (!qs || !*qs) { rpt_err(INCORRECT_USAGE, "NO QUERY_STRING DATA", NULL, NULL); } else { get_begin(qs); newValue = get_cgi_var("value", 0, 0); } } else if (!strcmp(method, "POST")) { post_begin(stdin); newValue = get_cgi_var("value", 0, 0); } else { PR_snprintf(error_info, sizeof(error_info), "Unknown Method (%s)!\n", method); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } if (!newValue) { rpt_err(INCORRECT_USAGE, "NO DATA", NULL, NULL); } /* Get UserDN and User Password */ rv = ADM_GetUserDNString(&err, &binddn); if (rv < 0 || !binddn || !*binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) { rpt_err(ELEM_MISSING, "NO USER NAME", NULL, NULL); } else { /* No DN, maybe it is local super */ /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(configdir, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) { rpt_err(ELEM_MISSING, "ErrorString: NO USER DN!", NULL, NULL); } else { binddn = NULL; bindpw = NULL; } } else { rpt_err(ELEM_MISSING, "ErrorString: NO USER DN!", NULL, NULL); } } } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } /* Initialize the pset */ pset = psetCreateSSL("admin-serv", /* configRoot */ configdir, /* userDN */ binddn, /* passwd */ bindpw, /* errorcode */ &rv); if (!pset) { PR_snprintf(error_info, sizeof(error_info), "PSETERROR: %d", rv); rpt_err(APP_ERROR, "PSET CREATE Failed", NULL, error_info); } /* Set port number to new number */ rv = psetSetSingleValueAttr(pset,"configuration.nsServerPort", newValue); /* Send response back */ if (rv != 0) { PR_snprintf(error_info, sizeof(error_info), "PSETERROR: %d", rv); rpt_err(APP_ERROR, "PSET SET Failed", NULL, error_info); } portVal = psetGetAttrSingleValue(pset,"configuration.nsServerPort", &rv); if (rv != 0) { PR_snprintf(error_info, sizeof(error_info), "PSETERROR: %d", rv); rpt_err(APP_ERROR, "SET is OK, but Verify GET Error", NULL, error_info); } else { rpt_success(NULL); fprintf(stdout, "Value: %s\n", portVal); } } 389-admin-1.1.35/admserv/cgi-src40/start_config_ds.c000066400000000000000000000052041220472121400216560ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /*///////////////////////////////////////////////////////*/ /*/ /*/ /*/ David Tompkins (mailto:dt@netscape.com) /*/ /*/ Netscape Communications Corp. /*/ /*/ 9/21/98 /*/ /*/ /*/ /*/ start_config_ds: starts a config DS instance /*/ /*/ /*/ /*///////////////////////////////////////////////////////*/ #include #include #include #include #include #include int error_exit(char *msg) { printf("Content-type: text/html\n\n"); printf("StartConfigDS Error

StartConfigDS Error

"); printf("Your request could not be fulfilled.

"); printf("Reason : %s
", msg); exit(0) ; } int success_exit() { sleep(10); printf("Content-type: text/html\n"); printf("Content-length: 13\n\n"); printf("NMC_Status: 0"); fflush(stdout); fclose(stdout); exit(0) ; } int main(int argc, char *argv[]) { int ret_val = 0; char *startcmd = 0; AdmldapInfo info; char *configdir = util_get_conf_dir(); /* find and open the AS config file adm.conf */ info = admldapBuildInfoOnly(configdir, &ret_val); if (!info) { return error_exit("Failed to open adm.conf"); } startcmd = admldapGetLdapStart(info); if (startcmd) { if ((ret_val = system(startcmd)) == -1) return error_exit("system() returned -1"); if (ret_val != 0) return error_exit("Execution of the StartConfigDS command returned non-zero"); return success_exit(); } return error_exit("No ldapStart entry found in adm.conf"); } 389-admin-1.1.35/admserv/cgi-src40/statpingserv.c000066400000000000000000000120121220472121400212320ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * statpingserv.c - determine the on/off status of any server. * * Takes a host and port, and the result can either be an * on or off icon, or text describing status. * * All blame to Adam Prishtina (adam@netscape.com) */ #include #include #include #include #include "libadminutil/distadm.h" #include "libadminutil/resource.h" #ifdef __cplusplus extern "C" { #endif #include "libadmsslutil/certmgt.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "key.h" #include "cert.h" #include "secport.h" #include "secmod.h" #include "prnetdb.h" #ifdef __cplusplus } #endif int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); char *m; char *qs = getenv("QUERY_STRING"); PRStatus err; char gifbuf[BUFSIZ]; PRInt32 bytes; PRFileDesc *req_socket= NULL; int retcode = 0; PRNetAddr *netaddr = NULL; char *result; char *host; int port; PRFileDesc *gif; char *file; char *portstr; struct PRFileInfo64 prfileinfo; (void)_ai; /* get rid of unused variable warning */ m = getenv("REQUEST_METHOD"); if(!strcmp(m, "GET")) { if(qs) get_begin(qs); result = get_cgi_var("result", NULL, NULL); host = get_cgi_var("host", NULL, NULL); portstr = get_cgi_var("port", NULL, NULL); if (portstr) { port = atoi(portstr); } else { port = 0; } if(result && !strcmp(result, "text")) fprintf(stdout, "Content-type: text/html\n"); else fprintf(stdout, "Content-type: image/gif\n"); if (!host || !port) { rpt_err(APP_ERROR, "Invalid hostname and/or port number!", NULL, NULL); return -1; } netaddr = (PRNetAddr *)calloc(1, sizeof(PRNetAddr)); if (NULL == netaddr) { rpt_err(APP_ERROR, "Failed to allocate PRNetAddr", NULL, NULL); return -1; } err = PR_StringToNetAddr(host, netaddr); if (PR_SUCCESS == err) { PR_InitializeNetAddr(PR_IpAddrNull, (PRUint16)port, netaddr); } else { PRAddrInfo *infop = PR_GetAddrInfoByName(host, PR_AF_UNSPEC, (PR_AI_ADDRCONFIG|PR_AI_NOCANONNAME)); if (infop) { void *iter = NULL; memset( netaddr, 0, sizeof( PRNetAddr )); /* need just one address */ iter = PR_EnumerateAddrInfo(iter, infop, (PRUint16)port, netaddr); if (NULL == iter) { rpt_err(APP_ERROR, "Failed to enumerate addrinfo", NULL, NULL); retcode = -1; } PR_FreeAddrInfo(infop); } else { rpt_err(APP_ERROR, "Failed to get addrinfo", NULL, NULL); retcode = -1; } } if (retcode > -1) { req_socket = PR_NewTCPSocket(); retcode = PR_Connect(req_socket, netaddr, 10000); } free(netaddr); if (retcode != 0) { /* SERVER IS DOWN - output the OFF button */ if(result && !strcmp(result, "text")) { rpt_success("The server is DOWN."); return 1; } file = PR_smprintf("%s/togoff.gif", ICONDIR); } else { /* SERVER IS RUNNING - output of ON button */ if(result && !strcmp(result, "text")) { rpt_success("The server is UP."); return 1; } file = PR_smprintf("%s/togon.gif", ICONDIR); } PR_Close(req_socket); if ((PR_FAILURE == PR_GetFileInfo64(file, &prfileinfo)) || (prfileinfo.type != PR_FILE_FILE)) { rpt_err(APP_ERROR, "Cannot open gif file!", NULL, NULL); } fprintf(stdout, "Content-length: %ld\n\n", (size_t)prfileinfo.size); fflush(stdout); PR_Sync(PR_STDOUT); gif = PR_Open(file, PR_RDONLY, 0); PR_smprintf_free(file); if(!gif) rpt_err(APP_ERROR, "Cannot open gif file!", NULL, NULL); while (0 < (bytes = PR_Read(gif, gifbuf, sizeof(gifbuf)))) { PRInt32 remaining = bytes; PRInt32 byteswritten = 0; while (((byteswritten = PR_Write(PR_STDOUT, gifbuf+byteswritten, remaining)) != remaining) && (byteswritten > 0)) { remaining -= byteswritten; } if (byteswritten < 0) { rpt_err(APP_ERROR, "Cannot write gif to stdout!", NULL, NULL); } } if (bytes < 0) { rpt_err(APP_ERROR, "Cannot read gif to write to stdout!", NULL, NULL); } PR_Sync(PR_STDOUT); PR_Close(gif); } return 0; } 389-admin-1.1.35/admserv/cgi-src40/statusping.c000066400000000000000000000021611220472121400207060ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Server ping * * This cgi provide a way for java front end to ping the server for status * */ #include int main(int argc, char *argv[]) { fprintf(stdout, "Content-type: text/html\n\n"); fprintf(stdout, "Content-length: 0\n\n"); return 0; } 389-admin-1.1.35/admserv/cgi-src40/stopsrv.c000066400000000000000000000152241220472121400202310ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * stopadm.c: Kills the admin server. * * Mike McCool */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include #include #include #include #include #include #ifdef XP_UNIX #include #endif #include "libadminutil/resource.h" #include "libadmin/libadmin.h" #define RESOURCE_FILE "stopsrv" #define resource_key(a,b) a b #define DBT_NO_NEW_PROCESS resource_key(RESOURCE_FILE, "1") #define DBT_SHUTDOWN_ACK resource_key(RESOURCE_FILE, "2") #define DBT_CANT_STOP_SRV resource_key(RESOURCE_FILE, "3") #define DBT_EXPRESS_SUCCESS resource_key(RESOURCE_FILE, "4") #define DBT_EXPRESS_FAILURE resource_key(RESOURCE_FILE, "5") #define DBT_SHUTDOWN_EXPRESS_WARNING resource_key(RESOURCE_FILE, "6") #define DBT_UNIX_I18N_STOP_FAIL resource_key(RESOURCE_FILE, "20") #define DBT_UNIX_STOP_FAIL resource_key(RESOURCE_FILE, "21") #define DBT_UNIX_I18N_STOP_SUCCESS resource_key(RESOURCE_FILE, "22") #define DBT_UNIX_STOP_SUCCESS resource_key(RESOURCE_FILE, "23") #define DBT_WIN32_I18N_STOP_SUCCESS resource_key(RESOURCE_FILE, "24") #define DBT_WIN32__STOP_SUCCESS resource_key(RESOURCE_FILE, "25") char *acceptLanguage = "en"; Resource *i18nResource = NULL; char* getResourceString(char *key) { return (char *)(res_getstring(i18nResource, key, acceptLanguage, NULL, 0, NULL)); } /* html resource string */ int main(int argc, char *argv[]) { int _ai=ADMUTIL_Init(); char *m = getenv("REQUEST_METHOD"); char msgbuf[BUFSIZ]; char line[BIG_LINE]; char *lang=getenv("HTTP_ACCEPT_LANGUAGE"); char *return_format = NULL; char *qs = 0; (void)_ai; /* get rid of unused variable warning */ i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (lang) acceptLanguage = strdup(lang); fprintf(stdout, "Content-type: text/html\n\n"); if(!strcmp(m, "GET")) { qs = getenv("QUERY_STRING"); if(qs) { get_begin(qs); return_format = get_cgi_var("return_format", NULL, NULL); } } else post_begin(stdin); #ifdef XP_UNIX switch(fork()) { case -1: if (i18nResource) { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, (const char*) getResourceString(DBT_UNIX_I18N_STOP_FAIL), getResourceString(DBT_EXPRESS_FAILURE), getResourceString(DBT_NO_NEW_PROCESS)); } else { rpt_err(SYSTEM_ERROR, res_getstring(i18nResource, DBT_NO_NEW_PROCESS, acceptLanguage, msgbuf, sizeof(msgbuf), NULL), NULL, NULL); } } else { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, "%s", getResourceString(DBT_UNIX_STOP_FAIL)); } else { rpt_err(SYSTEM_ERROR, "Couldn't create a new process to stop the Administration Server.", NULL, NULL); } } break; case 0: fclose(stdin); fclose(stdout); fclose(stderr); if(setsid() == -1) { exit(0); } /* wait for a bit so the server can give */ /* feedback */ #ifdef AIX PR_Sleep(5); /* AIX doesn't like sleep(5) */ #else sleep(5); #endif #if defined(ENABLE_SERVICE) PR_snprintf(line, sizeof(line), "service " PACKAGE_NAME " stop"); system(line); #else if (util_find_file_in_paths(line, sizeof(line), "stop-ds-admin", CMDBINDIR, "../..", "")) { system(line); } #endif exit(0); break; default: /* comment out temporily, should be back later log_change(TO_ADMIN, "Admin server shutdown on user request"); */ /* Child process will notify client */ if (i18nResource) { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, (const char*)getResourceString(DBT_UNIX_I18N_STOP_SUCCESS), getResourceString(DBT_EXPRESS_SUCCESS), getResourceString(DBT_SHUTDOWN_EXPRESS_WARNING)); } else { rpt_unknown(res_getstring(i18nResource, DBT_SHUTDOWN_ACK, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); } } else { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, "%s", getResourceString(DBT_UNIX_STOP_SUCCESS)); } else { rpt_unknown("Admin server should be shutdown on user request"); } } fflush(stdout); break; } return 0; #else /* XP_WIN32 */ if (i18nResource) { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, (const char*)getResourceString(DBT_WIN32_I18N_STOP_SUCCESS), getResourceString(DBT_EXPRESS_SUCCESS), getResourceString(DBT_SHUTDOWN_EXPRESS_WARNING)); } else { rpt_unknown(res_getstring(i18nResource, DBT_SHUTDOWN_ACK, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); } } else { if(return_format && !strcmp(return_format, "html")) { fprintf(stdout, getResourceString(DBT_WIN32__STOP_SUCCESS)); } else { rpt_unknown("Admin server should be shutdown on user request"); } } fflush(stdout); { STARTUPINFO sui; PROCESS_INFORMATION pi; sui.cb = sizeof(STARTUPINFO); sui.lpReserved = 0; sui.lpDesktop = NULL; sui.lpTitle = NULL; sui.dwX = 0; sui.dwY = 0; sui.dwXSize = 0; sui.dwYSize = 0; sui.dwXCountChars = 0; sui.dwYCountChars = 0; sui.dwFillAttribute = 0; sui.dwFlags = STARTF_USESHOWWINDOW; sui.wShowWindow = SW_HIDE; sui.cbReserved2 = 0; sui.lpReserved2 = 0; sui.hStdInput = 0; sui.hStdOutput = 0; sui.hStdError = 0; if(CreateProcess(NULL, "NTStopService.exe", NULL, NULL, FALSE, DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP, NULL, NULL, &sui, &pi) > 0) return 0; /* success */ } return 1; #endif /* XP_WIN32 */ } 389-admin-1.1.35/admserv/cgi-src40/stopsrv.properties000066400000000000000000000076451220472121400222130ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { stopsrv1 { "Couldn't create a new process to stop the Administration Server." } stopsrv2 { "Admin server should be shutdown on user request" } stopsrv3 { "Couldn't stop the administration server" } stopsrv4 { "Success" } stopsrv5 { "Error" } stopsrv6 { "The Administration Server should be shut down in a few moments. Please note that your Administration Express session has now ended due to the shutdown of this server. To re-enter Administration Express, either start up this server or log in to another running Administration Server." } //#/* html resource string */ stopsrv20 { "\n\n\n\n\n\n\n\n\n\n
%s
%s
\n\n" } stopsrv21 { "\n\n\n\n\n\n\n\n\n\n
Error
Couldn't create a new process to stop the Administration Server.
\n\n" } stopsrv22 { "\n\n\n\n\n\n\n\n\n\n
%s
%s
\n\n" } stopsrv23 { "\n\n\n\n\n\n\n\n\n\n
Success
The Administration Server should be shut down in a few moments. Please note that your Administration Express session has now ended due to the shutdown of this server. To re-enter Administration Express, either start up this server or log in to another running Administration Server.
\n\n" } stopsrv24 { "\n\n\n\n\n\n\n\n\n\n
%s
%s
\n\n" } stopsrv25 { "\n\n\n\n\n\n\n\n\n\n
Success
The Administration Server should be shut down in a few moments. Please note that your Administration Express session has now ended due to the shutdown of this server. To re-enter Administration Express, either start up this server or log in to another running Administration Server.
\n\n" } } 389-admin-1.1.35/admserv/cgi-src40/ugdsconfig.c000066400000000000000000000337401220472121400206440ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * User/Group Directory Server get/set for the Admin Group * * Note: * Terms "Global" and "Domain" are used interchangeable * Terms "Local" and "Admin Group" are used interchangeable * * Get Operation * in: op=getconfig * out: ugdsconfig.inforef= * out: ugdsconfig.globaldirurl= * out: ugdsconfig.dirurl= * out: ugdsconfig.binddn= * out: ugdsconfig.bindpw= * * Set Operation * in: op=setconfig&ugdsconfig.inforef= * "default" is a special key-word which instructs that the inforef should be set * to reference the global domain U/G Directory entry * * or * * in: op=setconfig&ugdsconfig.dirurl=& * ugdsconfig.binddn=&ugdsconfig.bindpw= * * If inforef parameter is present, the CGI does not look for the parameters dirurl, binddn, bindpw * */ #include "libadmin/libadmin.h" #include "string.h" #include "libadminutil/admutil.h" #include "libadminutil/resource.h" #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "libadmsslutil/certmgt.h" #include "util.h" #include "cert.h" #include "libadmin/libadmin.h" #include "config.h" static void handle_getconfig(const char *configdir, const char *securitydir); static void handle_setconfig(const char *configdir, const char *securitydir); static char *getGlobalInfoDN(char *siedn); static char *nonull_value(char *str); /* * Logging function */ static FILE * logfp = NULL; static int log_enabled = 0, enable_verified=0; static void logMsg(char *format, ...) { char logfile[512]; if (!log_enabled && enable_verified) return; /* Automatically enable logging if .dbg file exists in the logs directory */ if (!log_enabled && !enable_verified) { const char *logdir = util_get_log_dir(); enable_verified = 1; if (util_is_dir_ok(logdir)) { PR_snprintf(logfile, sizeof(logfile), "%s/ugdsconfig.dbg", logdir); /* Attempt to optn the log for reading * to check if it exists. */ logfp = fopen(logfile, "r"); if (logfp == NULL) { return; } fclose(logfp); /* Attempt to open the file for writing. */ logfp = fopen(logfile, "w"); /* If we opened the log for writing, go * ahead and enable logging. */ if (logfp != NULL) { log_enabled = 1; } } } if (logfp != NULL) { va_list ap; va_start(ap,format); vfprintf(logfp,format,ap); va_end(ap); fflush(logfp); } } /* * i18n conversions defines and function; * properties file = "ugdsconfig.properties" */ #define RESOURCE_FILE "ugdsconfig" #define resource_key(a,b) a b #define DBT_NO_METHOD resource_key(RESOURCE_FILE, "1") #define DBT_UNKNOWN_METHOD resource_key(RESOURCE_FILE, "2") #define DBT_NO_QUERY_STRING resource_key(RESOURCE_FILE, "3") #define DBT_NO_OPERATION resource_key(RESOURCE_FILE, "4") #define DBT_UNKNOWN_OPERATION resource_key(RESOURCE_FILE, "5") #define DBT_BUILD_LDAPINFO resource_key(RESOURCE_FILE, "6") #define DBT_GLOBAL_GETUSERDIR resource_key(RESOURCE_FILE, "7") #define DBT_LOCAL_GETUSERDIR resource_key(RESOURCE_FILE, "8") #define DBT_PARSE_SIEDN resource_key(RESOURCE_FILE, "9") #define DBT_GLOBAL_SETUSERDIR resource_key(RESOURCE_FILE, "10") #define DBT_LOCAL_SETUSERDIR resource_key(RESOURCE_FILE, "11") #define DBT_NO_SETPARAM resource_key(RESOURCE_FILE, "12") #define DBT_BAD_DIRURL resource_key(RESOURCE_FILE, "13") #define DBT_ADMSSL_INIT_FAILED resource_key(RESOURCE_FILE, "14") static char *acceptLanguage = (char*)"en"; static Resource *i18nResource = NULL; static void i18nInit() { i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (getenv("HTTP_ACCEPT_LANGUAGE")) { acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); } } static const char *i18nMsg(char *msgid, char *defaultMsg) { const char *msg=NULL; static char buf[BUFSIZ]; /* ok - not threaded code */ if (i18nResource) { msg = res_getstring(i18nResource, msgid, acceptLanguage, buf, sizeof(buf), NULL); } if (msg == NULL) { msg = (const char*)defaultMsg; } return msg; } static char * nonull_value(char *str) { return (str!=NULL) ? str : (char *)""; } static char error_info[1024]; /* * Main */ int main(int argc, char *argv[]) { int _ai=ADMUTIL_Init(); char *method = getenv("REQUEST_METHOD"); char *qs = 0, *op=0; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); (void)_ai; /* get rid of unused variable warning */ logMsg(" In %s\n", argv[0]); i18nInit(); fprintf(stdout, "Content-type: text/html;charset=utf-8\n\n"); /* GET or POST method */ if (!method || !*method) { /* non UI CGI */ rpt_err(SYSTEM_ERROR, i18nMsg(DBT_NO_METHOD,"No method is specified"), NULL, NULL); } else if (!strcmp(method, "GET")) { /* UI CGI - either upgrade or normal admin CGI */ qs = getenv("QUERY_STRING"); if (!qs || !*qs) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_QUERY_STRING ,"NO QUERY_STRING DATA"), NULL, NULL); } else { get_begin(qs); } } else if (!strcmp(method, "POST")) { post_begin(stdin); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_METHOD,"Unknown Method (%s)"), method); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } logMsg("method=%s\n", method); op=get_cgi_var("op", NULL, NULL); logMsg("op=%s\n", op); if (op == NULL) { rpt_err(INCORRECT_USAGE, i18nMsg(DBT_NO_OPERATION,"No operation is defined"), NULL, NULL); } if (strcmp(op,"getconfig") == 0) { handle_getconfig(configdir, secdir); } else if (strcmp(op,"setconfig") == 0) { handle_setconfig(configdir, secdir); } else { PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_UNKNOWN_OPERATION,"Unknown Operation (%s)"), op); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } return 0; } static AdmldapInfo local_get_admldapinfo(const char *configdir, const char *securitydir) { AdmldapInfo adminfo; int rc; if(ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_ADMSSL_INIT_FAILED,"Cannot initialize SSL"), NULL, NULL); return NULL; } adminfo = admldapBuildInfo((char *)configdir, &rc); if (adminfo == NULL) { logMsg("admldapBuildInfo failed, rc=%d, admroot=%s\n", rc, nonull_value((char *)configdir)); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_BUILD_LDAPINFO,"Failed to build ldap info (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); return NULL; } if (admldapGetSecurity(adminfo)) { /* Temporarily override the siedn. This needs to be * done to get a valid LDAP handle. */ char *siedn = NULL; char *userdn = NULL; char *siePasswd = NULL; /* returned value from ADM_Get... should NOT be freed */ ADM_GetCurrentPassword(&rc, &siePasswd); /* via PIPE */ /* if userdn is initialized, override the siedn to make bind succeed */ ADM_GetUserDNString(&rc, &userdn); if (strcasecmp(userdn, ADM_NOT_INITIALIZED)) { siedn = admldapGetSIEDN(adminfo); admldapSetSIEDN(adminfo, userdn); admSetCachedSIEPWD(siePasswd); } if (!admldapBuildInfoSSL(adminfo, &rc)) { logMsg("admldapBuildInfo failed, rc=%d, admroot=%s\n", rc, nonull_value((char *)configdir)); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_BUILD_LDAPINFO,"Failed to build ldap info (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); return NULL; } /* reset if we changed it */ if (siedn) { admldapSetSIEDN(adminfo, siedn); PL_strfree(siedn); } } return adminfo; } /* * Return current U/G directory setting */ static void handle_getconfig(const char *configdir, const char *securitydir) { char *inforef=NULL, *globaldirurl=NULL, *dirurl=NULL, *binddn=NULL, *bindpw=NULL; AdmldapInfo adminfo; int rc; logMsg("In handle_getconfig\n"); if (!(adminfo = local_get_admldapinfo(configdir, securitydir))) { return; } if (!admldapGetDomainUserDirectory(adminfo, &globaldirurl, &binddn, &bindpw, &inforef, &rc)) { logMsg("admldapGetDomainUserDirectory failed, rc=%d\n", rc); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_GLOBAL_GETUSERDIR,"Failed to read Domain User Directory Info (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } if (!admldapGetAdmGrpUserDirectory(adminfo, &dirurl, &binddn, &bindpw, &inforef, &rc)) { logMsg("admldapGetAdmGrpUserDirectory failed, rc=%d\n", rc); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_LOCAL_GETUSERDIR,"Failed to read Admin Group User Directory Info (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } rpt_success(NULL); fprintf(stdout, "ugdsconfig.inforef:%s\n", nonull_value(inforef)); logMsg("ugdsconfig.inforef:%s\n", nonull_value(inforef)); fprintf(stdout, "ugdsconfig.globaldirurl:%s\n", nonull_value(globaldirurl)); logMsg("ugdsconfig.globaldirurl:%s\n", nonull_value(globaldirurl)); fprintf(stdout, "ugdsconfig.dirurl:%s\n", nonull_value(dirurl)); logMsg("ugdsconfig.dirurl:%s\n", nonull_value(dirurl)); fprintf(stdout, "ugdsconfig.binddn:%s\n", nonull_value(binddn)); logMsg("ugdsconfig.binddn:%s\n", nonull_value(binddn)); fprintf(stdout, "ugdsconfig.bindpw:%s\n", nonull_value(bindpw)); logMsg("ugdsconfig.bindpw:%s\n", nonull_value(bindpw)); } /* * Modify U/G Directory setting */ static void handle_setconfig(const char *configdir, const char *securitydir) { char *inforef=NULL, *dirurl=NULL, *binddn=NULL, *bindpw=NULL; char *siedn; AdmldapInfo adminfo; LDAPURLDesc *url; int rc; logMsg("In handle_setconfig\n"); if (!(adminfo = local_get_admldapinfo(configdir, securitydir))) { return; } inforef = get_cgi_var( "ugdsconfig.inforef", NULL, NULL ); dirurl = util_local_to_utf8((const char*)get_cgi_var( "ugdsconfig.dirurl", NULL, NULL )); binddn = get_cgi_var( "ugdsconfig.binddn", NULL, NULL ); bindpw = get_cgi_var( "ugdsconfig.bindpw", NULL, NULL ); logMsg("inforef=%s\n", nonull_value(inforef)); logMsg("dirurl=%s\n", nonull_value(dirurl)); logMsg("binddn=%s\n", nonull_value(binddn)); logMsg("bindpw size=%d\n", strlen(nonull_value(bindpw))); if (inforef != NULL) { if (strcasecmp(inforef,"default")==0) { siedn = admldapGetSIEDN(adminfo); inforef = getGlobalInfoDN(siedn); } if (!admldapSetAdmGrpUserDirectoryCGI(adminfo, NULL, NULL, NULL, inforef, &rc)) { adminfo = NULL; /* gets destroyed upon failure */ logMsg("admldapSetAdmGrpDirectoryCGI failed, rc=%d, inforef=%s\n", rc, nonull_value(inforef)); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_GLOBAL_SETUSERDIR,"Failed to set link to the Domain User Directory Info (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } } else { if (dirurl==NULL) { logMsg("param ugdsconfig.dirurl missing"); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_NO_SETPARAM,"Parameter %s missing"), "ugdsconfig.dirurl"); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } if ((rc = ldap_url_parse(dirurl, & url)) != 0) { logMsg("Bad ugdsconfig.dirurl"); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_BAD_DIRURL,"Bad LDAP URL value (%s)"), dirurl); rpt_err(INCORRECT_USAGE, error_info, NULL, NULL); } if (!admldapSetAdmGrpUserDirectoryCGI(adminfo, dirurl, binddn, bindpw, NULL, &rc)) { adminfo = NULL; /* gets destroyed upon failure */ logMsg("admldapSetAdmGrpDirectoryCGI failed, rc=%d\n", rc); PR_snprintf(error_info, sizeof(error_info), i18nMsg(DBT_LOCAL_SETUSERDIR,"Failed to set User Directory Parameters for the Admin Group (err=%d)"), rc); rpt_err(SYSTEM_ERROR, error_info, NULL, NULL); } } if (adminfo) { destroyAdmldap(adminfo); } rpt_success(NULL); } /* * Return the U/G Directory Info DN for the domain: * "cn=UserDirectory, ou=Globalpreferences,ou=,o=NetscapeSuiteSpot" * The name is extractioned from the sie DN. The domain name is the second * RDN in the sie DN from right to left. * * Example: sie dn="admin-serv-goo,ou=Netscape Adminstration Server,cn=SuiteSpot, * cn=goo.mcom.com, ou=Netscape SuiteSpot, o=NetscapeRoot" * The admin domain name is "Netscape SuiteSpot" * Returning cn=UserDirectory, ou=Globalpreferences,ou=Netscape SuiteSpot,o=NetscapeSuiteSpot */ static char *getGlobalInfoDN(char *siedn_p) { char *comma, *domain; char *siedn=strdup(siedn_p); char buf[1024]; memset(buf,0,sizeof(buf)); logMsg("getGlobalInfoDN for %s\n", nonull_value(siedn)); comma = strrchr(siedn, ','); if (comma == NULL) { logMsg("getGlobalInfoDN comma1 not found\n"); rpt_err(SYSTEM_ERROR, i18nMsg(DBT_PARSE_SIEDN,"Failed to parse SIE DN"), NULL, NULL); } *comma=0; comma = strrchr(siedn, ','); if (comma == NULL) { logMsg("getGlobalInfoDN comma2 not found\n"); rpt_err(SYSTEM_ERROR, i18nMsg(DBT_PARSE_SIEDN,"Failed to parse SIE DN"), NULL, NULL); } domain=comma+1; PR_snprintf(buf, sizeof(buf),"cn=UserDirectory,ou=Global Preferences,%s,o=NetscapeRoot", domain); logMsg("global info dn=\"%s\"\n", buf); return strdup(buf); } 389-admin-1.1.35/admserv/cgi-src40/ugdsconfig.properties000066400000000000000000000032131220472121400226060ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { ugdsconfig1 { "No method is specified" } ugdsconfig2 { "Unknown Method (%s)" } ugdsconfig3 { "No data in QUERY_STRING environment variable" } ugdsconfig4 { "No operation is defined" } ugdsconfig5 { "Unknown Operation (%s)" } ugdsconfig6 { "Failed to build ldap info (err=%d)" } ugdsconfig7 { "Failed to read Domain User Directory Info (err=%d)" } ugdsconfig8 { "Failed to read Admin Group User Directory Info (err=%d)" } ugdsconfig9 { "Failed to parse SIE DN" } ugdsconfig10 { "Failed to set link to the Domain User Directory Info (err=%d)" } ugdsconfig11 { "Failed to set User Directory Parameters for the Admin Group (err=%d)" } ugdsconfig12 { "Parameter %s missing" } ugdsconfig13 { "Bad LDAP URL value (%s)" } ugdsconfig14 { "SSL related initialization failed" } } 389-admin-1.1.35/admserv/cgi-src40/userauth.properties000066400000000000000000000023001220472121400223120ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { userauth1 { "No user name is specified" } userauth2 { "No LDAP information is available" } userauth3 { "No Server Root information is available" } userauth4 { "Cannot initialize SSL" } userauth5 { "Failed to build ldap info (err=%d)" } userauth6 { "Failed to read Admin Group User Directory Info (err=%d)" } } 389-admin-1.1.35/admserv/cgi-src40/viewdata.c000066400000000000000000000334611220472121400203200ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * viewdata.c: View generic server parameters in HTML Admin Interface. * * Initial version: 3/11/99 by Adam Prishtina */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadminutil/resource.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/libadmin.h" #include "libadmin/cluster.h" #define MY_PAGE "viewdata.html" #define NBUF_SIZE 1024 /* * i18n conversions defines and function; * properties file = "viewdata.properties" */ #define RESOURCE_FILE "viewdata" #define resource_key(a,b) a b #define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1") #define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2") #define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3") #define DBT_WITH resource_key(RESOURCE_FILE, "4") /* html resource */ #define DBT_OUTPUT_DATA_SERVER_PRODUCT_NAME resource_key(RESOURCE_FILE, "20") #define DBT_OUTPUT_DATA_DATE resource_key(RESOURCE_FILE, "21") #define DBT_OUTPUT_DATA_SERVER_ROOT resource_key(RESOURCE_FILE, "22") #define DBT_OUTPUT_DATA_SERVER_PORT resource_key(RESOURCE_FILE, "23") #define DBT_OUTPUT_DATA_PRODUCT_NAME resource_key(RESOURCE_FILE, "24") #define DBT_OUTPUT_DATA_VENDOR resource_key(RESOURCE_FILE, "25") #define DBT_OUTPUT_DATA_PRODUCT_VERSION resource_key(RESOURCE_FILE, "26") #define DBT_OUTPUT_DATA_BUILD_NUMBER resource_key(RESOURCE_FILE, "27") #define DBT_OUTPUT_DATA_BUILD_SECURITY resource_key(RESOURCE_FILE, "28") #define DBT_OUTPUT_DATA_REVISION_NUMBER resource_key(RESOURCE_FILE, "29") #define DBT_OUTPUT_DATA_DESCRIPTION resource_key(RESOURCE_FILE, "30") #define DBT_MAIN_TABLE_HEADER resource_key(RESOURCE_FILE, "31") #define DBT_MAIN_TABLE_FOOTER resource_key(RESOURCE_FILE, "32") #define DBT_MAIN_SERVER_ID resource_key(RESOURCE_FILE, "33") #define DBT_MAIN_PRODUCT_VERSION resource_key(RESOURCE_FILE, "34") #define DBT_MAIN_UPGRADE_AVAILABLE resource_key(RESOURCE_FILE, "35") #define DBT_MAIN_PRODUCT_URL resource_key(RESOURCE_FILE, "36") static char *acceptLanguage = (char*)"en"; static Resource *i18nResource = NULL; char* getResourceString(char *key) { static char msgbuf[BUFSIZ]; /* ok - not threaded code */ return (char *)(res_getstring(i18nResource, key, acceptLanguage, msgbuf, sizeof(msgbuf), NULL)); } static void i18nInit() { i18nResource = res_find_and_init_resource(PROPERTYDIR, RESOURCE_FILE); if (getenv("HTTP_ACCEPT_LANGUAGE")) { acceptLanguage = getenv("HTTP_ACCEPT_LANGUAGE"); } } /* * Get the AdmldapInfo struct for ldap SDK API. */ AdmldapInfo get_adm_ldapinfo(const char *configdir, const char *securitydir) { AdmldapInfo ldapInfo = NULL; int rv; ldapInfo = admldapBuildInfo((char *)configdir, &rv); if(!ldapInfo) exit(0); rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); return(ldapInfo); } /* * Get bind DN and bind PW info. */ int get_bindinfo(char **binddn, char **bindpw) { int rv; int err; char *username = 0; char *localAdmin = 0; rv = ADM_GetUserDNString(&err, binddn); /* & of (*binddn) */ if (rv < 0 || !*binddn || !**binddn) { rv = ADM_GetCurrentUsername(&err, &username); if (rv < 0 || !username || !*username) exit(0); else { /* No DN, maybe it is local super */ localAdmin = admGetLocalAdmin(NULL, &rv); if (localAdmin) { if (strcmp(username, localAdmin)) exit(0); else { *binddn = NULL; *bindpw = NULL; } } else exit(0); } } if (*binddn) rv = ADM_GetCurrentPassword(&err, bindpw); return 1; } LDAP *server_bind(const char *securitydir, char *host, int port, int security, char *binddn, char *bindpw) { int ldapError; LDAP *server; if(!(server = util_ldap_init(securitydir, NULL, host, port, security, 0, NULL))) { return NULL; } if ((ldapError = util_ldap_bind(server, binddn, bindpw, LDAP_SASL_SIMPLE, NULL, NULL, NULL, NULL)) != LDAP_SUCCESS ) { switch (ldapError) { case LDAP_INAPPROPRIATE_AUTH: case LDAP_INVALID_CREDENTIALS: case LDAP_INSUFFICIENT_ACCESS: /* authenticate failed: Should not continue */ #ifdef LDAP_DEBUG util_ldap_perror( ld, "util_ldap_bind:" ); #endif ldap_unbind_ext(server, NULL, NULL); return NULL; case LDAP_NO_SUCH_OBJECT: case LDAP_ALIAS_PROBLEM: case LDAP_INVALID_DN_SYNTAX: #ifdef LDAP_DEBUG util_ldap_perror( ld, "util_ldap_bind:" ); #endif /* Not a good DN */ ldap_unbind_ext(server, NULL, NULL); return NULL; default: ldap_unbind_ext(server, NULL, NULL); return NULL; } } return server; } int get_product_url(LDAP *server, char *sie, char **text, char **url) { char *dn; char *domain; char *tmp, *tmp2; char *base = NULL; LDAPMessage *entry; int ldapError; char **vals; *url = NULL; *text = NULL; /* Get the domain */ tmp = strdup(sie); if (!(tmp2 = strrchr(tmp, ','))) { free(tmp); return 1; } tmp2[0] = '\0'; if (!(domain = strrchr(tmp, ','))) { free(tmp); return 1; } domain++; tmp2[0] = ','; while(*domain == ' ') domain++; /* form the rest of the url */ if(strstr(sie, "Administration")) { base = "ou=Admin, ou=Global Preferences"; } else if(strstr(sie, "Directory")) { base = "ou=Directory, ou=Global Preferences"; } else if(strstr(sie, "Enterprise")) { base = "ou=Enterprise, ou=Global Preferences"; } else if(strstr(sie, "Certificate")) { base = "ou=Certificate, ou=Global Preferences"; } dn = PR_smprintf("%s, %s", base, domain); if((ldapError = ldap_search_ext_s(server, dn, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &entry)) != LDAP_SUCCESS) { PR_smprintf_free(dn); return 1; } PR_smprintf_free(dn); if((vals = util_ldap_get_values(server, entry, "nshtmladminproducturl"))) { *url = strdup(vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nshtmladminproducttext"))) { *text = strdup(vals[0]); util_ldap_value_free(vals); } if(*url && *text) return 0; return 1; } void output_data(LDAP *server, char *sie) { LDAPMessage *entry; char **vals; int ldapError; char *tmp = strdup(sie); char *isie; /* SIE has some data... */ if((ldapError = ldap_search_ext_s(server, sie, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &entry)) != LDAP_SUCCESS) return; if((vals = util_ldap_get_values(server, entry, "serverproductname"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_PRODUCT_NAME), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "installationtimestamp"))) { struct tm tm = {0}; char buf[BIG_LINE]; int rc; /* only PARSE YYYYmmddHHMMSS */ rc = sscanf(vals[0], "%4d%2d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec); if (rc < 6) { PR_snprintf(buf, sizeof(buf), "Error: date [%s] not in YYYYmmddHHMMSS format", vals[0]); } else { tm.tm_year -= 1900; /* the number of years since 1900 */ tm.tm_mon -= 1; /* The number of month since January, in the range 0 to 11 */ #ifdef LINUX strftime(buf, BIG_LINE, "%b %d, %Y %T %p", &tm); tzset(); PR_snprintf(buf, sizeof(buf), "%s %s", buf, daylight ? tzname[1] : tzname[0]); #else strftime(buf, sizeof(buf), "%b %d, %Y %T %p %Z", &tm); #endif } util_ldap_value_free(vals); vals = NULL; fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_DATE), buf); } if((vals = util_ldap_get_values(server, entry, "serverroot"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_ROOT), vals[0]); util_ldap_value_free(vals); } if(!(vals = util_ldap_get_values(server, entry, "nsserverport"))) { /* argh, port can be in the configuration object */ char *config_buf = PR_smprintf("cn=configuration, %s", sie); if((ldapError = ldap_search_ext_s(server, config_buf, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &entry)) != LDAP_SUCCESS) { PR_smprintf_free(config_buf); return; } PR_smprintf_free(config_buf); vals = util_ldap_get_values(server, entry, "nsserverport"); } if(vals) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_PORT), vals[0]); util_ldap_value_free(vals); } /* ... and ISIE has the rest. */ isie = strtok(tmp, ","); isie = strtok(NULL, "\0"); while(*isie == ' ') isie++; /* eliminate spaces */ if((ldapError = ldap_search_ext_s(server, isie, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &entry)) != LDAP_SUCCESS) return; if((vals = util_ldap_get_values(server, entry, "nsproductname"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_NAME), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nsvendor"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_VENDOR), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nsproductversion"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_VERSION), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nsbuildnumber"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_NUMBER), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nsbuildsecurity"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_SECURITY), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "nsrevisionnumber"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_REVISION_NUMBER), vals[0]); util_ldap_value_free(vals); } if((vals = util_ldap_get_values(server, entry, "description"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_DESCRIPTION), vals[0]); util_ldap_value_free(vals); } } int main(int argc, char *argv[]) { int _ai = ADMUTIL_Init(); char *qs = getenv("QUERY_STRING"); char line[BIG_LINE]; FILE *html = open_html_file(MY_PAGE); char *sie = NULL; char *binddn, *bindpw; LDAP *server; LDAPMessage *entry; int ldapError; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); char *securitydir = NULL; AdmldapInfo ldapInfo = get_adm_ldapinfo(configdir, secdir); (void)_ai; /* get rid of unused variable warning */ i18nInit(); if(!get_bindinfo(&binddn, &bindpw)) exit(0); securitydir = admldapGetSecurityDir(ldapInfo); server = server_bind(securitydir, admldapGetHost(ldapInfo), admldapGetPort(ldapInfo), admldapGetSecurity(ldapInfo), binddn, bindpw); fprintf(stdout, "Content-type: text/html;charset=utf-8\n\n"); if (!server) { char buf[BUFSIZ]; PR_snprintf(buf, sizeof(buf), "Error: could not open connection to [%s:%d]\n", admldapGetHost(ldapInfo), admldapGetPort(ldapInfo)); rpt_err(NETWORK_ERROR, buf, NULL, NULL); } if(qs) { get_begin(qs); sie=get_cgi_var("sie", NULL, NULL); } if (!sie) { /* error - incorrect usage */ rpt_err(INCORRECT_USAGE, "This program must be called as a GET CGI with the sie parameter", NULL, NULL); } while(next_html_line(html, line)) { if(parse_line(line, NULL)) { if(directive_is(line, "SHOW_DATA")) { fprintf(stdout, "%s", getResourceString(DBT_MAIN_TABLE_HEADER)); output_data(server, sie); fprintf(stdout, "%s", getResourceString(DBT_MAIN_TABLE_FOOTER)); } else if(directive_is(line, "ID_TITLE")) { char **vals; if((ldapError = ldap_search_ext_s(server, sie, LDAP_SCOPE_BASE, "(objectclass=*)", NULL, 0, NULL, NULL, NULL, -1, &entry)) != LDAP_SUCCESS) continue; if((vals = util_ldap_get_values(server, entry, "nsserverid"))) { fprintf(stdout, (const char*)getResourceString(DBT_MAIN_SERVER_ID), vals[0]); util_ldap_value_free(vals); } } else if(directive_is(line, "SHOW_URL")) { char *text; char *url; if(get_product_url(server, sie, &text, &url) == 0) { /* success - output link */ fprintf(stdout, (const char*)getResourceString(DBT_MAIN_PRODUCT_URL), url, text); } } else fputs(line, stdout); } } return 0; } 389-admin-1.1.35/admserv/cgi-src40/viewdata.properties000066400000000000000000000101711220472121400222630ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { viewdata20 { "
\n
Server Name:
\n
%s
\n
Installation Date:
\n
%s
\n
Server Root:
\n
%s
\n
Port:
\n
%s
\n
Product Name:
\n
%s
\n
Vendor:
\n
%s
\n
Version:
\n
%s
\n
Build Number:
\n
%s
\n
Security Level:
\n
%s
\n
Revision:
\n
%s
\n
Description:
\n
%s
\n" } viewdata32 { "
\n" } viewdata33 { "\n%s\n\n\n \n\n" } viewdata34 { "Upgrade Available\n" } viewdata35 { "No Upgrade Available\n" } viewdata36 { "%s\n" } } 389-admin-1.1.35/admserv/cgi-src40/viewlog.c000066400000000000000000000376641220472121400202010ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * viewlog.c: View various log files in HTML Admin interface. * * Initial version: 3/11/99 by Adam Prishtina */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "libadminutil/resource.h" #include "libadminutil/distadm.h" #include #include #include #include #include #include #include "libadmin/libadmin.h" #include "config.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/admsslutil.h" #include "cgicommon.h" #define MY_PAGE "viewlog.html" #define DEF_SIZE "25" #define LOGDIRATTR "nslogdir" #define ERRORLOGATTR "nserrorlog" /* * i18n conversions defines and function; * properties file = "viewlog.properties" */ #define RESOURCE_FILE "viewlog" #define resource_key(a,b) a b #define DBT_INV_NUMBER resource_key(RESOURCE_FILE, "1") #define DBT_INV_NUMBER_DESC resource_key(RESOURCE_FILE, "2") #define DBT_SUBTITLE resource_key(RESOURCE_FILE, "3") #define DBT_WITH resource_key(RESOURCE_FILE, "4") #define DBT_NO_DIR resource_key(RESOURCE_FILE, "5") #define DBT_NO_DIR_DESC resource_key(RESOURCE_FILE, "6") #define DBT_NO_FILE resource_key(RESOURCE_FILE, "7") #define DBT_NO_FILE_DESC resource_key(RESOURCE_FILE, "8") #define DBT_NO_DIR_FOUND resource_key(RESOURCE_FILE, "9") #define DBT_NO_ID resource_key(RESOURCE_FILE, "10") #define DBT_NO_ID_DESC resource_key(RESOURCE_FILE, "11") #define DBT_INV_NOHTML resource_key(RESOURCE_FILE, "12") #define DBT_INV_NOHTML_DESC resource_key(RESOURCE_FILE, "13") /* html resource */ #define DBT_DISPLAY_LOGFILE_SELECT_BEGIN resource_key(RESOURCE_FILE, "20") #define DBT_DISPLAY_LOGFILE_VALUE_SELECTED resource_key(RESOURCE_FILE, "21") #define DBT_DISPLAY_LOGFILE_SELECT_VALUE resource_key(RESOURCE_FILE, "22") #define DBT_DISPLAY_LOGFILE_NO_LOG resource_key(RESOURCE_FILE, "23") #define DBT_DISPLAY_LOGFILE_SELECT_END resource_key(RESOURCE_FILE, "24") #define DBT_MAIN_HIDDEN_TRACK resource_key(RESOURCE_FILE, "25") #define DBT_MAIN_ID_TITLE resource_key(RESOURCE_FILE, "26") #define DBT_MAIN_WIDTH resource_key(RESOURCE_FILE, "27") #define DBT_MAIN_TABLE resource_key(RESOURCE_FILE, "28") #define DBT_MAIN_TABLE_FONT resource_key(RESOURCE_FILE, "29") #define DBT_MAIN_TABLE_FONT_CLOSE resource_key(RESOURCE_FILE, "30") static char *acceptLanguage = (char*)"en"; static Resource *i18nResource = NULL; static Resource *i18nResource_common = NULL; static char* getResourceString(char *key) { if (key && !strncmp(key, COMMON_RESOURCE_FILE, strlen(COMMON_RESOURCE_FILE))) { return (char *)(res_getstring(i18nResource_common, key, acceptLanguage, NULL, 0, NULL)); } else { return (char *)(res_getstring(i18nResource, key, acceptLanguage, NULL, 0, NULL)); } } void search_file(FILE *cmd, int num, char *str) { int replace, count, temp; char line[BIG_LINE]; char **buffer = NULL; /* buffer to store log matches */ char **tmp = NULL; int i = 0; if(num <= 0) return; replace=0; count=0; while(fgets(line, sizeof(line), cmd)) { if(strncmp(line, "format=", 7)) if((!str) || (strstr(line, str))) { count++; if(count<=num) { if(!buffer) { buffer = (char **)MALLOC(sizeof(char *)); if (!buffer) { /* Malloc failed. Bail. */ return; } } else { tmp = (char **)REALLOC(buffer, count*(sizeof(char *))); if (!tmp) { /* Realloc failed. Free and bail. */ for (i=0; i<(count-1); i++) { FREE(buffer[i]); } FREE(buffer); return; } buffer = tmp; } } else { FREE(buffer[replace]); } temp = strlen(line); line[temp-1] = ' '; line[temp] = '\n'; line[temp+1] = '\0'; buffer[replace] = STRDUP(line); if(replace == (num-1)) replace=0; else replace++; } } if(count < num) { /* could not find num entries */ replace=0; } else count=num; /* replace is at the first entry to output */ for(temp=0; temp 0) { /* print raw log content only */ print_html = 0; } } if (print_html ) { while(next_html_line(html, line)) { if(parse_line(line, NULL)) { if(directive_is(line, "LOG_TO_VIEW")) { display_logfiles(logdir, file); } else if(directive_is(line, "NUM_TO_VIEW")) { output_input("text", "num", num, NULL); } else if(directive_is(line, "STRING_TO_VIEW")) { output_input("text", "str", str, NULL); } else if(directive_is(line, "HIDDEN_ID")) { /* keep hidden track of what the current id are */ fprintf(stdout, (const char*)getResourceString(DBT_MAIN_HIDDEN_TRACK), id); } else if(directive_is(line, "ID_TITLE")) { fprintf(stdout, (const char*)getResourceString(DBT_MAIN_ID_TITLE), id); } else if(directive_is(line, "ACCESS_LOG")) { FILE *cmd; char full_path[PATH_MAX]; #ifdef AIX fflush(stdout); #endif if (!file || !*file || !util_is_valid_path_string(file) || !util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) { continue; } PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); cmd = fopen(full_path, "r"); fprintf(stdout, "%s", getResourceString(DBT_MAIN_WIDTH)); PR_snprintf(tmp, sizeof(tmp), getResourceString(DBT_SUBTITLE), num, file, (str)? getResourceString(DBT_WITH) : "", (str)? str : ""); fprintf(stdout, (const char*)getResourceString(DBT_MAIN_TABLE), tmp); fprintf(stdout, "%s", getResourceString(DBT_MAIN_TABLE_FONT)); /* begin search */ if(cmd) { search_file(cmd, atoi(num), str); fclose(cmd); } fprintf(stdout, "%s", getResourceString(DBT_MAIN_TABLE_FONT_CLOSE)); } else { fputs(line, stdout); } } } } else { /* only print the raw log content */ FILE *cmd; char full_path[PATH_MAX]; #ifdef AIX fflush(stdout); #endif if (file && *file && util_is_valid_path_string(file) && util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) { PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); cmd = fopen(full_path, "r"); /* begin search */ if(cmd) { search_file(cmd, atoi(num), str); fclose(cmd); } } } return 0; } 389-admin-1.1.35/admserv/cgi-src40/viewlog.properties000066400000000000000000000044131220472121400221350ustar00rootroot00000000000000//# BEGIN COPYRIGHT BLOCK //# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. //# Copyright (C) 2005 Red Hat, Inc. //# All rights reserved. //# //# This program is free software; you can redistribute it and/or //# modify it under the terms of the GNU General Public License //# as published by the Free Software Foundation; version 2 //# of the License. //# //# This program is distributed in the hope that it will be useful, //# but WITHOUT ANY WARRANTY; without even the implied warranty of //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //# GNU General Public License for more details. //# //# You should have received a copy of the GNU General Public License //# along with this program; if not, write to the Free Software //# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //# //# END COPYRIGHT BLOCK // ICU resource file root { viewlog1 { "Invalid Number" } viewlog2 { "The number of entries should be a number." } viewlog3 { "Last %s accesses to %s%s%s:" } viewlog4 { " with " } viewlog5 { "Log directory not found." } viewlog7 { "Invalid file." } viewlog8 { "Cannot find specified log file in directories chosen." } viewlog9 { "Cannot find directories based on server id %s. You may need to start the configuration directory server." } viewlog10 { "No server id specified." } viewlog11 { "Please specify a server id." } viewlog12 { "Invalid nohtml option." } viewlog13 { "The nohtml option should be 0 or 1." } viewlog20 { "" } viewlog25 { "\n" } viewlog26 { "\n\n\n\n\n\n\n
%s Logs
 
\n" } viewlog27 { "


\n" } viewlog28 { "
%s
\n" } viewlog29 { "
\n" }
viewlog30 { "
\n" } } 389-admin-1.1.35/admserv/genrb_wrapper.sh000066400000000000000000000024751220472121400200470ustar00rootroot00000000000000#!/bin/sh # BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # A wrapper for ICU utility genrb on Unix. # Sets LD_LIBRARY_PATH before invoking the command if [ $# -lt 3 ]; then echo Usage: $0 path_to_icu_bin_dir path_to_icu_lib_dir [ genrb parameters ] echo path can be in regular PATH format with paths separated by the path delimiter exit 1 fi icu_bin="$1" ; shift icu_lib="$1" ; shift # HP SHLIB_PATH too for old versions of HP-UX SHLIB_PATH=$icu_lib:$SHLIB_PATH LD_LIBRARY_PATH=$icu_lib:$LD_LIBRARY_PATH PATH=$icu_bin:$PATH genrb "$@" 389-admin-1.1.35/admserv/html/000077500000000000000000000000001220472121400156125ustar00rootroot00000000000000389-admin-1.1.35/admserv/html/admserv.html.in000066400000000000000000000110221220472121400205420ustar00rootroot00000000000000 @capbrand@ Management Console
@capbrand@
Server Products
Services for Users  
 
 
  Services for Administrators  
 
  @vendor@ Home Page
Check for upgrades and information about @capbrand@ server products.
   
  @capbrand@ Administration Express
View server status and configuration/log data.
   
 
  Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
Copyright (C) 2005 Red Hat, Inc.
All rights reserved.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
389-admin-1.1.35/admserv/html/admserv_dsgw.html000066400000000000000000000010161220472121400211630ustar00rootroot00000000000000   Directory Server Gateway
Search for and edit directory entries.
    389-admin-1.1.35/admserv/html/admserv_orgchart.html000066400000000000000000000010201220472121400220230ustar00rootroot00000000000000   Directory Server Org Charts
Browse org charts of your organization.
    389-admin-1.1.35/admserv/html/admserv_phonebook.html000066400000000000000000000010251220472121400222030ustar00rootroot00000000000000   Directory Server Express
Search for users by name, user ID or extension.
    389-admin-1.1.35/admserv/html/htmladmin.html.in000066400000000000000000000041401220472121400210610ustar00rootroot00000000000000
@capbrand@®
Administration Express

Help
389-admin-1.1.35/admserv/html/monreplication.html000066400000000000000000000033701220472121400215260ustar00rootroot00000000000000 monreplication
389-admin-1.1.35/admserv/html/viewdata.html000066400000000000000000000025431220472121400203100ustar00rootroot00000000000000 viewdata
Additional Information:
389-admin-1.1.35/admserv/html/viewlog.html000066400000000000000000000031161220472121400201550ustar00rootroot00000000000000 viewlog
389-admin-1.1.35/admserv/icons40/000077500000000000000000000000001220472121400161255ustar00rootroot00000000000000389-admin-1.1.35/admserv/icons40/16space.gif000066400000000000000000000000671220472121400200610ustar00rootroot00000000000000GIF89a€ÿÀÀÀ!ù,„©Ëí£œ´Ú‹³>;389-admin-1.1.35/admserv/icons40/N24b.gif000066400000000000000000000004231220472121400173200ustar00rootroot00000000000000GIF89a³ÿÿÿÿÌÌÌ™™™3f™3ff333™™f™ff3f333,@ÈÈI«µ itě慚$H¢0ã¾ !o†áp®ï®¤¨ ào(,%¨dp0,‚e³‰0HxØd¡èz¿à°báK¥¦ŒZXg$‡x1ºP#Tü€œ:=6vLN…>/‰ŠY/ WŒ>\\b•“Ž`F›C^Bvn7PDfti©«­ ¨{v{R!¨IU€«P¼»(p…M€SvÇÅp'Í#$¥Í6|+  Yáâ<äå:êë;389-admin-1.1.35/admserv/icons40/adminics.gif000066400000000000000000000016751220472121400204140ustar00rootroot00000000000000GIF89a÷ÿÿÿÿÿÌÿÿ™ÿÿfÿÿ3ÿÿÿÌÿÿÌÌÿÌ™ÿÌfÿÌ3ÿÌÿ™ÿÿ™Ìÿ™™ÿ™fÿ™3ÿ™ÿfÿÿfÌÿf™ÿffÿf3ÿfÿ3ÿÿ3Ìÿ3™ÿ3fÿ33ÿ3ÿÿÿÌÿ™ÿfÿ3ÿÌÿÿÌÿÌÌÿ™ÌÿfÌÿ3ÌÿÌÌÿÌÌÌÌÌ™ÌÌfÌÌ3ÌÌÌ™ÿÌ™ÌÌ™™Ì™fÌ™3Ì™ÌfÿÌfÌÌf™ÌffÌf3ÌfÌ3ÿÌ3ÌÌ3™Ì3fÌ33Ì3ÌÿÌÌÌ™ÌfÌ3Ì™ÿÿ™ÿÌ™ÿ™™ÿf™ÿ3™ÿ™Ìÿ™Ì̙̙™Ìf™Ì3™Ì™™ÿ™™Ì™™™™™f™™3™™™fÿ™fÌ™f™™ff™f3™f™3ÿ™3Ì™3™™3f™33™3™ÿ™Ì™™™f™3™fÿÿfÿÌfÿ™fÿffÿ3fÿfÌÿfÌÌfÌ™fÌffÌ3fÌf™ÿf™Ìf™™f™ff™3f™ffÿffÌff™fffff3fff3ÿf3Ìf3™f3ff33f3fÿfÌf™fff3f3ÿÿ3ÿÌ3ÿ™3ÿf3ÿ33ÿ3Ìÿ3ÌÌ3Ì™3Ìf3Ì33Ì3™ÿ3™Ì3™™3™f3™33™3fÿ3fÌ3f™3ff3f33f33ÿ33Ì33™33f333333ÿ3Ì3™3f333ÿÿÿÌÿ™ÿfÿ3ÿÌÿÌÌÌ™ÌfÌ3Ì™ÿ™Ì™™™f™3™fÿfÌf™fff3f3ÿ3Ì3™3f333ÿÌ™f3,¢ÿH° Àk®buŠ“U×VY;˜€€œPÉ“E…NBRIϨõÄÃÒϪ€TDÊOËDâQe­ŠŸŸ­©úƒgc*?I¡ìYM?†þaeM…@%Ÿþ*°Š׆…jÍ£@#Iåùs-ÕˆÖ&þYÙT–µjÖ Ä“'˨y"Hªš*–x l°ñÀ€;389-admin-1.1.35/admserv/icons40/cert16.gif000066400000000000000000000005531220472121400177230ustar00rootroot00000000000000GIF89aÕÿÿÿÿÿÌÿÿÌÌÿÌ™ÿÌ3ÿ™ÌÿÿÌÌÿÌÌÌÌ̙̙ÌÌ™™Ì™fÌ™3™ÌÌ™™ÿ™™Ì™™™™™3™f™™ff™f3f™™ffÌff™ffffff3f3fÿ33™33f333333ÿ3Ì3f3,À‹pH, KÈd ãQ–ŽÊ ä°qBKRÅaúQ¥†¤B‰dºH!äiHʇƒp~^ mÊ$‰ j|}Bl[ˆ}  B ‰BœŸ¡!G´œ$ $"W~x…]W f#iI$xLJ$FÕDA;389-admin-1.1.35/admserv/icons40/directorysmall.gif000066400000000000000000000016721220472121400216570ustar00rootroot00000000000000GIF89a÷ÿÿÿÿÿÌÿÿ™ÿÿfÿÿ3ÿÿÿÌÿÿÌÌÿÌ™ÿÌfÿÌ3ÿÌÿ™ÿÿ™Ìÿ™™ÿ™fÿ™3ÿ™ÿfÿÿfÌÿf™ÿffÿf3ÿfÿ3ÿÿ3Ìÿ3™ÿ3fÿ33ÿ3ÿÿÿÌÿ™ÿfÿ3ÿÌÿÿÌÿÌÌÿ™ÌÿfÌÿ3ÌÿÌÌÿÌÌÌÌÌ™ÌÌfÌÌ3ÌÌÌ™ÿÌ™ÌÌ™™Ì™fÌ™3Ì™ÌfÿÌfÌÌf™ÌffÌf3ÌfÌ3ÿÌ3ÌÌ3™Ì3fÌ33Ì3ÌÿÌÌÌ™ÌfÌ3Ì™ÿÿ™ÿÌ™ÿ™™ÿf™ÿ3™ÿ™Ìÿ™Ì̙̙™Ìf™Ì3™Ì™™ÿ™™Ì™™™™™f™™3™™™fÿ™fÌ™f™™ff™f3™f™3ÿ™3Ì™3™™3f™33™3™ÿ™Ì™™™f™3™fÿÿfÿÌfÿ™fÿffÿ3fÿfÌÿfÌÌfÌ™fÌffÌ3fÌf™ÿf™Ìf™™f™ff™3f™ffÿffÌff™fffff3fff3ÿf3Ìf3™f3ff33f3fÿfÌf™fff3f3ÿÿ3ÿÌ3ÿ™3ÿf3ÿ33ÿ3Ìÿ3ÌÌ3Ì™3Ìf3Ì33Ì3™ÿ3™Ì3™™3™f3™33™3fÿ3fÌ3f™3ff3f33f33ÿ33Ì33™33f333333ÿ3Ì3™3f333ÿÿÿÌÿ™ÿfÿ3ÿÌÿÌÌÌ™ÌfÌ3Ì™ÿ™Ì™™™f™3™fÿfÌf™fff3f3ÿ3Ì3™3f333ÿÌ™f3,ŸÿH° Àk²²%‰’'PLxÍ”’PV(Ñq"4+{JY)¡bˆ¡=)EO):,M>hmåŽ!¡Œ˜D ž$W<ÙXJ§P%c’|ÑJ©Ÿ.}2µ‘¨Kh“DŒ¸ÊFSÐJùLÂÊJ¥ )CèSYˆ+Ó†eûç©[³$¡Í¥{Ín‰$%Ò–¢8Ñ.Ù½ *&;389-admin-1.1.35/admserv/icons40/dms.jpg000066400000000000000000001635121220472121400174220ustar00rootroot00000000000000ÿØÿàJFIFKKÿí¬Photoshop 3.08BIMíKK8BIMó8BIM 8BIM' 8BIMõH/fflff/ff¡™š2Z5-8BIMøpÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè8BIM8BIM8BIM$@@PP6 M€8BIMÿþ'File written by Adobe Photoshop¨ 4.0ÿîAdobed€ÿÛ„              ÿÀ¿v"ÿÝ(ÿÄÈ  !1A"Qaq2‘BR#¡±brÁÑ‚’3¢²CÒScs$ðá“£ÃãT%Uñ4Dd”âƒt5´&!1AQaq‘"ð¡Á2±ÑBRbár‚¢#ñ²ÂÒ’âò3Sc£ÿÚ ?ß袨}óß<—kò8ØxXÐL“Aë3M¾àïe°ØË§–„ÊùEcø½Ïò8Ÿû_ùuïþ.óßüŽ'þ×þ]NÒ—|u[Žâï=ÿÈâíåÑÿ‹¼÷ÿ#‰ÿµÿ—FÒñÕltV7ÿ‹Ü÷ÿ#‰ÿµÿ—WNÃîÜîê‹9󠊊Ѫwk¼1;·–û´1R$\(¢Š…(¢Š(B(¢ŠŠ(¢„"Š(¡¢Š(B(¢ŠŠ(¢„"Š+ÂÀP…확G$ùh¾4!9¢â£Ÿ’‰~Ц²s1/Ú"$¨u5¸W†E5Z—¸!_µLeîh—Mâ›aFà®>²{k“ƒÆ¨Çº“xºé\¿sÅ÷ÿm<,ÊX\îˆâ¯'*1ã\œÈýµ@“º#Ûéîp4 ¯Žµ`âËEQå@-æÇí®N|cƳsÝ+àúxkMv݈߯²˜pæÊŠÔ¿¨Gí£ú„_z²£ÝÇ^žë#«[ãSýœÔÿsªþ~/½^þz/½YPîÏãýµèîÝGŸöÔg5#‘ªŒØýµØÊŒøÖZÚ¾/ûiÊwZýÿ¦ô§‰= ñZXÈCã] TøÖyu!ûTò>挟_e)ãÌd¤]ŽªòO{¸UF.âŒÛÍûiä\ämö© ™ “ ‘ÕXïEDGËFßjœ¦|mãH`FI„‚}E7\¤oTJ§Æ•JîŠð05íEQBEP„QE!QEEQBEP„QE!QEEUZ.s'œåàË•ò1bÌÀÄň,ké~r4Öê¨î¾«ý·o%H‰.Ù($|զЫKÞ‘F³ºàÊ銹d¶ôS.LŠÜÝü𼑴Ÿv¤±ùåÉäÆXy i¢üèÌ"Ls¶EwÛ骖WHÛÔóI¦Õòo“ ‘¸j¥è¨žåËÉÁá²2ðå1OŒ«€­ÖER,á—åjŽæùnW2b‚XâŒáŒ$H}H²LÓzSÅ,»Ò“Ì©úý‰?å Dœ3A ÏER¦ç;Š&ô¢ŠY9 "Íi0/ËÈ‚)q¤ØŸ˜_NEêË꼑§òTßÈO™‘É@òI<8²Æ°Ï<^ŒŸ‰ JñH›!óG¿wúIä‘?žƒÑ@%”ÕQJ™ÿÐßëý\[ó˜?ÿIÿ¼zØ+%ýUMÜÖÿö_ýãÓ@<•w‹@•Fã¢âž]¼«Ïd€$ÇTm¾ÒÊö¿øjÅÝ'oÃ~Í™ÇJùŠ€Q˸/ØqòµVý= i°÷<|w0ü'0¼6V6*ââ"øñ†ÿùOöþïÏVF <'•*À¬«Ó«/Âv×#˜ùy?šhLq1e'oá°?Ëæ§}ÝÚ/Àd Œ[ËÅäãË×a:únÜo·M8$¶?ïÀÿßÅRÎ(1™Œ‚®d$«~T?¡ö=[oµ¾Öß-iÿ£ë·—ÿ¬ƒý׬ÜÇZoé*탕÷¼?¹égŠk3yÚ´z(¢ªZÑEP„QE!QEEQBEÉp(BêŠAòc^¦›IÈD¿l}t!>,pÓ(ñ¨yùh×íT^G8££T²’LÔ_‹Îæâ€€[«\ý‰ªÝ=ÌÐΈªÞ×÷Ó ­+ºcKÙÿmBåwz|ÿ¶²Lžæ•ɳT\ÜìÌH$Ó%uªä÷ˆ¿úŸ¶¢ò;½µ³þÚÌdä¤b5?å²Üƒæ±­œ["@ö…MÉÊû?uÊuÝ¡é­GÍÜÒµüçëªqÈsã­pdc`Omkô"ÌB«Ô8«\}Å3ʾcÖŸ?3!î:ôIÅfYÓ¨ªk¢ô÷ÛÆ¬âX‹à²s.y¢Ú)†åd y‰¿RMyýNR,ë­DkÞ׺Vk t?ÙZ¶GE„ÎZ©3Ÿ(°ÖãßL››q;®nGZHMõ j]}¦š0ón.jvM §ßÔå¾ðÖ‡ääcrI·…0 €-b i^M¯Ò§`V:~9)uóiÖ¼nJ]Ê7‘ìú©[Ž Wu·S}N”m&Œ‹÷)Oê²ëcÒ”^^Q®íµ sa¡èÝôŠ=8è§yÕO'9 ûgÝzrÁ*‹–6¶†«7*OQï÷ÐÌv°éøÒQcDÂáp®p÷€¼Ž•-‹ÜRCjz ¢CØ:¾ßeIC»B²ª˜%<‰dUúã•H Ýz|ÒV6fkm&³¶yoäm÷ÓnC2x0ä%í ¸é{šÍs²= VÙäÈÎ19±‹ÞÖ»þÚšÅÞqõ×ÎpsÒ¡±j•ÅîyRÞÛ\Óiu·/£±ùèœ0©¹(Ÿí ù÷»œ[Î~º²`÷K¿íªåm”‚¶”ÉFèiPàÖm…Ýqµ®ÿ¶¬¼o9Cm }/Uí*UšŠgZ78YøÔ!)Ex5íEQBEP„QE!QEEQBQ¶¸¡..Éžhòd˜Í!›Õ€¡…½rÞ¯ázHÍÿ¥RôT‚F”*v—"žËÈS%%Š`r';’y›*aSMó»¾åóWröæü©ñžlyò·1džoM$aµ§Ž"ÇÌ¿4‰µÛÍ÷äß1ENéjQ´h\Þ?‘ÄlÕi`}»ÀvBvÃÍFù–»|Ly%Šy»Ã¬[™Š«X®ð„ìßµ™wíßKÑPåK&ë…Ž’K2©õfd”»Ú.B«“¹K6ÕJïXý(b\±êIf;™™Ù™˜îfjVЇ(EQBÿÑßë-ýNMÜÆÿöoýãÖ¥Y7ê·$˜<¾ú>«¶5Á-eˆþÁz{d 9ÁSÈŒ¥lÆÉ!T= NwD[¹rmÿéñÿ:¬arÃ.R¹™qñ° yÒ™ˆ'P£Íæï2ÔÇwó8Á¹¨lÎ~(ïæDå;¼.àöÕ3‘î×v ?í§PëJä{­cÏûj£Èw› í“öÕç$páeÜ¢ä7KÛÙz®ÏÉI!7cVl‚N¯¹=õ˜„í–þãL[õ/¤ŠxŽ•C“!ØþêD»/­ €SU¢/{ãLvKxïÔÕ¹98ó²cŸ÷DzÄm긊XÛ¯¶¦ðxôÈã³$bB›ðÓ_ÛIrb ùʱˆÉBUA$Þ¥ñ0±²"VyÈruEPmûj ûiU ¬ ’¾ž7§ly©L##æpÚ)áÄâ.ò°ö…?¶»þ‘„˜“º?mAÅ&Cî¼­¦ƒZTz†ÀÊÚøSÆï2AÁ‹{uJa`îSñøQvJÎ,T³ [þÚr1Ô€Dl-§Îµ[Uiê°XØø‘ã0£ÈY ®÷ !²ž3ç Ä?EUË|2q‘nªLaרvõ¾õéì®ÎîÁñ#zûiâ!°%¤Úù¸ç3aš7µÀòµ½ú—Q#Íu‰D>›~#'Œ€ Ðè©‘Ç,¶5.}Š ©l.‘œÞDôý©4ëì=‡‰—Ç©X°•­ÖT`Xý7§=Æ™Hƒ©òÜ_ÇQTFí©ar>+UÏ\alöâ›áðØØ«½Ù¥tù·h¿P¨OêrG#l»¾ºŸ“”ÂXšÏæ±ê ΕKbKµÓé¢à-“7–÷Ë+>/?*çÓãW^Óî)&Èq¸›%ÿmdÈëí«wdJÃ'%‚¨]TF+@+nÄæØÚçöÔæ7,« Ì£É`@½ªC’u·›J¯ju¨Ãž¯ãOuoα9›XÖ¦±¹´Òî>ºS+ˆ`kÚ†Åå!r.ãë©5ȉº04¬„µà`zW´!QEEQBEP„QE!QEEQBEP„QE!ÿÒßëýfÿûçÿôŸûÇ­ª©}åú~½Ýšy‡èEèìú—óÝR?½BEkø(Ÿýìÿû¯ÿüOþöý×ÿBIEkø(Ÿýìÿû¯ÿüOþöý×ÿBIZÿè¯ÿ•æ?ë ÿvJOÿÿ½ŸÿuÿãU¿²û4v|Y‘ŒÓ™ù¶F¹‹ÒÛ°0ûòn¾ê­4QEEW„Ú„/k†p¢’› :Ô&+éƒbÓR*)<œøâ櫜—qG>z€å9Ρ¤·Â©œŸ$’^îÍï&ÕdmHä’Wb3S|¿wpöÕ“î§rÖÛHå¼3.Ò:·PMé‹abµÇ¤ÞI«…’4UDt*+3™šBNãQRåJÚ›Ú­+‹ˆË‹uÒäýuäøqdBÑHÐk{ ?¦Z¤%þà>Tg}›xRdø~Ús•ƒ•ˆäH‡h65êlñº8ÚNºÖi ;¢Ñ ܼ¶Šðzêß²¬€¢‚œD F]Äô>"§Œr/lÊÈ6§©y\˜ÜAûê%m‰»âµ?‘‘êp°áǤ*Ï>A"ÃpÒ4¬· Ý€ÈMÏr‘š«øÑñú(7=(Ћ[ZÝ’UÔv./õÓ‘« ½/Mâp>›S”¾å#Àõ¤–! Ø[V¡'Jqk‹Ÿe4ŽÛšúë ÷Ó¨Íô½]bãyr®ä3 @º[ÙÒ¦¸e"'B[§ÑPꇯ‰ñ©þåoÕ·à+],·~RžíÐkåë]®„sÿ—Zô/A¥Åv›céÐõ¾j]Qî^ fúM2–þ´ÃKƒáì°©#=¬ª¦%åb:·N(©-‘I5öù€Ûõ[ã\íÚÚt¶‡ÂçÆ— ,?ᯠÜ›é©4î‘%°[¥½÷½é¼Vi§k^Ìߥ;  OÓá®·¦ð¡-5ÈUÞEú  œG”°o!N”ÙͶŸi§;ã@¡ˆvAaouë^´ÌÂñ Óû©\äQ“E¾é·¿­ézÀèMÈøšv\–»|Þ>êo [ßÃÞjjýÈ˼/-sk\ÓJ==kAéí½v:צžÚ¯…‰¿öP[˘q1$ž/ÌF†Ù¾†Õ!'ÆÊ¡± u']ÁÙ©<6-ác¯ÀÕ…ˆUÐzƒ\®h¥yF £Ä$ÛÄ⩼Ç7 ùÈ2äõ„ØMÖÇÙUáÎòÒ §!ˆèmj´w†f;ñނʦS"“76¹ªD@‘ kã|ì~š©t=mzôHAÐÔlŽŠ\­KŒîÙïs!;@'Z¼q]Üd B~&¾~‹%ІV©¬nXˆó Chn+éŽ?žŽ`<ýjz Ä ùãˆî§B=_¸~êWÚ þÚ¦vˆN$µ5`kª¯`s1Ìš¦¢ÈYÁªH!:^Šð×µEQBEP„QE!QEEQBEP…ÿÓß袊Š(¢„"Š(¡¢Š(B(¢‘–e@nhBíœ/Zc•ž‘­Fò\ÂBš©\Ïr"#38\êiá)e& {•îã ëì½Q¹nçqP4ð7ýÕ\Ìæ¥Èõ$’ê ÝzŠŸ)œØbu·î­6íÑÖk—*Éö_0Ó´3o~Ÿ¾¢fÌš[„éБ©®xâS½Àø›kM[‘Âèd‡OwÕW0ªŠËérÓù‚› øýué\¢uD_mɦ«Éa»ÇÉmnM´ÒþÚîNS4iw[®ÑFáŽäm–kØS”\‹—õT{@[þúô#uiÝm ýÔÅ¹Ì €ÇKZÔƒóéÿ ÷7JÑ×Þ¤[¸ w)¢Ó”ÈIŒuŸe9í¾×ã9×|Œ¹vÅ”)%AöëîªûsbXš9" \ê/¥ªÇÆsç4‚9XàèEͨÈË1b>%ÁtÀ“©ú©ç-˜rrK$b5@O¼:›{éŒÅN1Ú¿ŠFÒçÁ|mZ-ÌÎp”Æ$*ÀQþÒ0]À‹’, ðÖƒ/‡†µÈÓ_ꢭ)Î µ>4åEˆ¦Ñ°Ò­­},± Qøýbœ-Ǹ FU/á}H÷Rè «.:àš…/Ü-õ °p«l3mó¯ÂÕ][ƒ¬U›…ÂÄ]˜®¶Ù»¼q " ))õ¯©Wí¯v‚6“§Â”EÔ€v‚:õ¯JÛM5:š½òY™&VÄØ <}”ÑT1bA¾ómuöSýº\t:kÒšD,$C½í¶”:†¢6ßKiàhU ü:_A]"^ö hmÖÔYœj:t©u ×÷Ó(Žß[­÷¨éR,¤+[_q¦J 6ûdiRø)྄ëü7Ò—FÖÞÍl#¸ÒP ½|Ó‡ÈI ^ú ·pýÈñª«–ôN úW=&ÆŸ«†’p]Òh/Wî;–ŽekÖY@„à©ú)(å44­"”QE!QEEQBEP„QE!ÿÔß袊Š(¢„"Š(¡ ›PM©´ù 74!u4Ê€ëP<Ÿ$Ь/Hr|²ÆÝT~Oš XøÔ€…×3ž$ÞQÈ>Ö{ÍÇÈä¶Ô•]Aº‹Ú¦2óZFk½1v¾ÓÃáN µAܪ†XçTêì=Ö? ŠšlðÇÕgSìkŠÐý4 Ü{À¤[~hÕÖÞ"ôâì›â—ÓŽƒÁgäo˜’oãO8þ/3’“f4e‚êòG´š¶ÍÀqò·š-¥Ž…M¬kCâ»sŽã¸8¡pKav'Àš£‘È6ãå"¯ãØõ%Z©œ`ñù`.j»7‹,›>¡jîOÓóÆ››×@.ðHm ø•ªèÙ ‹"Íu±¶Öhšì¤tÜ¿ikžKŸ0¥‘|r©@HêH÷Ö+<«ÛžRw8ÛœkLÀ7bÅJ±|Esá§ÓOùe¶I‘WnýOÆ£ÅÉ÷×Z2ÝFk™(í$hW ‘¯²¥8¬—‹ e©h…¢%Aót¯pxa‘­•:âÄo´¶¤Ÿ`Z˜Ãàxô˜æ3Û]Ê„ ªìàA‰8Ñ4mϾ,kžZiùGY¦—ÎEÈÕoòÒ\ÄØèØŠö[ß|Úöþúá±'ãäõñ&Äu{\{0:Ô?'"ÉÒ¨±s¯SX¢fwyƒ8蘸¡OI¥gpUOžÇ¯Jo5„% $‚up­,0ú¯¢‘eøR“• …™Î‚úO eß Þä â„ѳŸµ~4ÝñXÞ,F¿ rˆø²žÀÞÄ)îzĤÈ×°³kó97e ˆþbƒ ¢H’ÄZ¤°±šfÜÃȧ[û©¸‡ÔüqsmŸžÂOJ4ˆ¨¼ÇÛVò/ˆÀššv*€ÅÔv,gAUÝjw"•[i6ð©n3Íå2_Ž‹pfæmRI©¼¾Ù‡J19R (ÀŸtÖ{œ¡!‚K‚hÚ“™uU6ã ¦ð êú>ïuêg‡‰¢Â 'ƒ?Ó¯Jï‘L,\MÊ` -á¡®¸‡Yð–@-r|IñöšÓôùÜ”Žð@Ž©å°12ï;.?óhÊ·ù‰è* N[”ÊŒÉÆÂÏm\ªAoycÀã1yîåL@ßÅÖ–;•þÒ+A»j"8.7TV ¶´zù­¥/38ÌÛ·M˜’X>‹_ ƒra÷á›õ‰qüÇ.¹ñGšO§+í;À_Nµc‰NÆXîkøßÌjgŸÀàò±¦‹6Ž`<»È½ïãoÕ;ÈÉ\¹øÌ›–Žä©Gí«8<Ãpí¹C–j¯¨p…±¾ÀÅNVÚ| t£pðð®‚ØÂÊ5'ƪ™üôÙyF f1À§nõf#JÛ“ 1Ý*èkjÌ®I…o’²¶Ý¤±×ÇZk®OÞm*•,ûÈõY½¢æžð¼«Á2ãÎÄÄæË²ÇßY¬ýJ3†×ÍÝ_w†cc'j³7‚µ(B¢ææ½Û´Ü__w²ºZÀW@,S]XÀ|2…Úzê.`ÆS+’€nP ÅV°g.Z*…}þûÖ‹ÆÃ?oIyUL‘î,,Ûmæú«?0¼bÇ5§‚”‰85;V˜]w  ƒrÖ>&:¹ Y–çE¾—öÓ˜8ìÙ2¥Š3ê ÇQ`kL¢ƒ&LÛ‰Ñ}‚õ–1ÛÁo˜z®%ã¢i'@ámkSi8Œ_Ìȶ½îjg<ì’Ämb/QyÇÕÄ•P` ƶµtmOú@»w®MØT†~Åiì¾Ö‹ŸäW#-ún)ÛtÝo…_»›¶øŽ?pÔ.£|cÄ{êôÙ·Ògò‡vk¶—J–ç³`’6XòémºW2WœÝ‘©Æ'òùWJÕŸ“ ÎF½«<î=BI•dš%¹Pteñújƒ4¿˜“q+×ÃAÖ´<ä•!”›:ëàj‡>g͵¯ÿ¥Q±˜ÎÙ#Ã%ÉmbmåbO¾¸<¸N7ægøËÄþœ—{‡;s³HÄDÇõf”‡úló»Èé;ÝЛ€Ï÷O²¢qxÄÇå²²½[»‹„¥í^ccÇ4ë$o`±ÛSRÂ"Û,J’¼ªœG±~Š~ fyØi™ôÑ/Ô%lYžáRâ?½ª†ç²‹žHÉ25£_hÝ¥ê ˆíüü®O(Ü)yˆòÃq×Ü*s¹"™ø×,¶]èt7ñ«gmG—‡nBÅwÝvˆQ-u }\Ú®ú¥ÉzЀÃk•é–#;s”²Ogì^ÝÂÁ×Õ˜‹Ë“!=Oû+YOuð‰Äe«â‚qdÕ¯˜x^¶ÌŽ@òÐÆ#E,Ú2ô¯âJš«=ÕŤüaÄg™Ð1]ä¹Aùk¼ .0];œs+f& PUo‰/ŽÊ<òª“4§ù8Ù˜™"!ŒÌ" ÈÊE˜IÒºü¼<$’ãcS2£ uúЬ]¼‡¸;bIܱËÊdñÐØ êóywE«[¥I̸\¾ѹsxP™Ž 1ÅC·saâŸCÑ1‚6Èî:{HªÀçÛ/’2¨ÛB¤ ˆÕ›•í¸ÂIŽïæßöÕo7€ÄÆÅ–Hoë ¾ïÖ²qùF0‘×õпÅÝ ¤FA½™?äË`bä̇Ílàƒ~ƒËcY ³K!cvw7ö’Mi2[¶§S%ÜÄæÞ6Šªö¾I<œ„ëº,{*¨%ÏK|+¡Ì¼cÎ_Ô•ÊâÚs„iç#¸(&Ç š&àk›Öu øßJÛ¸Iûo*OBXÈɶ¢T·ÕáM9œ.ÆÍ-?® ¤uFÚóW2<é;JѦ,\®‘໣tWY?ÿ‰,_eÑÒžuýÕ)Ž·Q·Ø+œ^-`î øÉXF±‰U]º[a*oï©*Iñ¹\La”ѦÊX[¥Å«}»°ÅÚ€×+ ­È­PHðH9cJ›X($ý4¿se(ðc­ºØx×¶ æg›cí}Ž"þÓd—'£ibØVÀ-p=´³kæbpA´c‘ðOyáS~¬ ô!ÇáÑV)*Ë-Œ¹I÷›ë7¥²ËÊe 3{Á;WýÚFhÜI" MÍ­Ny4ž9!GR"DBt¾Ñæ·ø«abmŠ6×÷%”Ãs)ÓǺVò›ûzõ®mrúªçÂv–<G¸¿Ñ·áa£ZF'¡“oÈ”—îZ³ ó- žÀ¦12,ƒáx<îvWL4¸‰wHíp£Ø>5Æw ÈqO·2€è¬uSoeOÍÜ3â³bq»0¡Œ“ H·V·Ùvùšÿz£y>æä¹h&YUŽàŸ.¢ÞÆù«-»Ü©ÜqzZÓ]†„X“»¦ Am5 -ÇZRf×CL>o•ÞͯíµTgÈi¬ÖN´¦nY–Sc¥ïpñ¦d«º^šš( ¦hw\ -ñÒ¼Ý*ÚêôëoÙ^=…Ø´±·Zè9±jÝhRšr™,&?)o)oŽ*½‹6[6ÃhIÚíV|¼_Îã¶?BÖûJû) ^/7ŽâãÉôµ•˜ª0Õ¶›xVnMݱ$KZø¶·ÉÈ;F-ö/aíÜD‡I·Ü}µËñRb~$Nd‹ÚzV¸9(¿$Ó4eeAfŽÚ_ÙQI>lr¬‘V|}â²Z»pIå"@,_5ºõ‹F ±"Œ˜vÎIL¦„“±Ô›x\xÕûÌž\ðÑÈ[ïS{õªÇÌdy€*mµ4¿ÿ…Z0²ý Ápd’y=€TV«ÀJÔÈʯ¢ÃÇÝÑz&dåc=y e´Þ •osZ¸ÃiŽNá}·v}¶R*O$þaIG*-{mDO’b svÀû«¨êWH–Ä”‡-™DíD@¯©§]£…ýS>n:À¦Ÿ1úª™“Í”Ó)Ôœñü®V&BäcÌÑÊ:06·¶¶\´ecÓ ÷.lní¿êbÄ­Éûs)û}p±§ôåÇ ª— þñªWÇsò/Хɏ)!°zëSë̾W±Èw˜Áq}/L¸®g”ÄiNV.Hí§Ñ}Er€eùŸMÀ‡?.Bº¨ŽD¹’G–Þ—¦ÛLJOQ¦„\T;â¸ç¢‚6!²$XŽš{!½[âϖߘ‰EÉ,ov­TyNCóÿ9ˆÍ øŒ fב¾`|+E‰ˆ7@ø,üͱŒI.òl|_Ãñ=¸8ÞZð€ÎI$«'Fòûª„Åâ9,ÆÊ\²êˆÚÝXxÛ­ê»ÿxòû“‡Š\É åÆY%p-ºl=Ô†F&f7Œù`Äí¸"*²–Bn ±òµ+Wag‰8âSÀ Oš´Àt ?ò†K³ÞÛØý·äså l‡XÔ»ZÀÛÙz÷ÔQ!¹!Eî-÷«®-×?•ÄhnÑ&RÇ+xu? Sî"3`ÿbYÆ&Qa\zõ[® ‹Uisü5!)©ÔÔ{©”<¾,Y“`Ξ®,êk}àjýê©Yˆ½xPõ‡üª¿¦^•©›2p.k”¿j²`s|t ,Ò•Ç!£õ@,¯´õ?v¹î¹£Ž3²2ò¶·á®°bã ˆÎbæ‘´|/P=É<œ–/¬ˆWírm픡 Ò”_ÇU׿) s”MDMz¦ø1çf¤oÿk[]ÄÞ¯˜^Jð‡Á7å¥ îåìYÃ1Öý7ÖSÅä.F9Y†ÝÊá½Ë­h<·rbäâá˜Æ àyMÇÍþÕt¾¢%ä#勆 ›ôÃ0¦òAsZv/røl¼^Ý|¼ rÍbÅ®Y‰[øUdñòI‰/­`ò©†€=šé^Í•—68˜äHˆ@™¹:uÛÔR¸sË6:‡$~¾ïms€.bGk®¬™Žã¯J&0ñÑEƒ3*¹cÚàÜç¨ÎÖâ±Ò,ÌgÑkÆ/ölÿ´¬n¨,‹ò¯ÓrzÔ4±·‘uo$×#ÂÄEt¹öîž%²jb<úô\~%Ë1æ]Œ~Y/ú¼TŒ\V63‚±H„ÆXîè¾ss¿ÛO´xü™$ä#É&$K&áƒnò[K}ÖªN{ó¦aLm°Ä—ÛÌ1µ¼·ð«? ——ÃÏ…1äÇUEh’Q×ÔZäÜŒ}MáͬW^3´NÃl°.$ÔuÈðyròüŽ~I&ÿN Ò ±ªy˜ûE—ýšºþEƒÛ\ ¼Ÿ «êO+ ms·Kn>PäyWÆ“ €Áï9Œô.ßéþAæÛZg…ÇÏÚ¸ñò‘ú‰"zÍabµÞ_#v6〇Ò:¬±çzD9Õºè›ËÝ}·Í r&âVHðþy † ïܵKæ9ÕæZEÂÀ\|B0µˆ"­XëÚü/ ™‚³)—:×%X~ôÝP#¶xlqVGªì2m¶ß´ž %ÈÄ8!ƒå¦Á€f-W¨ïTnÐãñ&îtÀä¡ãPhÿ½i~GŽî OéÑÊdâïb:6»~Êœ‹…œT ,ßéo`£§Úÿøk"äîH9 ÍŽÖ,U‘¶ÔÀ¬ºHq——!nF±;£o̤ÿ†£yhZY“òƒz²îò¯A]÷S¯?—ŒOP©(Iz»öÇaÞ\ùK*…@H½¯ÒÞúèF[mÀ‚ä‡M [¥(ÐjU9%Yc1Êàlf×J㌗nB%änqäp%aÔ?6•­÷¨íL¼T‚>j¤jÌmjɳøæÃ™J鹺ßBð4ÖyÊ¡ˆÀŒ /qÚ4sÁÄ-›ôŸ‚ÈDe“r:‡VójOv¿£Ý½{³Ÿ£wüª´v„s§nñŸ™ÿ[òÑÞçÂÂß²§íqÒ¯3™%äJ [ŽAPWô›¶jÿåñ§+ú_Ú«Ö&®¶Ò¼"¡Î§ÅNÈèA?MûM?ý!'ÞiÂvkÇka :\ÕšÞÊòÔn:Ÿ;# PØý­Àcÿ§„¢ÞóRø¸80G_®½èz×hÖ5ÕFÑ¢’„ Qjp*>)â=Å d­QBTQE!QE_ÿ×ß袊¼&£³²Dhu§92ˆÐ›Õ?›ä¶+XÔ„(^áä–Ì7Ûàk9äçy]¶LÖ=GZ“æyQœŸ ®¼ÊÚõß_¢¬ ]7x²nm/[›*?'”8g®6ôÖ¥O_1¹:ô¶§áU>àkæåPÖ¡0ÅK¯pa°ô'VÓ­8‡™Àkùö=æõJÝ]ëáHåKÄå1̱¿¨¡Ã{øô­?3ˆÎâ„xè7Ö"¿`øõ÷Ö’0*ûÙ9råbe`» ¬døµc惴\ ñ-ÿÝÁ›KaÀ×ÁJ³cGÇäâ¬6g`ÅØy¬>Ȧ”F èHÐõ÷S¬ˆ’$ØÐ9mw6ãÒ¢¤›Ñ…ÕnÕF¾Êà ŀ8Óœ ¶)<|õƶÀÃÍo wÛ¸¿ÖyÆÃuy¿.â ׸aî?zªË‘|‰…® éìÒ¹ƒ?7‰ÎLÌL20eéëJÙô½8ãC\êë‘ëSt…/§Î^n3É›SŠë§[ÔO#’Ó|žPã[õ÷š° œNW‡—!¤Îf€±¹M¿óm}ËP#+9ž uÜúe調v¨µdûXº¾õÆ…$àøÕWä#vŸ(é]ãÆÒȪ”‘¹­{ õ«"pœV~®\§%¯m‹å@m§O3S‘)"(SÒ‰ˆ-vû;­«VÁz.~êûd¦%x±†ÄÂbPëï×®ãÉŽ@Xî>Ó­U¸ódR†F°_+#|tÛR‚HÙ ›W“`Û¹W©pWoxNıˆRÖ8ü,¨£`"õIPë¨é©4â^ÆÉî “†Ù¹LÌ$¸T)¸…Þ?”|ÕEæ&õÝJh±xUïôûõA8˜|Ôfle#ÝÃíUÐãH\·#O›:|V>MÝ÷$%VùtR|oarÝ­‡“/$apJ•HÛuíר¤ùnO"X<™ñ0Ò& Ú´™ù¾¼xóý)'’Öh–Aþ±¬ï™Åüš¶<«µ— >œˆ˜Ý%É2´ñ¤ °0#%WÈõžRd!<,zjiÿba·,ëË‘R&;“uÞ¤Xî ¦í‹‘˜ß—ÄBò=€Û¨áW˜ø Eá±x¬á¹™‚†èÛÍɵh³`ݳ8¶…û2TÞ»éÝ„èGB¦ù¼èŽ(E@ÊÀ~&ÝÖÙUÞs—É@¼~A>ŠhoA´<žÚ³ÅÇ·Øñ³„H¤û[Eª'¸Âç²É:ã8êÀ’X{±Êó9c@ßn ]©Æƒk†%ú¨9žÄ }›±ékTâçîœØ¸Ü¾3~.NE®#Og½¿†¥9&X¸ùýkú –`¶ßK ø×]£—ýŽŠ 6r’É$ŽãÎ0J­jàqýIq}º¬œîI„L@ùÃw+_Û=«Û±C&>*Í”[bdL79o´Eü«S«™y/ ˆB=EÛ[}B©Ëä÷.äT’]M…äéþUoÁŒc&D¤ë4·éeGî®à¶" ®)‘8¬ÿ½{÷‘§â01[+M³e‚È ÆÝ<»é.(AÞ|rE…csy²åYVÿ8û"õsn'Î9¹Rc#M– Nì/¹TØÙQ¡xþÕÉ“‰tÛ/¦»£‘/¢7VÓìµSÉ㠱ƱÁ_ÇäR ¡Y;‡6&IÁ’;ånôý+kì©n?´{”¢ÂØö‘€ô¶å]Z¤0s$ïí—“ÈlPƒùXÂÝAû;Ï¿æ­{¤(„¨¾Ñ¸u>ázÁrR°ÖàZ•‘è¶À ÄÜzÐ:ÍS´ûÇ•Ò9 X8ݧ°Ô,p,k…•ˆqòä_©>>cóVÓŸÍcˆý26€5½fýÑ•X;2º7ñR5 zÎo4¶ú‘—Ì Z#c|wlå”…æÇ ³lÝàj qÌDÇbu„n°èM4â²W7evÝ&¢[‹Y?ÙQy’eòÙ&ÚÖH¢RÛ­ã§ZÑg‡ Â@–b±ßæLDÛ 9qE ™Ž}7¿C¯²¥û{Ÿ&FSèBUL‡Q¹µÚ*ÁÄ~•÷y\ŽM— 3¨òÿV§Oñ§÷{¿‘Û¼~[͇‹.æ¸tÛG¨ÚV®A„†Ñ›vQfâÆq–óA-S~o™Ê$ u)Ñ ¬ép´×º2±ÈIT2k ÐýtÙ%üÆÅʃðÍ‹K®óãÔûkŒìS*ÿÙ !o{ƒû=µž1·¤\~«\çv`¹$‚¹cò¸¹8¦xŽ÷ÚXÂ5an¢ 39ȹ‘XŠUã> 'àFÚã9øœ¤Çr¡ƒÞâäô?EMAÆAÉá¿7ÆI<ñÌ3g«—ò¬³yw7ÚŽ›—zì­>R=½z,ölB3ÂOŸÁ7Çå¡ÂUõñÕ٠ʸ¸]-7)‘ËŸÁ‰ òUO±SÛá©'âvF¹j¡Eƒ4l²¨'ì·Ý§x¤Î«0Æwã`7“jîy]~H Q¦æ‘þJäFaë=´]&gåÐ ”Ó•ìîåΛ•H•âšacb¤2ÛÜjíÛ2òRq±q\¢4ÓŒ\|–òƒR=…Éw9ÁÎ⦂gŠDÙêC¡ÑôVStþ*“ä{zh9É! +ìhc^ª# {é¥vìÄ£(‰~!…?RªÀ¸-»"«Ý…ÿfH2}E+aŽûcôžϔo¨OäðÚYÜìD$·´eJÍ4¹€™†¤6¶úê+‘†9±dÇ‘„q°!˜èÕT‰n-Z•¾N#V Éfܧ!/+œ JIcµ|tµX8~ß\<¼Iy‚q Щ»lêËÐé]ÌxN1áËÂŒÀö$ÈÞrm¥”kÔ{iŽGrA<‡VÝ{+Ø kur€±´ q\’<ÆS5+S‹ˆíî^JË¿å”ßr•6nu]:Us‹þ‰6^k¢‰%"ˆ¶å:î}µsåcAqÓ+4$¹kjwjzÔ>_rò™™¢|Ù}[° e7 zª\y‘´Áû“JQÄãÑl)>.*ãBÂIaA–[¿ÌWømMæÏ–G…Á$í Úè.5 U,>R ñ™ò rNöu;¶¹>#ìëVL&5ô¥Y(#wįÍMbÐw&¯WÅóK)RVWµ¿=ÝøÓäk‰‘&ùT{-ôiW~G±büì3@qÄ7!²¹¶¶Ý{ÒXRG\s?Ù¸x\Z˜òyùq¼#üÊÊ ä‚‚ÿ0ÔkS{ÊDXÓ µ4Z¸ÌA.:ÑûÓþo…ã£Í%1 r îmãk¶Ú…æ¸L)\¨"‘nÄXµÆÓL&õDq†’}=MÁ‚¨þbjÕÇã³Ë‡•¤K«t°7j¢ïŒE_jÑ!¤—,3Í•ûHñ`E”ª¬j@”ãÑ—þ}ô÷/÷RË´ -]^ºMÛâ¹oìÉ˸ë3‘ôuxqüL¯ð¿þj\š ¡”9Ha×Ôó?.£«7ù*H÷W›—Ú*YR'#âßæoï®+Ïø›ûémé˜}b¼2F:¸¿Ž¢†)rˆ …z/í?ßRìF‰âIëâ,˜¯¤‹õŠ”²J©®é¬3# ¦œ‚ ¢´QE EP…ÿÐßë–6Õ5Ë”"B?5š"µ¬ÇžäÝ÷ö½î:Õ‡º9M¡€5šçæú¬Àësûiâ* •™4æCfuµî´×|ÄÊ®ºý¡cf ÞþËhmn¾úvP¹/fùXŸj«sí»<ÛÁGZ¶µšíÔ¯ãUtÛŽ–²nµØ梾¢½ÐKÔÏÛ\¯pe.ŽÓHÖ¹*ßÅÛìÕRˆySˆ’XªÇÃè­C°{{“Äãr¹|¨LX™6Žú3‘ö”}Ñ÷«BìŸÑÎ+…EËçÒ<üðATÔÄŸF›Í_¹>;a…"­¢Ø,à£J¢ì%z-´bFº‹…«‘‘/«`>õŽd$x†—¶µOÎŒ©`E¿O Ô9NÒ屘¦9Žd#ïl>“vns“'!*E ‚]Pî:~êÉk‹ÈÞÛjèÎýwn‹9ÆíîG$¾^Fxog±ú~ji™*)Žd*êH ‹ñ­{ŽÃÇÂÁH"]¡®Ãééû) þ;ÎF6—¨Ýk0ø0®ì8Ï_3WEÅÁºL(ë&âoÍ#ħ ß9û;Fµ+—ÍG˜KéG ;”|ÄÔnNZádeáá\mì§ÚÀi­FË)‘“ò’Pc°ËPà÷#q ±ñNNSG´ßZ{²¯¥"Ÿ1}užF¹Ô‹Þ¤îB¢þQý´ ¨^ÊØí¹/£‘ü¶I³-þŗͺ¬Ü&/Éà „ŒJyeKÛÌTU÷‹Ñƒ—™ÇA<¸ó B4Wóô`¾êªõ±6z±VÙ½(`Hq’’î?ÈãËc(Ø›j~’j¸¬|=µÜ²É;™%bîÆåx¢çé©0À%”Œ‰%=ã¹Þ;!20æh¥Rd$t­K€ä¤î¿Âåää²€™O†Ö+¦åª—böŒÅš%ú|,=rM·¸+é^Üá°8®= ÃÇHRäÙ@ Àäª<'(àOqU\nÍɇÅÇÆ1—IXý¢>c}jÏÛ¸ÐÁÌ#.h¬VW!€¶áï©Ë öÕ:@2%7 ûóU^àÅÐH<­¿EUó#;gHÔøÖ—“ñ”‘¡ÐƒUœž ŠV!•ÀSqµc¹ÄœæLH®KmŽT@.4Y—7ÇdòÐÿLÀÿQŽòo¡ ©Üj3º pòð¨Ú1†#¥Î†µVÅÃÆ1a[«xŸ‰:Ó Î;0²aI“K«¨5Ñáñý(Wæ> .bìÜPË-áÆLü¾O&¾eÅŠÛ½Œà"õÖ›Ê&D ‹zD‡oiTl½›€K¾ I„îw0ŽÂádkƒ]I/oá±v,¢ì\Úo÷kabJÄc(ŽæN«càಟÒxPÃæk“aþU<¾ç“”Á›/ ÿ%&ëd²¬åOóTõŽâääÉiÌQa°||B¤ƒíÓï5;œß/•d¿-¸zX…/¯Í".¡hêԨ͉eoíÎ><~%0ñ‡¤X,’¶“Íc¸¦¡9®ðî1ñâÙ"Àå.È:—ú*‡ä¥Ã”â,@;¯µ‹(Þu ÏæÒ»î^?ŠÉÌß$[[.Kø8 ö\_¨Âr > ³ôó¾Ñ„qVT§ýEäòO©Èb+Çв‹ OŸÂä$ÚäÆH6#†ˆD¥Ì¬dfkûu=*±Çvv_ç!üä[QäUë¡÷V`,Ü–g£­27à|¤V˜+Wbö–V~"Ë“øxo#zŽ˜‹ý÷oZ¿ÄqœL>:öG˜ÿ33Q…ƒ…$lp®ËhÓ˜ÅýÕÒˆh…Ê›jR†ÖöWÏ\¿k¦oê>wµŽ9‘¥$}}澇6µRfã.çÍå=’2ìgGBºý¡jÍÊ‘Œb\?jÑĈ”¤ùmXªÆ_gᤛGD‚÷,77†‹Prñ8øÆé*#¯\— šrS$Í ÿL¯®µ›‘´i3*‰€Ùan†Úük™(‘BãW:®œ$zÀ²îáâ±§Å–|h‚Ê–7×­©ÿkñÐ?‘äÆe-#+‹‹†¾Ê¶äq¶†xçU’,.õöZÔ×VX†ÄEÐ 4Ü+¯ô™¼§nCpÚõ­)EÏú…šFè,]»Tî_oàMÚÒ¿ލfŒÂÁ$g$_áSç«Ûøø°A‰ˆ¡aƉ 3{vèßMTð¹|Œ!ùxÚèé¬fÛEõg? ÕÎ~¤3Ë>/3EÇÄ@iãQ½™¾`¿uwU<¿§Ä^Ýä‘'`¥Ú«µp˜±8fV°9+x0ZDŠIÎØTõr)|«ÑöoüUŽäñòË/äÊ~&ë*ôÔï¬ÑµȸªÒnÊ@x)_Óȳsåa$Š$‘”è¡…öHgþ™ãÃ)X˜íÔ©¾„}Orí‡Ãºa˜§ˆ,lÌ®´Öôךï¯É¤±(Øúíµ®°‘Tú·˜y¤ 4W VÍLcA]VËñQñ‘¸†áí'Úi† Õ#KŸSå`|5éVIfþ¹¢T%MÀ'uÆ»Å/Û*D2rö™‡Eð }¾úÙbá1ÙpùdåZ/¾ØòµTâσ"G2‘å|§¥Ãj*G+/Ôñ/#:7¦BܸsöG·è«æ' ‰Ìfcc*«8m°xÖ‘Ãp=½Žù"C2Kâí´×5qƒÖ³Yf$ä Œà9,n:<þå•p!EÝÈ2‹ÛbýªÏûŸ¼ñÎyƒ†âÅ ’]YÈñ#ž÷g}¿qgÎŽÏù8Ø®$ ÒÃMÍüMQ\Gf?,*f)ùWØH¸—' n`*5WÛ…ÁKgÌht ÷ ÌãΈùË%µ òßãS’rÌÉëâMi#ùYz« Ͳ²gã°Nž‹ Ž _åöd#Q$;r|Gƒi%Æõ²Ä—tN9;µÅhüOvó‘d 2r&óÇ'KøX‹VÀeãó˜:¦×BǸŸ§­d¡Óbù-qo…_ÿO²Ä3ec·VU`~Ö®—¡i‹î±Jé3xÐ+‘ÂzÇõ“ýõÉÄÇ·È>³N¥ÏÇE´®÷ÓwÊÅ ‹‹û>5Aƒ ‰ªãò˜ãOL{ƵáÄÇý!MŸá—V΄koœW¸øP5χüâ—ÉÑO›ª{ù\~ž’ýUç屺zIõ aÿxø?øÎ+†î~kýF0©xôEz©/Ë㎑.žá]¢D:"€ÿz{ ä!ù…yÿzûÿ¸Ãìù¨xôEz«,%G@?CqU8;£ƒr6gD~¦ñ9\Àô§V¿°Ô‚2*©+Epެ47®êR"Š(¡ ÿÑߘØT5—éDÚÔÜïµIªtglG©Yçuò—w5Ol­ÀMïk uÏæz’±¿^”¬šŽ½5dB…߬ZÌ«à:W¾¨·ÌGÃÙ]*È7Ô×½WÃqöô¦e@‘A {_ßU®loÎb5òгЕfUµ¯oÿ ¯æc6G& …K;•UÒt¥•"IÉ4jC)¾Áì\¾ðä )ôðà åL|û+üM_Mp]»Ävî Äâ±’Ó{çr<]ºšì~؇µxp“ e8—#§øjpÈÎÊ—µÚƳ[ÿ©/áð÷làŽ©Nô®®tðë\—ˆû1‹Ÿr„ˆ®ß4\ÉY#È@&Ç“A½T•? Ïy‰D#ûSš{_ÙZDŽ=&oáª/=Žðç]T‚Þº¯°rðPpPE]¢Ê?°tÎä~[ L˜ÎÛ+møÚŸM›Ñ2 a´ê-­ª¡Ý|¡þ›è.›îuëìµkú*HrÚ¬ÜËøŽ[«’oñ¤›Cn•㛟}ëÓ} ë\â\“ÕÕ‰xtžßÃRé›å²ôɧøu¿Â•yÅÑon·¦.¥}’0Ý~ºŸ}6’2Ãz+‘à}Ö¥!|1‰"H²~m˜znôÂ[Ì}ëÔÉE*‹^ˆÍ¯ì¥qã2H¨¬l>šR¥o¿¥|Y€Äò‹ÎÍ+| þáZº…XiU^ËÄ8|~4FØâU6ð6k6µªI %t+ÚáÒ»¥P¼µ4ÌÃ\”ºèã¥:&ÕâøÔ‚EBª³c”••ºŽ´˜†ö÷š–丨æ™óµØêÛM.1XÖú{NšV˜ÍÀRθ(_‡ÂšóvÀ•äˆ8EÞ€ê.†¤âR­/Í©là Ø±›±6è<* ÈÚ0Õ|ïÄñùùÜŸ!Ÿ1AŒæpl7kaIaòkèedC²XÍž—õqÚ¡|)ç%Üø¼ qWüÎS¹”§€-1÷Óa‰‘kIC#&ߘ”7¾Óÿ¥VÊìcBF«7¦I$¥4 ÏØ<„ù³¼2°›ñC}d \³8ù2¤|‡kˆ !¦þ‡Ýª‡aÏÅñ\®F4ÎZ\}9¤¶¯Õ~±VþC .X“™m&Ó¡·Â¸P¼'r'(zíp-Dþ¢ÿ±G¤NìŽþ’ :…“ð¿JoÃçS¿pxؘœlgx }–”ʘ¢–PÀ“jcúL©/sòysH¦m„F 7mJýœ(ƒ=Ç ¬çLˆ0ÍissQa‰Ú[•9&"Ãìè-ûjn 7(ömý"³îNtaÎb¸-éÌ’*Ž· 1?²¯<[™11¤#F‰ì®´€‹˜T€%€>Í&èE¿ê³¥3¼¹¼£aã±H1Áwaö…¬>§§ùÍ.4ì˱€ÄŸ¦õ°mÈKò”ö‰Èžª‡Èdf!DG}—Ч÷TLùÏ ŽFfT'ië§¿Z¶åGLCÂEýõ“Ž‘ÈÒ9»sajàH1Äp]ØH6 W»‡å=It¸ŸmÍG™!A9[m6Ž5y›OÝO$>´#pò @:mE„†,Y2öùâÝ"k¥Âéûë½ôÛ&ÕŸPã0ýÝ'wÔ¹éŒ#þeÜ€Àáb]ÐB¾âÚ5Ïò-8ìN˲AÈòÿôóçôÇÛ#Aº¡2b›’â=yB´™3¬a¯¨;¿¸Ö¿/æ;{„ÅÃÀ‰ÊE*º(*4ób|M/>áMvKƃÐ5hÞ‘å{g‚“XOÊ¡@ÞÊÇ{„“ƒ™2ñK"ºØÛiê-Z×!—ÉŽ72MÀOÒÖ]úTvrøSCg#ZuuHò 5îTNãíî#Ê  œX!Um7S^åÊàr“о,+c´mn>š”î|Váò¥šŠ9A»mÒì P9xñ"É‘Äoq½f,q:î¸ûÕ˜ÆO°¾4mBÙ E„ºgÕI¦$ñ™1üÌG_즸|ïÆDbËgßgEý5ß›që4ÇM¶×©5Åæ%Yq„¸Ùè´C8²•÷†«m[Ý&2 µnMLjÀâµ>ÆMG7ùu‹ALW:3߯ÞT7êwpdGÃKR²þgÓÝ ›–²–|¦áxܰÆNH_O™Åþš§wãÍÃÅ–Q û…®™‘±Á`‹çìÊŸÁã¼’>ARÁ~‘Z^//ƒÆq¨^0ä×&Ý:Š©öïÙœ/çZ@±o*TIøU²LŽÝÅâ1xÓæ$‰¨YnY_âø«—É•Â3ÑtøÐ"ÜiCWvª¡÷aÄäæüöª±ÿQ÷ôª,†Ý+gäàá& ‰€˜ÎGžÝz{|k$å0äÅÊ2íVbSÙkÕü+Ñÿ´0޳slš]פñY?™ÀÇ•-æooOñ9RàÎr#½ícápj•ÙSz¼|‘Z·Ðjß aãÖ»D¸q˜ÍrRÜŽ|óÎyÚ~U¾”¦6NW¦Ñ4¤Ä|¿UCI!VœØEþ=Iãɹ@¹øU9¸±Y÷zð™|«™´˜,J5ï±Î¥ÿF©¯ÈHt,l+vÉǃ;L<”cÊ6º¶¿âñZÃ{‹‡Ÿ‚äæÂœªwBþ ùX}›hŒ¶‘C‡Ü¦{±ÿz@çËÔ1ú듟&¾cï¦!úÑ¿K_Zm£E^é'Ç9¾ñ¯s´i‰{Šó²£EUƒäÝ$[±ÐÖ«Ú\Ém€±¬GP¬²¯=¯Èì‘Eý”0C•ôŸ”%uð©pn*‘Û9ÂHÓ_ ºDÛ””¢Š(BÿÒÛù vFk(îìàÖ­#šœ,MsjÅ{·'s¶ºkM*?#6ù‰cãN1×ðüöT^A&½/R&ØÁÔû¯VG‡êÃíí{k¤76Ñ[M·éoD§v¾À :Ÿ}u·Þ@:\}u%Ý–×Ó¨ëOûƒ“›ïXWoác2Í1> šþÚHÎí¡Øk_ý'à›;–˜^LÇ c±¿íU7ëLc2ðþ/åVÚ¤Œÿ(~ü–ŒZá—Ýpj8Ê7øõÜ8Êê4·5É+³Ôˆ~"ëom8ôÀ'*Ä¥¯¬¯Â–¬|±-­ï¤EÑ.ÚüM'ô±¦”õm÷ÑŠ•é›x1_æoØj+œÃLœ ¹Òìñ'—Þ7_¦–iD0ú†û˜O8Èž6Pæá¯ruÒÔãÊAê ¯}ÕåÅõ1»´ˆÞDˆ |á׿¨žäÊõ%e MÈÖöð­+¹£LÌ+‘t¹ŒÚÚ•Žr™i>A1.ÈÀ°ßVÏË_™RÞb£Iµt~E×Ük›>kô 5·î¬©“É<²-þè?²’[»ï¥r’„^ûF¿Eq±ÛëR~äåÔEµ‰ŒØ0ß²H ~…t§xYS źú> ”©Q}ÃO›æÿ à€|,uÉÈô™¶«´÷ƒÁiùÜ<$ó–ÈDÓ¡ó m3§icò‰ÿ ÔÿéÛc/sbd峴ʇBÌ‚ê£ÞM%ÉmŒ“[ ¾¤ÃƉ.ÐøÒì.*…åååq†[¯¤± µ4þl–Kn"ÞÚAv$nÉXmHKiÅt—õv“ÓZ\°U¹¨(¹GÉä<*7„&C([èjK!Òg2*“`=”ѹ ‰p¦V¥¨éGÊCuZR7Ü:øTÙ‘™ÈÙf*hM¼jV–5;µ"ö·¾˜N$P¢VöÓ4áåHÇ›¥BæH¨äÄ…ƒQ®´êXòX›!?¥+Æ¥ ê’zØ{£|µ%4a‡$ޏã‚A ™Ô‰íæ½¾ªç”ll¼£VÊ6Ô&Æà{)‡æåŸ’1Çr‰ÖÕMï^S7&rq€Y-%Úëòµ¾ÉþZŽL§Ç6ÌŽã0 aŠŽq·§Æ”ƤÀ#ªÒ`LW™ýïÊgBЕH· 3 7?]D`òy¼~Ty¸S¼9›¬ˆH Ò¸æ öô æêL0½<-Â?,YÕ7.Ü‘óÈ’ÿ„Îgåò,%” î6 (÷VûÅE.O‰ý0ñ.É-à@Ô È¿G».FVîJ5—S ûDo ( ,€ ³y=Ø(%»qL08|>?{Æ»¤“瑺oOÙA§²ƒÒ½¨5Å)$ÔªG9ÃfâÌÙ ëDä“>u¿¸õª~vNB±Iq¦Wèn†¶˜½HÈ7ªô²Å¬B+,¾Ÿná&$Ç¢Ýk8ŤššÎxŽ7žI²§!V'¸Üß{aûµÆw.6B7š"æ^¶ x}{ÈóùM3xPÄ_ÀŠéX¶-ÚÁ$šÍvæù™œÖG…ž¨°q‘ÆYuuc¥öyIÿë\—¸?/‚Í‚( [¡¨\þÖãr'L¼x„9Ù€]ës女àAŒí°¨YTøéY>¡nR‡©n’7î«ø’ŽáÖ9v§9Üô¸¨ ÆÝn.ZqÆå=%„‹H6©÷TVN&Ühe1¢1µ¿ŒS7îdᱟ'íüº¬:ìγnw.Yg.‘ uÙB‰‹ ;JÒð;~EPÍ»h°µJ¦<(AT µ¨Íîœ^æâbÊŽEl€£óŽªÞñV;×F6ã ¹¹9¸º­÷w3Dz¨)?Òn—¿T'ø«Ÿ‰Tõ1æ[´d®Öc¥C_GäEëFW¡ê*ŸÉpló´Ïˆ¦W>Xýª¢ïSžër'õiãò#m˜2 BǸŽnw’‹ŒI=8“ñ$öR.ãZ“ð6 £oÊX(=Ñ¥þ‘RÓì5Sç¸~k:5â1qÛÔ–dGc öŸuëd‹î¡5ÓJ““ ó)\54õù—í+|i®ª3ªÄœuXoÛævñÞ2±dv$ô`Û¨÷U‡?ŒÌÇÅI2£Yg ÍÜ¡~ÏÓV\þÎ+•››ÅËäì’)VÖ=tu>ÝÕËÇ›éÉrñ“¨IÛ¹|­¥ryv¶p–ÜÏûS‹qǧ”T$8¯:zϸê\“àzVÜ‘K™Ê¬ŠÒ3©êK_ÀVÉäùÕ6&ÁWÛàOö·iEÇE'1È"œÉ¸vôÓ­–ÿoïQôèoºn,b*{QÏ"6„1”° ƒÚ|d¼v ¶BžG;Ô@Sk´Â…ZÛK`÷Ôÿ ÚÿÖbüÀ“`‘šE$\m-åý•)7hæa®èí*¸H?Uvç8€"ÙÈŒjkš¨dã™`b©m§x$}Ú[öe0¶¸îr±BGŽZœ •‹Ü2Œ—ÇÍKE¬n‡¾³zÀKÍ嚸š«p`À0ñÖ©_¨x¿Ô8¸å‰ψ勘FEŠûõóU¢\OM€]Á¯P9¹Q œ‰ˆ"oã}-Yùœƒ F0í/دãØŒ¥#…kR¡t¯²§ø<¯NUׯ«ÀÚŸñòí{ª¾ììýÊ‚õ©áI¾0kììÛÅëjáæßëáP‚¦h¯/¥è¡BÿÓÓ{“#dm­bË‘ºWׯµÎë˜ˆÜ ÄyéKJÝ È¢‹1Ø\¶ŠßÄ|iQ£…é-¯csLy|±!ÆÅ"–&Fw‚•]÷?T”Œ#¡Õ€ïñP]Õaÿ«Ð$¤¬¤HGˆ¾•ŽËˆIe {HÒ¯ÿ©|–Ks^š± Úþûš O“<æòHX[¡«.íZIšnö¿KW«kÙ^é@6:U(Rrø-ü*-Iõ èo\仄]>ºñ°½µ“ãjbh;€žJÚ+áO8ü¬Ž?+2$FƒÆffPÀ1°°:µ0iÀM¯o @JÊ„B·PZRôR;ÌÉRÈ‘Ÿ([7ÆÇžLyHœ£©ºº›Gˆ4Úý v·¿Â ÖŠBú/ô¿ž“íáë¹yà‘‘Ï‰A«”¼Ž©ŽvO̲°Òž~>?/' f²Î7(÷¯[V‘ÈeâäW°“£+)øW6íÃlʨM†«§fк#:Ôb5V($á0çlŒydeÚMî½üi—+Ýÿi‚ÙÐEs, å}¾$_æµWOªG˜ÛÛ\*„R ذ*|n e™ E£W¥Ÿíâ\È™jÕM`÷`Í/‘áÆä0‹ÅEº0öÔ—ýæxÇÞÑTñŒ›Ž¬>×B>ªs Ì4”C¥ºµLoÞ$³×O¹I±iƒEhÿ¼Ò0ÓOuu-‘’HÆÊ£­WDqµ€% 6ÚÂÕ(bô1£~iµ»×¹P„ÉÚ Ë°,\éZ±ÆÈ¹š=§ä™báË”·õ$¹¸¬«¿9Vü‘Ø™2°jkAîSWΈPyÔ° Ä{·—”äOåÛt1 ŠÞý¢*ÎLÏ#)ÛÃO. 8öǃ’7HWRN%BA)I/ÐXެݵÆÿSœC4žŒ çÍÊceHþÊî: í¥U݇í5c‹-£ã1ð””I/4ö6ÜI´wþU|¨²ÄÖ«DÈçûwÆþÃá,ÓªY²¯1ö7ÚÛü>ZŽâyÎ^|æÆŠxý=’+ÜÉ,a‹ßxûÏݨœl~/Ž?—õò‰˜Ð¤ªüÎìß*ýÚ’ŽKåc¬š†;nŠ(@ÿM€ÚþV{|µXZJi˜Ý¿Ü"Kp3Q1”h…ÚGfûÍòÚ©ó`O‹”qfpma­ý–­.^/Žã8©sd‰2a”3®D±‘8cö~Eĵ ÙœS÷'râbHwG w¶¶<ì§ù©âBI‡ ûQn§üSpý«ÇâÊ¡%1ú’{Úýf,½rˆ.@|(eÐÕU‰^oÜ»‡JVšGpå< |iÍì*J^9°új‘ÇÚLÊ4n¤T†L›HöëjÍÖ0©‰f*E7‘ÍÇããä’ªí±v‹›Úý'›ƒÉ£œID»:€,G×^÷W“ãâH‰4/¼3Ü¡í~’ã$çúw“hFˆÞö¾½h¢.¥½3»ßkÚ¢9þNO…Ìh$d’²z@Úá|ÄÔù·ªà 4ÕO½r9 ,82xÙZ)DÊŒGB¯å*ÞMA‰Ÿ”bSDí/¢­q²OËâÅy"UüMm}ºX}5_ïlŸËâʼn—Ôo”}ÕÿÏW(aÉÛÿf‚í²F<·?`[ïÏûÝ'^gnJ˜ÄQ‹FÚNºTz±h€éšœÒÎôîÈûb(Ëò|,Ã+*Lfab"b âÊÙ» õJ~[:—]ÒÊ6Ã’½Kxÿm`hMbnzT¯oògŒæq3UˆôeVb=€ëT(,Šúüt¦ÙI#]A>Úç:,È#ž½$EuaІ¡¬†×ÍßQ‚ª!ïsom«ÔŽý|*G'0Þ€_Ä B(µ±*ÍÁ”ºö,u¦¦Å4É`‹û©Ê‹(¤%A*;+ŒÄi=y7 A!M>ñY3Àçp|¶Lëì ÉKc²ر¾Ò¾ [{¢¸ÚÝ)¤øð>Ô0,»NàHmSvÌnÇl]cm—Åg=½ÛOê ÞL¿\ŒÐV 2dÉVû[mµ@÷+x¹bôaÒ³ÔŽ:H—ׯ"P2ÓqÉY9vɈ`r´ñÚR—wܨ«›•›<…˜ú.Å–! Ÿ(¦=Ôð€^I ën·Ú*sÅHS{‹(±>ÿus<±II4jd.d25 HQõæK‘¶è‘ómf¢ßxÆ002|mý!â–A kž»WOi4Þ~&˜°ÁW–EÞv…¿›áWÙöá•ô~i‰ÓOm%-4ŽÊªó ¢Þ>aâ5¨sç‰Á‹vþÅÎ6ã†k:ü«ù®,¿¥q.,¬EÇP<*ó“ÆA‰šTüf¹EðUûä»U¹ðÆ9õršÁÎåN­o}jµÊŒðìí=r‹([[JwÇ41äÆù˜ƒàu"¸Ê_6ûX•|iÉ ¾´üÑíJÙ;;V«Uà3±äɱ£/ŠŽ•¶öìûá_…|ïÚ®¦Aw¶ÐÓ­ný«6èÔ{ª"@ˆrÚ©¹#9èx+Åü—¢¹ð*µÿÔ¶÷|¾G¾ºÄù©/+|kbï!^ÞúŹv¼­í½YFî%‡ºŸ«•UI·º£ ³€tøSÄo/´û飊S‚rÜ_öÒªàŽ—¦ Ø‚~ªSÕÁ~" Xý=ïN‚Ã|,Ôx啃4áC)Xö«RÄç8®V"Ü~\SûB0$|W毕Ĥh:ô§}¦^~~4: %›c6 Éxú0•À\EäAø¢Èõgİؾ¡uÔ:ÛÞ+•³J«ì×ê¬å¹lÜ#lL¹ý±pmìßz–ìÞ;’æ¤ÇË‘]V"zXÞþê®ØHÅÉ\V›œIÂ&Nžªð†vÑŸA𣄷Þ7¯rUæpƒåñ§AU/@+I4íªÊM;USºÉWâ%?g5WüÊËRÐä#c,CVXÉ?U'Ê®.J¬l¡Ìl ×k/FøÒ!Dzשj¿@=çïMŒ@_:~ JéÏN/£lu¹ªo¨XìT†µ¦þ¤ð!3ÿ¨1a¨ùVãO…ghï¼Åˆ»Kh·ùºõ71Ý‘UΙËMYºÛÄRj.@IãSXÜ9f-ÉJ°F¶%I¼Œ?†×¤0¤Ç‹9æH÷G&%:ÛØMéB瓌Æë(¢à|)”rmm|t"ò?›ÉyT›-ðǧO d '-*«©ÙJcÁÉ;´é ‰ ¢=îæÿ"X53ú+­5ð¨*BëÀW ×>ýUèÙãP„ã.lI“")$muaî­³9fî F™áoMÀÖæ×Ü>5Š^µÑì˜Û'7 ™ÂÈŸG”Õ7,Ûœ£)ÅØ·ŠÑbýÈ5.1HòòŸ},±1°qg^žñM ‡}¡^ywæQðq¯úƒ¸ÓÕÄ…•Q¥:X÷ ®ºÛk V˜Ú·ÐˆË9»9”‰L× )&BT¦çè¦æÒæ»’añ©YJãcI1ëk ƇnÊ~i5úëM!nåБ°wâ²_‘¹zÕ— óËø~_æX|qY¹ÝÑ28Ue.µ 5ø­öj¦Ý½É2™!ÖQ­”ݾªÓûî(ãxÿ¨ïôéÖ›pÐk äò®›2ˆ‹©uԱDžØÈÉú2ɤŠH\Ç"puV5aàðâå²aÆ%ÕÌ{b7êÞ7ûk¾ø‘•U@.ˆ>$õ®;_’‡ŠÈ\Ùƒ(@à:|ÃríÓé5`‘œ™‰Ye †àf¦drÜŽ.^@’Uÿ±ânÔz¤¡~â-¶î©µíÞF`cÇåâFRV¸*U^¿5þÝW›+…õ#ž9e\Ùr$dH< _U!Im~mÕhÎä01’ LâLY¬„^`ÀÅœ6ÆØßoøêªFkŽg$ÅÂÌ-9b‘‘¾ñ¹TY5c¢mÝVßÒ³3¹H”ze"ƒ•¹ó Ãùj±Ü\'³Æ˜s¬³GÓ2«(_4{mªoôß¼¸>'-Ä9¦õ 6 K¾m|M-ªÄ H¢Ú:W,t¨ NîÀΑbÅS;?C+®õ+6jÇvˆä-‰¦aZáŠOJaž8໇W?í¥d{¦ ñù¬\‰eHÌ]N„kâ*CËFŸ˜õøU‘"U‰qÑL­Ê/¸3dWY¿"šZ+úKð¤³tˆ^»Æ}Ð#{©²KM3cF  xšŽql4×ÂÔï*`Ò±ð-P™ya¹8ñTÜ„Üi¢p ÚŽœ°þýMW{®!‘Æ4v×z6¿ÂÀÔô’Æ¢ÅÔ}"Õ_ç%ÜŒ·Ü»IÐߥh¶Û…pUKDó°%CëBúÝÚE¸Ò÷Úùk ýVÏüçxæÆ"ô‡Á@¢vï#,Ѳ¶Ûªõ—÷ìH{¯? 0++ =ú{ÒraýA'§Å’CÛXÔèš(êÿÝ^¡ÚúW/%ÖÀYz W×:xÕ éïÓLÙ2»_ åkº¨WÜ4SW•@ëãYOé&^Bpq™P¬DfûFúm­Uà®~k~ú&+Ú™)ÐR e}Þ&• o!Ö•q)eC>%˜{…?¿…DE'ÿU ôH˜¬T´lnöЉ†nÅÕx/sqjöŠ„©$”;ÈHôÍ‹¡¸¿–”½{^Ö…%² ’/çop¦Ù2mTunµÌ¬L¥ÒúŠ%³:ÓJ`0L^ÖO° ª÷ä '®ÃÊ$RÄøZúÕµ|È@ªïxâ¶wmæD‚îˆX‡Z§’ ±q¿))ìKmØ«ÊåîXÁX#:{ííøÔNnT›#–ì5²¡ñ½#;•3f5ÛÂÚy©†NWªÀ³i•tP}«\ˆqÆçgÍÕ“¹)Iª‘L‡ÈÈŽ>¶TO_¦¦‘WÈ„ÑS£1gá÷ª§¤ÊZ&ôȰV½ì|-j´r™-‰‡ùQf*Ád±ÞïöŸ{T^´FÐ4ý©c'ªŽÊL— <±°-Ð6ƒNŸ7€û5Ø•æÊ¼“”|ÖÄÓȲ¶Ì’g«LÆß†ÌNïÛN3&’(]YÕL«wôÈBüª»‡Ù©†ø™Ä| ‡¸ª&[n’ãA\$€ª£aÐ{*GãÔ4gtŒÿêyHûŽ·®£ãsø¼ˆ¥ÊÂYÓÔT“Ud:nÐÿ–ºñœv ö= …Vz©þÚy°gP|­ ©ã[—jMø1©=oX? $y9ëfôUŽž¥ÈQà4Ö¶ÎÑo*‹î·0ëŠ$´pìäû¨®Aÿ³7Šd‹ÿÕ´÷f Ò†ÚÊ öÖCÊöî{ÌJ˹75¸w,q•"ö>úÌ9(âY|{zÉvýÈü¥»ÊݹŸ¸ZXÊøO÷PxAH²[ÛsVÒØ·1°”3@‘M΄ioQýåßÌ<µUGoò'ôëjí;4õÈP~“V•u:ب:|º½\‘fÛ»i}:QýåíBj«kÛYpr…ï×¥Nv· p9ò‡ò‘`<~4ôNJÿ¦¢ö°"äŠwÇLÿ˜ØFÐoÐi{t5MîMÙÛ”dhq¢ÑÅazÙê¤öo–×;ZºvWnú3KÌÊöðá_h3}uQ‰CK±ÝqºÚõ5±âãE‹V:Åè¢ù&nS³ee˜#cq‚=%Í)¼Ò}kFùSܱrþ¡ÃãRéó~XÖ_±W1ømY1Yí S±¿Ò‘›¶ó#,s Â$ Ôî«JðÜbôƒ_½¾MßæÝzêll´Cù<‚Öü¾Y3D}ÛšóGþÿ åqnå†^áÎ[e ÀjCå+<ÍŠv1§ÖzÒ¼?)ÅfG•3C2›]|Gˆ>ÑRÙÜ'æÄ¹0+G3ó ±äó=½j½Ü¿¨Ðq,xülC)Œy™šÃê-4‰ƒ,„Ù`M«ñ°®[.^G*W/¢³X{noWÞ‰»vƒùFé6¥g±-Ó¹{ó±ýØSüÎ¥2{Ÿ;¸ù5l¥Túq ÐTÏÈ~Y½3ц‡ßôÕ7Kæµí§×V +¡Mp¹U¼ØÑwx„úu*±Ü<ü¤Ò=îH"þÏ qÛÜŽ.<ën"dãÈ[C´kå>™+Ë“#=ɽµöW0ÊPîÂ>ºÚ#äй³‘7 µ$«Ž/ÛŽc9À“M‚˜YH]«`t5äxÜ+æb&/#$+![É,z “¸RtªÄI!¹ÐuÓ¨Àõ#V:¥õ5 ÕôW>mp_q±9œg #^‘Ô ´UBxÛ:4Ë)r,Ѷà@Ö˜ä&kt½sºö?UH ENpZ_é+ùnv\g$úñ6Áì+¯î­²NE/°›ƒÖ¾oý?‹;#ºp£ã¬f%·ùB;Ù­ì¸b“ëI!2Æ_ÔQ}ööVW©å,ç z­üQ ÃÌ|ÑË6R9v4²¾f#ú92‡ÊÀ{EKáåÅ1E6¬½mPX2qy“¼xí;²|Ç¢ª¤eã×""¸îoỨø5/Ü€ôV]µi’;C)<ÉÄè¥F„^Æ’‡(¤Q úi¤BX¢ –è¥Qµ‰ÐR–ã±Øî}ööZÕ¬ò­F!äÇLÖqÇ&€nmÌ™>Ø–þÖ:Pk seäsyŒ¸C•@ÒzÓ¼Îí‰T¦2üª×!Ëæfƒ¹Š§ˆ‡‘õbc®×n €ˆñ*™‹òs¼pÏëGÔ1&ããTî¾K/&,YFkY¼ÃÙ¥êÏÜYI…‡,ìâäXu$Öcês!êMêϧ× ?j«ê,mŒêWÐ=¡Ø¿šáñ9K9Ó#5ÉbʪuÖýZ­ËØý®›¤› <™œYçÈ´„ÛOµTN#¿xÕíŽ(Ë”‘Oˆ‹ ±³ÙFÒBÕ—î| øÄ˜¹©)µÂ)?kO/•!#ù£‘z,ö,¼AŒ˜æU¾úì.'/Y¸lHáÌÇÕÄ?´:ŸÌµ‡ìhå10³fÂ45ºóýÁÇA>^PtmDd]ìzÃËXl’~c)æÖò9mu:š¯…rsݹÛ'MÌ·ìcæÏ±o½«©Æ`ãFT"/C¦¬~&´®;+ׄ!V €HÐߨk3íhX`c±OM ¨¹ù›¥¾ŠÑ8÷Ùµoajß0²ŠÅIJÚH°$ëá^;îbh&‘F4†.q.|²ÂËôjo¼¤{*Eõñ§èèÖÜEJc›\ø*§z™ÔÄòô æ×þÚê¡VƒLç”±°è)Ä͵ 0¿·Æ¤&ˆÍ.ä m æu¿²‘˜µ´6æ,„Ø1¹])“µœcÊi´±¬‰,-ò¸ ƒï§1§sãIµ•‰6¥5psIšùS¸â|Ng7 ŠgP=ÁF©"ý-o¶þ¥a<ÕœÀ ’(#Þ*¦B±T,QJݘ‹‹ýšÂ>P4¡îVÎ>cÖ¾(ÀÈÅ‹'ÔËÜЮ®±‘òÚþúä9®g¸$ìHõÇÆQbB‹ïn—éPk>>><㯨ìÀÉ)Co”¶¤âÈ™Ygi •µÈ4²Žâí†þÕzþ/%’I}h“` ·ûý¿vœæa&˜ßšÈI¡Ú@7C¨$覡—5¥ÌÊÆfºÍ*SÊ»ì ›W¸Ü“eÇÈp¨ÂĽÏÊ:é5f6î$K€#6:&3O¹|ÀåFÊÑ܃Çb\nRÞèò\l0y™dhöJXh5ÛPRç4,Œ >žGcìÓÉz”ÁãqùhŒ’Kwa`„tê“õ Ú#ÕA1Ba†0ÎbŽ?sFº´¯Õîzíû5´vi"5ñ¸›q]›éÎ y@[ª•5­vÏøÈ€ÈÞ+£jí¹#'íÅS"õWaÿå[áEvþ\¯ºŠ¹*ÿÖлŠ;«‹ }µ—rqî­e÷7þê×{†hÞç꬧šƒÓ‘ŠYˆúî+$!CmT°fPA±$u&½ 6 w˜û+‚ þ¦ë°=5öW^˜îN¦ÖÖ·AX”÷.Ñ®ìƒB#JWE Iñöu‚ª‡Õˆ?/‡¾„~íÀ¨±µ½êd¥(g±(@°Öà}ãš6›°¾—¤K>í®PðiÌJ «µímHéÒ–NCtOl´Ð…¦v‡ó¶lê ÂFÀF»¼*å˜òF·_—ÄÕ·;£‰p¹ôáÈÚSò‡> Й‘ÓÁ…ºz×S‚#`3HÔŽÜܹ™]2Æ8Gâ¡¥ÉeÐzbï4Œ@»à*`ñåÀ> Ø#ÍQ\Ž.è´*Es9ö¥9ÆP8b·ðK¸Lgä33¤ô3dyjž%|U…þé¯s¹¿èñAq ¾g „Š3ò!mD’ý}Ÿv‘Ë’^?l~WΘ_/¸ƒC4ßÁ÷Wþ#yj# Üä›Ù¥|lpþ£›“.C·©!þ&XÂÿ ÕœO§ßç6èkp"1ýW%é×?ë?W³f&ZWLºDaþ%/ ¬]̳ÊÞ¦DíóI!êÇÿE~Í+^וI/R¼ç)ÈÎdÊR.IÕ3ÎÊÍÆÚØØ_šŽÄÈÂTˆ­½ÒuÓøª;¹+ñŸò¨ÛfËŽóDƒÅ‹Â²)·óT¦~3ec4*ŽèßÓ–æ)=7Y=)vù½)vúr Iq¿ªñ…Ü’¾O îøŒÅÃâ¬J‘_Â)“µ~ßÏ.Ïøuu¸Â@î ÒàXâ^·/^Q„¢XyŒdß›Í-¿Ê«y0ó|·#vÚ‰ò^|C†¦i¤Œ­ëÛ.ò<ò–óüžz³pü6W ™2ò\vo>T6FÌtœLËæ ¢fr v~–ª<—-Éñ8œˆãù<~3—bù˜‘3 #ŒÏ&LpãM3"¯®Ñ¾ÕÙ-JñÝ÷ÝY¸˜cžÆüÎ/§‘<Ÿ–Ide1¶N\³ƒ4®±6ÈÕ7|íæ«­l‹hbëpîÙµÆÙê¼A ybkMónù’]ÕÆçd’q7C6ÈŒÜ~øôªºC2ød x]¿?Ér8÷:q¤mÁmìõ¥õý•¨Üž>Lh›"¬ùç H¬Y‰°›¯£·ïn£û» ŠG¶j¹}OŒ%³q%Ú‘`ýwmU‚«¸>Ö…ú{€¨òg²ü·ØO¼Zª/ó)\ÈyñõBí!ÖB}7<»¼»]kVí¬ƒÅãÄE™Æ÷öÚ¶Úk†$|¦§°-¸£8w"E\Ê‘QÝóÈŒ.Ð]$›­c3t'q¿Z½wÿ-ù¬öÇŒƒ:}5I•÷Òö¥¹=ÆRÔû•°€„cø@ ïnev>ßzœËÚR4 ?@¨>ßù¦§²¤ùeŘfÙ©® ø¿ ö€»œr"U_ú†rcƒ´ÊÖ ×ßVtý>ÍfoK.)µœ0¿€5Û8~®pÉ ¡ ­ýµªñ¸ämœJ`;‹m'W¿[»ì®¬ å—ÅQ&íab ðÆÀ}¨å6÷5ª5»o–›ðÄ6 ígu[ÛÙ­m2qï69K‹ÛBEõ¨¹øQ7ÓÑ$“YŸ ÎñD/ ¿œÅ!¼Ãáz´c÷4r¶Ü|WÀiì “å mQ›Zä_áòmÈùK Æ‹¯k•ǹ\>`ꥹ,é¶Zl uýö¨G叨Ø,’ù‰µµ·ÓKÿRãóU=t|g—E3®ÐHëæéLù.|yeÁÆ9eP°ë§Æ±‹sÞă÷}«Pœ6á–²ùt }½éÖ/óI»"MØQaT Z U’I¤Œ±-éÜ‚·=-áRÜü× Ç°HëYÜ’Ëo¶º¬ðÄÙŒˆ¥K‡Xî\äìÝ@‚¬ªýýÃÜyÜúD+F—6¨è*­sS9Ù}Ë—.s)Ü«ø„k öWxÝ©ÊΡÌE"kZWÐk]kvf`‹åÈ»0fNçP¡½iï~^BÁ€§:ù ò+CâÿL!ô"Ÿ>{\]ѤûúUˆñ £ÅâÆ‘ ;ó[Z´qò‘P”Hâ,s‘ÍåC7ÈdI Çb='rÀ0ÓK“Iñ…[;_å.·¿²â¥{ÇÊÃä?5‘Á“¨ Ü\T<†)UÇU ýUNÁ 01ËÆFEÉ'µ}7ÄcÉ+^àAÐ U“Ȉ½®|À[O Êø?ÔŽ6X'FG…vb-¥…®jÏê'o)U’p¤‹pzëHo@ȹb2W´ª½£ƒ]—Ò©úÛéä†q#í,ì,¢ýjÿZxàåG3/K†Z=XÁÏr]’°ïWþK*8Ú3)Ú¡Á áì©Ì0²ã£ƒqí5Œs¿¨<¶:bÇ<;‹ ¯ÓWNÃî®8ñéÃeÎ"Ëĺ‘¼®:ÝXû/G©1~¨˜,‹@¯ È„Ûk©¸¸±J=UöÔªX¤r›@)Œ’§SOfÅ“SI¯¦æF¹>œ6iÁ`˜4—¦ñäãâd 2$ ù‰:Tœ¼x]C€=õUîHðÞ¨&ÍohœÀ‰# ¬€Þ[T·+ú—ÀqÁ’ùLºLi§¾«rþªäeoó˜]n}£G;‰ùË,€(•@"ÃÚ5ªÍ‹>@ ·ÈÉqã älüõùj2u¶\8FØ5]s¹¹ÃŸùܸ×@³XÜbûéŽFŒÈòz‹!B ÚêmS¸0Ãk —õb "aå»Ï$༨"?!n‹vÐ þ*Îo™Iü)G'ªË(—¥{s&3`HÐÎ/Юӭ­ãI/â;´Š}0. €z –“ ¥–I¤RTݶ»\þËלG#âÏ› !bp6Üêª|ëï­ÂàÚe#ZߢªT`;“mó»$ê·ô¶)t#ÀÚ°1¬l¥Kè¾Ú³Ã†#園}¬žm£ËñQ“ç¯,À íÃÖª €ÇØ ×ÜUbиÀ«/’H˜ù”ÿʨ œ9—*Y1BU×øƒ–¬x³.fÞ?kòaIÓU ³ß/Þéæ«cv¯‡1£¾IŠåT‚,Öôÿ}DçÒ²}Ÿâ¦6fkƒjšgðÒr2©È{C´32›lÍ¿‰7á?SyVƒÓ|®/u¡I˜—Uy$51Ü9£ ]Çlmå, ·Ý!«0å9©smÕHc>E@ººp‹€øŒ£ŠrHì9­÷ïÎÜçÔò›É?ðçò‚˜yje£Ìaº&¡èñ¾U3È5¹×Ƥxþk•ñó'‹iè’0ýÆ­ŒîG³C•âpxû×Ò’îUüDu?ÊE"D$Ö ;÷¹Ðm“œÎNŸM&Ýïܤ]y €|ßWJq|çæýˆhþorÞÜ;Ÿ*W%l¾`nkçÃݽÉ%Ãr{}FÛM¥æù\‚V|Ùœ0Ôÿmñü£ÅK}ËoægÂ@¨ù+1p¹? Ôg#$\g/3•´ÇÙ DØÉ!ùVçìýïଋg—“ÃVrÄÍÜI=XVÕÊ'ÇÃùÎJ1• ‚ó#Jä ѤfÚ‹Yç#+‘?A‰uh>IY³=K‘?/ÈrK¬˜ë’«—™˜ÀÇ$‘›ˆÄ*|ÐÂÛvÁ÷£üJÅ>—p8ðÈÃøÃ'ü™+ÌÞEÓ-¦Ëc•Ërrú’¢X›ðAcb W9Lqù>/()•ñdøN¾_öÑk×rø¤}ô$A» Êå´ÅÅ¡û°ù¿â^7“sÔ½= ìœf##ó\1óo?½8ùTõy^Ô?5.Qòð3=ñ¢iŒ3É"ëg-¡M¿bÕâ€rÎËŸnä"d ùÉÙûLW•œôúÒKgñð€«bE$q0ñoC#dž_´ÑïJxyÞ)6zóœs ܃"9!Ü-{¯ª«¸káRa!“¶•Vω~Ca–ÒÄÃÎiŽ óC H%h‘¤]B °ø5¯QœÖVD¸™Xñ.XÅ2Ä‘‚«3-’Q»ÈÏùUéë¼/_êÿúÅ¡9®6\ˆñ1ålŒ™­ècÁ’É%úzhŠKôû4 \{‘jß"3©È‡ ¶F’¡Á#ÀbòØŽü›Ê÷º…E+a´éÒ—æ'ɃÛAS2Gå ¹Ù‚„ |Z•Η•ÂX}N:“ ‚ˈãF\‚Ýdóí ¬í¶?*Ô6tæ&\‰¤9jM‚ÐÃ}¤§Ìïoø¯þÍ_k;“Ý Áë÷2Ýc~íñvü¸î €ÃiÚžðX¢~Q0ÑŽD›ƒæe1»I"‹†5è‰ZnfB``MÚ,iµ>Ѝv¢—‘‘|ÇD$XÜÓÔ>Dâq‘aÆlò°ÝíÖ»1þ™ÈQü‘ø®ÁWmÀP[È~Xó,ß“™òò&Èbæ'먹Eõ×Ùî©G ά‡2•PÄnöÕ-N壥û3Ÿ‘äNÏ-†ãÐ{êÙÞ£7Æ´ÂA)Ukiãá\~’`4¼¦D¬<©ÍoiéZguðiÊq²ÂÇt>}Húk|î%<¢cûWZÁŒm“óDûðX÷bà‡õfe Y¬—ë Ö´ÌUxPypñªona·£Ï™ù‡Ž¦®ø­#ö‚+©h¸z~ÅϘÚH4!IbJªØî:Xó‘˜bm†Qg½õoJ㤀«ìû”éJòÍRn”T M1!Г 2 +æmQ«*  õ$“ûªa¢<€Ô^šÉ ÚÝoࢬˆ ¹²¾ñÁlÑ‚vB­†¾4ë±;K3ƒ'—†Šþ”c£ûK/º¬]ÃÄär1“ÊÓȱ‚zy¾5¥ðü ð%!ptL›½%‘n¤›¨× ÷Ô—Éæð2FŒ¸ŽnÁµôºÔkrpà³¼«½b¹ÓÚÚ S¬\äÎÃH±7ÛáoeS{€ÆQ¡Ïâ¶ï1~âfÀ¹ gCq/šëã}j6x"@ÈFæµå…º2øÚ»õ¦Å” ; cæ‹Ùü¾Ê䤞X$ÆÇ¹ÜoÍpʬžÚáËéwÅáü„üÚGªìÃêM£)/UIÈ/ÌO7 B$;"n„¨5qã;â^K"êG8„ì3TNàáNFv QwÓåÚZ 1§“ÒÒ9<ûGE'­‡¾œ¼„ÄJ©R,,|MºÓŒwT½‰ÿ¬ Kv…C•aà#“ruaÐû«HãÈ S¸87•²ÚÀn—«ÞmA¥nãÅ‚RžxQ^ÑZ”/ÿÐÞfÕIî†Ç!C’lçR·ë·ãW™ÔÕg—ã2~Qñ5]È*žŠÏ2x¨¥üi’†¬7YŠ›øÓü4“¬`ÇïöÄamomLepj XÊ5^Àû/QGÖOLǸ(7óZÃà+8ÈWFÞݯ@«Üÿù˜¤ÎÇqøúÆ‘Ùó–SJð‡óܶx\‰,Â$Ú¢ÃåŸô&†Eõ"VGº¢iæß©¨ìŽÐ‡3#ó Œ§MeÜ:tÒ ÀÎ$[³¸9v(0‹¸Þœ¿rþc(¤‡>A!P­Ð"û¶ÓLlù'ÏŠL–´‘° Zû¾ÈÝ¥+v˜äÈ# ®ë •ý•TxìNÖs‡T²V¤*ß{r2M–pÃy#&ãÆæ©ä  IåÊùYRÏ+y¤bÆúÚçAMd‰ƒXQâ=º×WsP,²‹—M¯ïëÖ»Y>ÎëÜ{+—hó {õ£l£²gsàN)Y—38JG¶ŸÃƒ4± VOQ†áàûÂiY1Ûãdf©®Wš{_Rgbíû²2Rœ¦NDØ O DË$B9bÛcçIT‰×pùÓkyÖž6÷3Ê ; éæ—ðªnr-B[e $Eª5 ÊY .Œzîéûh“HZÒ-‰³ÛSø¸¨ÑÎÒ~sŽ[ã-êdc)ù½¯,iöão7üÝ3Å'Yp=EÈ…$xÜ¥7 "cøA¼U£Û,_㫯ðïY”„¢àGx”NèJ·tN•Qk“jè$íÚi!&}¤&œX?Ôð¬5õ£·ù…j]ÐÙ¼ÿ8xž7jcqŠeÌÌ—Lx¤*wM)7å£Ý²5󼕚q˜ó?+‡ ZJfEü aZ{æE€‹Ûøûbþ?$W@"EfûÙò-QÆ—.Ø´ÛÜm'cç?»ó+ïíy›µ‹Œ¿Oñ|«?âøøâÈÉä·I+åC$öõ=ùY€Ñ=oõ=5ÿMv%{ϺEÇ‚´rE$w6%’E>_¢•ç)ƒÅžAaC/“I×ñrÿÙà6+/šIåò}ÍÕE+.VV)Í¥gš5’YXªX^×ùV½G+ê¼KYð¬=òa(JãùL§óÏwã—â\_MäÞ™æ^ÔaæØÞm±ù`#ø|«Y=M†tï‹‘‘~£ÄŒë´ Ò£±›˜ÈA6/)–¥3´`t‘›üË^KÿÈÝèÄKn!À5í\ÞÓ9\ØÌñ£zlàÈD×GR̪êQÀd`U”ô ‹Mññ%OLådÉšØñ \3?›ÐÅOôñãu~ÓüÒ}ªfËÜD.N*xÊ¢G6÷,…¢øþS™žè–N_á “öDÁŽè¢*’•Sç‹ÔòÕ·8«0Ýv;"Kb =ÁtmýêP‰…Â,ÂáCvã&ÃË?ÇspöÏqÁÌ`D3Àƒ”âáOU¥€kꪨ+øÿ:3mÝþ3“?šî|󭕃Ÿ••_sÉCÿä±ü»RÕ<²|ûýI7TîtøÒñÆNÝ1B:b¨B¾é@eoç¬ç&xùT’U$¤ÊlzŸ5Eš¤Ú®µ¾±b¥3wipM°Ã ´^ùîLÞc4fåÄq^†6&Qˆ —.š^YG¥ÌÅÿITI&™#;f{oR½Éù|œÎ—°;võÖšþn.߯“Ë%—rþ_›k8¾®z°E·Íj膄z"¥küáq¸Ð·Ë½ë0ï¾Håó+TFÚ¾¬œ/êw΀˜Óâr3&Ø#°–2@$¨u³Ÿj:ÿºkŸÁr½Ã–ÏF$Éè/ƒ\ùÃñS^»@ø¥T–-ËtæCKÒ<±UFv’ÊlHÙìM¶‹{i̬‰¥­íÛHA>AjRÚ+»úT0±¸™%yUg–RI²ô«psX°ñ²ú2‚ä¶ÔØu5p¼œfZ1?€Çl«îöüE_f™søùŸOQ] Šë\N_«jä¢ÃmÂZ]¹.Ï Z»ÉÎè3DZ9ÃÖ}ÝKn:ÜÕ›.Å qÔ0ªÏmOKé+ßÈ,oÓÊ~v†Ñ€u½nâÌúpE“êÍ¿2|cÌ›|.¬?u7ÊGÓÒ7 loKœXÆ»>ûøSLÂøê³CehØ0/í¤êB¥0âD™‹¸´”tñ4ë7ŒÅ”Ç”F@ÕnH¨ÔÊi™dŽ=ÞÕ-kzÔ²ÅxD ìmPò ]Á@GêrØcªÇ m¿ oWmªØüEBFDœž<¤mÖaí6:Ôû‹:þÚ.#±( ˜µ”¿A¥ÇöÕ–'4ºs¸ÚÖ½ªëÊf.6;'OaÖ¨Y¢Yd‘ãPÛµµ©íf’x(œÞg»º€á—å=©l>!q0”)RMÈ ¯í©½oˈPmi|>†Óc* 2+ö‡8™vÈ%ÚóQ2Eíý)Œê0ÔØkôÔŒÈ#¸ÚN¾Úåc0Jëoµa )»,ƒ¹•“š˜bv‘ð°¨Õ'h½êw¼Á›{‹Ý_n•͹[Qãñ¬Äö­äkð  ÇÕ^/³Æ”Q¯ï¥R“•Ø\ÃÊêŠ.Î@[ûM.Âþ'Zï½9£’ß#õµV›ÚnOŽ˜¹L…˦ú Уܺû­j­q~”H>]€“á­¯V8%Gm þŒÌî/Þ¶F>PÉY¸( ‰ë^ˆYbÛ»æøµ×§s¸‰¥Ìòu âÊÆ›pnˆb¨=ÃÍ¿™\%{:*µì ©[éñ¬Ó”ÈÈ2—s¨$iÖ®½ÐíL^¥‰IwkÐڨܴÁ¼ ±%·}[h}~ÅMÒ]“™}â½yZÀž†ÔØ>¶ú +먒|©åoýµhT/v–}´ƒ+Aö r.J¹Þ/û¨1–õ¿­K!4±?ù«µ$0¶·¥ÛÑou ëV¯ÓþÕ=ÉË‚çn.%¥˜õÝcåOñRLˆ‚NIá)‹ƒ˜Ü¯oB6…ñ!U–9ЯʃU&³mÄ­ÑñX€GÞ'QZ?u†Ç˜þ]™5Úö&Ä{*‡ÏˆX'¦VËÔ(±½¼mûë‘Æ17Œ¢é‹®· HY$z2eÛç>|¯Ëá§©&»F‚ÿÂM>Ÿx¤“*ñc¨¶›~º…ã3WB“ÈéøÇ¡¸èjEøÁË¿õD™³ 1l¸::Ä –ä}êÙr3ó€"F=W*AðÅO`<<’ƒé¾ä•ïµX—J”Åž1&A‘eÖÑ*F´ó‚~q÷¶ÕZ.s“ãᛉ†H¸ÝÁž']Âàý²ÃMßvåw.6v"ùvħϸnVûñôòøV+œ{›·Eöšœwb˜E±Ä|Ç-άJ‘dÀÇ"YvÆBÙH¶„k^Ï’DaT•q‰Û£+²ËÖ©YÍ”³DRG‘ ¬àùoì¿ï§æ¹|…ÄÇMòD.v —í5¾j´qKF´¹ô $C—ÅZUÄŽ=7 =ÆÇêl<ÝjcŠ…$•B‹•ë戴Y²Å.&_Q7# ¶Ö'ß­];k†ŸòÞœ‹‘ët7;}¥[å¢Ý¸I¿ÙZ¥bØ-‚ÅU®¾Ú·Â»TT ŽŠ·ßƬ*,+¡n;BR½¢Š*Å ÿÑßé qÄM/A¡”‚Ên) bÚŸué í¼%bÌXß[t« HmVmñ¹-TBðó‹¶óäŽ%W1• ¸-¥Zj«úƒîØË¦Ÿ¾ž €§E’C“Šù¹Þo¡þúëxЛé¡ñ=k§Wi-­ìÜ×2¬¡˜lÚĢMoTåY‚ê92l ³ÈÆÁTjÌ×û TÎ3#Ü7AÇ·È‚é.@ûò7Í-öc_3ýºa„ˆpŠÊBÇ>DQJÍ Ø •Áþe‹m?Éåh}s#bá?ú=2&_¾ ¡}Ÿ/ªßÁAÑñ+™Ï—*äãÆâùL†éÜÃdp u*k Tb± û1¨Qû)]Gº£{K‹ƒ•äcÊÈã½L܉fžiKr±{ßáJóXçŽå拌Éhb'tPd1ž§ìï?|ÿ–©h™‰BæÜÿ×¹;7Æà¹#R#ßæ^åñxÇtðT|³§’U÷¬‹fªä¸rðhø¿êFó~kÊ ÆKIèH F}±¾Y*Ë…˜2•ÕÓÒÈ…½<ˆ £ZâÄ|ÈÃÌö«¼ÌH3ñ¤ÄÈ]ÑÊ,} ý–ħÌ+G—s2>hHÎÒ]‡õ.e»×x÷};›€„ƒÄãCo2ŽŠL.?¸8†Œ FL±dIm}4•D˜á½Œÿ6ß¹ZÒp¼#sùÞTBg¹ÉiòrFnSäåfˆq°aÀÂÔæCÉEìMÙ¤ ´5ÏÙh¶lþ ¸wGv¬]¥<€äç—†WS¨‡½7ÿ<‹³ü/WrøÆÍË'¸^µÈÔäE{ r!3·å™Œ_<<ÊßÌýÏÏM–¤ŒH¿ „`üÇø¤>fª±PÀ« ƒÔW¤’I>5úF79°ýõ ¤Œ[!‹©y¾_ðãÈß !D£s "ÞI§ÙÝNp9Ý ¯ §. Ät¶ç[‰Gñ|õêJÂèïI§û4š¼Ì× êªÿ™ªÛM™B1/ˆ”DñTZµbÌ¥+6£p¼š!¤ß¤ÿ¥^×µX¯ôþ%¹ ‹O²Ç¡2NR%fí œínæNSíTŠ”ãùÌÑ’êre£2HX|­õ/þj‡ô¤“INÔð?µ«[ýÅ /;”ƒhÿ³c­¾9þÊÉr{"g¢IÁÅb*q8áû\Ž-"ÿJÉÇä6ǰ怈‹%ìòí%¬òGóËÿGMù.ØÆå1ŠdÌÿ›gÉ™`Y­³oEˆ/Éü”ÿ•î !ÌòYÙÍ>v[Å‹2LbÆÿ²ÄkíôÿÇQoÞœD<I‘4gkÇ$~`~†¤ëצš¯+ͽ̟"PãFb¥å1‘”Ëõ ß¡eáÓ„“†ÇÏÌÏE*Ù ZP0×ÏVo)è²V…ÆòXKúqŸÇã~bGIPM•“´ %m¥Ä[^O’ß.ïçóUK=“†ìX2Ûþ ²:CŠÅíG7¨²Ù´énOŸƒ¶¡Ÿ’É1—AÃEK­‚$k×Û²¬¶.ñ«¥ôù^Ý|HHÅŽïàŠ«JÅ¥ :ÛJ5Û®¢Ç_ ) Ag½€6×ÛJ£†ÿ-[ëÓ6c­Ïˆ©>#žÈâ§ÝÝGŠþVÊ‹md"Ö¾µã ’V«¹ÌÈ8*Ës”$%Ä+·iò›»”HŠ"L­ÃÒSp/¨²¶|stSí¯ûzG–Ãq×Õ_Úm_Cb‹Æ/H`"Àh¬ŒÌœ”á­à*–T8ò«Rt©b èjœ¦$ãÇckS’•#ÇÅÅ»X2­ÜjzUš8w"´2+ƶÚÕPì÷lÎ;¹ó³_¡ÚOOª®Í2ùX}¡¥D‰-Ø£ (¬˜#‡.`ãrõéNrsVÉfxoÈLT¨` pèuöT7;,¢k\ÁVúüi±ҔÓÎ|©I˜Ôü¾Ú‘a–?Ä@¼øÒ“/—@F¿M5  ||*Øá¢ªXÕDI&F?)ùw>ƒ–IPü»m/ÓRr:¼›lKxØÓL¨Gæ¡ ÀÖ¿‡J‹Ñ„mŒ]ÛBÆžŽãµHþUçbMŠáâ )ò¥ºéRÎÂ8ö’ þ*'.@²‹):Z”È˱0ˆY/z²·6Ѧ›Aøõªý¶ÛßV÷ÛývEÇj’ÞÒEêºA#¦µ’XžÕhø.…ý•Ò’zxõ®Âúxêâú}5 W`›XŽ´¢†a¶â’ME?â£õ9 d"á¤PWÜMA*BÕ¸iU8ž)$|¨¡¯ã§Z³bÄHÚ:õXæ@Å\leŽ'_ öt«!IU$BWpp=oXÝÉí[`;”` ètÒyr £¾âv‹])•F„8W’ÊIК”,Ë»ÿ𳬶ÈÄk©­+»¢‘°Àkì¬ë%Hf#ÛÐí«í,÷±QnEëØÞÆÌ7JJ j-ïµ#q¥Z©O£‘m ·Þ5®ÁSöFž6µé¼UN”I)©t.ÝPøÚµÿÓÖW Žãhüñ’F?jÉ ½c*XÜß§Kÿei¡Éa7"’]Ù0«F"cÐ9ÐáÒ±óŒ½'‡[¸&ëKBÊs¸³cЏž¾ê¨s‹ l‘¯­ üf$ƒÒ­|_/#˜èß‹7ú`øÕ§3ô¬ä¦ïY=r—µÁܱq-γbÏ^«g2äv9/ž¥>{õ¸öZ–ÅÏ—S$$«t$t7±­k+ôS-#f#{³\*¨²¬^ 9/Ò¾w ˜±<űìÛ§ðêwWKth$‚åí.àÿzó9ü¢ªáÃ5ƒ²u ^æÕ 2E„ýRx帱e׿>úŸ‡±;—HÎ!Œ±ÕœZÔdör+'Pu‡Æ«kQ4 >5Å“ò©rFEerœY]ƒ°µ˜“åè Nv>2ò¼ÍY?.¸»Dª‡ÌÁ·]˜}Á÷ª½‘Ú<Ôa›òŽB¬Fºû©<–½eߨoW+£©Ûk¨wÆÕeî^æ0Ç‹Í#{ú•Kç÷Ë™Ž’9Œ1'Ú×5‚W‰%ƒz-öm­NPMÇÅ‘‚¸²cÅ,Š4%*à…«œ “åê¾U Q¢¨ø vöŠ?œß_ j‚×( fÔ|i}IÌms‹+åjÕ²fÃÃDªòY8ʰ@å\ØR¯êdb¬Òºö,MϺ’ÎÉaqe:éý¾5+ý*L|Üû˜µöØ‹ {êë¼]¶÷qRËŽH•æ?‰ÓR}1$‡Ï&6gñÅ!Ùâ†R»Þ¥ª;?ÈãƒfôUþh‡ª¿í%KÆþ¤i ûjüÂô±$Ä>"‹Î퇨ÂL‹àƒ øýêX¢Ê,€¢Šˆ†'™Emÿ¢Ð휜€<Óòî?È‘¢Ö!^àò¼¯$’q™ùOë ˜%duµ*ÓUݶg  ²K¯ålhÜ=Á•€üló~[É’|bcÈŸ~'ŽŽ¯–d"Ù‰‰»[5}6<9<V€A"ñSZ§-‚ä5ˆ‘‰È_0<„°õ¥£R˧‡Q\MŽvKÛkON†”®À½i‰ E HÑ3uÛ)#Jm¼Þýu§YnzëHm+¥´¢cÌ€¬‰æwG ɾ&œQãkÖüPC,±ø#+ìù[ãÝZÅgM>&¾„Î3¥¤U2¥ÆÈÄ+­ü¯Ú’Ün:ûê¹Ü·R:í©Íûo¯ÑUÞ~Eü¤à1V©RSÎÁÊOÈãxªÉ"ëüÆ´>]+1ìDü·!7oVVaþ3ýÕ¥£ c.¼*$”(~KPXø*# ÑG ÖáMþŠšäznoÒ 9B%ÄÅÜÁw/×cjxšQå·Æ@Ž—¨÷f,I¡ÔÓ´:Ø{4¤&ŒÇ ’ÞVê|)㢪I— ÊÂo›ËõkNxå“!½^¨4£9\©W.&”r˜ØxùÔØÔæ"˜qQ:;¨{YTv:îv6ßszŒÎ±‘n6ÜSé ÜkjŠæç'É&Ë“¯…A u8š,£»fóùvÔ!TQüªBn#CáJæd6VT¹NùX±úMé¹éYNªÔªÝ…À¯EýŸ\ÀÖSãJiqìð¨BäÞ§»N?=ˆ¨¹oò‹Ôëý•3Ûù‹Çr˜ùl¢M¡¼—·QjY–‰:šä̲ԹèV2c©G#SìŸÝR|.B´"ƒeP¾ÝEDpy±w') ñ¢us¼vjm°bí¬±VJ¦ÄäÚû}·ñ¬Q>]ïBYm"[,êYC‡°W’›)'_5þ¥‚Ú®L_ãûé3ÈãO¶(²#’W6D ìÛ`uN`ª·wBÁ¿[‹{…esJ ÈÒýG°ÖáËöÇ1É#†Àêˆ^°þS^;“Ë㦷© ¬ŒGK©«ì‚=B¢ñ8«&2Ø’OJlF¢ÃáNâþêEµûêõBu É1¸# 4Ý®‚/o `úž.l)“‚|Äu©,¡p €´.ÈÀ©7÷iHõ"—‹^½JR‚µOѸçÏî¯Zy×ÙwÚä(ýõô.ÚÄ¿C1“Ï"ÃbB§éÜumjâ•ÀhàÉ¥¸—$žÕÑKhÚ+ A¯hp•&QOQI>.4šI·ÅE9ÛAZš)F¿ ÆHnqÐhýÔÖN×ãîTøXß÷ÔÞÛWAi ¸b<z“Hø¨Œ~ÝÂ…ƒ*‹jŠ˜H¶€¬=•ØÕ4a€e\¤N(¢Š)’¢Š(¡ ÿÓß袊Š(¢„.H¯+ºäÔ)\‘Mòq—"6º0µéɯ*TÀ‘P±~áìŽW”L¾¾+>å’0Iýµð¨®è€ íëÕS`ñé[Äãð_ùOî¬[ŸMÙ,H°7¬<»q€ŽteÑáLËsäʤ`I—>oeIvßfDÛÝWÓ°óxü 7thÒö©®Ôã32.h#mŠT.á~¶ª8õ¹Õ]Ì'ЗrÅÄ\p׈ºîÒ›s-qòe½´u§Q$˜ÅŒÑÇEW ¶¦<ߪØn]Ôƒ¥—ÃZê\ …rlVäê ·…Š’1Œ€=Ed?m6âX·†O_EñùFßì©><ªäÄ4»ñ¨Î$lã O ‡â®Êuslb_U“ÿlôlI¿!7ç¡âÅ™——Q‘°ud¬Ê=þ›5gñáÃ?-m̹+mÒñTõûÎõªÕ?¹¸ÇÀãrŽ_Èd:ú˜Í§¥#8óÁü.ß4_å®·“n1›ï·mÃn¶ôâ"·h\/¦r¥ ÂÌK\ƒb%X7•TqÃ=ç“æo—ܾêé?Vì¿>?hR¶: +™#-Ž„j­â¶•{}¬TŠö꺢’I¬}9¼®,rŒ°ÚûöøIä]¯V~X<2.&=Ó ’IÚu¹ö³_uSJ³'‹B>±¥\ó§G¬H"LhMÇO‘jû æ‹$6Óƒ»ø©NÃÀüÏ6“³…\_Å7ÜA°­F~n|IP‡ŠÞe>> Ì;'!Ó‹ÓW ¯mtµhÙøF`d¹3· ÈÆxmò‡šè±¾f3'’¶ ŒË´ÜyŽí)¬R°ò“c÷-Ìúr98ì •€oM7E 7ˆ:UøFI‰zœê½ÆÇlü¶ÇÝ麣²_í¶æ§<:§­g@ñˆ$ܶÞ_ö©²9 ªÞÚ‚ þ4ÿÇ•žE+DN·Êò41ÜùQsÇÌ1ò žöØêGÐz×ÑyY0åÅ…“\M ’G]EëæyY+{tÔehý›Üí&,X-ŸHõ¾a}4÷Uw­Ï|gL ²ÔâÆ$Õ^²£™Ýôýµ[çœI€¸Ú.OSVA™^?¬š‘ó-WyI!8ò»¶Ä0o3àêOD§éþH—…Øuhg‘[àÇwöÖ•‰8h£UXXÖÚôÜ?4ØŸ>&\›_Üoåe­ë™F"(`O÷ÒÀŒƒ¢9+zl»¬O…T³Sólg«cÉ"ÿ•ÍXrYLÎ ù¼*·Šågä0\“éÏêǹ*ƒþð50,B&(£`˜“ ð§rÙ—_ TnRLÆ_n”áfÞ‰·¶­" ŒÕ Ó± : i0öÏ2I{y@Uöý4ª¹`hÒ«¿Õ§—>^<¶‘ɼ‹ý¦Ò¤–GXîÚ¿Ž¾ÊKAÁ:ÈýɦXŽ€'ˆÁäµ×Æ¢{¢¦à¹G”¥åþbÊJá_Yí~ê¥þ çzòbËëX€4:ÔraǽM¢7,1YënžúäÚõï^µåü*„˨O‡´R„mÒPhçO”¾—¹öô¡H\Þ¤xȽYw_ä¾£ô ®¾ÃS|B¥Ééj¦ùkg­Üx½ØôªÒ;#ýPΠZˆé«XTÇêN3äq˜ù€û<¶ku³‹TaÎG%‘#ÏáoqßVÞè*x,ñ Ü,EýÞ4¶íDñ{‰ïMzô£Ëì1Åb©©šw“° û¯S]¸Ñâw ír`-}5éQX¥›iCföøR’<‘Ȳ¥÷©ÛÀoYc".É‚Û(ƒn_©Ëö¯£Ó5™wµÇBE|ÉßÚw,Ûv_!½—­û‡å$Êã1ge!¤‰XøëmkýC-ÿ{9&mwÉ»è Vó”OB¹‚OÑUܵη÷ÒDéJo6°+†k¥­¥Ç:DäXE·Ã¼È+꽂”°-/üÚiñ4ÝÎæ$øš ‹×ûiÔCÊi·¾B.ª>ñ¡Ÿ+vý+íàíu9,d¹ñÊ?uh‘òð¸öНv¦º­îﶉŒ`z+2Ê´ 7¨ Íý•aªÏ{ù5ð9 Ÿ¢7­6þxö¯%ôÀüî0ÿì¹Sé9›ldvo*i5Ûº¢–c`)‘øò7H£ñÿÒ5±}fãÐ%R¢&³•uõúhôá@[b€5&ÔEPYõ‘õsýƒáVnÈà=Üœl°±âÚI^W?,­Š‚f€{EÚ/Wùª%!IÊ©d@‹>Å1Û‘ú‚¼ŸÍ„9I‚ÇšqÜÆEâõaØÉ¢Ÿ·÷êNNÉýKÏV‡7,´o}ânNB~ ¤)[Ñop¢°ò%Ú*š“îXÞ7è¯!;+æò¸EŠ`Ç$¬}›Œ¦$ÿfª}åØyý¤øRfeE™”Ò$rÂŒ„4aX,ŠÄüãÍåû•ô…R?V8ÖÎìéò#RÒqÓE˜ë±IŽ_ª9 †žß"fq4%ÀŽ x,®K{£ý&¬yXð8éjر~ŵWñ`ÊÌË1áãÉ4Ž—(ªný£üo3Tþd¿—\lK†lxR& ÜnQæ·ø«©`T’¹Àƒ'ïÁYÿM¡‰¹IcŒ’O…ü¢Õ¬ Kl½ÁûV¬—ôúI++"‚­¥: Ž•ªFçSý´ÄÔö¬¤W¹dì€wkÚ¨ö_Ê,~š­(ÞÖ êw½Œã¹3¢kÙ™Hø¨„ e µ]  Ñ»öÀ7&àš¥yÌÎOÅÃx@Âx‘¢—m˵á­0U]Ê£V{kñ­½'gcáÈ ÌV%ˆó5EÒˆ‹îñûVN¹¶–ƒÆ´Óž".G"|ù·‚ȾÂXkYôÞ`±¡ ž½:VÃØ*#á%mŽebÞÝzUU*ÑÈ¢·3cb)‰bÐHª3Ä7(î ŸÓVÕ†—ñ­/e ú߯¡òLƒëa#I=Ÿ¶ Š»ž¨—c*_kpÏqB™ "˜©>;•I_¢õ³Á'¤»S¡Ò³Îñù¹¹éêÌÅ6%mÕ~‘WÜTe ÒëaÐÿm);³Ã$@M; ÷Gô Ñêé¯ÄUC‘y¹É•”Y¡ß®º–®ÁÅ­û+>Ì Ü™#2ÅÐo o¦¾ú€šy’•åq1ª¿:‹‹kÒ `ÍHKz§hK—¿@X'%ßo§:ƒkÜXøâ¨N_ŒÂ“ts–KôqãʹžñUDµ ‡‘ÉÈÅ.| øö¹èFšÕË %³H¨rzì¦üŸ€vÙ›F-Ø\Ô¦ÄÇ€$zé×ÄÔÇhrpHò8†}œecKÝO¸Vkß^®fAx’ñ"fºšÒÆ ÈÅ‘I*eáP:§ÊGwʰ»DOˆ I&i4OV ™ µº×"ãÞ?}vÀ^¸ ´ÖB®DL”äX\‘­3½éb\ÃQB,,u:[Ƨ¸`}ÓkUmw1·AãV. 퉬|F¾5G Lö…£Šª; »ö{”ç£ðÝ­½ºUÏ»ÿõî@©×Ò5Oí%ßÍBã]ˆä“áqj»óp¾+/jd‰ÀF”Üzñˆý䜢$ÝX¾"ì…ü)ôÊ…wt&ÀÛ­6ň¡6*lA÷{©í­´îÖ >÷êºqm£±j=¯ÿö1rKî¹µdÿªX†ãi€Ó"5{ûÇ”þêÖx‰ÅAá½QÿV°waàò+Ö70±ë£ Ã÷WZcË£}ËŠžCWûÖFN¿ ðø^‘ã\“§Æ•J‘ÅÚœ|²}¢Û/îµé˜ÓR+Ô”ˆš 4'usºæ¤©^‚†¤0-¹| Ÿ¢£€: ²v—üÇ&˜ŠÛTäø•SæžÓz‘|ÏrY–‰ì[ïlÏ4< zjÌb[¡}luéj›>0šOx»Q8k>‰¤XŽŒ}6ÐŽ•/‚Mˆ×ÄS¨ñ"Kh ©Â…]ð¤ô¢ï˜A™f]¥{Ej©QEEQBEP…ÿÕß袊Š(¢„"Š(¡¯+ÚðÐ…ÉAïjSú…ùddzm ±óÊÌß$=ñZäýì`ÈÞ» :F=ƒÛñjòQ¹„+§©æÿþú]RI]! “JË1/Vw;QGÅk^äbIÂ%Ïoü¡Hðn7/ËC…›”0°‡Ÿ3(ÞëûØ7ãKòÇÿ¬û5³ñ2vû÷WÇöì¾Åe”ŠO¦òË]ïcêH›·3ùž¦»;¶ í>:;6Sþ.|㬓°óë÷ý8ÿ‚¼å»{/?–˜ÃægâÝ1Ž$¢¢´fOXó‡ôÎïàû5†åá9ì iÚÊ©Hî÷h€z Òfaã.윘a_l²"¼EcŸª‘ñX|ls<†~g ÒK$ó峡ÇEê‘EéÀImdû;úsdw· †9œUÎIbYÈÐe!“vä–Þoù¹)=&€¸äŽCËN˜«†Oyv–##œÂV^ª³£·ùc.Õ•ß=›6O6t1´3&6&LÀ£‚¬.±méVL~7ÄÄÂÇ€ù¨cO÷TS Ì {#ÃCãûùµ åîuã9á gC4˜m$ŠÑ±ŽKƬèáYäfV¥3±ÚÉc} ±¶þ¯p ÍÃÎBm0gMn¹ªþ ÿ¬oøÒ«ÙN9L8¹Q¤ zYŠ<%Q«|$zíqn‰Ã¶¿zËÈòÏÂ{Fʜ𸼢qór˜¨çôæ‘/å¸Òö§Ñw'°Éq~†õ×i÷fW‹>À¹YE†R5õV]¿²£$†}r;¬NIŒ²›Xâ($‹V‡UyAÒ¶tÙ¹§#%ËJ@RþÛ Sx$¾À+ŒÂUÓÝomwŒA}u·…h¶ÍELñNC¤s¤ Jü éNk–ÊîÆžb@±B*³L2_V¶—×Ù\C‘]‚ÜZýIªï}[©^ 7Å™ñò[v îf*~ú¯¸ÕÏôÿ%#?à0(Âà4¸ú§Á6")ËsvE!uò›‹t«¿`qX–›—üò.S]F¶â·kÞ²Æ@]`HëA‰Ù®}Êìçrƒ¨Öšä*H¾d#[õ¥Ý¼¢ÔÖSc{ÞÞÊÚÕT’«˜¹žÜÞ>~ 7ÁÁs$³^ÇÍÕ_ÈÚ«yO¶«X}é$öäª}Bæyɱ³\éj²DÖ[a쪢\ȳT‡Õ•„0òËD¾w1$ÿuS~w2@Bª…¿oì«lò2G×­T¸ÖfÎÏÝÑ¥¹¿Ž‚œb’X)ù'i"Œn°XÙQ9ÙP ÐäÇr:‹\}éÀ[þF’š\gt€-­4GorCܪü¶l|¤Øœ|壯€³¨ûMm}-Ƕí‰o·í·^¾Ëda™±ÜFŽ@¡‡K0±¨Ã’R¢Ú¤}U``HÍVM\‡S4RßÓ—cø éõRI$‘KE‚ÉÆ]Ž€²•®`ÁÅÄ@ò>÷÷øÞ¡{ŸEã2±Sp€xjj¹¶MZbž.Yè²€b•ãÐíb>£HÜØû /’-;‘ЛÒÞ”…k¤üuéãO®Ûe4_›Ì.)‘aí¨@^ÚͨUƒ… ùwn¤‘z¯hNµdáàsåÜÜ[^•M÷6ÈÔ…£ÿpv¤ö•˜ÙY1&å@±ÞàkÖ®²qò#”¨b5Vu¼Ö7‡“Ç»”i!õ,GU¸4ñ¹)ç*Ò9}ÂÛ‰Öý*Û;ŸÄg…_„%rR$—9(þg ¸®o; ‚Ø9tÚC ®wŸêÅŒFt%”Ò£¹eä÷ƒþ¢ëã¨Ò³#PÖ'Ýð¬7m‘p É[­L}n<_:àc'¯ ƒb…Dw¿i6m欙Q'¤¢t$éº=m}erós`DvÊÛv‹Ä}W介“Î/™è·H·¶­·=V m®z,6ÁÜL±vlT4žW#ØmI›_Czé®Ýz×>?ÙL«8¥aÚXn:›‚=žÍkÇ\þÏ…u¨äe]X×RÜUz—¡ ÄrPïpkSýÅ÷<²È¡ÄxÎMÅír¬¤hÚŠ×?Cr¡‡ÌYX!“í,m{05.Õè€k|t7È6+âÚÏò›{zTßÌar‘îÆq¸ ´gFUî>{‰ÎFÃŽ?ÌH·´Êm°û@ñ‘Ï«$$£)ºib.¿4òaˆnŬߠñ=+Û^¢¸®BYÑW)lÀhãÇãS ^„„®UI®”kzêŠ:(¢Š"Š(¡¢Š(B(¢Š¿ÿÖß袊Š(¢„"Š(¡¢ŠJ¸uVž•–wgê4&~O ;©dWòê Y¿Š­=ÿÝö× +‡›Lxéãr-»àµóG-ȘãÎËR"‰Œ³[íTß]AÄ6"ªØùc¸‡zñW7õ‘ÈæÂ¼qźûMôVêjßú‡ËÆ£ÖÆ‹"ÝJ1R~ƒÒ±ž/[›ÁŽöß19ê7¬çõ3²câxêÙo"Ç*†ÕnCió-ªaj`¶ñ!˜#%&ä¤LOOb³Ôï~u¥.ò,‚FùXXkà+cý,î”äø©ñe™8òù£S©V7öWÎ.mÓ¥=â9<Þ;)fØ….„¦ìdFèĽMª¨LV3À­ç¼ûn.>,Ž{ŽØH ¹¸‹`bûó@4>Ô‘Ž:ù÷#"L̹óeÒL‡.G±z"ÿ…-W®æî.o‡^'6IdÏ´¹*à‚!St]ç_ý”ªµ•œøh¶ óJ ¡¹?…bÝûœ˜E¥1´œ:ȲN;I)ñ;Wà¿ùêóúSÇÃÞ1I0 8üyrÑŒ—Xck¨ÏTˆl(µ×-•>g3Èe䯱M—3e4hÅÕ}b[nâòÔ~@ü"ÃìßWZèY#2 Œ¬‘­{–Ê\¼ÃMø}U—PAÔ0ú*}»Ÿ•—ˆ‡†–}Øq ¢1â:ê~5IJçqíŽÚ̓bŒz˜åÿÕ·—ü´ºâ£ xõ?MXD$\â*² ñx÷(ü§hcbMÅu€¶ÓCHrhÉ" ÝH:šE7J */oi­æÍ›ªf+TåäõnàÅ´4‹qåÔŸ7?… R›Jž¢¬xˆ’ ½¯ÔøiK2æ© £±± €®Äª›…ð½XxYÛ‘Æ™‚8ÜoàM$1¼¤žžûû«¶Æ`n­ÓÙU˜…`u­™U£ H·Ze<‡d’ÛÊ•Åó .Џñ’4˜1»±7º²„*“´“FìI¹+©vã{ŸŽL8±\ÉF, )þÊS òrç h˜†ªÊòM†§Æ¨éŸlˆpz5ŒoiÑjé‹‘–¡¢™_K}GÑY‡uïË’­ò­‚_îíª¯I¢3Tð®ŠrLìOÓ\êaø…«†½½„VR¬]"Ü›Wv:×zVÞ Bô Ø[Ýz×{HG]Ö»5…ɬ-a¨\ézÔ{X$±ÆEŠ!òè5PzU–óSÕ9ï]Òdc° {/z««»G°[O}\û–$|`IÕ+TÉP’ÝEõ>ÓLÀ;Ô’K)n ,|œ£DK*ÛEa{{ÅOsœ7‹Æ¼ñÂVE.Ò@¹÷T/jí—-›í¡cî6ÆH…µÐmÅ4¢6ŒûQ\²ÊyŸXÁaòÜtj¼}§O ¿67ª„m ./}´ÎN ^Å:jH&«0| %¯j¦›u5Ã[_ÙS\æÂX€Ô‹…BibFˆK#”ˆû[÷ ãöø×B2È:û);ž‡KTBìuú-Vßy±²bȈA±#Ùâ*¹­­h=ƒÇÿSy#"å5¡­‹Àl²£€oñ«ÅX ŠW‚áV hÔŽ‚ÕeƒcJc$©,\EŒ )ò‹ W¡@¯iŠ(¢„"ƒÒŠ(B(¢ŠŠ(¢„"Š(¡ ÿ×ß袊Š(¢„"Šóƽ¡®\íFo`¿Õ]W¨xݸe ˆ¡ æŸÔᓸ9ÆšFQŠÆ4ÕžŠƒZ¥YÛx–äß]OO`æTºŽ—éUå?²”xšÒ<õ *n,I>Úìæ M¨ ¨ÐÜëaTõIò–·])æNLܬ}ÔTä¥ÕÈ͗ÔuD>˜7ioeQãVäwB!“—ýY}€)ªÿ[ÒÄš)]wím§Ç¯Ú4Óº8Ü™ïÉÆÌøvâÔo( Sú“]ÌϵTíî¸ä9qóðÛu’4”3L­Ó_{«K‹˜b3B¢`¢ú“î¬G&åBv‹Õ‡æòð?ì²ØFNàÃ@M¶ÇîÒJw—rqÉØì̯üç?̼2Š˥¼ÄŸ–²¬œ‰'žI'‘ÛÏqÐÖ•Û “ËàŸn‚1S¶A×rÞªÏÁfãeË!e`m,{MŇÏk|µ$»ãSHiQØ­üL猋…–(ãt—o›«^–‹0ݳZG${<‡Ý^þœñßÔð"ü¾>éâ%%f7_nëV†’ò3Îþ]6ªè+t.@,äbqîY%l»d2Xï'ÁâÁ™•´!¥ÕuZö;,`O[SÉÛY0fãÁ“0<„¤Ñ‚øVúùªJ.Ú‰`ÚÙvÚÀØU‚ã¹¾•C‡YÇ#‘ùLÞ‘h¯pàí’;ž‡Ì¿ÍU.W3úŽd™@`-›j‹]ªõßœ6_…&\,f‰ÝQšß(>ÛVb2gMÛ|›”«XTøÇ|Ì lUöâÁË:â`CÜøÒ?ùZ»wgù…­\A·J«$˸ô¶ô©eÝäºè4&úÛSI%Èë]uЦ¡œ@¢IcÅ€?I«§Í“ËH#cŽ(íkF§ïU"hfG_™X=l~9Ʀ[eŒˆc»).[Àߨ¡¥ˆz&‰j¯|þk6:;.ËEÍîlmTܼ«‹)ë¡÷Ôvò \OGMâäû­Òªx²dådƆÚ›{0ÜMs¢’@[¸|¹ø½³ôY@ ðöЙ乄ÎÃÚÀ€óZרicw1)ˆÉ¸mP ¶ûuÇ?#AÆ"ÂÛdY$Øž”n›ô>V>‰tÈŽÀ ‡þGÙJ”±6ÚOC{éíÒ©#+0ßñÍè2dCk§º¡å¢‡ [»2a’bòn ºÕR$SÜÑ!egrúXLííJR—×h[ûë© ëàiÚFÖÓØEzêëÔ\†¤¨^tøÖïú!ÂÇ6N{1`¢þÊÁÕNõýkë_Ò¾=p»C ìØÓçK~• ¸C Æ¡@éKÚŠ*"Š(¡¢Š(B(¢ŠŠ(¢„"Š(¡¢Š(BÿÐß袊ƒEy¡? ö„/·Û^ÑEEQB@=kË ÞÚûkÚ(B(¢ŠŠ(¢„/-XGÿô?縤¹Ùè9ÂåõýÕ¼V5úý‚Òaq9ʤ„yasìÜ×ýÖ¡YdµÈö¬ Š(¨]4Rm¤ñŸheýÆ”¤¦!Lnt âçÜA%ž¡Þ¦øYo°¹·ò¿˜~ÝÔÃW‘˜øD«ý[Ûýê[…kåM`vcjªíéÎ@D‚ô ÈZˆ ÍURàû –åšyxÈ&E‰`¿°_íT_/Âgñ4\†$°6ª=D*òž•õgÂâp¸à`®ÈÐ]˜õvñfø×œ·ƒÊcnC2!?f@§Ùì¦2`ضjºƒ‚ù+ˆããÍä±1"¤šUP§Þkì~+ xî; E„ªX{…bÙhùœÖLâ÷‚Lvõ-ºH’*îó}ݵÈþƒ÷$Y ¸ãdÂ\¶Í»NàdÁö|«¾¾Š¢…äÀ#qc–KæNöÍŸ‘î‰äŸÒÿéøðñ‹ùuÛl{¶CÄ¿f&ÈwôÇÜZ—ý3îøNàX²[n' £c௺ð9ÿhÛþ²«œö4ø|Æv.B•š‰R@}¥Ëþ%mÕ­´ßÃÆ¨2"dõZ¶"3Þ¾²Û^ªéÇt·qpÿ–Ëm܆Xæsÿ ý)¿˜íÛ'ñ­;ä¥Ënòã8Èòæ‡'*y¡€ $/F×!™|²·ËZ"7`ru–DÇYBwOé†9™'#ƒ“ù,‰ŽéѓԟÅÅ™¾ÝAb~ŒKë©ä9Uü¸>uƈ«‘ì !p¿å«£r|‡ ÜØü.lÊcÏ?ì‰ùˆåÄ Ó@LKÊ«Æî¾¦ÿ+;ÒX]߯AÇðÃG<¼SM¹IÜEºFYº k|žo»¾ƒg6êþÝŠE윆ËÛµBd~ŽðN bçeÂÞÙ r¨¢ÿ½HAú3Ç#‘ÊäH/ªÇqéñ³Õ³3½8\¢è‰,Xù,Z+Á$Ûl²ÇêúÞF•VŠ9V6þI6<Èçñ`’Ë‘<%p¤É…Æ“1 f½]ªì±É"FÑ£üß#íKôãÑO«úŠS†àøþ8þ6?N%‰c¹ÝWv?3‘µVø¾ì˜ù™˜’cz\Œœf47žIRO@F6¹¦õv–Oø›¤®ó{ÇãñyŒ¸2c“Šh—3"¼ª'·¡"ìvã–þVY?…¼ôÛ$ìÉwÅÕ€­s@ü–‘™‰>y˜b¶BFŠÿ—Üé+7Èwªíß·ù¥±rW27‘ãU’H†û Þ›Ù—k7—r¶ÛÔ‘ˆR$-j-TþÙæyç¹–˜ÍL™Y4®>–6L˜“âîw´>œS·²j1y¼Ü®ôÊŠY™8hxé21¡Q£43úd6Ð]÷2ʱ¯ÈÑzr}ªcl¹è/¨)Ô²¸Zƒj®§yñÅY¤ÆÊ‹ÿ§ž^ è…¤ÅtT‘Ù]w¥ã—Óo7óÒ˜=ÛÇæäCŽØù8¿™Ã<Ž,³¢„–Ûêl¼’‹Ô]Èñ¦ïø^¢yª6KE;㪞¢ÇÄÔ7wñ“5§Ž|4)l3É gü¨ù¦,’¿ÊJ«¦ßQwü»j6KDoŽªsh¾¤šñÛW{ð«$±0“rbIž}9 Åþ®ÁŽVDR¬ÑÍé>ßå}¦7xbÏ.>,Ï䯇ªÔ$\ïo2òI’ lli –Û=Y•F:b%ï|V?›æv®³;¯À‹’|Ü|ˆfâá\¬œR¨Ò4»lÑlw‰Ótn¿êy|ûj6K!§½£™Õ9ä8./”OO;%qôÔ;~ŸvÑGŒb>Ô6§Ã»xÔ—2<¸r0ÿ'†9-óª&-Êú±ìwaµ—kG2Ã'ðT¶[e¼¨Ø³c˜Â02úe]\7…åFù|ÚÑçH8UÓ~¯µæ_¤Þ+ÈÿMøe$™&bz›ý”ë¸ãgáV.G ÿQæ<ú¨—–<™–|¾Ÿ§+üþJu›Üm.dYÙ2æœaù©†è}Haq¢ÙÞ›fÉ$ÛÉ7§÷¼ž£4¨Åߢ_PUèɪ~Ÿp*>W'ÚHþêU{·víh _ÆöýÖ§YáÅa¤ÓúsωŒ¸Ï‘™¯¤‹˜@¿ã’AfVoF9vûã㛓áæ<|<‘ÇÈÌ‘¦È–UY_<ˆÏ×VoM^_ú:€.dn WPv'mÃÿèÃ[ï¶Ÿ'l𱩇_fÀk¼{;”ÊáÛ|\¼h£ÉUÈUQ,³¢MÇ‘¶ï”¤Ë«ÿ7RÕÈbJ7=]DžÛáYð¡aïAL²;µrX»ñÑ«´—Sû*ÇEFã©S¸Œ ¨?é¯m8Ûl…éOöƒ^âv?ÁdŽO¼°ƒhØ«qàl*ÝAõ¨ì§P Ë2ãB«kάŠÛ`z¬È?hiŒ¼ÖVGá&,­º­ýÕr°(¤Ù,äOrV#{ÕWíù,ò¹èUÁ¾K˜Çæ²!EÈr±áãŲ8Ž8±$3’ò$rn’Gwùcùvy¾j»×šQêIÞžÕFÀ̪Ýኙø˜¸ðeÅ‹ÏcäA—ÆÁ˜JFË$:<‘Ëåù>z°ãc&&܇qñ±ˆ<^!ÜÆH¤êDþ‰Ó1Çåÿ‹V­(Ò›yû}ê6³Ü³ˆûG¹ Œ‰!Â\™¸\ž+.C‘+4™Ï椕 /'©éù•¿ÓûíòT”]·ÏE“ÃϘпÄMÆ´¢Gr'‘b ,hЪ¼hÐnó²UÖ¼° Ü‘Ñ@€ê³WàyŽ.7æ¹H°bá2°9y¤›Õ™Ìoù‰™ã¦YÚ-²+ÈžšÆ¥xþ#2tþ“È&©ÈqÒñQfbç>\ðb˜˜‹FøøÊÐîÛ¾]þ£IèzŽþMº#ˆö7©m–;÷ZÖñ½ê;‰ÿ»ö—úäöîüÉzVÝÿIèý¯æ¦õKaTlŽï9ø,¾–lÃ\Hr!’Kä3FbI& ô)Þâ?S|Ÿq+¬ßæ1¹1Æ1‹âßuI¹¤q š;ÃþŸýŸímo?ËVòz°¤Þk@ýé¶Oø,÷ µ{£†Âá2xçÓ“â×++ä“ÐÈÆÊ”Oe›ÒY#–7HÏú[jiøŽw#œá9|£Šß‡12Õ$uóeú[é飷|ŒŽÿ>ϱV‹ ,*MÂj@zÿ2)\½Ê…ÚœÿÛÌ$¹<>n~D±‰¤Ñg~bÅd0îßæEÓÓóíùêßœœ8íÇúd¤»²V*-Ž¥C*ɵ½Fþ_³Oì(Ò¢S2.[?}T€aÓܩݒü¤Á6qÌâÃÅ Þ=xå\¼€U¤.ѦÕÿ„Ÿ>ù<’2ðüŸ#›‹ÊçÇYx8y8ÐÃŒÈóezbY ›XTAhÿ ŸñwÉVm(Ò§Ô—·c(Ú=¼U¶9Þ;´Ú%ÅŸ/€ŽLl˜LΑºK¡êG/¢Ít*¯±¡¤±»O¸11¸ÆQ‹6OËår% ²"<9_˜7¥!GOÌ+lÚÿÏWú-G©.žÏþå_oúU7´9|Ì®s-edžl¼ÜK‹mîÀK€‘*®Jzkµ%0ý†—fÿµ²•ç{_‘ç"å²ÂÃvý+‘Š"³´²I,©}¶]ˆ±|±üÿ‹²;ž•í¤©ÓÛý(Ø+×Ûâª2ð<ÉæO& šÄ1±¦–B¯'©ê0z.ëølß7ýÙ§}±ÀKÁËž"_Êñ¹'Äã­2c¸ ùƒ0œs3&ØSÈžžï/©±ltT’Tmê¸øŽC”Ÿ…“C³ä#Ο֑”H¥ˆ¤a#–íøÛ¼Û~Zg•Åw6qer¼ ÄÈÃåÌÇÌy#he}4ž#Iê#EóÄÛ<ËóÕ®ŠÈ B¾(1µÅÕ ¹;[¹9êÐoÅÌ‹&,QÆÏ‘#ÆÐ4;!)Ƈ&EwiÑ·yý?:F•×)Ú|ÿ#‰ÝÐÉÇ'pþ_òß)XÌPG'ª/ø[“j·øj÷E0» ØSöµA¶ ã_ÛþåÉ™`\Ixèpv$ŽÒ #šIËm1"lüm¿>ï/ËSôQHKø2`QEB”QE!QEEQBEP„QE!QEEQBEP„QE!QE_ÿÙ389-admin-1.1.35/admserv/icons40/domain16.gif000066400000000000000000000003641220472121400202350ustar00rootroot00000000000000GIF89a³ÿÿÿÿÌÌÿÆÆù™Ìÿ™™Ìff™3f™33f3™fÀÀÀ!ù ,@VpÉYÊ93¯z¯ F jI` É„GÁrq†öX–ª”ˆåšRB ¡U¹ô4•eH耩ç53œßQµ=ÆÉÑ+¦ÒN–(Ø®YÓ,àNM;ËfÛé0«§»Bg_éTQ +Vó„@‹”³ª#bßjl 5LoV<49\;wIZB;v3 %@Œ1 * a&– n!;389-admin-1.1.35/admserv/icons40/enterpriseic.gif000066400000000000000000000004061220472121400213100ustar00rootroot00000000000000GIF89aÄÿÿÿÿÌÿÿ™™™fÌÿf™Ìf™™ffÌfff3Ìÿ3™ÿ3™Ì3™™3fÿ3fÌ3f™3ff333™ÿ™ÌfÿfÌf™fff33™3f33f3,‹ !Žd)B]ªvåZ”¨¢ÝV%‰45–|¨B‘h($=ƒŠsK rJ%I» ICšìp¸‘@NeÉP,¡ S͉¨ˆ´BÁ’‘ 9[ }" .…~ .‘•~…|••"ª|¥§ "²³ ¶&¸$!;389-admin-1.1.35/admserv/icons40/goto.gif000066400000000000000000000001261220472121400175630ustar00rootroot00000000000000GIF89a ¢ÿÿÿÎÎΜœÎccœ, #ºÜþ0¶@kAè­GÖ_ Àæq¤ø'W²ã oãÀxŽ';389-admin-1.1.35/admserv/icons40/group2.gif000066400000000000000000000002401220472121400200260ustar00rootroot00000000000000GIF89a³ÿÿÌÿff™ÌÌÿf™Ì™ÌÌf™f™Ì™ÿÌÿÀÀÀÌÌÌ™™™fff!ù ,M0ÉI«T8;UkG¸q‰§™2Væ· ÌJµ ”*Û× „,ÐR¹YoÙ0 ÃbËPp/;'Ê‘6†Æµó ‹IÄ¢zŒn/8;389-admin-1.1.35/admserv/icons40/help.gif000066400000000000000000000003451220472121400175460ustar00rootroot00000000000000GIF89a³ÿÿÌÌÌÿÌÌ™™™Ì™™™ff™ff333fÀÀÀ3!ù,@’ÉI«½ôŒ0ÆIÝhC‘˜¤qašh*ÏÖêÞæ ÛáGv0YB(Å“NF88ŸPçr·é%®¿`ŠgÍž¨¬Ž¯¥Å|®è´:–*Þðø{J«3¼~Ÿ͸R/_[U#‡$e€bˆ%„f†Ž?lŒ“7@‘˜a‰dœ5@r¤¡ ª«¬ªJ2"j²W—v¶;389-admin-1.1.35/admserv/icons40/host.gif000066400000000000000000000002311220472121400175650ustar00rootroot00000000000000GIF89a¢ÿÀÀÀÌÌÿÌÌÌ™Ìÿ™™Ìf™ÿff™33f!ù,@^´Ì Æ–¹á©N`ñhÆd4BzXZW¼ïheDxÃ'fs} ‡ 0xZl"•ˉF„t†AÁéú€dAÉ ”`eŒ—•Цt†Vc¤¬"a¦P6Ø39oJ;389-admin-1.1.35/admserv/icons40/hr.gif000066400000000000000000000000741220472121400172260ustar00rootroot00000000000000GIF89a ‘ÿÿÿÌÌÌ, „©Ëí¯tZ[3ܼû†âH&;389-admin-1.1.35/admserv/icons40/messagingic.gif000066400000000000000000000002561220472121400211100ustar00rootroot00000000000000GIF89a³ÿÿÿÿÿf™ÿ3fÌÿÿÌÌÿÌÌÌ™ÌÌf™ÿffÌ3fÿ,cÉI«TsH!Ä\ @1€H*[ÐzaK *îípm‡–pµ“ N-UreCdÄ¥jàsR•Äi jHxDÑéb0P{ÔCYA2¶¼æU>ÖsDFÑýžö/ex†;389-admin-1.1.35/admserv/icons40/oldservic.gif000066400000000000000000000002431220472121400206050ustar00rootroot00000000000000GIF89a³ÿÿÿÿÌÌÌ™™™fff3™™333™™ff,XÈI«D8QÌ v!çdx•Ý ˆHì‰À0H›î=›˜„÷úa’VˆÛHlÍæV ü~8Á –Á ¾ZB1è‚¿£Šä ¤Se6p&Á32‹ž;389-admin-1.1.35/admserv/icons40/spacer.gif000066400000000000000000000000531220472121400200670ustar00rootroot00000000000000GIF89a€ÀÀÀ!ù,D;389-admin-1.1.35/admserv/icons40/togoff.gif000066400000000000000000000017411220472121400201030ustar00rootroot00000000000000GIF89a3÷ÿÿÿÿÿÌÿÿ™ÿÿfÿÿ3ÿÿÿÌÿÿÌÌÿÌ™ÿÌfÿÌ3ÿÌÿ™ÿÿ™Ìÿ™™ÿ™fÿ™3ÿ™ÿfÿÿfÌÿf™ÿffÿf3ÿfÿ3ÿÿ3Ìÿ3™ÿ3fÿ33ÿ3ÿÿÿÌÿ™ÿfÿ3ÿÌÿÿÌÿÌÌÿ™ÌÿfÌÿ3ÌÿÌÌÿÌÌÌÌÌ™ÌÌfÌÌ3ÌÌÌ™ÿÌ™ÌÌ™™Ì™fÌ™3Ì™ÌfÿÌfÌÌf™ÌffÌf3ÌfÌ3ÿÌ3ÌÌ3™Ì3fÌ33Ì3ÌÿÌÌÌ™ÌfÌ3Ì™ÿÿ™ÿÌ™ÿ™™ÿf™ÿ3™ÿ™Ìÿ™Ì̙̙™Ìf™Ì3™Ì™™ÿ™™Ì™™™™™f™™3™™™fÿ™fÌ™f™™ff™f3™f™3ÿ™3Ì™3™™3f™33™3™ÿ™Ì™™™f™3™fÿÿfÿÌfÿ™fÿffÿ3fÿfÌÿfÌÌfÌ™fÌffÌ3fÌf™ÿf™Ìf™™f™ff™3f™ffÿffÌff™fffff3fff3ÿf3Ìf3™f3ff33f3fÿfÌf™fff3f3ÿÿ3ÿÌ3ÿ™3ÿf3ÿ33ÿ3Ìÿ3ÌÌ3Ì™3Ìf3Ì33Ì3™ÿ3™Ì3™™3™f3™33™3fÿ3fÌ3f™3ff3f33f33ÿ33Ì33™33f333333ÿ3Ì3™3f333ÿÿÿÌÿ™ÿfÿ3ÿÌÿÌÌÌ™ÌfÌ3Ì™ÿ™Ì™™™f™3™fÿfÌf™fff3f3ÿ3Ì3™3f333ÿÌ™f3,3Ư H° ÁƒÀ°¡Ã‡^³B±¢Å‹+ °¢£Ç C®°21¢I“EªIÒÊÉ—S®œÙ±%Ì›2i®´ s#Ÿ¯q9PçÈ’1 e¸ôaΎוy6­ß¿[Û²ÕKR+W£€íú%¹+܆~€gdÉk+¿¼Œù®f—œ;›Hš´ÂÓ¨S ;389-admin-1.1.35/admserv/makeUpgradeTar.sh000077500000000000000000000016241220472121400201040ustar00rootroot00000000000000#!/bin/sh if [ -z "$1" -o -d "$1" ] ; then echo "Usage: $0 output.tar.bz2 file" exit 1 fi if [ -f "$1" ] ; then echo "File $1 exists - remove it first" exit 1 fi if [ -n "$2" ] ; then dbfiles="var/lib/dirsrv/slapd-*/db/* var/lib/dirsrv/slapd-*/db/*/* var/lib/dirsrv/slapd-*/cldb/*" fi libdir=usr/lib64/dirsrv if [ ! -d /$libdir ] ; then libdir=usr/lib/dirsrv fi # use new httpd.conf and admserv.conf cd / tar cpjf $1 -C / --no-recursion --exclude httpd.conf --exclude admserv.conf \ etc/sysconfig/dirsrv* etc/dirsrv/slapd-* etc/dirsrv/slapd-*/* \ etc/dirsrv/slapd-*/schema/* var/run/dirsrv var/lock/dirsrv/slapd-* \ var/log/dirsrv/slapd-* var/lib/dirsrv/slapd-* var/lib/dirsrv/slapd-*/* \ var/lib/dirsrv/slapd-*/ldif/*.ldif $libdir/slapd-* $libdir/slapd-*/start-slapd \ etc/dirsrv/admin-serv etc/dirsrv/admin-serv/* var/log/dirsrv/admin-serv `echo $dbfiles` ls -l $1 389-admin-1.1.35/admserv/newinst/000077500000000000000000000000001220472121400163355ustar00rootroot00000000000000389-admin-1.1.35/admserv/newinst/src/000077500000000000000000000000001220472121400171245ustar00rootroot00000000000000389-admin-1.1.35/admserv/newinst/src/25rebrand.pl.in000066400000000000000000000337651220472121400216700ustar00rootroot00000000000000 use AdminUtil; use DSUtil qw(debug); # load perldap use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils qw(normalizeDN); use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn); my @old_brands = ({cap => 'Red Hat', norm => 'redhat', vend => 'Red Hat'}, {cap => 'Fedora', norm => 'fedora', vend => 'Fedora Project'}); my $admininf = (getInfs("admin"))[0]; my $newbrand = {cap => $admininf->{admin}->{Brand}, norm => $admininf->{admin}->{NormBrand}, vend => $admininf->{admin}->{Vendor}}; my @attrs = ("*", 'aci'); my $nsrootdn = "o=NetscapeRoot"; my $myhost = ""; my @mapoldnew = (); sub sameBrand { my ($old, $new) = @_; return $old->{norm} eq $new->{norm}; } sub replaceOldNewEntry { my ($ent, @ary) = @_; my $changes = 0; for my $attr (keys %{$ent}) { my @newvals = $ent->getValues($attr); for my $pat (@ary) { my $old = $pat->{old}; my $new = $pat->{new}; if ($pat->{attr}) { if (lc($attr) eq lc($pat->{attr})) { map { $changes += s/$old/$new/g } @newvals; } } else { map { $changes += s/$old/$new/g } @newvals; } } $ent->setValues($attr, @newvals); } return $changes; } sub rebrandEntry { my ($ent, $old, $new) = @_; my $dn = $ent->getDN(); my $changes = ($dn =~ s/cn=$old->{cap}/cn=$new->{cap}/); if ($ent->getDN() ne $dn) { # if we rebranded the dn $ent->{_olddn_} = $ent->getDN(); # save old dn } $ent->setDN($dn); # set new dn and rebrand $changes += replaceOldNewEntry($ent, {attr => 'nsvendor', old => $old->{vend}, new => $new->{vend}}, {attr => 'nsslapd-pluginvendor', old => $old->{vend}, new => $new->{vend}}, {old => "cn=$old->{cap}", new => "cn=$new->{cap}"}, {old => "\@$old->{norm}-admin", new => "\@$new->{norm}-admin"}, {old => "\@$old->{norm}-ds", new => "\@$new->{norm}-ds"}, {old => "$old->{norm}-admin", new => "$new->{norm}-admin"}, {old => "$old->{norm}-ds", new => "$new->{norm}-ds"}, {old => "$old->{cap} Administration Server", new => "$new->{cap} Administration Server"}, {old => "$old->{cap} Directory Server", new => "$new->{cap} Directory Server"}); return $changes; # number of changed items } sub fixDupVals { my ($conn, $ent) = @_; my $rc; # as a result of our corrections above, we have some # duplicate values - let's remove them # this is a list of attributes that may have DN syntax # and are multi valued - we have to normalize them first my %mydnattrs = (owner => 'owner', roleoccupant => 'roleoccupant', member => 'member', seealso => 'seealso', uniquemember => 'uniquemember', parentorganization => 'parentorganization', secretary => 'secretary', manager => 'manager', aliasedobjectname => 'aliasedobjectname', associatedname => 'associatedname', distinguishedname => 'distinguishedname', documentauthor => 'documentauthor', nsroledn => 'nsroledn', nsadminsiedn => 'nsadminsiedn', nsdirectoryinforef => 'nsdirectoryinforef', mailenhanceduniquemember => 'mailenhanceduniquemember'); my %skipattrs = (objectclass => 'objectclass'); for my $attr (keys %{$ent}) { next if ($skipattrs{lc $attr}); my @newvals = $ent->getValues($attr); my %uniq = (); # the keys of the uniq hash will be the normalized values # the hash table will just throw away dups, so the # resultant table will have as the keys the unique # normalized values, and will have as the values the # original unique un-normalized values if ($mydnattrs{lc $attr}) { %uniq = map { normalizeDN($_) => $_ } @newvals; } else { %uniq = map { lc $_ => $_ } @newvals; } $ent->setValues($attr, values %uniq); } if ($conn->update($ent)) { $rc = LDAP_SUCCESS; } else { $rc = $conn->getErrorCode(); } return $rc; } sub rebrandAddCopy { my ($conn, $ent, $old, $new, $exists) = @_; return () if (!rebrandEntry($ent, $old, $new)); # already branded correctly $conn->add($ent); my $rc = $conn->getErrorCode(); if ($rc == LDAP_TYPE_OR_VALUE_EXISTS) { $rc = fixDupVals($conn, $ent); } if ($rc != LDAP_SUCCESS) { if ($rc != LDAP_ALREADY_EXISTS) { # just bail - it's unlikely that we would get this error from # far down in the tree, if we didn't already get this at # the top level return ('error_adding_entry', $ent->getDN(), $conn->getErrorString()); } else { debug(1, "Entry ", $ent->getDN(), " already exists - skipping\n"); } } return (); } # delete the subtree starting from the passed entry sub delete_all { my ($conn, $dn) = @_; my $sentry = $conn->search($dn, "subtree", "(objectclass=*)", 0, ("dn")); my @mystack = (); while ($sentry) { push @mystack, $sentry->getDN(); $sentry = $conn->nextEntry(); } # reverse order my $dn = pop @mystack; while ($dn) { $conn->delete($dn); my $rc = $conn->getErrorCode(); if ($rc != LDAP_SUCCESS) { debug(1, "ERROR: unable to delete entry $dn, error code: $rc:" . $conn->getErrorString() . "\n"); return $rc; } $dn = pop @mystack; } return LDAP_SUCCESS; } sub entIsIsie { my $ent = shift; return grep {/nsapplication/i} $ent->getValues('objectclass'); } sub rebrandEntries { my ($conn, $old, $new, $mapoldnew, @ents) = @_; my @errs; my @entstodel; for my $ent (@ents) { next if (!$ent); @errs = rebrandAddCopy($conn, $ent, $old, $new); if (@errs) { return @errs; } if ($ent->{_olddn_}) { push @{$mapoldnew}, {old => $ent->{_olddn_}, new => $ent->getDN()}; push @entstodel, $ent; } } while (@entstodel) { my $ent = pop @entstodel; my $dn = $ent->{_olddn_}; $conn->delete($dn); my $rc = $conn->getErrorCode(); # cannot delete the entire tree rooted at the isie because that would # delete all instances if there are multiple ds instances # but for other entries such as the sie if (($rc == LDAP_NOT_ALLOWED_ON_NONLEAF)) { if (entIsIsie($ent)) { $rc = 0; # if the isie is empty after we have done all sies, we will delete it later } else { $rc = delete_all($conn, $dn); } } if (($rc != LDAP_SUCCESS) and ($rc != LDAP_NO_SUCH_OBJECT)) { return ('error_deleteall_entries', $dn, $conn->getErrorString()); } } return (); } # see if there are any more instances under the old isie - if # not, remove the isie sub cleanupIsie { my ($conn, $isiedn) = @_; my $rc = LDAP_SUCCESS; $sie = $conn->search($isiedn, "one", "objectclass=netscapeServer"); if (!$sie) { $rc = delete_all($conn, $isiedn); if ($rc) { return ('error_deleteall_entries', $isiedn, $conn->getErrorString()) } } return (); } sub rebrandSieAndIsie { my ($conn, $filt, $mapoldnew) = @_; my @errs; my @sieary = (); my $sie; for ($sie = $conn->search($nsrootdn, "sub", $filt, 0, @attrs); $sie; $sie = $conn->nextEntry) { push @sieary, $sie; } for $sie (@sieary) { my $siedn = $sie->getDN(); my @rdns = ldap_explode_dn($siedn, 0); my $isiedn = join(',', @rdns[-5..-1]); my $isie = $conn->search($isiedn, "base", '(objectclass=*)', 0, @attrs); # search for old brands for my $oldbrand (@old_brands) { next if (sameBrand($oldbrand, $newbrand)); my @ents = ($isie, $sie); my $sieconf = "cn=configuration," . $siedn; for ($ent = $conn->search($sieconf, "sub", "objectclass=*", 0, @attrs); $ent; $ent = $conn->nextEntry) { push @ents, $ent; } @errs = rebrandEntries($conn, $oldbrand, $newbrand, $mapoldnew, @ents); if (@errs) { return @errs; } } @errs = cleanupIsie($conn, $isiedn); if (@errs) { return @errs; } # remove the sie entries under ou=User Preferences, ou=%domain%, o=NetscapeRoot # they will be recreated $ent = $conn->search($nsrootdn, 'sub', "(|(ou=$siedn)(ou=\"$siedn\"))"); if ($ent) { $conn->delete($ent->getDN()); my $rc = $conn->getErrorCode(); if ($rc) { return ('error_deleteall_entries', $ent->getDN(), $conn->getErrorString()); } } } return (); } sub getSuffixList { my $conn = shift; my @suffixlist = ('cn=schema', 'cn=monitor', 'cn=config'); for (my $ent = $conn->search('cn=mapping tree,cn=config', 'one', 'objectclass=*', 0, ('cn')); $ent; $ent = $conn->nextEntry) { # grab the first cn value in the entry that does not begin with a quote my @ary = grep {!/^[\"]/} $ent->getValues('cn'); if (!@ary) { # could not find one without quotes - strip quotes my $dn = $ent->getValues('cn'); $dn =~ s/^[\"]//; $dn =~ s/[\"]$//; push @suffixlist, $dn; } else { push @suffixlist, $ary[0]; } } return @suffixlist; } sub rebrandConfFiles { my $configdir = shift; # start with the isie from the adm.conf # see if there is already a configds my $admConf = AdminUtil::getAdmConf("$configdir/admin-serv"); if (!$admConf) { return ('error_reading_conffile', "$configdir/admin-serv/adm.conf", $!); } # now fix adm.conf and local.conf my $count = 0; # reset while (my ($key, $val) = each %{$admConf}) { for my $oldbrand (@old_brands) { next if (sameBrand($oldbrand, $newbrand)); $count += ($val =~ s/cn=$oldbrand->{cap}/cn=$newbrand->{cap}/g); # fix DNs $count += ($val =~ s/\@$oldbrand->{norm}-admin/\@$newbrand->{norm}-admin/g); # fix jar names $count += ($val =~ s/\@$oldbrand->{norm}-ds/\@$newbrand->{norm}-ds/g); # fix jar names $admConf->{$key} = $val; } } if (($count > 0) and !AdminUtil::updateAdmConf($admConf, "$configdir/admin-serv")) { return ('error_updating_conffile', "$configdir/admin-serv/adm.conf", $!); } my $localconf = "$configdir/admin-serv/local.conf"; if (-f $localconf) { if (!open(LOCALCONF, "$localconf")) { return ('error_reading_conffile', $localconf, $!); } my @lines = ; close LOCALCONF; $count = 0; # reset for my $line (@lines) { for my $oldbrand (@old_brands) { next if (sameBrand($oldbrand, $newbrand)); $count += ($line =~ s/cn=$oldbrand->{cap}/cn=$newbrand->{cap}/g); # fix DNs $count += ($line =~ s/\@$oldbrand->{norm}-admin/\@$newbrand->{norm}-admin/g); # fix jar names $count += ($line =~ s/\@$oldbrand->{norm}-ds/\@$newbrand->{norm}-ds/g); # fix jar names } } if ($count > 0) { if (!open(LOCALCONF, ">$localconf")) { return ('error_updating_conffile', $localconf, $!); } for my $line (@lines) { print LOCALCONF $line; } close LOCALCONF; } } return (); } sub postinst { my ($inf, $inst, $dseldif, $conn) = @_; my @errs; my $rc; if (!$myhost) { # we need to find the sie entry for the inst - we need # the host to do that my $config = "cn=config"; my $config_entry = $conn->search($config, "base", "(objectclass=*)"); if (!$config_entry) { return ("error_no_configuration_entry", $conn->getErrorString()); } $myhost = $config_entry->getValues('nsslapd-localhost'); } my $filt = "(&(cn=$inst)(serverhostname=$myhost))"; my @localmapoldnew = (); my $cdsconn = $inf->{configdsconn}; @errs = rebrandSieAndIsie($cdsconn, $filt, \@localmapoldnew); if (@errs) { return @errs; } # fix references to old sie and isie entries in ds instance # get a list of dns to search my @suffixlist = getSuffixList($conn); while (@suffixlist) { my $dn = pop @suffixlist; my $ent = $conn->search($dn, 'base', 'objectclass=*', 0, @attrs); if ($ent) { my $changes = replaceOldNewEntry($ent, @localmapoldnew); if ($changes and ($rc = fixDupVals($conn, $ent))) { return ('error_updating_entry', $ent->getDN(), $conn->getErrorString()); } } } # add to the global mapoldnew push @mapoldnew, @localmapoldnew; return (); } sub post { my ($inf, $configdir) = @_; my @errs; my $rc; my $cdsconn = $inf->{configdsconn}; # rebrand the admin server sie tree my $filt = "(&(serverhostname=$myhost)(objectClass=nsAdminServer))"; @errs = rebrandSieAndIsie($cdsconn, $filt, \@mapoldnew); if (@errs) { return @errs; } # look through the entire tree looking for references to the old # dns - replace them with the new dns for (my $ent = $cdsconn->search($nsrootdn, 'sub', 'objectclass=*', 0, @attrs); $ent; $ent = $cdsconn->nextEntry) { my $changes = replaceOldNewEntry($ent, @mapoldnew); if ($changes and ($rc = fixDupVals($cdsconn, $ent))) { return ('error_updating_entry', $ent->getDN(), $cdsconn->getErrorString()); } } # rebrand config files @errs = rebrandConfFiles($configdir); return @errs; } 389-admin-1.1.35/admserv/newinst/src/30updateglobalpref.pl.in000066400000000000000000000033111220472121400235470ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2009 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK use DSUpdate; use AdminUtil; use DSUtil qw(debug); # load perldap use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils qw(normalizeDN); use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn); sub post { my ($inf, $configdir) = @_; my @infs = getInfs("setup", "admin"); # there are several tokens in the map that we don't # use for 02globalpreferences - so just add dummy # values setupinf to make the map happy $setupinf->{General}->{ServerIdentifier} = 'notused'; $setupinf->{General}->{ServerPort} = 'notused'; $setupinf->{General}->{Suffix} = 'notused'; my $upd = { path => '@ldifdir@/02globalpreferences.ldif.tmpl', mapper => "@infdir@/updateconsoleinfo.map", infary => \@infs }; return DSUpdate::applyLDIFUpdate($upd, $inf->{configdsconn}, $inf); } # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/ASDialogs.pm.in000066400000000000000000000123221220472121400216750ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package ASDialogs; use strict; use DialogManager; use Setup; use Dialog; use DSUtil; my $asserveradmin = new Dialog ( $SILENT, # hidden 'none', sub { my $self = shift; my $id = $self->{manager}->{inf}->{admin}->{ServerAdminID} || $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID}; if (isValidDN($id)) { $id =~ s/^(.*)=.*/$1/; } $self->{manager}->{inf}->{admin}->{ServerAdminID} = $id; my $pwd = $self->{manager}->{inf}->{admin}->{ServerAdminPwd} || $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd}; $self->{manager}->{inf}->{admin}->{ServerAdminPwd} = $pwd; return $id; }, sub { return $DialogManager::NEXT; }, ['none'] ); my $asport = new Dialog ( $TYPICAL, 'dialog_asport_text', sub { my $self = shift; my $port = $self->{manager}->{inf}->{admin}->{Port}; if (!defined($port)) { $port = @admservport@; $self->{manager}->{setup}->{asorigport} = $port; } if (!$self->{manager}->{setup}->{reconfigas}) { if (!portAvailable($port)) { $port = getAvailablePort(); } } return $port; }, sub { my $self = shift; my $ans = shift; my $res = $DialogManager::SAME; my $reconf = $self->{manager}->{setup}->{reconfigas}; if ($ans !~ /\d+/) { $self->{manager}->alert("dialog_asport_error", $ans); } elsif (!$reconf && !portAvailable($ans)) { $self->{manager}->alert("dialog_asport_error", $ans); } else { $res = $DialogManager::NEXT; $self->{manager}->{inf}->{admin}->{Port} = $ans; } return $res; }, ['dialog_asport_prompt'] ); my $ashostip = new Dialog ( $CUSTOM, 'dialog_ashostip_text', sub { my $self = shift; if (!defined($self->{manager}->{inf}->{admin}->{ServerIpAddress})) { $self->{manager}->{inf}->{admin}->{ServerIpAddress} = "@admservip@"; } return $self->{manager}->{inf}->{admin}->{ServerIpAddress}; }, sub { my $self = shift; my $ans = shift; if ($ans && (length($ans) > 0)) { $self->{manager}->{inf}->{admin}->{ServerIpAddress} = $ans; } elsif (exists($self->{manager}->{inf}->{admin}->{ServerIpAddress})) { delete $self->{manager}->{inf}->{admin}->{ServerIpAddress}; } return $DialogManager::NEXT; }, ['dialog_ashostip_prompt'] ); # must verify that the user or uid specified by the user to run the server as # is a valid uid sub verifyUserChoice { my $self = shift; my $ans = shift; my $res = $DialogManager::NEXT; # convert numeric uid to string my $strans = $ans; if ($ans =~ /^\d/) { # numeric - convert to string $strans = getpwuid $ans; if (!$strans) { $self->{manager}->alert("dialog_assysuser_error", $ans); return $DialogManager::SAME; } } if ($> != 0) { # if not root, the user must be our uid my $username = getLogin; if ($strans ne $username) { $self->{manager}->alert("dialog_assysuser_must_be_same", $username); return $DialogManager::SAME; } } else { # user is root - verify id my $nuid = getpwnam $strans; if (!defined($nuid)) { $self->{manager}->alert("dialog_assysuser_error", $ans); return $DialogManager::SAME; } if (!$nuid) { $self->{manager}->alert("dialog_assysuser_root_warning"); } } $self->{manager}->{inf}->{admin}->{SysUser} = $ans; return $res; } my $assysuser = new Dialog ( $CUSTOM, 'dialog_assysuser_text', sub { my $self = shift; my $user = $self->{manager}->{inf}->{admin}->{SysUser}; if (!defined($user)) { $user = $self->{manager}->{inf}->{General}->{SuiteSpotUserID}; } if (!defined($user)) { if ($> == 0) { # if root, use the default user $user = "@httpduser@"; } else { # if not root, use the user's uid $user = getLogin; } } return $user; }, sub { my $self = shift; my $ans = shift; return verifyUserChoice($self, $ans); }, ['dialog_assysuser_prompt'] ); sub getDialogs { return ($asserveradmin, $asport, $ashostip, $assysuser); } 1; 389-admin-1.1.35/admserv/newinst/src/AdminMigration.pm.in000066400000000000000000000437171220472121400230050ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package AdminMigration; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(migrateAdminServer); @EXPORT_OK = qw(migrateAdminServer); # load perldap use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils qw(normalizeDN); use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn); use Migration; use AdminServer; use AdminUtil; use DSUtil; use DSUpdate; use SetupLog; use File::Path; use File::Spec; # tempfiles use File::Temp qw(tempfile tempdir); use strict; # This gathers all of the old information from the old # scattered config files and updates the corresponding # parameters in the $mig->{inf} sub getOldFileInfo { my $mig = shift; # assume the config DS has already been migrated # we need to get our data out of there, and fix it # as needed my $oldAdmConf = getAdmConf($mig->{oldsroot} . "/admin-serv/config"); $mig->{inf}->{admin}->{sie} = $oldAdmConf->{sie}; $mig->{inf}->{admin}->{isie} = $oldAdmConf->{isie}; if (defined($oldAdmConf->{ldapStart})) { $mig->{inf}->{admin}->{ldapStart} = $oldAdmConf->{ldapStart}; } if (!defined($mig->{inf}->{General}->{FullMachineName}) or !defined($mig->{inf}->{admin}->{ServerIpAddress}) or !defined($mig->{inf}->{admin}->{Port})) { my $oldPset = getPset($oldAdmConf); if (!defined($mig->{inf}->{General}->{FullMachineName})) { $mig->{inf}->{General}->{FullMachineName} = $oldPset->{serverhostname}; } if (!defined($mig->{inf}->{admin}->{ServerIpAddress})) { $mig->{inf}->{admin}->{ServerIpAddress} = $oldPset->{'configuration.nsserveraddress'}; } if (!defined($mig->{inf}->{admin}->{Port})) { $mig->{inf}->{admin}->{Port} = $oldPset->{'configuration.nsserverport'}; } } # need sie, isie, config ds url, admin id if (!defined($mig->{inf}->{General}->{ConfigDirectoryLdapURL})) { if (!open(DBSWITCH, $mig->{oldsroot} . "/shared/config/dbswitch.conf")) { $mig->msg('error_opening_dbswitch', $mig->{oldsroot} . "/shared/config/dbswitch.conf", $!); return 0; } while () { if (/^directory default (.*)$/) { $mig->{inf}->{General}->{ConfigDirectoryLdapURL} = $1; } } close(DBSWITCH); } if (!defined($mig->{inf}->{General}->{ConfigDirectoryAdminID})) { if (!open(ADMPW, $mig->{oldsroot} . "/admin-serv/config/admpw")) { $mig->msg('error_opening_ldapconf', $mig->{oldsroot} . "/admin-serv/config/admpw", $!); return 0; } while () { next if (/^#/); if (/^(.*):.*$/) { $mig->{inf}->{General}->{ConfigDirectoryAdminID} = $1; } } close(ADMPW); } if (!defined($mig->{inf}->{General}->{SuiteSpotGroup}) or !defined($mig->{inf}->{General}->{SuiteSpotUserID})) { if (!open(SSUSERS, $mig->{oldsroot} . "/shared/config/ssusers.conf")) { $mig->msg('error_opening_ssusersconf', $mig->{oldsroot} . "/shared/config/ssusers.conf", $!); return 0; } while () { if (/^SuiteSpotGroup\s+(.*)$/) { if (!defined($mig->{inf}->{General}->{SuiteSpotGroup})) { $mig->{inf}->{General}->{SuiteSpotGroup} = $1; } } if (/^SuiteSpotUser\s+(.*)$/) { if (!defined($mig->{inf}->{General}->{SuiteSpotUserID})) { $mig->{inf}->{General}->{SuiteSpotUserID} = $1; } } } close(SSUSERS); } if (!defined($mig->{inf}->{General}->{AdminDomain})) { my @rdns = ldap_explode_dn($mig->{inf}->{admin}->{isie}, 1); $mig->{inf}->{General}->{AdminDomain} = $rdns[-2]; } # the old admin server used to run as root - we cannot do that anymore # with Apache based admin server, so by default just use the SuiteSpotUserID # i.e. the same user id that the directory server uses # and if that is not defined, we'll just have to use the default if (!defined($mig->{inf}->{admin}->{SysUser})) { $mig->{inf}->{admin}->{SysUser} = $mig->{inf}->{General}->{SuiteSpotUserID} || "@httpduser@"; } if (!defined($mig->{inf}->{General}->{SuiteSpotGroup})) { $mig->{inf}->{General}->{SuiteSpotGroup} = "@httpdgroup@"; } return 1; } # This is how we extract the sie and isie as the as entries are # being added sub migratecb { my ($context, $entry, $errs) = @_; my @arycontext = ($context); # always replace the tasks and commands with the new ones my $dn = $entry->getDN(); if (($entry->getDN() =~ /^cn=Tasks/i) or ($entry->getDN() =~ /^cn=Commands/i)) { push @arycontext, 1; # means to delete any existing entries first } my $rc = check_and_add_entry(\@arycontext, $entry, $errs); return $rc; } # The config DS should have already been migrated, including the old # admin server data. We need to update that information. Some of the # fields no longer apply (userPassword, configuration.encryption.nsCertFile, # configuration.encryption.nsKeyFile, serverRoot) # some of the fields must be removed (any ssl2 fields) # some of the fields must be changed (nsSuiteSpotUser) sub migratePset { my $mig = shift; my $configdir = shift; my $inf = $mig->{inf}; my @errs; my $conn = $mig->{inf}->{configdsconn}; # add the Admin Server configuration entries my @ldiffiles = ("@ldifdir@/asmigrate.ldif.tmpl", "@ldifdir@/21astasks.ldif.tmpl", "@ldifdir@/22ascommands.ldif.tmpl" ); my @infs = getInfs("admin", "setup"); my $mapper = new Inf("@infdir@/asmigrate.map"); $mapper = process_maptbl($mapper, \@errs, $inf, @infs); if (!$mapper) { $mig->msg(@errs); $mig->msg($FATAL, 'error_creating_asmigration_maptbl'); return 0; } # update isie and sie getMappedEntries($mapper, \@ldiffiles, \@errs, \&migratecb, $conn); if (@errs) { $mig->msg(@errs); return 0; } my $localconf = "$configdir/local.conf"; my $isnew; if (! -f $localconf) { $isnew = 1; } if (!open(LOCALCONF, ">$localconf")) { $mig->msg($FATAL, 'error_updating_localconf', $localconf, $!); return 0; } # now get the entries and write them to local.conf my $entry = $conn->search($inf->{admin}->{sie}, "sub", "(objectclass=*)"); if (!$entry || $conn->getErrorCode()) { $mig->msg($FATAL, 'error_no_localconf_entries', $inf->{admin}->{sie}, $localconf, $conn->getErrorString()); close(LOCALCONF); return 0; } while ($entry) { updateLocalConf($entry, $inf->{admin}->{sie}, \*LOCALCONF); $entry = $conn->nextEntry(); } close(LOCALCONF); if ($isnew) { my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; chmod 0600, "$localconf"; chown $uid, -1, "$localconf"; } return 1; } sub updateconinfocb { my ($context, $entry, $errs) = @_; my @arycontext = ($context); # add or update all of the entries except for the UserDirectory my $dn = $entry->getDN(); if (($entry->getDN() =~ /^cn=UserDirectory/i)) { return 1; # return true, continue } my $rc = check_and_add_entry(\@arycontext, $entry, $errs); return $rc; } # this updates any information in the configDS that pertains # to the console being upgraded sub updateConsoleInfo { my $mig = shift; my $configdir = shift; my $inf = $mig->{inf}; my @errs; my $conn = $mig->{inf}->{configdsconn}; if (@errs) { $mig->msg($FATAL, @errs); return 0; } # update the console info my @ldiffiles = ("@ldifdir@/02globalpreferences.ldif.tmpl" ); my @infs = getInfs("admin", "slapd", "setup"); my $mapper = new Inf("@infdir@/updateconsoleinfo.map"); $mapper = process_maptbl($mapper, \@errs, $inf, @infs); if (!$mapper) { $mig->msg(@errs); $mig->msg($FATAL, 'error_creating_updateconsole_maptbl'); return 0; } # update isie and sie getMappedEntries($mapper, \@ldiffiles, \@errs, \&updateconinfocb, $conn); if (@errs) { $mig->msg(@errs); return 0; } # now, copy over any customization entries my $basedn = "ou=Admin, ou=Global Preferences, ou=" . $inf->{General}->{AdminDomain} . ", o=NetscapeRoot"; my $versents = $conn->search($basedn, "sub", "(objectclass=*)", 0, qw(* aci)); if (!$versents) { $mig->msg($FATAL, 'error_migrating_console_entries', $basedn, $conn->getErrorString()); return 0; } my @oldents = (); for ($versents; $versents; $versents = $conn->nextEntry()) { push @oldents, $versents; } for (@oldents) { my $olddn = $_->getDN(); my $ver = getInfsVal('admin', 'ConsoleVersion', @infs); if (($olddn =~ /ou=(\d.\d)/) && ($1 ne $ver)) { my $newdn = $olddn; $newdn =~ s/ou=$1/ou=$ver/; my $newent = $_; $newent->setDN($newdn); $conn->add($newent); if ($conn->getErrorCode() == LDAP_SUCCESS) { debug(3, "Added new console customization entry $newdn\n"); } elsif ($conn->getErrorCode() == LDAP_ALREADY_EXISTS) { debug(3, "Console customization entry $newdn already exists, skipping\n"); } else { $mig->msg($FATAL, 'error_adding_console_entries', $newdn, $conn->getErrorString()); return 0; } } else { debug(3, "Skipping entry $olddn - do not need to migrate it\n"); } } return 1; } sub migrateSecurityFiles { my $mig = shift; my $configdir = shift; my $admConf = getAdmConf($configdir); my $sie = $admConf->{sie}; my @rdns = ldap_explode_dn($sie, 1); my $inst = $rdns[0]; my $rc = $mig->migrateSecurityFiles($inst, $configdir); my $haspinfile; if (-f $mig->{oldsroot} . "/admin-serv/config/password.conf") { if (system ("cp -p $mig->{oldsroot}/admin-serv/config/password.conf $configdir/pin.txt")) { $mig->msg('error_copying_passwordconf', "$mig->{oldsroot}/admin-serv/config/password.conf", $!); return 0; } } return 1; } sub updateConfFileSecInfo { my $mig = shift; my $configdir = shift; my $haspinfile; for (glob("$configdir/*")) { if (/pin\.txt$/) { $haspinfile = 1; } } # if the user has specified a pin file, we need to let nss.conf know if ($haspinfile) { if (!open(NSSCONF, "$configdir/nss.conf")) { $mig->msg('error_opening_nssconf', "$configdir/nss.conf", $!); return 0; } my @nssconf = ; close(NSSCONF); # nss.conf is usually read-only chmod 0600, "$configdir/nss.conf"; if (!open(NSSCONF, ">$configdir/nss.conf")) { $mig->msg('error_writing_nssconf', "$configdir/nss.conf", $!); chmod 0400, "$configdir/nss.conf"; return 0; } my $found; for (@nssconf) { if (/^NSSPassPhraseDialog/) { $found = 1; $_ = "NSSPassPhraseDialog file:$configdir/pin.txt\n"; } print NSSCONF $_; } if (!$found) { print NSSCONF "NSSPassPhraseDialog file:$configdir/pin.txt\n"; } close(NSSCONF); chmod 0400, "$configdir/nss.conf"; } # update console.conf with security info my $pset = getPset($configdir); if (defined($pset->{'configuration.nsserversecurity'}) and ($pset->{'configuration.nsserversecurity'} =~ /on/i)) { my $certname = $pset->{'configuration.encryption.rsa.nssslpersonalityssl'}; my $clientauth = $pset->{'configuration.encryption.nssslclientauth'}; if (!open(CONSOLECONF, "$configdir/console.conf")) { $mig->msg('error_opening_consoleconf', "$configdir/console.conf", $!); return 0; } my @consoleconf = ; close(CONSOLECONF); if (!open(CONSOLECONF, "> $configdir/console.conf")) { $mig->msg('error_writing_consoleconf', "$configdir/console.conf", $!); return 0; } for (@consoleconf) { if (/^NSSEngine/) { $_ = "NSSEngine on\n"; } elsif (/^NSSNickname/) { $_ = "NSSNickname $certname\n"; } elsif (/^NSSVerifyClient/) { if ($clientauth =~ /on/) { $_ = "NSSVerifyClient require\n"; } else { $_ = "NSSVerifyClient none\n"; } } print CONSOLECONF $_; } close(CONSOLECONF); } return 1; } sub migrateAdmpw { my $mig = shift; my $configdir = shift; if (-f "$mig->{oldsroot}/admin-serv/config/admpw") { if (system ("cp -p $mig->{oldsroot}/admin-serv/config/admpw $configdir/admpw")) { $mig->msg('error_copying_admpw', "$mig->{oldsroot}/admin-serv/config/admpw", $!); return 0; } } return 1; } sub migrateAdminServer { my $mig = shift; my @errs; if (!stopAdminServer()) { return 0; } my $configdir = $mig->{inf}->{admin}->{config_dir} || $ENV{ADMSERV_CONF_DIR} || $mig->{configdir} . "/admin-serv"; my $securitydir = $mig->{inf}->{admin}->{security_dir} || $configdir; my $logdir = $mig->{inf}->{admin}->{log_dir} || $ENV{ADMSERV_LOG_DIR} || "@logdir@"; my $rundir = $mig->{inf}->{admin}->{run_dir} || $ENV{ADMSERV_PID_DIR} || "@piddir@"; if (!getOldFileInfo($mig, $configdir)) { return 0; } if (!createASFilesAndDirs($mig, $configdir, $securitydir, $logdir, $rundir)) { return 0; } # change branding information $mig->{inf}->{admin}->{sie} =~ s/\bNetscape\b/@capbrand@/g; $mig->{inf}->{admin}->{isie} =~ s/\bNetscape\b/@capbrand@/g; # update ldapStart # if ldapStart is not an absolute path, we need to add # the directory server instance dir (ServerRoot) to it if ($mig->{inf}->{admin}->{ldapStart} && !File::Spec->file_name_is_absolute($mig->{inf}->{admin}->{ldapStart})) { debug(1, "Need to make ldapStart an absolute path - ", $mig->{ServerRoot}, "/", $mig->{inf}->{admin}->{ldapStart}, "\n"); $mig->{inf}->{admin}->{ldapStart} = $mig->{ServerRoot} . "/" . $mig->{inf}->{admin}->{ldapStart}; } if (!updateAdmConf({ldapurl => $mig->{inf}->{General}->{ConfigDirectoryLdapURL}, userdn => $mig->{inf}->{General}->{ConfigDirectoryAdminID}, SuiteSpotUserID => $mig->{inf}->{General}->{SuiteSpotUserID}, SuiteSpotGroup => $mig->{inf}->{General}->{SuiteSpotGroup}, sysuser => $mig->{inf}->{admin}->{SysUser}, sysgroup => $mig->{inf}->{General}->{SuiteSpotGroup}, AdminDomain => $mig->{inf}->{General}->{AdminDomain}, sie => $mig->{inf}->{admin}->{sie}, isie => $mig->{inf}->{admin}->{isie}, ldapStart => $mig->{inf}->{admin}->{ldapStart}}, $configdir)) { return 0; } if (!migrateSecurityFiles($mig, $configdir)) { return 0; } my $conn = getConfigDSConn($mig->{inf}->{General}->{ConfigDirectoryLdapURL}, $mig->{inf}->{General}->{ConfigDirectoryAdminID}, $mig->{inf}->{General}->{ConfigDirectoryAdminPwd}, $configdir, \@errs); if (@errs) { $mig->msg($FATAL, @errs); return 0; } $mig->{inf}->{configdsconn} = $conn; $mig->{inf}->{slapd}->{updatedir} = "@updatedir@"; my @errs; if (@errs = updateDS($mig)) { $conn->close(); $mig->msg(@errs); return 0; } my $admConf = getAdmConf($configdir); $mig->{inf}->{admin}->{sie} = $admConf->{sie}; $mig->{inf}->{admin}->{isie} = $admConf->{isie}; if (!migratePset($mig, $configdir)) { $conn->close(); return 0; } if (!updateConsoleInfo($mig, $configdir)) { $conn->close(); return 0; } $conn->close(); if (!migrateAdmpw($mig, $configdir)) { return 0; } if (!updateConfFileSecInfo($mig, $configdir)) { return 0; } $mig->msg('updating_httpconf'); if (!updateHttpConfFiles($mig->{inf}->{admin}->{ServerIpAddress}, $mig->{inf}->{admin}->{Port}, $configdir)) { $mig->msg($FATAL, 'error_updating_httpconf'); return 0; } if (!setFileOwnerPerms($mig, $configdir)) { return 0; } # Update selinux policy updateSelinuxPolicy($mig, $configdir, $securitydir, $logdir, $rundir); if (!startAdminServer($mig, $configdir, $logdir, $rundir)) { return 0; } return 1; } # obligatory module true return 1; # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/AdminServer.pm.in000066400000000000000000000672671220472121400223300ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package AdminServer; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(createAdminServer reconfigAdminServer createASFilesAndDirs setFileOwnerPerms updateHttpConfFiles startAdminServer stopAdminServer removeAdminServer setDefaults updateSelinuxPolicy); @EXPORT_OK = qw(createAdminServer reconfigAdminServer createASFilesAndDirs setFileOwnerPerms updateHttpConfFiles startAdminServer stopAdminServer removeAdminServer setDefaults updateSelinuxPolicy); use File::Path; # tempfiles use File::Temp qw(tempfile tempdir); # load perldap use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils qw(normalizeDN); use Mozilla::LDAP::API qw(ldap_url_parse); use Mozilla::LDAP::LDIF; use DSUtil; use Inf; use Setup; use AdminUtil; sub setDefaults { my $setup = shift; if (!defined($setup->{inf}->{admin}->{ServerIpAddress})) { $setup->{inf}->{admin}->{ServerIpAddress} = '@admservip@'; } if (!defined($setup->{inf}->{admin}->{Port})) { $setup->{inf}->{admin}->{Port} = @admservport@; } if (!defined($setup->{inf}->{admin}->{SysUser})) { my $user = $setup->{inf}->{General}->{SuiteSpotUserID}; if (!defined($user)) { if ($> == 0) { # if root, use the default user $user = "@httpduser@"; } else { # if not root, use the user's uid $user = getLogin; } } $setup->{inf}->{admin}->{SysUser} = $user; } if (!defined($setup->{inf}->{admin}->{ServerAdminID})) { my $id = $setup->{inf}->{General}->{ConfigDirectoryAdminID}; if (isValidDN($id)) { $id =~ s/^(.*)=.*/$1/; } $setup->{inf}->{admin}->{ServerAdminID} = $id; } if (!defined($setup->{inf}->{admin}->{ServerAdminPwd})) { my $pwd = $setup->{inf}->{General}->{ConfigDirectoryAdminPwd}; $setup->{inf}->{admin}->{ServerAdminPwd} = $pwd; } return 1; } sub checkRequiredParameters { my $setup = shift; for my $asparam (qw(ServerIpAddress Port SysUser ServerAdminID ServerAdminPwd)) { if (!defined($setup->{inf}->{admin}->{$asparam})) { $setup->msg($FATAL, "missing_adminserver_param", $asparam); return 0; } } for my $general (qw(AdminDomain SuiteSpotUserID SuiteSpotGroup ConfigDirectoryLdapURL)) { if (!defined($setup->{inf}->{General}->{$general})) { $setup->msg($FATAL, "missing_general_param", $general); return 0; } } return 1; } sub setFileOwnerPerms { my $setup = shift; my $configdir = shift; my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; # chown the config directory $! = 0; # clear errno chown $uid, -1, $configdir; if ($!) { $setup->msg($FATAL, 'error_chowning_file', $configdir, $admConf->{sysuser}, $!); return 0; } # chown and chmod other files appropriately for (glob("$configdir/*")) { # these are owned by root next if (/httpd.conf$/); next if (/nss.conf$/); next if (/admserv.conf$/); next if (! -f $_); # should never happen # all other files should be owned by SysUser $! = 0; # clear errno chown $uid, -1, $_; if ($!) { $setup->msg($FATAL, 'error_chowning_file', $_, $admConf->{sysuser}, $!); return 0; } # the files should be writable $! = 0; # clear errno chmod 0600, $_; if ($!) { $setup->msg($FATAL, 'error_chmoding_file', $_, $!); return 0; } } return 1; } sub createASFilesAndDirs { my $setup = shift; my $configdir = shift; my $securitydir = shift; my $logdir = shift; my $rundir = shift; my $uid = getpwnam $setup->{inf}->{admin}->{SysUser}; my $gid = getgrnam $setup->{inf}->{General}->{SuiteSpotGroup}; $setup->msg('create_adminserver_filesdirs'); # these paths are owned exclusively by admin sever my @errs; for ($configdir, $securitydir, $logdir) { @errs = makePaths($_, 0700, $setup->{inf}->{admin}->{SysUser}, $setup->{inf}->{General}->{SuiteSpotGroup}); if (@errs) { $setup->msg($FATAL, @errs); return 0; } $! = 0; # clear errno chmod 0700, $_; if ($!) { $setup->msg($FATAL, 'error_chmoding_directory', $_, $!); return 0; } chown $uid, -1, $_; if ($!) { $setup->msg($FATAL, 'error_chowning_directory', $_, $setup->{inf}->{admin}->{SysUser}, $!); return 0; } } # these paths are shared by SuiteSpotGroup members @errs = makePaths($rundir, 0770, $setup->{inf}->{admin}->{SysUser}, $setup->{inf}->{General}->{SuiteSpotGroup}); if (@errs) { $setup->msg($FATAL, @errs); return 0; } $! = 0; # clear errno chmod 0770, $rundir; if ($!) { $setup->msg($FATAL, 'error_chmoding_directory', $rundir, $!); return 0; } chown -1, $gid, $rundir; if ($!) { $setup->msg($FATAL, 'error_chgrping_directory', $rundir, $setup->{inf}->{General}->{SuiteSpotGroup}, $!); return 0; } return 1; } sub makeConfFiles { my $setup = shift; my $configdir = shift; my @start_slapd; if ($setup->{inf}->{slapd}->{SlapdConfigForMC} =~ /yes/i) { my $inst_dir = $setup->{inf}->{slapd}->{inst_dir}; @start_slapd = ('ldapStart', "$inst_dir/start-slapd"); } $setup->msg('updating_admconf'); my $rc = updateAdmConf({ldapurl => $setup->{inf}->{General}->{ConfigDirectoryLdapURL}, SuiteSpotUserID => $setup->{inf}->{General}->{SuiteSpotUserID}, SuiteSpotGroup => $setup->{inf}->{General}->{SuiteSpotGroup}, sysuser => $setup->{inf}->{admin}->{SysUser}, sysgroup => $setup->{inf}->{General}->{SuiteSpotGroup}, AdminDomain => $setup->{inf}->{General}->{AdminDomain}, @start_slapd}, $configdir); if (!$rc) { $setup->msg($FATAL, 'error_updating_admconf', $!); return 0; } $setup->msg('updating_admpw'); $rc = updateAdmpw($setup->{inf}->{admin}->{ServerAdminID}, $setup->{inf}->{admin}->{ServerAdminPwd}, $configdir); if (!$rc) { $setup->msg($FATAL, 'error_updating_admpw'); return 0; } return 1; } # sub addDefaultSecurityInfo { # my $setup = shift; # my $inf = $setup->{inf}; # my $configdir = shift; # my $reconfig = shift; # my @errs; # my $admConf = getAdmConf($configdir); # my $localconf = "$configdir/local.conf"; # if (!open(LOCALCONF, ">$localconf")) { # $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); # return 0; # } # if (!open(CONSOLECONF, "$admConf->{configdir}/console.conf")) { # debug(0, "Error opening $admConf->{configdir}/console.conf: $!"); # return 0; # } # print LOCALCONF "configuration.Encryption\n"; # close(LOCALCONF); # return 1; # } # This is how we extract the sie and isie as the as entries are # being added sub registercb { my ($context, $entry, $errs) = @_; my $rc = check_and_add_entry([$context->{conn}], $entry, $errs); my $setup = $context->{setup}; if ($rc) { if ($entry->hasValue('objectclass', 'nsApplication', 1)) { $context->{isie} = $entry->getDN(); } elsif ($entry->hasValue('objectclass', 'nsAdminServer', 1)) { $context->{sie} = $entry->getDN(); } if ($context->{sie}) { $rc = updateLocalConf($entry, $context->{sie}, $context->{localfh}); if (!$rc) { $setup->msg($FATAL, 'error_updating_localconf_entry', $entry->getDN()); } } } else { $setup->msg(@{$errs}); $setup->msg($FATAL, 'error_adding_adminserver_config_entry', $entry->getDN()); } return $rc; } sub registerASWithConfigDS { my $setup = shift; my $inf = $setup->{inf}; my $configdir = shift; my @errs; $setup->msg('registering_adminserver'); # open a connection to the configuration directory server my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL}, $inf->{General}->{ConfigDirectoryAdminID}, $inf->{General}->{ConfigDirectoryAdminPwd}, $configdir, \@errs); if (@errs) { $setup->msg($FATAL, @errs); return 0; } # add the Admin Server configuration entries my @ldiffiles = ("@ldifdir@/20asdata.ldif.tmpl", "@ldifdir@/21astasks.ldif.tmpl", "@ldifdir@/22ascommands.ldif.tmpl" ); my @infs = getInfs("admin", "setup"); my $mapper = new Inf("@infdir@/adminserver.map"); $mapper = process_maptbl($mapper, \@errs, $inf, @infs); if (!$mapper or @errs) { $conn->close(); $setup->msg(@errs); $setup->msg($FATAL, 'error_creating_adminserver_maptbl'); return 0; } # context will get filled in with isie and sie in registercb my $localconf = "$configdir/local.conf"; my $isnew; if (! -f $localconf) { $isnew = 1; } if (!open(LOCALCONF, ">$localconf")) { $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); return 0; } my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup}; getMappedEntries($mapper, \@ldiffiles, \@errs, \®istercb, $context); close(LOCALCONF); if ($isnew) { my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; chmod 0600, "$localconf"; chown $uid, -1, "$localconf"; } $setup->msg('updating_admconf_configds'); if ($context->{sie} or $context->{isie}) { if (!updateAdmConf({sie => $context->{sie}, isie => $context->{isie}, userdn => $conn->{adminbinddn}}, $configdir)) { $setup->msg($FATAL, 'error_updating_admconf', $!); return 0; } } $conn->close(); return @errs ? 0 : 1; } # update other config files - these are the fields which users typically want to # change during an install or an upgrade, that also must be synced to the Apache # style config files - we use the config CGI in command line mode because it # already has all of the logic to update the files correctly sub updateHttpConfFiles { my $serverAddress = shift; my $port = shift; my $configdir = shift; my $origport = shift; my $admConf = getAdmConf($configdir); my $user = $admConf->{sysuser}; # this is required on some platforms in order to execute the config command my $savepath = $ENV{SHLIB_PATH} || $ENV{LD_LIBRARY_PATH}; $ENV{LD_LIBRARY_PATH} = ""; libpath_add("@LIBPATH@"); libpath_add("$savepath"); $ENV{SHLIB_PATH} = $ENV{LD_LIBRARY_PATH}; my $cmd = "@cgibindir@/config op=set configuration.nsSuiteSpotUser=\"$user\""; if (!defined($origport) or ($port != $origport)) { # need to change the port number $cmd .= " configuration.nsServerPort=\"$port\""; } if ($serverAddress) { $cmd .= " configuration.nsServerAddress=\"$serverAddress\""; } $? = 0; # clear error my $output = `$cmd 2>&1`; # Check the output of the config CGI to see if something bad happened. if ($? || $output =~ /NMC_Status: 1/) { debug(0, "Error updating console.conf:\n"); debug(0, $output); $ENV{LD_LIBRARY_PATH} = $savepath; $ENV{SHLIB_PATH} = $savepath; return 0; } debug(1, $output); $ENV{LD_LIBRARY_PATH} = $savepath; $ENV{SHLIB_PATH} = $savepath; # update Group in console.conf if ($admConf->{sysgroup}) { if (!open(CONSOLECONF, "$admConf->{configdir}/console.conf")) { debug(0, "Error opening $admConf->{configdir}/console.conf: $!"); return 0; } my @contents = ; close (CONSOLECONF); grep { s/^Group.*$/Group $admConf->{sysgroup}/ } @contents; if (!open(CONSOLECONF, ">$admConf->{configdir}/console.conf")) { debug(0, "Error writing new group $admConf->{sysgroup} to $admConf->{configdir}/console.conf: $!"); return 0; } print CONSOLECONF @contents; close (CONSOLECONF); } my @savefiles = qw(admserv.conf httpd.conf nss.conf console.conf cert8.db key3.db secmod.db); if (! -d "$admConf->{configdir}/bakup") { if (system ("mkdir -p $admConf->{configdir}/bakup")) { debug(0, "Error backing up $admConf->{configdir}/console.conf failed: $!"); } } # backup savefiles for "remove-ds-admin.pl -a" foreach my $savefile (@savefiles) { if (! -f "$admConf->{configdir}/bakup/$savefile") { if (system ("cp -p $admConf->{configdir}/$savefile $admConf->{configdir}/bakup")) { debug(0, "Error backing up $admConf->{configdir}/$savefile failed: $!"); } } } return 1; } sub startAdminServer { my $setup = shift; my $configdir = shift; my $logdir = shift; my $rundir = shift; my $isrunning; $pidfile = "$rundir/@pidfile@"; if (-f $pidfile) { open(PIDFILE, $pidfile); my $pid = ; close(PIDFILE); if (kill 0, $pid) { $isrunning = 1; } } my ($fh, $filename) = tempfile("asstartupXXXXXX", UNLINK => 1, SUFFIX => ".log", DIR => File::Spec->tmpdir); close($fh); my $rc; my $selinux_cmd = ""; # If we're using selinux, start the server with the proper context # to allow the process to transition to the proper domain. if ("@with_selinux@") { $rc = system("/usr/sbin/selinuxenabled"); if ($rc == 0) { $selinux_cmd = "runcon -u system_u -r system_r -t initrc_t"; } } if ($isrunning) { $setup->msg('restarting_adminserver'); if ("@enable_service@") { $rc = system("service @package_name@ restart > $filename 2>&1"); } elsif ("@systemdsystemunitdir@") { $rc = system("/bin/systemctl restart @package_name@.service > $filename 2>&1"); } else { $rc = system("$selinux_cmd @cmdbindir@/restart-ds-admin > $filename 2>&1"); } } else { $setup->msg('starting_adminserver'); if ("@enable_service@") { $rc = system("service @package_name@ start > $filename 2>&1"); } elsif ("@systemdsystemunitdir@") { $rc = system("/bin/systemctl start @package_name@.service > $filename 2>&1"); } else { $rc = system("$selinux_cmd @cmdbindir@/start-ds-admin > $filename 2>&1"); } } open(STARTLOG, "$filename"); while () { $setup->msg('adminserver_startup_output', $_); } close(STARTLOG); unlink($filename); if ($rc) { $setup->msg($FATAL, 'error_starting_adminserver', $rc); return 0; } $setup->msg('success_starting_adminserver'); return 1; } sub createAdminServer { my $setup = shift; my $reconfig = shift; # setup has inf, res, and log if ($reconfig) { $setup->msg('begin_reconfig_adminserver'); } else { $setup->msg('begin_create_adminserver'); } if (!setDefaults($setup)) { return 0; } if (!checkRequiredParameters($setup)) { return 0; } my $configdir = $setup->{inf}->{admin}->{config_dir} || $ENV{ADMSERV_CONF_DIR} || $setup->{configdir} . "/admin-serv"; my $securitydir = $setup->{inf}->{admin}->{security_dir} || $configdir; my $logdir = $setup->{inf}->{admin}->{log_dir} || $ENV{ADMSERV_LOG_DIR} || "@logdir@"; my $rundir = $setup->{inf}->{admin}->{run_dir} || $ENV{ADMSERV_PID_DIR} || "@piddir@"; # if we're just doing the update, just register and return if ($setup->{update}) { if (!registerASWithConfigDS($setup, $configdir)) { return 0; } # Update SELinux policy if needed updateSelinuxPolicy($setup, $configdir, $securitydir, $logdir, $rundir); return 1; } if (!createASFilesAndDirs($setup, $configdir, $securitydir, $logdir, $rundir)) { return 0; } if (!makeConfFiles($setup, $configdir)) { return 0; } if (!registerASWithConfigDS($setup, $configdir)) { return 0; } $setup->msg('updating_httpconf'); if (!updateHttpConfFiles($setup->{inf}->{admin}->{ServerIpAddress}, $setup->{inf}->{admin}->{Port}, $configdir, $setup->{asorigport})) { $setup->msg($FATAL, 'error_updating_httpconf'); return 0; } if (!setFileOwnerPerms($setup, $configdir)) { return 0; } # Update SELinux policy if needed updateSelinuxPolicy($setup, $configdir, $securitydir, $logdir, $rundir); if (!startAdminServer($setup, $configdir, $logdir, $rundir)) { return 0; } # Force to make log files owned by admin user and group # to maintain consistency with the log files created via CGI/Console my $uid = getpwnam $setup->{inf}->{admin}->{SysUser}; my $gid = getgrnam $setup->{inf}->{General}->{SuiteSpotGroup}; # chown log files appropriately for (glob("$logdir/*")) { $! = 0; # clear errno debug(1, "Changing the owner of $_ to \($uid, $gid\)\n"); chown $uid, $gid, $_; if ($!) { $setup->msg($FATAL, 'error_chowning_file', $_, $admConf->{sysuser}, $!); return 0; } } if ($reconfig) { $setup->msg('end_reconfig_adminserver'); } else { $setup->msg('end_create_adminserver'); } return 1; } sub reconfigAdminServer { my $setup = shift; return createAdminServer($setup, 1); } sub stopAdminServer { my $prog = "@sbindir@/stop-ds-admin"; if ("@enable_service@") { $prog = "service @package_name@ stop"; } elsif ("@systemdsystemunitdir@") { $prog = "/bin/systemctl stop @package_name@.service"; } elsif (! -x $prog) { debug(1, "stopping admin server: no such program $prog: cannot stop server\n"); return 0; } $? = 0; # run the stop command my $output = `$prog 2>&1`; my $status = $?; debug(3, "stopping admin server returns status $status: output $output\n"); if ($status) { # Ignore the stop failure debug(1,"Warning: Could not stop admin server: status $status: output $output\n"); return 1; } debug(1, "Successfully stopped admin server\n"); return 1; } sub removeAdminServer { my $baseconfigdir = shift; my $force = shift; my $all = shift; if (!stopAdminServer()) { if ($force) { debug(1, "Warning: Could not stop admin server - forcing continue\n"); } else { debug(1, "Error: Could not stop admin server - aborting - use -f flag to force removal\n"); return ( [ 'error_stopping_adminserver', $! ] ); } } my $configdir = $ENV{ADMSERV_CONF_DIR} || $baseconfigdir . "/admin-serv"; my $securitydir = $configdir; my $logdir = $ENV{ADMSERV_LOG_DIR} || "@logdir@"; my $rundir = $ENV{ADMSERV_PID_DIR} || "@piddir@"; # Need to unlabel the port if we're using SELinux. if ("@with_selinux@") { my $port; # Read the console.conf file to find the port number. if (!open(CONSOLECONF, "$configdir/console.conf")) { if ($force) { debug(1, "Warning: Could not open $configdir/console.conf: $!"); } else { debug(1, "Error: Could not open $configdir/console.conf: $!"); return( [ 'error_reading_conffile', "$configdir/console.conf", $! ] ); } } else { # Find the Listen directive and read the port number. while () { if (/^Listen /g) { # The port is after the last ':' my @listenline = split(/:/); $port = $listenline[-1]; } } close(CONSOLECONF); } if (!$port) { if ($force) { debug(1, "Warning: Could not determine port number - forcing continue\n"); debug(1, "Warning: Port not removed from selinux policy correctly. Remove label manually using semanage.\n"); } else { debug(1, "Error: Could not determine port number - aborting - use -f flag to force removal\n"); return ( [ 'error_reading_port' ] ); } } else { # Attempt to remove the http_port_t label from the port used by Admin Server. my $semanage_err = `semanage port -d -t http_port_t -p tcp $port 2>&1`; if ($? != 0) { if ($semanage_err !~ /defined in policy, cannot be deleted/) { debug(1, "Warning: Port $port not removed from selinux policy correctly. Error: $semanage_err\n"); if (!$force) { return( [ 'error_removing_port_label', $port, $semanage_err ] ); } } } } # turn off the switch to allow admin server to connect to the ldap port $? = 0; # clear error my $cmd = "getsebool httpd_can_connect_ldap"; my $output = `$cmd 2>&1`; chomp($output); if ($output =~ /Error getting active value for httpd_can_connect_ldap/) { # this version of selinux does not support the boolean value debug(1, "This version of selinux does not support httpd_can_connect_ldap\n"); } elsif ($?) { $setup->msg($SetupLog::WARN, 'error_running_command', $cmd, $output, $!); } elsif ($output =~ /on$/) { $cmd = "setsebool -P httpd_can_connect_ldap off"; $? = 0; # clear error $output = `$cmd 2>&1`; chomp($output); if ($?) { $setup->msg($SetupLog::WARN, 'error_running_command', $cmd, $output, $!); } else { debug(1, "$cmd was successful\n"); } } else { debug(1, "selinux boolean httpd_can_connect_ldap is already off - $output\n"); } } # remove admin server files in $rundir my $file; for $file (glob("$rundir/admin-serv.*")) { unlink($file); } # remove admin server log dir if ($logdir =~ /admin-serv/) { # make sure directory has admin-serv in it somewhere if (!rmtree($logdir)) { debug(1, "Warning: Could not remove directory $logdir: $!\n"); if (!$force) { return ( [ 'error_removing_path', $logdir, $! ] ); } } } # remove config files my @savefiles = qw(admserv.conf httpd.conf nss.conf console.conf cert8.db key3.db secmod.db); if (opendir(CONFDIR, $configdir)) { while ($file = readdir(CONFDIR)) { next if ($file eq '.' || $file eq '..'); if (-d "$configdir/$file") { debug(1, "Skipping directory $configdir/$file - remove manually\n"); next; } if (grep /^$file$/, @savefiles) { debug(1, "saving file $configdir/$file\n"); } else { debug(1, "removing file $configdir/$file\n"); unlink("$configdir/$file"); } } closedir(CONFDIR); if ($all) { # restore backed up savefiles foreach my $savefile (@savefiles) { if (-f "$configdir/bakup/$savefile") { if (system ("mv $configdir/bakup/$savefile $configdir")) { debug(0, "Error Restoring $configdir/$savefile failed: $!"); } } } } # Clean up the bakup dir system ("rm -rf $configdir/bakup"); } else { debug(1, "Error: could not read config files in $configdir: $!"); if (!$force) { return ( [ 'error_removing_path', $configdir, $! ] ); } } return; } sub updateSelinuxPolicy { my $setup = shift; my $configdir = shift; my $securitydir = shift; my $logdir = shift; my $rundir = shift; # if selinux is not available, do nothing if ("@with_selinux@") { # run restorecon on all directories we created system("restorecon -R $configdir $securitydir $logdir $rundir"); # Label the selected port as http_port_t. if ($setup->{inf}->{admin}->{Port}) { my $need_label = 1; # check if the port is already labeled properly my $portline = `semanage port -l | grep http_port_t | grep tcp`; chomp($portline); $portline =~ s/http_port_t\s+tcp\s+//g; my @labeledports = split(/,\s+/, $portline); foreach my $labeledport (@labeledports) { if ($setup->{inf}->{admin}->{Port} == $labeledport) { $need_label = 0; last; } } if ($need_label == 1) { system("semanage port -a -t http_port_t -p tcp $setup->{inf}->{admin}->{Port}"); } } # turn on the switch to allow admin server to connect to the ldap port $? = 0; # clear error my $cmd = "getsebool httpd_can_connect_ldap"; my $output = `$cmd 2>&1`; chomp($output); if ($output =~ /Error getting active value for httpd_can_connect_ldap/) { # this version of selinux does not support the boolean value debug(1, "This version of selinux does not support httpd_can_connect_ldap\n"); } elsif ($?) { $setup->msg($SetupLog::WARN, 'error_running_command', $cmd, $output, $!); } elsif ($output =~ /off$/) { $cmd = "setsebool -P httpd_can_connect_ldap on"; $? = 0; # clear error $output = `$cmd 2>&1`; chomp($output); if ($?) { $setup->msg($SetupLog::WARN, 'error_running_command', $cmd, $output, $!); } else { debug(1, "$cmd was successful\n"); } } else { debug(1, "selinux boolean httpd_can_connect_ldap is already on - $output\n"); } } } sub libpath_add { my $libpath = shift; if ($libpath) { if ($ENV{'LD_LIBRARY_PATH'}) { $ENV{'LD_LIBRARY_PATH'} = "$ENV{'LD_LIBRARY_PATH'}:$libpath"; } else { $ENV{'LD_LIBRARY_PATH'} = "$libpath"; } } } 1; # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/AdminUtil.pm.in000066400000000000000000000700741220472121400217650ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package AdminUtil; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(getAdmConf getConfigDSConn createConfigDS createSubDS updateAdmConf updateAdmpw updateLocalConf importCACert getLocalConfigDS getPset registerDSWithConfigDS registerManyDSWithConfigDS createSubDSNoConn registerScatteredDSWithConfigDS getInfs getInfsVal unregisterDSWithConfigDS isConfigDS addConfigACIsToSubDS); @EXPORT_OK = qw(getAdmConf getConfigDSConn createConfigDS createSubDS updateAdmConf updateAdmpw updateLocalConf importCACert getLocalConfigDS getPset registerDSWithConfigDS registerManyDSWithConfigDS createSubDSNoConn registerScatteredDSWithConfigDS getInfs getInfsVal unregisterDSWithConfigDS isConfigDS addConfigACIsToSubDS); # load perldap use Mozilla::LDAP::Conn; use Mozilla::LDAP::Utils qw(normalizeDN); use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn); use Mozilla::LDAP::LDIF qw(enlist_values); use DSUtil; use Inf; use FileConn; use strict; # get the adminutil client configuration (adm.conf) # the file is in LDIF format # just return as a hash ref for easy key/value access # single valued attributes will have a single string value # multi valued attributes will have an array ref value sub getAdmConf { my $dir = shift || "@configdir@"; my $ret = {}; my $fname = "$dir/adm.conf"; if (-f $fname) { open( ADMCONF, "$fname" ) || die "Can't open $fname: $!"; my $in = Mozilla::LDAP::LDIF->new(*ADMCONF, \&read_file_URL_or_name); my @records = $in->get(undef); # read to end of file close(ADMCONF); @records = enlist_values(@records); for (@records) { # there should only be 1 record my %h = @{$_}; # cast $_ to an array and use that to init hash $ret = \%h; } $ret->{configdir} = $dir; } return $ret; } # pset info is from the local.conf file, also in LDIF format sub getPset { my $admConf = shift; my $configdir; if ($admConf) { if (ref($admConf)) { $configdir = $admConf->{configdir} || "@configdir@"; } else { $configdir = $admConf || "@configdir@"; } } my $ret = {}; my $fname = "$configdir/local.conf"; if (-f $fname) { open( LOCALCONF, "$fname" ) || die "Can't open $fname: $!"; my $in = new Mozilla::LDAP::LDIF(*LOCALCONF); while (my $ent = readOneEntry $in) { foreach my $attr (keys %{$ent}) { my @vals = $ent->getValues($attr); if (@vals > 1) { $ret->{$attr} = \@vals; # value is array ref } else { $ret->{$attr} = $vals[0]; # value is single string } } } close LOCALCONF; } return $ret; } sub getAdmpw { my $admConf = shift; my $configdir; if ($admConf) { if (ref($admConf)) { $configdir = $admConf->{configdir} || "@configdir@"; } else { $configdir = $admConf || "@configdir@"; } } my $ret = {}; my $fname = "$configdir/admpw"; if (-f $fname) { open( ADMPW, "$fname" ) || die "Can't open $fname: $!"; while () { chop; ($ret->{ServerAdminID}, $ret->{ServerAdminPwd}) = split /:/; last; } close ADMPW; } return $ret; } sub getCertDir { my $configdir = shift; # if configdir already ends in admin-serv, just use it if ($configdir =~ /admin-serv$/) { return $configdir; } # otherwise, assume configdir is the directory containing admin-serv return "$configdir/admin-serv"; } sub isConfigDS { my $inst = shift; my $configdir = shift; my $admConf = getAdmConf ($configdir); my $ldapstart = $admConf->{ldapStart}; my $expected = $inst . "/start-slapd"; if ( "$ldapstart" eq "$expected" ) { return 1; } else { return 0; } } sub getConfigDSConn { my $url = shift; my $id = shift; my $pwd = shift; my $configdir = shift; my $errs = shift; # for output errs - an array ref my $certdir; if (!$url or !$id) { my $admConf = getAdmConf($configdir); $url = $url || $admConf->{ldapurl}; $id = $id || $admConf->{userdn}; } my $h = ldap_url_parse($url); my $host = $h->{host}; my $port = $h->{port}; my $basedn = $h->{dn}; # If PerLDAP was build using OpenLDAP, we must check the URL scheme # to see if we're using LDAPS. If MozLDAP is being used, we need # to check for the secure option. if ($h->{scheme}) { if ($h->{scheme} eq "ldaps") { $certdir = getCertDir($configdir); } } elsif ($h->{options} & LDAP_URL_OPT_SECURE) { $certdir = getCertDir($configdir); } # first try anon bind # 3 is LDAPv3 - 1 means use nspr debug(3, "Attempting connection to " . $h->{host} . ":" . $h->{port} . " certdir $certdir configdir $configdir\n"); my $conn = new Mozilla::LDAP::Conn($h->{host}, $h->{port}, "", "", $certdir); my $errstr = "Success"; if ($conn) { $errstr = $conn->getErrorString(); } if (!$conn or ($errstr ne "Success")) { if ($conn) { $conn->close(); $conn = 0; } push @{$errs}, 'configds_open_error', $url, (($errstr eq "Success") ? 'unknown error' : $errstr); return $conn; } # if $id is not a dn, look up the dn if ($id !~ /=/) { my $ent = $conn->search($h->{dn}, "sub", "(uid=$id)", 1, 'dn'); $errstr = $conn->getErrorString(); if (!$ent or ($errstr ne "Success")) { $conn->close(); $conn = 0; push @{$errs}, 'configds_finddn_error', $id, $url, (($errstr eq "Success") ? 'unknown error' : $errstr); return $conn; } $id = $ent->getDN(); } if (!$conn->simpleAuth($id, $pwd)) { $errstr = $conn->getErrorString(); $conn->close(); $conn = 0; if ($errstr =~ /constraint/i) { push @{$errs}, 'configds_bindretry_error', $id, $url; } else { push @{$errs}, 'configds_bind_error', $id, $url, (($errstr eq "Success") ? 'unknown error' : $errstr); } return $conn; } $conn->setDefaultRebindProc($id, $pwd, LDAP_AUTH_SIMPLE); # store the binddn for later use $conn->{adminbinddn} = $id; return $conn; } sub verifyAdminDomain { my $conn = shift; my $url = shift; my $domain = shift; my $h = ldap_url_parse($url); my $dn = "ou=$domain, $h->{dn}"; my $ent = $conn->search($dn, "base", "(objectclass=*)", 1, 'dn'); my $errstr = $conn->getErrorString(); if (!$ent or ($errstr ne "Success")) { return ('configds_no_admindomain', $domain, $h->{dn}, (($errstr eq "Success") ? 'unknown error' : $errstr)); } return (); } # Take the slapd server instance specified in the slapd section of the given inf # and make it into a configuration directory server sub createConfigDS { my $inf = shift; my $errs = shift; # open a connection to the directory server my $conn = new Mozilla::LDAP::Conn($inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, $inf->{slapd}->{RootDNPwd}, $inf->{General}->{certdir}); my $errstr; if ($conn) { $errstr = $conn->getErrorString(); } if (!$conn or ($errstr ne "Success")) { @{$errs} = ('error_connection_failed', $inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, ($conn ? $errstr : "unknown")); if ($conn) { $conn->close(); } return 0; } # add the NetscapeRoot suffix @{$errs} = addSuffix($conn, "o=NetscapeRoot", "NetscapeRoot"); if (@{$errs}) { $conn->close(); return 0; } # add the o=NetscapeRoot tree using the mapper and ldif templates my @ldiffiles = ('@ldifdir@/01nsroot.ldif.tmpl', '@ldifdir@/02globalpreferences.ldif.tmpl', '@ldifdir@/12dsconfig.mod.tmpl', '@ldifdir@/13dsschema.mod.tmpl', '@ldifdir@/14dsmonitor.mod.tmpl', '@ldifdir@/16dssuffixadmin.mod.tmpl' ); my @infs = getInfs("slapd", "admin", "setup"); my $mapper = new Inf("@infdir@/configdsroot.map"); $mapper = process_maptbl($mapper, $errs, $inf, @infs); if (!$mapper or @{$errs}) { $conn->close(); if (!@{$errs}) { @{$errs} = ('error_creating_configds_maptbl'); } return 0; } getMappedEntries($mapper, \@ldiffiles, $errs, \&check_and_add_entry, [$conn]); $conn->close(); return @{$errs} ? 0 : 1; } sub internalCreateSubDS { my $conn = shift; my $inf = shift; my $errs = shift; my $force_pta = shift; my @additionalLdifFiles = @_; # add the o=NetscapeRoot tree using the mapper and ldif templates my @ldiffiles = ('@ldifdir@/12dsconfig.mod.tmpl', '@ldifdir@/13dsschema.mod.tmpl', '@ldifdir@/14dsmonitor.mod.tmpl' ); push @ldiffiles, @additionalLdifFiles; # If PTA is not enabled yet, we need to enable and configure it my $ent = $conn->search("cn=Pass Through Authentication,cn=plugins,cn=config", "base", "(objectclass=*)", 0, 'nsslapd-pluginenabled'); my $errstr = $conn->getErrorString(); if (!$ent or ($errstr ne "Success")) { $conn->close(); @{$errs} = ('error_finding_pta', (($errstr eq "Success") ? 'unknown error' : $errstr)); return 0; } if (($ent->hasValue("nsslapd-pluginenabled", "off", 1)) || $force_pta == 1) { push @ldiffiles, '@ldifdir@/15dspta.mod.tmpl'; } my @infs = getInfs("slapd", "admin", "setup"); my $mapper = new Inf("@infdir@/dirserver.map"); $mapper = process_maptbl($mapper, $errs, $inf, @infs); if (!$mapper or @{$errs}) { $conn->close(); if (!@{$errs}) { @{$errs} = ('error_creating_configds_maptbl'); } return 0; } getMappedEntries($mapper, \@ldiffiles, $errs, \&check_and_add_entry, [$conn]); $conn->close(); return @{$errs} ? 0 : 1; } # Take the slapd server instance specified in the slapd section of the given inf # and make it into a subordinative directory server # (no o=netscaperoot, with PTA setup) sub createSubDS { my $inf = shift; my $errs = shift; my $force_pta = shift; # open a connection to the directory server my $conn = new Mozilla::LDAP::Conn($inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, $inf->{slapd}->{RootDNPwd}, $inf->{General}->{certdir}); if (!$conn) { @{$errs} = ('error_connection_failed', $inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, "unknown"); return 0; } return internalCreateSubDS($conn, $inf, $errs, $force_pta, '@ldifdir@/16dssuffixadmin.mod.tmpl'); } # same as createSubDS but works directly on the dse.ldif file itself # this is suitable for use when creating a new DS instance on the local # machine, sub createSubDSNoConn { my $inf = shift; my $errs = shift; # $ENV{DS_CONFIG_DIR} is set in ds instance creation my $dsconfdir = $ENV{DS_CONFIG_DIR} || "@instconfigdir@/slapd-" . $inf->{slapd}->{ServerIdentifier}; my $dseldif = "$dsconfdir/dse.ldif"; my $conn = new FileConn($dseldif); if (!$conn) { @{$errs} = ('error_opening_dseldif', $dseldif, $!); return 0; } return internalCreateSubDS($conn, $inf, $errs, 0); } sub addConfigACIsToSubDS { my $inf = shift; my $errs = shift; # open a connection to the directory server my $conn = new Mozilla::LDAP::Conn($inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, $inf->{slapd}->{RootDNPwd}, $inf->{General}->{certdir}); if (!$conn) { @{$errs} = ('error_connection_failed', $inf->{General}->{FullMachineName}, $inf->{slapd}->{ServerPort}, $inf->{slapd}->{RootDN}, "unknown"); return 0; } my @ldiffiles = ('@ldifdir@/16dssuffixadmin.mod.tmpl'); my @infs = getInfs("slapd", "admin", "setup"); my $mapper = new Inf("@infdir@/dssuffixadmin.map"); $mapper = process_maptbl($mapper, $errs, $inf, @infs); if (!$mapper or @{$errs}) { $conn->close(); if (!@{$errs}) { @{$errs} = ('error_creating_configds_maptbl'); } return 0; } getMappedEntries($mapper, \@ldiffiles, $errs, \&check_and_add_entry, [$conn]); $conn->close(); return @{$errs} ? 0 : 1; } sub updateAdmConf { my $params = shift; # hashref my $configdir = shift || "@configdir@"; my $admConf = getAdmConf($configdir); my $isnew = 0; if (!$admConf || !%{$admConf}) { $isnew = 1; # create it } # update values in admConf with the passed in params while (my ($key,$val) = each %{$params}) { $admConf->{$key} = $val; } # write it out my $filename = "$configdir/adm.conf"; delete $admConf->{configdir}; # don't write this open(ADMCONF, "> $filename") || die "Can't write $filename: $!"; while (my ($key,$val) = each %{$admConf}) { next if (!defined($key) or !defined($val)); if (ref($val)) { for my $vv (@{$val}) { print ADMCONF "$key: $vv\n"; } } else { print ADMCONF "$key: $val\n"; } } close(ADMCONF); if ($isnew) { my $uid = getpwnam $admConf->{sysuser}; chmod 0600, "$filename"; chown $uid, -1, "$filename"; } return 1; } sub updateAdmpw { my $userid = shift; my $pwd = shift; my $configdir = shift || "@configdir@"; my $filename = "$configdir/admpw"; my $isnew = 0; if (! -f $filename) { $isnew = 1; } $pwd = getHashedPassword($pwd, "SHA"); open(ADMPW, ">$filename") or die "Error: can't write file $filename: $!"; print ADMPW "$userid:$pwd\n"; close(ADMPW); if ($isnew) { my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; chmod 0600, "$filename"; chown $uid, -1, "$filename"; } return 1; } # this is the prefix used for attribute names in the pset file sub getAttrNamePrefix { my $dn = shift; my $rootdn = shift; # the sie DN my @dnList = ldap_explode_dn($dn, 1); my @rootdnList = ldap_explode_dn($rootdn, 1); my $attrLen = scalar(@dnList) - scalar(@rootdnList); my $attrName = ""; while ($attrLen > 0) { if ($attrLen == 1) { $attrName .= $dnList[0]; } else { $attrName .= $dnList[$attrLen-1] . "."; } $attrLen--; } return $attrName; } # these are attributes not written to the pset my %nopsetattrs = ( cn => 'cn', aci => 'aci' ); # This is only used during setup. # When the admin server is running, changes # occur online, and the file contains a cache # of those changes # but during setup, we need to create the # local.conf as a bootstrap for the server sub updateLocalConf { my $entry = shift; my $siedn = shift; my $localfh = shift; # convert entry to pset format my $prefix = getAttrNamePrefix($entry->getDN(), $siedn); # write values to file foreach my $attr (keys %{$entry}) { next if $nopsetattrs{lc($attr)}; my $attrName; if ($prefix) { $attrName = $prefix . "." . $attr; } else { $attrName = $attr; } foreach my $val ($entry->getValues($attr)) { debug(3, "updateLocalConf: writing $attrName: $val\n"); print $localfh "$attrName: $val\n"; } } return 1; } sub importCACert { my $securitydir = shift; my $cacert = shift; # may be a file or the actual cert in ascii/pem format my @errs = (); # return if (! -d $securitydir) { @errs = ('securitydir_not_exist', $securitydir); return @errs; } if (! -w $securitydir) { @errs = ('securitydir_not_writable', $securitydir); return @errs; } # see if "CA certificate" already exists my $output = `certutil -L -d \"$securitydir\" 2>&1`; if ($output =~ /CA certificate/) { @errs = ('cacert_already_exists', $securitydir); return @errs; } if ($cacert =~ /^-----BEGIN CERTIFICATE-----/) { $! = 0; $? = 0; # clear error indicators if (!open(CERTUTIL, "|certutil -A -d \"$securitydir\" -a -t CT,, -n \"CA certificate\"")) { @errs = ("error_running_certutil", $!); return @errs; } print CERTUTIL $cacert, "\n"; close(CERTUTIL); if ($?) { @errs = ('error_return_certutil', $?, $!); return @errs; } } elsif (! -f $cacert) { @errs = ('cacertfile_not_found', $cacert); return @errs; } else { $! = 0; $? = 0; # clear error indicators $output = `certutil -A -d \"$securitydir\" -a -t CT,, -n \"CA certificate\" -i \"$cacert\" 2>&1`; if ($?) { @errs = ('error_return2_certutil', $?, $!, $output); return @errs; } } return @errs; } # if the config ds is local to this machine, return # the instance name (e.g. "localhost" for slapd-localhost) # if not, return null sub getLocalConfigDS { my $configdir = shift; my $admConf = getAdmConf($configdir); my $ldapStart = $admConf->{ldapStart}; my $inst; if (!$ldapStart) { return $inst; # empty } if ($ldapStart =~ /slapd-(.+?)\//) { $inst = $1; } return $inst; } # most admin server CGIs only use PASSWORD and USERDN sub getAuthCredentials { if ($AdminUtil::USER) { return ($AdminUtil::USER, $AdminUtil::PASSWORD, $AdminUtil::AUTHORIZATION, $AdminUtil::USERDN, $AdminUtil::SIEPWD); } if (!defined($ENV{PASSWORD_PIPE})) { return (); } my $fh; if (fileno(STDIN) == $ENV{PASSWORD_PIPE}) { $fh = \*STDIN; } else { open(INPUT, "<&=$ENV{PASSWORD_PIPE}") or die "Error: could not open PASSWORD_PIPE $ENV{PASSWORD_PIPE}: $!"; $fh = \*INPUT; } while (<$fh>) { if (/^User: (.*)$/) { $AdminUtil::USER = $1; } if (/^Password: (.*)$/) { $AdminUtil::PASSWORD = $1; } if (/^Authorization: (.*)$/) { $AdminUtil::AUTHORIZATION = $1; } if (/^UserDN: (.*)$/) { $AdminUtil::USERDN = $1; } if (/^SIEPWD: (.*)$/) { $AdminUtil::SIEPWD = $1; } } if (fileno(STDIN) != $ENV{PASSWORD_PIPE}) { close $fh; } return ($AdminUtil::USER, $AdminUtil::PASSWORD, $AdminUtil::AUTHORIZATION, $AdminUtil::USERDN, $AdminUtil::SIEPWD); } # this takes a list of DS instances and registers all of them # with the config DS sub registerManyDSWithConfigDS { my $inf = shift; my $errs = shift; my $configdir = shift; my @instances = @_; if (!@instances) { return 1; # no instances to register - just return ok } # open a connection to the configuration directory server my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL}, $inf->{General}->{ConfigDirectoryAdminID}, $inf->{General}->{ConfigDirectoryAdminPwd}, "$configdir/admin-serv", $errs); if (!$conn or @{$errs}) { return 0; } my $admConf = getAdmConf("$configdir/admin-serv"); for my $inst (@instances) { my $instinf = createInfFromConfig("$configdir/$inst", $inst); if ($instinf->{filename}) { unlink($instinf->{filename}); } $instinf->{General}->{ConfigDirectoryLdapURL} = $inf->{General}->{ConfigDirectoryLdapURL}; $instinf->{General}->{ConfigDirectoryAdminID} = $inf->{General}->{ConfigDirectoryAdminID}; $instinf->{General}->{AdminDomain} = $inf->{General}->{AdminDomain}; $instinf->{admin}->{ServerAdminID} = $inf->{admin}->{ServerAdminID}; if (!registerDSWithConfigDS($inst, $errs, $instinf, $conn, $admConf, $configdir)) { return 0; } } $conn->close(); return 1 } sub registerScatteredDSWithConfigDS { my $inf = shift; my $errs = shift; my $instances_ref = shift; my @configdirs = keys %{$instances_ref}; my $configdir = $configdirs[0]; # use the first configdir for admin-serv if ( ! $instances_ref ) { return 1; # no instances to register - just return ok } # open a connection to the configuration directory server my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL}, $inf->{General}->{ConfigDirectoryAdminID}, $inf->{General}->{ConfigDirectoryAdminPwd}, "$configdir/admin-serv", $errs); if (!$conn or @{$errs}) { return 0; } my $admConf = getAdmConf("$configdir/admin-serv"); for $configdir ( @configdirs ) { foreach my $dsinst ( @{$instances_ref->{$configdir}} ) { my $instinf = createInfFromConfig("$configdir/$dsinst", $dsinst); if ($instinf->{filename}) { unlink($instinf->{filename}); } $instinf->{General}->{ConfigDirectoryLdapURL} = $inf->{General}->{ConfigDirectoryLdapURL}; $instinf->{General}->{AdminDomain} = $inf->{General}->{AdminDomain}; if (!registerDSWithConfigDS($dsinst, $errs, $instinf, $conn, $admConf, $configdir)) { return 0; } } } $conn->close(); return 1 } sub registerDSWithConfigDS { my $servid = shift; my $errs = shift; my $inf = shift; my $conn = shift; my $admConf = shift; my $configdir = shift || "@instconfigdir@"; my $rc = registerDSWithConfigDSExt(1, $servid, $errs, $inf, $conn, $admConf, $configdir); return $rc; } sub unregisterDSWithConfigDS { my $servid = shift; my $errs = shift; my $inf = shift; my $conn = shift; my $admConf = shift; my $configdir = shift || "@instconfigdir@"; my $rc = registerDSWithConfigDSExt(0, $servid, $errs, $inf, $conn, $admConf, $configdir); return $rc; } sub registerDSWithConfigDSExt { my $isRegister = shift; my $servid = shift; my $errs = shift; my $inf = shift; my $conn = shift; my $admConf = shift; my $configdir = shift || "@instconfigdir@"; my $inst; my $needclose; if ($servid =~ /^slapd-/) { $inst = $servid; } else { $inst = "slapd-$servid"; } my ($dummy1, $pwd, $dummy2, $userdn) = getAuthCredentials(); if (!$inf->{General}->{AdminDomain}) { if (!$admConf) { $admConf = getAdmConf("$configdir/admin-serv"); } $inf->{General}->{AdminDomain} = $admConf->{AdminDomain}; } # open a connection to the configuration directory server if (!$conn) { if (!$userdn) { $userdn = $inf->{General}->{ConfigDirectoryAdminID}; } if (!$pwd) { $pwd = $inf->{General}->{ConfigDirectoryAdminPwd}; } $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL}, $userdn, $pwd, "$configdir/admin-serv", $errs); $needclose = 1; } if (!$conn or @{$errs}) { return 0; } # need to get the admin uid if (!$inf->{admin}->{ServerAdminID}) { my @rdns = ldap_explode_dn($inf->{General}->{ConfigDirectoryAdminID}, 1); if (@rdns and $rdns[0]) { $inf->{admin}->{ServerAdminID} = $rdns[0]; } else { # a userid not a dn $inf->{admin}->{ServerAdminID} = $inf->{General}->{ConfigDirectoryAdminID}; } } my $instinf; # setup will usually supply everything, but ds_create will not if ($isRegister && !$inf->{slapd}->{RootDNPwd}) { $instinf = createInfFromConfig("$configdir/$inst", $inst, $errs); if (!$instinf or @{$errs}) { if ($needclose) { $conn->close(); } return 0; } } my @ldiffiles = (); if ($isRegister) { # add the Admin Server configuration entries @ldiffiles = ("@ldifdir@/10dsdata.ldif.tmpl", "@ldifdir@/11dstasks.ldif.tmpl" ); } else { # remove the Admin Server configuration entries @ldiffiles = ("@ldifdir@/10rm_dsdata.ldif.tmpl"); } my @infs = getInfs("slapd", "setup", "admin"); my $mapper = new Inf("@infdir@/dirserver.map"); $mapper = process_maptbl($mapper, $errs, $inf, $instinf, @infs); if (!$mapper or @{$errs}) { if ($needclose) { $conn->close(); } return 0; } my $context = [$conn]; getMappedEntries($mapper, \@ldiffiles, $errs, \&check_and_add_entry, $context); if ($needclose) { $conn->close(); } return @{$errs} ? 0 : 1; } # return Inf objects for the given names - the names correspond # to .inf file names in the infdir - the list will be ordered # so that brand specific names come before generic names - # it is assumed in .inf processing that if a value is found # in an earlier Inf later Infs will be ignored sub getInfs { my @names = @_; my @ary; my @infs = glob("@infdir@/*.inf"); for my $name (@names) { for my $inffile (@infs) { if ($inffile =~ m,^@infdir@/.+-$name\.inf$,) { # brand specific debug(2, "Found brand specific inf file", $inffile, "\n"); push @ary, new Inf($inffile); } } } # added all brand specific inf files, if any - now add generic inf files for my $name (@names) { push @ary, new Inf("@infdir@/$name.inf"); } return @ary; } # get a value from a collection of Inf objects # given a section and a parameter, will return # the value from the first Inf that has the # section and value sub getInfsVal { my ($sec, $parm, @infs) = @_; for my $inf (@infs) { if ($inf and exists($inf->{$sec}) and defined($inf->{$sec}) and exists($inf->{$sec}->{$parm}) and defined($inf->{$sec}->{$parm})) { return $inf->{$sec}->{$parm}; } } return undef; } 1; # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/ConfigDSDialogs.pm000066400000000000000000000427751220472121400224400ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package ConfigDSDialogs; use strict; use Net::Domain qw(hostfqdn); use DialogManager; use Setup; use Dialog; use DSUtil; use Mozilla::LDAP::API qw(ldap_explode_dn); sub verifyConfigDSInfo { my $self = shift; my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; my $certdir; my @errs; if ($url =~ /^ldaps/) { if (!$self->{manager}->{inf}->{General}->{certdb} and !$self->{manager}->{inf}->{General}->{CACertificate}) { return ('dialog_configdsinfo_nocacert'); } if (!$self->{manager}->{inf}->{General}->{certdb}) { (@errs) = AdminUtil::importCACert($self->{manager}->{setup}->{configdir} . "/admin-serv", $self->{manager}->{inf}->{General}->{CACertificate}); if (@errs) { return @errs; } } } my $conn = AdminUtil::getConfigDSConn($url, $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID}, $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd}, $self->{manager}->{setup}->{configdir}, \@errs); if (@errs or !$conn) { $conn->close() if ($conn); return @errs if (@errs); return ('dialog_configdsinfo_unreachable', $url); } (@errs) = AdminUtil::verifyAdminDomain($conn, $url, $self->{manager}->{inf}->{General}->{AdminDomain}); $conn->close(); return @errs; } my $configdsinfo = new Dialog ( $EXPRESS, 'dialog_configdsinfo_text', sub { my $self = shift; my $index = shift; if ($index == 0) { # the url my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; if (!defined($url)) { my $host = $self->{manager}->{inf}->{General}->{FullMachineName} || hostfqdn; my $port = $self->{manager}->{inf}->{slapd}->{ServerPort} || 389; if (!portAvailable($port)) { $port = getAvailablePort(); } my $suffix = "o=NetscapeRoot"; $url = "ldap://$host:$port/$suffix"; } return $url; } elsif ($index == 1) { # the id return $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} || "admin"; } elsif ($index == 2) { # the password return undef; } elsif ($index == 3) { # admin domain my $admindomain = $self->{manager}->{inf}->{General}->{AdminDomain}; if (!defined($admindomain)) { $admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} || hostfqdn; $admindomain =~ s/^[^\.]*\.//; # just the domain part } return $admindomain; } else { # the CA cert my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; my $cert = $self->{manager}->{inf}->{General}->{CACertificate}; if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb} or ($cert =~ /^-----BEGIN CERTIFICATE-----/)) { # not using LDAPS, or already have a certdb - hide CA prompt $self->{prompts}->[4]->[2] = 1; } else { $self->{prompts}->[4]->[2] = 0; # unhide CA prompt } return $self->{manager}->{inf}->{General}->{CACertificate}; } }, sub { my $self = shift; my $ans = shift; my $index = shift; my $res = $DialogManager::SAME; if ($index == 0) { # validate URL? $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL} = $ans; my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb}) { # not using LDAPS, or already have a certdb - hide CA prompt $self->{prompts}->[4]->[2] = 1; } else { $self->{prompts}->[4]->[2] = 0; # unhide CA prompt } $res = $DialogManager::NEXT; } elsif ($index == 1) { # id $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} = $ans; $res = $DialogManager::NEXT; } elsif ($index == 2) { # pwd my $test = $ans; if ($test) { $test =~ s/\s//g; } if (!$ans or (length($test) != length($ans))) { $self->{manager}->alert("dialog_configdsadmin_invalid"); } else { $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; $res = $DialogManager::NEXT; } } elsif ($index == 3) { # admin domain $self->{manager}->{inf}->{General}->{AdminDomain} = $ans; $res = $DialogManager::NEXT; } else { # CA cert filename if ($ans && length($ans) && ($ans !~ /^-----BEGIN CERTIFICATE-----/) && ! -f $ans) { $self->{manager}->alert("dialog_configdsinfo_ca_error", $ans); } else { $self->{manager}->{inf}->{General}->{CACertificate} = $ans; $res = $DialogManager::NEXT; } } if (($index == 4) && ($res == $DialogManager::NEXT)) { my (@text) = verifyConfigDSInfo($self); if (@text) { $self->{manager}->alert(@text); $self->{manager}->alert('dialog_configdsinfo_tryagain'); $res = $DialogManager::FIRST; } } return $res; }, ['dialog_configdsinfo_url_prompt'], ['dialog_configdsinfo_id_prompt'], ['dialog_configdsinfo_pwd_prompt', 1], ['dialog_configdsinfo_domain_prompt'], ['dialog_configdsinfo_ca_prompt'] ); my $regconfigdsinfo = new Dialog ( $EXPRESS, 'dialog_configdsinfo_text', sub { my $self = shift; my $index = shift; if ($index == 0) { # the url my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; if (!defined($url)) { my $host = $self->{manager}->{inf}->{General}->{FullMachineName} || hostfqdn; my $port = $self->{manager}->{inf}->{slapd}->{ServerPort} || 389; if (!portAvailable($port)) { $port = getAvailablePort(); } my $suffix = "o=NetscapeRoot"; $url = "ldap://$host:$port/$suffix"; } return $url; } elsif ($index == 1) { # the id return $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} || "admin"; } elsif ($index == 2 || $index == 3) { # the password return undef; } elsif ($index == 4) { # admin domain my $admindomain = $self->{manager}->{inf}->{General}->{AdminDomain}; if (!defined($admindomain)) { $admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} || hostfqdn; $admindomain =~ s/^[^\.]*\.//; # just the domain part } return $admindomain; } else { # the CA cert my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; my $cert = $self->{manager}->{inf}->{General}->{CACertificate}; if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb} or ($cert =~ /^-----BEGIN CERTIFICATE-----/)) { # not using LDAPS, or already have a certdb - hide CA prompt $self->{prompts}->[5]->[2] = 1; } else { $self->{prompts}->[5]->[2] = 0; # unhide CA prompt } return $self->{manager}->{inf}->{General}->{CACertificate}; } }, sub { my $self = shift; my $ans = shift; my $index = shift; my $res = $DialogManager::SAME; if ($index == 0) { # validate URL? $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL} = $ans; my $url = $self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL}; if (($url !~ /^ldaps/) or $self->{manager}->{inf}->{General}->{certdb}) { # not using LDAPS, or already have a certdb - hide CA prompt $self->{prompts}->[5]->[2] = 1; } else { $self->{prompts}->[5]->[2] = 0; # unhide CA prompt } $res = $DialogManager::NEXT; } elsif ($index == 1) { # id $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} = $ans; $res = $DialogManager::NEXT; } elsif ($index == 2) { # pwd my $test = $ans; if ($test) { $test =~ s/\s//g; } if (!$ans or (length($test) != length($ans))) { $self->{manager}->alert("dialog_configdsadmin_invalid"); } else { $self->{firstpassword} = $ans; # save for next index $res = $DialogManager::NEXT; } } elsif ($index == 3) { # verify second password if ($ans ne $self->{firstpassword}) { $self->{manager}->alert("dialog_configdsadmin_nomatch"); } else { $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; $res = $DialogManager::NEXT; } } elsif ($index == 4) { # admin domain $self->{manager}->{inf}->{General}->{AdminDomain} = $ans; $res = $DialogManager::NEXT; } else { # CA cert filename if ($ans && length($ans) && ($ans !~ /^-----BEGIN CERTIFICATE-----/) && ! -f $ans) { $self->{manager}->alert("dialog_configdsinfo_ca_error", $ans); } else { $self->{manager}->{inf}->{General}->{CACertificate} = $ans; $res = $DialogManager::NEXT; } } return $res; }, ['dialog_configdsinfo_url_prompt'], ['dialog_configdsinfo_id_prompt'], ['dialog_configdsinfo_pwd_prompt', 1], ['dialog_configdsinfo_pwd2_prompt', 1], ['dialog_configdsinfo_domain_prompt', 0, 0], ['dialog_configdsinfo_ca_prompt'] ); my $configdsadmin = new Dialog ( $EXPRESS, 'dialog_configdsadmin_text', sub { my $self = shift; my $index = shift; my $id; if ($index == 0) { # return undef for password defaults $id = $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID}; if (!defined($id)) { $id = "admin"; } elsif (isValidDN($id)) { # must be a uid for this dialog my @rdns = ldap_explode_dn($id, 1); $id = $rdns[0]; } } return $id; }, sub { my $self = shift; my $ans = shift; my $index = shift; my $res = $DialogManager::SAME; if ($index == 0) { # verify DN if (($ans =~ /[\x00-\x20\x22\x2b\x2c\x3d\x5c\x7f\x80-\xff]/) && !isValidDN($ans)) { $self->{manager}->alert("dialog_configdsadmin_error", $ans); } else { $res = $DialogManager::NEXT; $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminID} = $ans; } } elsif ($index == 1) { # verify initial password if ($ans =~ /[\x80-\xff]/) { $self->{manager}->alert("dialog_configdsadmin_invalid"); } else { my $test = $ans; if ($test) { $test =~ s/\s//g; } if (!$ans or (length($test) != length($ans))) { $self->{manager}->alert("dialog_configdsadmin_invalid"); } else { $res = $DialogManager::NEXT; $self->{firstpassword} = $ans; # save for next index } } } elsif ($index == 2) { # verify second password if ($ans =~ /[\x80-\xff]/) { $self->{manager}->alert("dialog_configdsadmin_invalid"); } else { if ($ans ne $self->{firstpassword}) { $self->{manager}->alert("dialog_configdsadmin_nomatch"); } else { $self->{manager}->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; $res = $DialogManager::NEXT; } } } return $res; }, ['dialog_configdsadmin_prompt'], ['dialog_configdsadmin_pw1_prompt', 1], ['dialog_configdsadmin_pw2_prompt', 1] ); my $configdsadmindomain = new Dialog ( $TYPICAL, 'dialog_configdsadmindomain_text', sub { my $self = shift; my $admindomain = $self->{manager}->{inf}->{General}->{AdminDomain}; if (!defined($admindomain)) { $admindomain = $self->{manager}->{inf}->{General}->{FullMachineName} || hostfqdn; $admindomain =~ s/^[^\.]*\.//; # just the domain part } return $admindomain; }, sub { my $self = shift; my $ans = shift; my $res = $DialogManager::SAME; if ($ans =~ /[\x00-\x20\x22\x2b\x2c\x3d\x5c\x7f\x80-\xff]/) { $self->{manager}->alert("dialog_configdsadmindomain_error", $ans); } elsif (isValidDN($ans)) { $self->{manager}->alert("dialog_configdsadmindomain_notadn", $ans); } else { $res = $DialogManager::NEXT; $self->{manager}->{inf}->{General}->{AdminDomain} = $ans; } return $res; }, ['dialog_configdsadmindomain_prompt'] ); my $useconfigds = new DialogYesNo ( $EXPRESS, 'dialog_useconfigds_text', sub { my $self = shift; my $yes = $self->{"manager"}->getText("yes"); my $nno = $self->{"manager"}->getText("no"); my $ret = 0; if ((defined($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}) and ($yes =~ /^$self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}/i)) or (defined($self->{manager}->{inf}->{slapd}->{UseExistingMC}) and !$self->{manager}->{inf}->{slapd}->{UseExistingMC})) { # we have to set up the directory server as the config ds $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC} = "yes"; $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 0; $ret = 0; # explicitly create the config ds } elsif (defined($self->{manager}->{inf}->{General}->{ConfigDirectoryLdapURL})) { $ret = 1; # use an existing config ds and register the servers with that one } elsif (!defined($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}) and !defined($self->{manager}->{inf}->{slapd}->{UseExistingMC})) { $ret = 0; # implicitly create the config ds } else { $ret = 1; # use an existing config ds and register the servers with that one if (exists($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC})) { delete $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}; } $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 1; } return $ret; }, sub { my $self = shift; my $ans = shift; my $res = $self->handleResponse($ans); if ($res == $DialogManager::NEXT) { if ($self->isYes()) { if (exists($self->{manager}->{inf}->{slapd}->{SlapdConfigForMC})) { delete $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC}; } $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 1; $configdsinfo->enable(); # use it $configdsadmin->disable(); $configdsadmindomain->disable(); } else { $self->{manager}->{inf}->{slapd}->{SlapdConfigForMC} = "yes"; $self->{manager}->{inf}->{slapd}->{UseExistingMC} = 0; $configdsinfo->disable(); # ignore it $configdsadmin->enable(); $configdsadmindomain->enable(); } } return $res; }, ['dialog_useconfigds_prompt'], ); my $updatedialog = new DialogYesNo ( $EXPRESS, 'dialog_update_text', 1, sub { my $self = shift; my $ans = shift; my $res = $self->handleResponse($ans); if ($res == $DialogManager::NEXT) { $res = $DialogManager::ERR if (!$self->isYes()); } return $res; }, ['dialog_update_prompt'], ); sub getDialogs { return ($useconfigds, $configdsinfo, $configdsadmin, $configdsadmindomain); } sub getRegDialogs { return ($regconfigdsinfo, $configdsadmindomain); } sub getUpdateDialogs { return ($updatedialog, $configdsinfo); } 1; 389-admin-1.1.35/admserv/newinst/src/RegDSDialogs.pm000066400000000000000000000067531220472121400217440ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # package RegDSDialogs; use strict; use DialogManager; use Setup; use Dialog; use DSUtil; my $configdsinfo = new Dialog ( $TYPICAL, 'use_existing_configds_txt', sub { my $self = shift; my $servid = $self->{manager}->{inf}->{slapd}->{ServerIdentifier}; return $servid; }, sub { my $self = shift; my $ans = shift; my $index = shift; my $res = $DialogManager::SAME; my %instances = %{$self->{manager}->{inf}->{slapd}->{Instances}}; $self->{manager}->setType($TYPICAL); if ($index == 0) { # validate serverIdentifier? foreach my $confdir ( keys %instances ) { foreach my $inst ( @{$instances{$confdir}} ) { if ( "$inst" eq "slapd-" . $ans ) { $self->{manager}->{inf}->{slapd}->{ServerIdentifier} = $ans; $self->{manager}->{inf}->{slapd}->{config_dir} = $confdir; $res = $DialogManager::NEXT; goto out; } } } out: if ( $DialogManager::SAME == $res ) { $self->{manager}->alert("error_configds_txt", $ans); } return $res; } return $res; }, ['dialog_dsserverid_prompt'] ); sub getDialogs { return ($configdsinfo); } 1; 389-admin-1.1.35/admserv/newinst/src/admin.inf.in000066400000000000000000000026451220472121400213260ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK [General] Name= Administration Server [admin] Name= @capbrand@ Administration Server Brand= @capbrand@ NormBrand = @brand@ Vendor=@vendor@ Version= @PACKAGE_VERSION@ BaseVersion= @PACKAGE_BASE_VERSION@ ConsoleVersion= 1.1 NickName= admin BuildNumber= @NQBUILD_NUM@ # the rest of these are obsolete, but left here for # compatability with the old setuputil Compatible= 1.0 Security= Domestic Checked=True Mandatory=True UseLdap=True SourcePath=admin Archive= nsadmin.zip PreInstall= ns-config PostInstall= bin/admin/ns-update PreUninstall= bin/admin/ns-remove DefaultAcceptLanguage=en StartProgram=start-admin 389-admin-1.1.35/admserv/newinst/src/adminserver.map.in000066400000000000000000000060661220472121400225570ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # register_param.map: # This file is used by the register_server.pl script to register the server # info to the Configuration Directory Server. The server info is stored in # the (template) ldif files located in @ldifdir@. In case a server entry has # %...% format parameters, this map table is used to resolve it and replace # the parameter with the value defined in this file. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = FullMachineName domain = AdminDomain brand = Brand normbrand = NormBrand hostname = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_port = Port as_addr = ServerIpAddress admpw = "@configdir@/admpw" as_error = "@logdir@/error" as_access = "@logdir@/access" as_pid = "@pidfile@" as_console_jar = "%normbrand%-admin-%as_baseversion%.jar" as_help_path = "@helpdir@" as_user = SysUser as_version = Version as_baseversion = BaseVersion as_buildnum = BuildNumber as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" console_version = ConsoleVersion 389-admin-1.1.35/admserv/newinst/src/asmigrate.map.in000066400000000000000000000052161220472121400222100ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # register_param.map: # This file is used by the register_server.pl script to register the server # info to the Configuration Directory Server. The server info is stored in # the (template) ldif files located in @ldifdir@. In case a server entry has # %...% format parameters, this map table is used to resolve it and replace # the parameter with the value defined in this file. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = FullMachineName domain = AdminDomain brand = Brand normbrand = NormBrand hostname = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_port = Port admpw = "@configdir@/admpw" as_error = "@logdir@/errors" as_access = "@logdir@/access" as_pid = "@pidfile@" as_console_jar = "%normbrand%-admin-%as_baseversion%.jar" as_help_path = "@helpdir@" as_user = SysUser as_version = Version as_baseversion = BaseVersion as_buildnum = BuildNumber as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" console_version = ConsoleVersion 389-admin-1.1.35/admserv/newinst/src/configdsroot.map.in000066400000000000000000000051011220472121400227250ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # Use this map with 01nsroot.ldif.tmpl and 02globalpreferences.ldif.tmpl, to # set up a directory server to be a Configuration Directory Server. This map # tells how to replace %...% tokens in those ldif.tmpl files. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = FullMachineName domain = AdminDomain brand = Brand normbrand = NormBrand uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` as_uid = ServerAdminID as_passwd = ServerAdminPwd asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_version = Version as_baseversion = BaseVersion ds_version = Version ds_baseversion = BaseVersion ds_port = ServerPort ds_secure_port = SecureServerPort:"636" ds_suffix = Suffix dsid = ServerIdentifier console_version = ConsoleVersion ds_console_jar = "%normbrand%-ds-%ds_baseversion%.jar" 389-admin-1.1.35/admserv/newinst/src/dirserver.map.in000066400000000000000000000062561220472121400222460ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # register_param.map: # This file is used by the register_server.pl script to register the server # info to the Configuration Directory Server. The server info is stored in # the (template) ldif files located in @ldifdir@. In case a server entry has # %...% format parameters, this map table is used to resolve it and replace # the parameter with the value defined in this file. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = FullMachineName domain = AdminDomain brand = Brand normbrand = NormBrand vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_uid = ServerAdminID as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" ds_version = Version ds_baseversion = BaseVersion dsid = ServerIdentifier ds_user = SuiteSpotUserID ds_port = ServerPort ds_secure_port = SecureServerPort:"636" rootdn = RootDN escapedrootdn = `$returnvalue = dnEscape($mapper->{rootdn});` ds_suffix = Suffix ds_buildnum = BuildNumber ds_console_jar ="%normbrand%-ds-%ds_baseversion%.jar" ds_sie = "cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" config_ds_url = ConfigDirectoryLdapURL console_version = ConsoleVersion 389-admin-1.1.35/admserv/newinst/src/dssuffixadmin.map.in000066400000000000000000000041271220472121400231000ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # register_param.map: # This file is used by the register_server.pl script to register the server # info to the Configuration Directory Server. The server info is stored in # the (template) ldif files located in @ldifdir@. In case a server entry has # %...% format parameters, this map table is used to resolve it and replace # the parameter with the value defined in this file. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = FullMachineName domain = AdminDomain brand = Brand dsid = ServerIdentifier ds_suffix = Suffix as_uid = ServerAdminID 389-admin-1.1.35/admserv/newinst/src/migrate-ds-admin.pl.in000066400000000000000000000045361220472121400232200ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use AdminMigration; use AdminUtil; use AdminServer; use Migration; use Resource; use DSMigration; use SetupLog; my $res = new Resource("@propertydir@/migrate-ds-admin.res", "@propertydir@/migrate-ds.res", "@propertydir@/setup-ds-admin.res", "@propertydir@/setup-ds.res"); my $mig = new Migration($res); # parse cmd line etc. $mig->msg('begin_dsadmin_migration', $mig->{oldsroot}); if (!$mig->{inf}->{General}->{ConfigDirectoryAdminPwd}) { $mig->msg('error_configds_adminpwd_required'); $mig->doExit(1); } # first, migrate directory server instances # either the config ds will be one of them, or we # should have already migrated the config DS $mig->msg('begin_ds_migration', $mig->{oldsroot}); if (!migrateDS($mig)) { $mig->doExit(1); } # next, migrate the admin server - this also registers the directory servers $mig->msg('begin_as_migration', $mig->{oldsroot}); if (!migrateAdminServer($mig)) { $mig->doExit(1); } # next, register/update the new directory servers # in the config ds $mig->msg('registering_dirserver_instances'); my @errs; if (!registerManyDSWithConfigDS($mig->{inf}, \@errs, $mig->{configdir}, @{$mig->{instances}})) { $mig->msg($FATAL, @errs); $mig->doExit(1); } $mig->msg('end_dsadmin_migration'); $mig->doExit(0); END { if ($mig and $mig->{keep}) { $mig->{inf}->write("__temp__"); } } # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/migrate-ds-admin.res.in000066400000000000000000000026571220472121400234000ustar00rootroot00000000000000begin_dsadmin_migration = Beginning migration of Directory and Administration servers from %s . . .\n end_dsadmin_migration = Directory and Administration servers migration is complete. Please check output and log files for details.\n begin_as_migration = Beginning migration of Administration server from %s . . .\n error_configds_adminpwd_required = The password for the configuration directory server admin is required.\ This is usually the password for the user you use to login to the\ console. You can provide this value in one of two ways:\ \ In a .inf file - you can provide migration with a .inf file\ containing this and other data like so:\ [General]\ ...\ ConfigDirectoryAdminPwd = thepasswordvalue\ ...\ then run migration with -f yourfile.inf \ On the command line like so:\ command .... General.ConfigDirectoryAdminPwd=thepasswordvalue\n error_opening_nssconf = Error: could not open NSS config file %s. Error: %s\n error_writing_nssconf = Error: could not write NSS config file %s. Error: %s\n error_creating_asmigration_maptbl = Error: could not create maptable for use in admin server migration.\n error_creating_updateconsole_maptbl = Error: could not create maptable for use in admin server console migration.\n error_migrating_console_entries = Error: Could not find the console customization entries under '%s'. Error: %s\n error_adding_console_entries = Error: Could not add console customization entry '%s'. Error: %s\n 389-admin-1.1.35/admserv/newinst/src/register-ds-admin.pl.in000066400000000000000000000431451220472121400234130ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use File::Basename; use Net::Domain qw(hostfqdn); # Admin Setup modules use AdminUtil; use AdminServer; # Directory Setup modules use Resource; use Setup; use SetupLog; use DialogManager; use Inf; use DSUtil; sub reg_get_passwd { my $setup = shift; my $key = shift; my $value0 = shift; my $value1 = shift; print("\n==============================================================================\n"); if ( $value1 ) { $setup->msg(0, $key, $value0, $value1); } elsif ( $value0 ) { $setup->msg(0, $key, $value0); } else { $setup->msg(0, $key); } system("stty -echo"); my $ans = ; system("stty echo"); print "\n"; chop($ans); return $ans; } sub reg_get_response { my $setup = shift; my $key = shift; my $value = shift; print("\n==============================================================================\n"); $setup->msg(0, $key, $value); my $ans = ; print "\n"; chop($ans); return $ans; } my $res = new Resource("@propertydir@/register-ds-admin.res", "@propertydir@/setup-ds-admin.res", "@propertydir@/setup-ds.res"); my $setup = new Setup($res); $setup->msg('begin_ds_registration'); # get existing instances my $instconfigdir = $setup->{configdir}; my %instances = (); for my $dir (glob("$setup->{configdir}/slapd-*")) { if (-d $dir) { my $dname = dirname($dir); my $bname = basename($dir); push @{$instances{$dname}}, $bname; } } # in case Directory Servers are installed at the unexpected location. my $done = 0; my $ans; while ( !$done && ($ans = reg_get_response($setup, 'subds_conf_prompt', "@instconfigdir@")) ) { if ( $ans eq "" || !$ans ) { $done = 1; } elsif ( ! -d $ans ) { ; } elsif ( basename($ans) =~ /^slapd-/ ) { my $dname = dirname($ans); my $bname = basename($ans); if ( exists $instances{$dname} ) { my $addit = 1; foreach my $thisslapd ( @{$instances{$dname}} ) { if ( $thisslapd eq $bname ) { $addit = 0; goto out0; } } out0: if ( $addit ) { push @{$instances{$dname}}, $bname; } } else { push @{$instances{$dname}}, $bname; } } else { $ans =~ s/^\s+//; $ans =~ s/[\/\s]+$//; my $rc = opendir(DIR, $ans); if ( $rc ) { my $file = ""; while ( defined($file = readdir(DIR)) ) { next if ( !("$file" =~ /^slapd-/) ); if ( exists $instances{$ans} ) { my $addit = 1; foreach my $thisslapd ( @{$instances{$ans}} ) { if ( $thisslapd eq $file ) { $addit = 0; goto out1; } } out1: if ( $addit ) { push @{$instances{$ans}}, $file; } } else { push @{$instances{$ans}}, $file; } } closedir(DIR); } } } my @instconfigdirs = keys %instances; if ( $#instconfigdirs < 0 ) { $setup->msg($FATAL, 'error_no_ds'); $setup->doExit(1); } print("\n==============================================================================\n"); $setup->msg('candidate_list_txt'); foreach my $c ( @instconfigdirs ) { foreach my $i ( @{$instances{$c}} ) { print " $c/$i\n"; } } # see if there is already a configds my $admConf = AdminUtil::getAdmConf("$instconfigdir/admin-serv"); my @admConfKeys = keys %$admConf; my $orig_confdsid = ""; my $new_confdsid = ""; my $new_confdir = ""; my $adminuid = ""; my @errs = (); my $fqdn = hostfqdn(); # set defaults if ( $#admConfKeys >= 4 ) # admserv.conf, console.conf, httpd.conf, nss.conf { # Admin Server is installed; that is Config DS exists, which may be # replaced with a new one in the RegDSDialogs $orig_confdsid = getLocalConfigDS("$instconfigdir/admin-serv"); $setup->{inf}->{slapd}->{ServerIdentifier} = $orig_confdsid; $setup->{inf}->{slapd}->{config_dir} = $instconfigdir; $setup->{inf}->{slapd}->{Instances} = \%instances; $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = $admConf->{ldapurl}; $setup->{inf}->{General}->{ConfigDirectoryAdminID} = $admConf->{userdn}; $setup->{inf}->{General}->{AdminDomain} = $admConf->{AdminDomain}; $setup->{inf}->{General}->{SuiteSpotUserID} = $admConf->{SuiteSpotUserID}; $setup->{inf}->{General}->{SuiteSpotGroup} = $admConf->{SuiteSpotGroup}; ($setup->{inf}->{General}->{FullMachineName} = $admConf->{ldapurl}) =~ s/.*:\/\/(.*):[0-9]*\/.*/\1/; $setup->{inf}->{admin}->{SysUser} = $admConf->{sysuser}; $adminuid = $admConf->{userdn}; # read additional config from config DS my $pset = AdminUtil::getPset($admConf); if ($pset && %{$pset}) { $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"}; $setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"}; } my $admpw = AdminUtil::getAdmpw($admConf); if ($admpw && %{$admpw}) { $setup->{inf}->{admin}->{ServerAdminID} = $admpw->{ServerAdminID}; $setup->{inf}->{admin}->{ServerAdminPwd} = $admpw->{ServerAdminPwd}; } $setup->{reconfigas} = 1; # allow AS reconfig my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); require RegDSDialogs; my @dialogs = RegDSDialogs->getDialogs(); $dialogmgr->addDialog(@dialogs); my $rc = $dialogmgr->run(); if ($rc) { $setup->doExit(1); } $new_confdsid = $setup->{inf}->{slapd}->{ServerIdentifier}; $new_confdir = $setup->{inf}->{slapd}->{config_dir}; my $newinst = "slapd-$new_confdsid"; my $inf = createInfFromConfig("$instconfigdir/$newinst", $newinst); if ( ! $inf ) { $setup->msg($FATAL, 'error_create_inf_from_config', "$instconfigdir/$newinst"); $setup->doExit(1); } if ( $orig_confdsid ne $new_confdsid ) { # To switch to the new Config DS, unregister the old one print("\n==============================================================================\n"); $setup->msg('unregister_old_confds', $orig_confdsid); # If we don't have it, prompt for the Admin password if (!$setup->{inf}->{General}->{ConfigDirectoryAdminPwd} || "" eq $setup->{inf}->{General}->{ConfigDirectoryAdminPwd}) { $ans = reg_get_passwd($setup, 'input_admin_passwd', $adminuid); $setup->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; } while (!unregisterDSWithConfigDS($orig_confdsid, \@errs, $setup->{inf})) { $setup->msg($FATAL, 'error_unregister_ds', $orig_confdsid); $ans = reg_get_passwd($setup, 'input_admin_passwd', $adminuid); $setup->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; @errs = (); } # updating the port number my $oldport = 0; my $newport = $inf->{slapd}->{ServerPort}; ($oldport = $setup->{inf}->{General}->{ldapurl}) =~ s/.*:([0-9]*)\/.*/\1/; $setup->{inf}->{General}->{ldapurl} =~ s/$oldport/$newport/; $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = "ldap://" . $fqdn . ":". $newport . "/o=NetscapeRoot"; } # Set the new inf to $setup->{inf} $setup->{inf}->{slapd} = $inf->{slapd}; $setup->{inf}->{slapd}->{config_dir} = $instconfigdir; $setup->{inf}->{slapd}->{Instances} = \%instances; } else { # Admin Server is not set up. # %instances has more than one instance # note: this is orig_confdsid is just a candidate... my $orig_confdir = $instconfigdirs[0]; my @orig_confdsids = @{$instances{$orig_confdir}}; ($orig_confdsid = $orig_confdsids[0]) =~ s/slapd-(.*)/\1/; my $originst = "slapd-$orig_confdsid"; my $inf = createInfFromConfig("$orig_confdir/$originst", $originst); if ( ! $inf ) { $setup->msg($FATAL, 'error_create_inf_from_config', "$orig_confdir/$originst"); $setup->doExit(1); } $setup->{inf} = $inf; $setup->{inf}->{slapd}->{ServerIdentifier} = $orig_confdsid; $setup->{inf}->{slapd}->{config_dir} = $orig_confdir; $setup->{inf}->{slapd}->{Instances} = \%instances; my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); require RegDSDialogs; require SetupDialogs; require ConfigDSDialogs; require ASDialogs; my @dialogs = RegDSDialogs->getDialogs(); $dialogmgr->addDialog(@dialogs); my $rc = $dialogmgr->run(); if ( $rc ) { $setup->doExit(1); } $new_confdsid = $setup->{inf}->{slapd}->{ServerIdentifier}; $new_confdir = $setup->{inf}->{slapd}->{config_dir}; if ( $orig_confdsid ne $new_confdsid ) { my $newinst = "slapd-$new_confdsid"; $inf = createInfFromConfig("$instconfigdir/$newinst", $newinst); if ( ! $inf ) { $setup->msg($FATAL, 'error_create_inf_from_config', "$instconfigdir/$newinst"); $setup->doExit(1); } $setup->{inf}->{slapd} = $inf->{slapd}; $setup->{inf}->{slapd}->{Instances} = \%instances; } $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = "ldap://" . $fqdn . ":". $setup->{inf}->{slapd}->{ServerPort} . "/o=NetscapeRoot"; $dialogmgr->resetDialog(); @dialogs = SetupDialogs->getRegDialogs(); push @dialogs, ConfigDSDialogs->getRegDialogs(); push @dialogs, ASDialogs->getDialogs(); $dialogmgr->addDialog(@dialogs); $rc = $dialogmgr->run(); if ( $rc ) { $setup->doExit(1); } $adminuid = $setup->{inf}->{General}->{ConfigDirectoryAdminID}; } # Get the ConfigDS's rootDN password print("\n==============================================================================\n"); $setup->msg('register_new_confds', $new_confdsid); $setup->{inf}->{slapd}->{RootDNPwd} = reg_get_passwd($setup, 'input_rootdn_passwd', $new_confdsid); if ( ($#admConfKeys >= 0 && ($orig_confdsid ne $new_confdsid)) || $#admConfKeys < 0 ) { @errs = (); # First, let's register the Configuration Directory itself while (!createConfigDS($setup->{inf}, \@errs)) { foreach my $err (@errs) { if ( $err eq "suffix_already_exists" ) { goto out; } } $setup->{inf}->{slapd}->{RootDNPwd} = reg_get_passwd($setup, 'input_rootdn_passwd', $new_confdsid); @errs = (); } out: } # If we don't have it, prompt for the Admin password if (!$setup->{inf}->{General}->{ConfigDirectoryAdminPwd} || "" eq $setup->{inf}->{General}->{ConfigDirectoryAdminPwd}) { $ans = reg_get_passwd($setup, 'input_admin_passwd', $adminuid); $setup->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; } @errs = (); while (!registerDSWithConfigDS($new_confdsid, \@errs, $setup->{inf})) { $setup->msg($WARN, 'error_register_configds', $new_confdsid); $ans = reg_get_passwd($setup, 'input_admin_passwd', $adminuid); $setup->{inf}->{General}->{ConfigDirectoryAdminPwd} = $ans; @errs = (); } my $hassubinst = 0; # Then, register the rest of the Directory Servers, if any my %subinstances = (); # hash without the Config DS %instances = %{$setup->{inf}->{slapd}->{Instances}}; foreach my $subconfdir (keys %instances) { my @subinsts = @{$instances{$subconfdir}}; foreach my $subinst ( @subinsts ) { if ( ("$subinst" ne "slapd-" . $new_confdsid) || ($subconfdir ne $new_confdir) ) { if ( 0 == $hassubinst ) { $hassubinst = 1; print("\n==============================================================================\n"); $setup->msg('register_subds'); } my $subid = $subinst; $subid =~ s/slapd-//; my $passwd = reg_get_passwd($setup, 'input_rootdn_passwd_sub', $subid, $subid); # if the password is not given, we don't register the server next if ( "" eq $passwd || !$passwd ); my $subinf = createInfFromConfig("$subconfdir/$subinst", $subinst); if ( ! $subinf ) { $setup->msg($FATAL, 'error_create_inf_from_config', "$subconfdir/$subinst"); } else { # If we're switching the config DS, we want to force updating the # PTA plug-in since it's configured for the old config DS. my $force_pta = 0; if ( $orig_confdsid ne $new_confdsid ) { $force_pta = 1; } $setup->{inf}->{slapd} = $subinf->{slapd}; $setup->{inf}->{slapd}->{RootDNPwd} = $passwd; push @{$subinstances{$subconfdir}}, $subinst; $done = 0; while ( !$done && !createSubDS($setup->{inf}, \@errs, $force_pta) ) { $setup->msg($FATAL, @errs); $passwd = reg_get_passwd($setup, 'input_rootdn_passwd_sub', $subid, $subid); if ( "" eq $passwd || !$passwd ) { $done = 1; pop @{$subinstances{$subconfdir}}; } else { $setup->{inf}->{slapd}->{RootDNPwd} = $passwd; } } # add the aci that allows the admin user to administer the server @errs = (); if (!addConfigACIsToSubDS($setup->{inf}, \@errs)) { $setup->msg(@errs); $setup->doExit(1); } } } } } my @subkeys = keys %subinstances; if ( $#subkeys >= 0 ) { @errs = (); if ( !registerScatteredDSWithConfigDS($setup->{inf}, \@errs, \%subinstances) ) { $setup->msg($FATAL, @errs); $setup->doExit(1); } } # Configure and register the admin server instance. # Generate a new inf for the config DS and override # the old slapd data from the last instance we registered. $new_confdir = $setup->{inf}->{slapd}->{config_dir}; my $newinst = "slapd-$new_confdsid"; my $inf = createInfFromConfig("$instconfigdir/$newinst", $newinst); if ( ! $inf ) { $setup->msg($FATAL, 'error_create_inf_from_config', "$instconfigdir/$newinst"); $setup->doExit(1); } $setup->{inf}->{slapd} = $inf->{slapd}; # need these manually set these 2 parameters $setup->{inf}->{slapd}->{UseExistingMC} = "yes"; $setup->{inf}->{slapd}->{SlapdConfigForMC} = "yes"; if ( !$setup->{reconfigas} ) { if ( !createAdminServer($setup) ) { $setup->msg($FATAL, 'error_create_adminserver'); $setup->doExit(1); } } else { if ( !reconfigAdminServer($setup) ) { $setup->msg($FATAL, 'error_reconfig_adminserver'); $setup->doExit(1); } } $setup->msg('end_ds_registration'); $setup->doExit(0); 389-admin-1.1.35/admserv/newinst/src/register-ds-admin.res.in000066400000000000000000000046401220472121400235660ustar00rootroot00000000000000begin_ds_registration = Beginning registration of the Directory Server use_existing_configds_txt = Do you want to use this server as Configuration Directory Server?\n\n subds_conf_prompt = The Directory Server locates its configuration file (dse.ldif) at %s/slapd-ID, by default. If you have Directory Server(s) which configuration file is put at the other location, you need to input it to register the server.\n\nIf you have such Directory Server, type the full path that stores the configuration file.\n\nIf you don't, type return.\n[configuration directory path or return]: candidate_list_txt = Candidate servers to register:\n unregister_old_confds = Cleaning up old Config DS: %s\n register_new_confds = Registering new Config DS: %s\n register_subds = Registering Sub DSes: end_ds_registration = Finished registration of the Directory Server input_rootdn_passwd = Input the Directory Server password on the server %s: input_rootdn_passwd_sub = If you want to register the server %s, input the Directory Manager password on the server.\n\nIf you don't, type return.\n[Directory Manager password on %s or return]: input_admin_uid = Please input the password for the Administrator User ID: [%s] input_admin_passwd = Please input the password for the Administrator User %s: input_userid = Please input the UNIX user id to run the server: [%s] input_groupid = Please input the UNIX group id to run the server: [%s] error_configds_txt = Error: the server ID %s does not exist. Choose server ID existing on the host.\n error_opening_instconfdir = Error: could not open config dir %s: %s\n\nDirectory Servers may not be set up yet.\nPlease run setup-ds-admin.pl.\nNote: once you run setup-ds-admin.pl, the server is automatically registered.\n error_no_ds = Error: could not find a Directory Server instance.\n\nDirectory Server may not be set up yet.\nPlease run setup-ds-admin.pl.\nNote: once you run setup-ds-admin.pl, the server is automatically registered.\n error_create_inf_from_config = Error: could not retrieve necessary info from %s. Please check the file.\n error_register_configds = Error: failed to register the configuration server info to the Configuration Directory Server %s.\n error_register_subds = Error: failed to register the additional server info to the Configuration Directory Server %s.\n error_unregister_ds = Error: failed to clean up the configuration info from the old Configuration\nDirectory Server %s.\n 389-admin-1.1.35/admserv/newinst/src/register_param.map.in000066400000000000000000000072511220472121400232410ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # register_param.map: # This file is used by the register_server.pl script to register the server # info to the Configuration Directory Server. The server info is stored in # the (template) ldif files located in @ldifdir@. In case a server entry has # %...% format parameters, this map table is used to resolve it and replace # the parameter with the value defined in this file. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # fqdn = `use Net::Domain qw(hostfqdn); $returnvalue = hostfqdn();` domain = `use Net::Domain qw(hostdomain); $returnvalue = hostdomain();` brand = Brand normbrand = NormBrand hostname = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` vendor = Vendor uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` as_uid = ServerAdminID as_passwd = ServerAdminPwd asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_port = Port admpw = "@configdir@/admpw" as_error = "@logdir@/error" as_access = "@logdir@/access" as_pid = "@pidfile@" as_console_jar = "%normbrand%-admin-%as_baseversion%.jar" as_help_path = "@helpdir@" as_user = SysUser as_version = Version as_baseversion = BaseVersion as_buildnum = BuildNumber as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" console_version = ConsoleVersion ds_version = Version ds_baseversion = BaseVersion dsid = ServerIdentifier ds_user = SuiteSpotUserID ds_port = ServerPort ds_secure_port = SecureServerPort:"636" rootdn = RootDN escapedrootdn = `$returnvalue = dnEscape($mapper->{rootdn});` ds_suffix = Suffix ds_buildnum = BuildNumber ds_passwd = RootDNPwd ds_console_jar ="%normbrand%-ds-%ds_baseversion%.jar" ds_sie = "cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" config_ds_url = ConfigDirectoryLdapURL 389-admin-1.1.35/admserv/newinst/src/register_server.pl.in000066400000000000000000000123121220472121400232770ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # Usage: register_server.pl [ -h ] [ -p ] [ -D ] \ # -w [ -d ] \ # -i -m ... # # Description: Store server info stored in the ldiffiles to the Configuration # Directory Server replacing the macros with the defined values # in the map file. # # -h : configuration server host (localhost, by default) # -p : configuration server port (389) # -D : configuration server's rootdn ("cn=Directory Manager") # -w : configuration server's rootdn password # -d : the directory where static .inf files are located # -i : dynamic .inf file(s) # -m : map file name # ...: ldif file(s) or template ldif file(s) to be stored in # the Configuration Directory Server use lib qw(@perlpath@); use Getopt::Std; use Net::Domain qw(hostname hostfqdn); # PERLDAP modules use Mozilla::LDAP::Conn; # Setup Inf module use Inf; use DSUtil; $USAGE = "$0 [ -Fv ] [ -h ] [ -p ] [ -D ] \ -w [ -d ] \ -i ... -m ... Description: Store server info stored in the ldiffiles to the Configuration Directory Server replacing the macros with the defined values in the map file. -H: help (print this message) -v: verbose -F: Fresh registration; i.e., removing the existing server info. -h : configuration server host (localhost, by default) -p : configuration server port (389) -D : configuration server's rootdn (\"cn=Directory Manager\") -w : configuration server's rootdn password -d : the directory where static .inf files are located (\"/usr/share/@PACKAGE_BASE_NAME@/inf\") -i : dynamic .inf file(s) -m : map file name ...: ldif files or template ldif files to be stored in the Configuration Directory Server"; if ($#ARGV < 0 || !getopts('HFvh:p:D:w:d:m:i:') || $opt_H) { print "Usage: $USAGE\n"; exit 1; } $confds_verbose = $opt_v; $confds_fresh = $opt_F; $confds_host = $opt_h; if ( "" eq $confds_host ) { $confds_host = hostfqdn(); } $confds_port = $opt_p; if ( "" eq $confds_port ) { $confds_port = 389; } $confds_rootdn = $opt_D; if ( "" eq $confds_rootdn ) { $confds_rootdn = "cn=Directory Manager"; } $confds_rootdnpw = $opt_w; if ( "" eq $confds_rootdnpw ) { print "ERROR: No root dn password\n"; print "usage: $USAGE\n"; exit 1; } my $infdir = $opt_d; if ( "" eq $infdir ) { $infdir = "/usr/share/@PACKAGE_BASE_NAME@/inf"; } my @inffiles = (); if ( "" eq $opt_i ) { print "ERROR: No dynamic .inf files\n"; print "usage: $USAGE\n"; exit 1; } else { @inffiles = split(/[ ]/, $opt_i); } my @ldiffiles = @ARGV; if ( 0 > $#ldiffiles ) { print "ERROR: No root ldif files\n"; print "usage: $USAGE\n"; exit 1; } $mapfile = $opt_m; if ( "" eq $mapfile ) { print "ERROR: No mapfile\n"; print "usage: $USAGE\n"; exit 1; } if ( ! -r $mapfile ) { print "ERROR: Cannot read $mapfile\n"; print "usage: $USAGE\n"; exit 1; } # reading info files @infdata = (); opendir(DIR, $infdir) or die "Cannot open install inf dir $infdir: $!"; while (defined($file = readdir(DIR))) { next if ( !("$file" =~ /\.inf$/) ); my $inffile = $infdir."/".$file; my $infdatum = new Inf($inffile); push(@infdata, ($infdatum)); } closedir(DIR); # open the ldap connection $conn = new Mozilla::LDAP::Conn( $confds_host, $confds_port, $confds_rootdn, $confds_rootdnpw ); if ( NULL == $conn ) { print "ERROR: Cannot connect to the server\n"; exit 1; } # eval map table for each dynamic .inf file foreach my $thisinf (@inffiles) { my $mapper = new Inf($mapfile); my $infdatum = new Inf($thisinf); push(@infdata, ($infdatum)); my @errs; $mapper = process_maptbl($mapper, \@errs, @infdata); if ( NULL eq $mapper ) { print "@errs\n"; print "ERROR: failed to generate mapper\n"; exit 1; } getMappedEntries($mapper, \@ldiffiles, \@errs, \&check_and_add_entry, [$conn, $confds_fresh, $confds_verbose]); if ( @errs ) { print "@errs\n"; print "ERROR: failed to register server info\n"; return 1; } pop @infdata; # in case handling multiple server instances, # need to turn it off from the second loop. $confds_fresh = 0; } $conn->close(); exit 0; 389-admin-1.1.35/admserv/newinst/src/remove-ds-admin.pl.in000066400000000000000000000075211220472121400230620ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use File::Basename; use File::Path; use DSUtil; use Resource; use DSCreate qw(removeDSInstance); use AdminServer qw(removeAdminServer); sub usage { print(STDERR "Usage: $0 [-f] [-d -d ...]\n\n"); print(STDERR " Opts: -f - force removal\n"); print(STDERR " -a - remove all\n"); print(STDERR " -d - turn on debugging output\n"); print(STDERR " -y - actually do the removal\n"); print(STDERR "WARNING: This command is extremely destructive!\n"); print(STDERR " It will remove all of the data and configuration\n"); print(STDERR " of all directory servers and admin servers, with\n"); print(STDERR " no chance of recovery. Therefore, in order to actually\n"); print(STDERR " do this, you must give the -y option.\n"); } my $res = new Resource("@propertydir@/setup-ds.res", "@propertydir@/setup-ds-admin.res"); my $i = 0; my $force = ""; my $all = 0; my $seeny; # load args from the command line while ($i <= $#ARGV) { if ( "$ARGV[$i]" eq "-f" ) { $force = 1; } elsif ("$ARGV[$i]" eq "-a") { $all = 1; } elsif ("$ARGV[$i]" eq "-d") { $DSUtil::debuglevel++; } elsif ( "$ARGV[$i]" eq "-y" ) { $seeny = 1; } else { &usage; exit(1); } $i++; } if (!$seeny) { &usage; exit(1); } my $baseconfigdir = $ENV{DS_CONFIG_DIR} || "@instconfigdir@"; my @instances = (); my @errs; if ( ! -d $baseconfigdir ) { print STDERR "Error: $baseconfigdir does not exist\n"; exit 1; } # get all of our directory server instances for my $dir (glob("$baseconfigdir/slapd-*")) { next if ($dir =~ /\.removed/); if (-d $dir) { $dir =~ s,$baseconfigdir/,,; # strip off dir part $dir =~ s/slapd-//; # strip off slapd part push @instances, $dir; } } # remove all of the directory servers for my $inst (@instances) { my $configdir = "$baseconfigdir/slapd-$inst"; if ( ! -d $configdir ) { print STDERR "Error: $configdir does not exist\n"; if (!$force) { exit 1; } } @errs = removeDSInstance($inst, $force, $all); if (@errs) { print STDERR "The following errors occurred during removal of $inst:\n"; for (@errs) { print STDERR $res->getText($_); } print STDERR "Error: could not remove directory server $inst\n"; if (!$force) { exit 1; } } } # remove the admin server if (@errs = removeAdminServer($baseconfigdir, $force, $all)) { print STDERR "The following errors occurred during removal of the admin server:\n"; for (@errs) { print STDERR $res->getText($_); } print STDERR "Error: could not remove admin server\n"; if (!$force) { exit 1; } } # if we got here, report success print "Removed admin server and all directory server instances\n"; exit 0; # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/setup-ds-admin.pl.in000066400000000000000000000305311220472121400227220ustar00rootroot00000000000000#!@perlexec@ # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # use lib qw(@perlpath@); use strict; use Setup; use SetupLog; use Inf; use Resource; use DialogManager; use DSCreate; use DSUpdate; use AdminUtil; use AdminServer; use DSUtil; use Net::Domain qw(hostfqdn); my $res = new Resource("@propertydir@/setup-ds.res", "@propertydir@/setup-ds-admin.res"); my $setup = new Setup($res); # see if there is already a configds my $admConf = AdminUtil::getAdmConf("$setup->{configdir}/admin-serv"); # Set defaults, but don't override settings that were # defined in a passed in inf file. if ($admConf && %{$admConf}) { unless (defined($setup->{inf}->{General}->{ConfigDirectoryLdapURL})) { $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = $admConf->{ldapurl}; } unless (defined($setup->{inf}->{General}->{ConfigDirectoryAdminID})) { $setup->{inf}->{General}->{ConfigDirectoryAdminID} = $admConf->{userdn}; } unless (defined($setup->{inf}->{General}->{AdminDomain})) { $setup->{inf}->{General}->{AdminDomain} = $admConf->{AdminDomain}; } unless (defined($setup->{inf}->{General}->{SuiteSpotUserID})) { $setup->{inf}->{General}->{SuiteSpotUserID} = $admConf->{SuiteSpotUserID}; } unless (defined($setup->{inf}->{General}->{SuiteSpotGroup})) { $setup->{inf}->{General}->{SuiteSpotGroup} = $admConf->{SuiteSpotGroup}; } unless (defined($setup->{inf}->{admin}->{SysUser})) { $setup->{inf}->{admin}->{SysUser} = $admConf->{sysuser}; } if ($setup->{inf}->{General}->{ConfigDirectoryLdapURL} =~ /^ldaps/) { unless (defined($setup->{inf}->{General}->{certdb})) { $setup->{inf}->{General}->{certdb} = AdminUtil::getCertDir("$setup->{configdir}/admin-serv"); } } # read additional config from config DS my $pset = AdminUtil::getPset($admConf); if ($pset && %{$pset}) { unless (defined($setup->{inf}->{admin}->{Port})) { $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"}; } $setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port unless (defined($setup->{inf}->{admin}->{ServerIpAddress})) { $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"}; } unless (defined($setup->{inf}->{General}->{FullMachineName})) { $setup->{inf}->{General}->{FullMachineName} = $pset->{"serverhostname"}; } } my $admpw = AdminUtil::getAdmpw($admConf); if ($admpw && %{$admpw}) { unless (defined($setup->{inf}->{admin}->{ServerAdminID})) { $setup->{inf}->{admin}->{ServerAdminID} = $admpw->{ServerAdminID}; } unless (defined($setup->{inf}->{admin}->{ServerAdminPwd})) { $setup->{inf}->{admin}->{ServerAdminPwd} = $admpw->{ServerAdminPwd}; } } # default to using the existing config DS unless (defined($setup->{inf}->{slapd}->{UseExistingMC})) { $setup->{inf}->{slapd}->{UseExistingMC} = 1; } unless (defined($setup->{inf}->{slapd}->{SlapdConfigForMC})) { $setup->{inf}->{slapd}->{SlapdConfigForMC} = 0; } $setup->{reconfigas} = 1; # allow AS reconfig } else { # default to creating the config DS unless (defined($setup->{inf}->{slapd}->{UseExistingMC})) { $setup->{inf}->{slapd}->{UseExistingMC} = 0; } unless (defined($setup->{inf}->{slapd}->{SlapdConfigForMC})) { $setup->{inf}->{slapd}->{SlapdConfigForMC} = "yes"; } } # do not allow reconfig (setup -r) if no setup has been done if (! $setup->{reconfigas}) { delete $setup->{update}; } if (!$setup->{silent}) { my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); require SetupDialogs; require DSDialogs; require ConfigDSDialogs; require ASDialogs; my @dialogs; if ($setup->{update}) { push @dialogs, ConfigDSDialogs->getUpdateDialogs(); } else { push @dialogs, SetupDialogs->getDialogs(); push @dialogs, ConfigDSDialogs->getDialogs(); push @dialogs, DSDialogs->getDialogs(); push @dialogs, ASDialogs->getDialogs(); } my $readytoproceed = new DialogYesNo ( $EXPRESS, 'dialog_readytoproceed_text', 1, sub { my $self = shift; my $ans = shift; my $resp = $self->handleResponse($ans); if ($resp == $DialogManager::NEXT) { if (!$self->isYes()) { $resp = $DialogManager::BACK; } } return $resp; }, ['dialog_readytoproceed_prompt'], ); push @dialogs, $readytoproceed; $dialogmgr->addDialog(@dialogs); my $rc = $dialogmgr->run(); if ($rc) { $setup->doExit($rc); } } # set default values if (!defined($setup->{inf}->{General}->{FullMachineName})) { $setup->{inf}->{General}->{FullMachineName} = hostfqdn; } if (!defined($setup->{inf}->{slapd}->{ServerPort})) { my $port = 389; if (!portAvailable($port)) { $port = getAvailablePort(); } $setup->{inf}->{slapd}->{ServerPort} = $port; } my $createconfigds; if ((defined($setup->{inf}->{slapd}->{SlapdConfigForMC}) and ("yes" =~ /^$setup->{inf}->{slapd}->{SlapdConfigForMC}/i)) or (defined($setup->{inf}->{slapd}->{UseExistingMC}) and !$setup->{inf}->{slapd}->{UseExistingMC})) { # if user has chosen to create the config ds, we must set # the url appropriately, before writing the inf for ds_newinst $setup->{inf}->{General}->{ConfigDirectoryLdapURL} = "ldap://" . $setup->{inf}->{General}->{FullMachineName} . ":" . $setup->{inf}->{slapd}->{ServerPort} . "/o=NetscapeRoot"; $createconfigds = 1; } if (!defined($setup->{inf}->{General}->{ConfigDirectoryAdminID})) { $setup->{inf}->{General}->{ConfigDirectoryAdminID} = "admin"; } if (!defined($setup->{inf}->{General}->{AdminDomain})) { my $admindomain = $setup->{inf}->{General}->{FullMachineName} || hostfqdn; $admindomain =~ s/^[^\.]*\.//; # just the domain part $setup->{inf}->{General}->{AdminDomain} = $admindomain; } if (!defined($setup->{inf}->{General}->{SuiteSpotGroup})) { $setup->{inf}->{General}->{SuiteSpotGroup} = "@httpdgroup@"; } # for admin server too, since ServerAdminID is used by AdminUtil code AdminServer::setDefaults($setup); my @errs; if (!$setup->{update}) { $setup->msg('create_dirserver'); # create a directory server instance # if we are not creating the config DS instance, # create but do not start the server - start # after createSubDS so the pta plugin will take effect my $start_server_after_reg = 1; # default - start server after registration if (!$createconfigds) { if (exists($setup->{inf}->{slapd}->{start_server}) && defined($setup->{inf}->{slapd}->{start_server})) { # user explicitly set this value $start_server_after_reg = $setup->{inf}->{slapd}->{start_server}; } $setup->{inf}->{slapd}->{start_server} = 0; # create server un-started } @errs = createDSInstance($setup->{inf}); if (@errs) { $setup->msg(@errs); $setup->msg($FATAL, 'error_creating_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); $setup->doExit(1); } else { $setup->msg('created_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); } # setup directory server instance to be the configuration DS if ($createconfigds) { $setup->msg('create_configds'); if (!createConfigDS($setup->{inf}, \@errs)) { $setup->msg($FATAL, @errs); $setup->msg($FATAL, 'error_create_configds'); $setup->doExit(1); } } else { # set up directory server instance to be managed by the console/adminserver $setup->msg('create_subds'); if (!createSubDSNoConn($setup->{inf}, \@errs)) { $setup->msg($FATAL, @errs); $setup->msg($FATAL, 'error_create_configds'); $setup->doExit(1); } if ($start_server_after_reg) { delete $setup->{inf}->{slapd}->{start_server}; # remove to start server if (@errs = DSCreate::startServer($setup->{inf})) { $setup->msg(@errs); $setup->doExit(1); } # add the aci that allows the admin user to administer the server if (!addConfigACIsToSubDS($setup->{inf}, \@errs)) { $setup->msg(@errs); $setup->doExit(1); } } } } if (!$setup->{update}) { # register ds instances with config DS if (!registerDSWithConfigDS($setup->{inf}->{slapd}->{ServerIdentifier}, \@errs, $setup->{inf})) { $setup->msg(@errs); $setup->msg($FATAL, 'error_register_dirserver'); $setup->doExit(1); } } else { doUpdate($setup, \@errs); if (@errs) { $setup->msg(@errs); if (!$setup->{force}) { $setup->msg($FATAL, 'error_reconfig_adminserver'); $setup->doExit(1); } } } # configure and register the admin server instance if (!$setup->{reconfigas}) { if (!createAdminServer($setup)) { $setup->msg($FATAL, 'error_create_adminserver'); $setup->doExit(1); } } else { if (!reconfigAdminServer($setup)) { $setup->msg($FATAL, 'error_reconfig_adminserver'); $setup->doExit(1); } } $setup->doExit(0); END { if ($setup and $setup->{keep}) { $setup->{inf}->write("__temp__"); } } sub doUpdate { my ($setup, $errs) = @_; my $inf = $setup->{inf}; # first, acquire a connection to the config DS my $conn = getConfigDSConn($inf->{General}->{ConfigDirectoryLdapURL}, $inf->{General}->{ConfigDirectoryAdminID}, $inf->{General}->{ConfigDirectoryAdminPwd}, $setup->{configdir} . "/admin-serv", $errs); if (!$conn) { return; } # update DS first # use the admin DN + password to update the DS - requires # the servers are online unless(defined($setup->{inf}->{General}->{UpdateMode})) { $setup->{inf}->{General}->{UpdateMode} = 'online'; } # this assumes all of the directory servers are already registered with # the config ds and being managed by them # a nice enhancement would be to detect if the instance is being managed # if not, shut it down, configure it for registration, then register it for my $inst ($setup->getDirServers()) { unless(defined($setup->{inf}->{$inst}->{RootDN})) { # adminbinddn set as a side effect of a successful getConfigDSConn $setup->{inf}->{$inst}->{RootDN} = $conn->{adminbinddn}; } unless(defined($setup->{inf}->{$inst}->{RootDNPwd})) { $setup->{inf}->{$inst}->{RootDNPwd} = $setup->{inf}->{General}->{ConfigDirectoryAdminPwd}; } } # stuff the config ds conn in the inf for update use $setup->{inf}->{configdsconn} = $conn; my @localerrs; if (@localerrs = updateDS($setup, ["@updatedir@"])) { push @{$errs}, @localerrs; if (!$setup->{force}) { return; } } $conn->close(); # register all instances $setup->msg('registering_dirserver_instances'); if (!registerManyDSWithConfigDS($setup->{inf}, $errs, $setup->{configdir}, $setup->getDirServers())) { if (!$setup->{force}) { return; } } return; } # emacs settings # Local Variables: # mode:perl # indent-tabs-mode: nil # tab-width: 4 # End: 389-admin-1.1.35/admserv/newinst/src/setup-ds-admin.res.in000066400000000000000000000326621220472121400231070ustar00rootroot00000000000000# this overrides the default # ------------ Welcome Dialog Resource ------------ dialog_welcome_text = This program will set up the %s Directory and Administration Servers.\n\nIt is recommended that you have "root" privilege to set up the software.\nTips for using this program:\n - Press "Enter" to choose the default and go to the next screen\n - Type "Control-B" then "Enter" to go back to the previous screen\n - Type "Control-C" to cancel the setup program\n\n # %s -> brand # this overrides the default # ----------- SSUser Dialog Resource ---------------- dialog_ssuser_text = The servers must run as a specific user in a specific group.\nIt is strongly recommended that this user should have no privileges\non the computer (i.e. a non-root user). The setup procedure\nwill give this user/group some permissions in specific paths/files\nto perform server-specific operations.\n\nIf you have not yet created a user and group for the servers,\ncreate this user and group using your native operating\nsystem utilities.\n\n # ----------- AS port Dialog Resource ---------------- dialog_asport_text = The Administration Server is separate from any of your web or application\nservers since it listens to a different port and access to it is\nrestricted.\n\nPick a port number between 1024 and 65535 to run your Administration\nServer on. You should NOT use a port number which you plan to\nrun a web or application server on, rather, select a number which you\nwill remember and which will not be used for anything else.\n\n dialog_asport_prompt = Administration port dialog_asport_error = The port %s is in use or not available. Please choose another port.\n\n # ----------- AS host IP Dialog Resource ---------------- dialog_ashostip_text = If you want to configure the Administration Server to bind\nto a specific IP address, enter the address below.\n\n dialog_ashostip_prompt = IP address # ----------- AS sys user Dialog Resource ---------------- dialog_assysuser_text = The Administration Server program runs as a certain user on your\nsystem. This user must have permission to modify files and directories\nfor your Directory server as well as the Administration server. You\nare strongly encouraged to use a non-privileged (i.e. non-root) user.\n\n dialog_assysuser_prompt = Run Administration Server as dialog_assysuser_error = The user '%s' is invalid.\n\n dialog_assysuser_must_be_same = Since you are not running setup as root, the user must be the same as your userid '%s'.\n\n dialog_assysuser_root_warning = You are strongly encouraged to use a non-root user for\nthe server uid. If you feel you have made a mistake,\nplease go back to this dialog and enter another user.\n\n # ----------- Use Config DS Dialog Resource ---------------- dialog_useconfigds_text = Server information is stored in the configuration directory server.\nThis information is used by the console and administration server to\nconfigure and manage your servers. If you have already set up a\nconfiguration directory server, you should register any servers you\nset up or create with the configuration server. To do so, the\nfollowing information about the configuration server is required: the\nfully qualified host name of the form\n.(e.g. hostname.example.com), the port number\n(default 389), the suffix, the DN and password of a user having\npermission to write the configuration information, usually the\nconfiguration directory administrator, and if you are using security\n(TLS/SSL). If you are using TLS/SSL, specify the TLS/SSL (LDAPS) port\nnumber (default 636) instead of the regular LDAP port number, and\nprovide the CA certificate (in PEM/ASCII format).\n\nIf you do not yet have a configuration directory server, enter 'No' to\nbe prompted to set up one.\n\n dialog_useconfigds_prompt = Do you want to register this software with an existing\nconfiguration directory server? # ----------- Config DS info Dialog Resource ---------------- dialog_configdsinfo_text = Please specify the information about your configuration directory\ server. The following information is required:\ - host (fully qualified), port (non-secure or secure), suffix,\ protocol (ldap or ldaps) - this information should be provided in the\ form of an LDAP url e.g. for non-secure\ ldap://host.example.com:389/o=NetscapeRoot\ or for secure\ ldaps://host.example.com:636/o=NetscapeRoot\ - admin ID and password\ - admin domain\ - a CA certificate file may be required if you choose to use ldaps and\ security has not yet been configured - the file must be in PEM/ASCII\ format - specify the absolute path and filename\n\n dialog_configdsinfo_url_prompt = Configuration directory server URL dialog_configdsinfo_id_prompt = Configuration directory server admin ID dialog_configdsinfo_pwd_prompt = Configuration directory server admin password dialog_configdsinfo_pwd2_prompt = Configuration directory server admin password (confirm) dialog_configdsinfo_domain_prompt = Configuration directory server admin domain dialog_configdsinfo_ca_prompt = CA certificate filename dialog_configdsinfo_ca_error = '%s' is not a valid CA certificate file. Please choose another one.\n\n dialog_configdsinfo_nocacert = You chose to use LDAPS but there is no CA certificate or certificate database. Please chose ldap for the protocol or provide a valid CA certificate.\n\n dialog_configdsinfo_unreachable = The server '%s' is not reachable. Please make sure it is running and listening, or choose another one.\n\n dialog_configdsinfo_tryagain = Please try again, in case you mis-typed something.\n\n # ----------- Config DS admin id and password Dialog Resource ---------------- dialog_configdsadmin_text = Please enter the administrator ID for the configuration directory\nserver. This is the ID typically used to log in to the console. You\nwill also be prompted for the password.\n\n dialog_configdsadmin_prompt = Configuration directory server\nadministrator ID dialog_configdsadmin_pw1_prompt = Password dialog_configdsadmin_pw2_prompt = Password (confirm) dialog_configdsadmin_error = The input '%s' is not a valid ID. Please choose another one.\n\n dialog_configdsadmin_invalid = The password contains invalid characters. Please choose another one.\n\n dialog_configdsadmin_nomatch = The passwords do not match. Please try again.\n\n # ----------- Update Intro Dialog Resource ---------------- dialog_update_text = The update option will allow you to re-register your servers with the\ configuration directory server and update the information about your\ servers that the console and admin server uses. You will need your\ configuration directory server admin ID and password to continue.\n\n dialog_update_prompt = Continue? # ----------- Config DS admin domain Dialog Resource ---------------- dialog_configdsadmindomain_text = The information stored in the configuration directory server can be\nseparated into different Administration Domains. If you are managing\nmultiple software releases at the same time, or managing information\nabout multiple domains, you may use the Administration Domain to keep\nthem separate.\n\nIf you are not using administrative domains, press Enter to select the\ndefault. Otherwise, enter some descriptive, unique name for the\nadministration domain, such as the name of the organization\nresponsible for managing the domain.\n\n dialog_configdsadmindomain_prompt = Administration Domain dialog_configdsadmindomain_error = The string '%s' is not a valid administration domain. Please choose another one.\n\n dialog_configdsadmindomain_notadn = The administration domain must not be a DN. The string '%s' looks like a DN. Please choose another one.\n\n # other messages configds_open_error = The server '%s' is not reachable. Error: %s\n\n configds_finddn_error = Could not find the user '%s' in the server '%s'. Error: %s\n\n configds_bindretry_error = You have made too many unsuccessful attempts to authenticate as '%s' to the server '%s'. Please contact the administrator for that server.\n\n configds_bind_error = Could not authenticate as user '%s' to server '%s'. Error: %s\n\n configds_no_admindomain = Could not find the admin domain '%s' under '%s'. Error: %s\n\n dialog_readytoproceed_text = The interactive phase is complete. The script will now set up your\ servers. Enter No or go Back if you want to change something.\n\n dialog_readytoproceed_prompt = Are you ready to set up your servers? # post install begin_create_adminserver = Beginning Admin Server creation . . .\n begin_reconfig_adminserver = Beginning Admin Server reconfiguration . . .\n create_adminserver_filesdirs = Creating Admin Server files and directories . . .\n creating_admpw = Could not create the admin server password file '%s': Error %s\n missing_adminserver_param = Missing required Admin Server setup parameter '%s'. Cannot continue.\n missing_general_param = Missing required General setup parameter '%s'. Cannot continue.\n creating_admpw = Could not create the Admin Server password file '%s'. Error %s\n error_create_dirserver = Failed to create directory server instance\n error_create_configds = Failed to create the configuration directory server\n error_create_adminserver = Failed to create and configure the admin server\n updating_admconf = Updating adm.conf . . .\n error_updating_admconf = Could not update adm.conf. Error: %s\n updating_admpw = Updating admpw . . .\n error_updating_admpw = Could not update admpw. Error: %s\n error_creating_adminserver_maptbl = Could not create the map table for registering the Admin Server with the configuration directory server.\n error_updating_localconf = Could not update the local admin server configuration file '%s'. Error: %s\n error_starting_adminserver = Could not start the admin server. Error: %s\n error_stopping_adminserver = Could not stop the admin server. Error: %s\n registering_adminserver = Registering admin server with the configuration directory server . . .\n error_adding_adminserver_config_entry = Could not add the admin server configuration entry '%s'.\nCheck the configuration directory server access and error log for more details.\n error_updating_localconf_entry = Could not update the local admin server configuration file for the configuration entry '%s'.\n error_no_localconf_entries = Error finding LDAP entries under '%s' to update in the local admin server configuration file '%s'. LDAP Error: %s\n updating_admconf_configds = Updating adm.conf with information from configuration directory server . . .\n updating_httpconf = Updating the configuration for the httpd engine . . .\n error_updating_httpconf = Could not update the httpd engine configuration.\n restarting_adminserver = Restarting admin server . . .\n starting_adminserver = Starting admin server . . .\n adminserver_startup_output = output: %s success_starting_adminserver = The admin server was successfully started.\n end_create_adminserver = Admin server was successfully created, configured, and started.\n end_reconfig_adminserver = Admin server was successfully reconfigured and started.\n create_dirserver = Creating directory server . . .\n create_configds = Creating the configuration directory server . . .\n create_subds = Creating the new directory server . . .\n setup_complete = Setup is complete.\n\n error_register_dirserver = Could not register the directory server with the configuration directory server.\n registering_dirserver = Registering directory server with the configuration directory server . . .\n error_creating_dirserver_maptbl = Could not create the map table for registering the directory server with the configuration directory server.\n error_reconfig_adminserver = Could not reconfigure the admin server.\n securitydir_not_exist = The security file directory '%s' does not exist.\n securitydir_not_writable = The security file directory '%s' is not writable.\n cacertfile_not_found = The CA certificate file '%s' was not found.\n error_running_certutil = Could not run the certutil program to add the CA certificate. Error: %s\n error_return_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s error_return2_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s\nHere is the output of the command: %s cacert_already_exists = The certificate database in '%s' already contains a CA certificate. Please remove it first, or use the certutil program to add the CA certificate with a different name.\n error_connection_failed = Error: failed to open an LDAP connection to host '%s' port '%s' as user '%s'. Error: %s.\n registering_dirserver_instances = Registering the directory server instances with the configuration directory server . . .\n error_finding_pta = Unable to find Pass Through Authentication Plug-In config entry. Error: %s.\n error_finding_isie = Unable to find the software configuration entry '%s' in server '%s:%s'. Error: %s\n error_updating_conffile = Unable to update the config file '%s'. Error: %s\n error_reading_conffile = Unable to read the config file '%s'. Error: %s\n error_admconf_isie = Unable to find the isie attribute in the config file '%s'\nPlease make sure you have registerd this server with the configuration Directory Server.\n\n error_reading_port = Unable to determine the Admin Server port number.\n error_removing_port_label = Error: could not remove selinux label from port '%s'. Error: %s\n error_product_already_exists = Error: the product %s already exists.\ If you want to delete this entry and force the conversion of the older\ product, run this program again with the --force option.\n\n 389-admin-1.1.35/admserv/newinst/src/setup.inf.in000066400000000000000000000025301220472121400213670ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # # Sample Server Package Information File # # Components: lists the components to be installed as specified # in subsequent sections. If the section or the ComponentInfoFile # does note exist the setup program will ignore the component [General] Name = @capbrand@ Server Products Vendor = @capbrand@ Project Description = @capbrand@ Server Products Installation Version = @PACKAGE_VERSION@ BaseVersion = @PACKAGE_BASE_VERSION@ Brand = @capbrand@ NormBrand = @brand@ 389-admin-1.1.35/admserv/newinst/src/updateconsoleinfo.map.in000066400000000000000000000041121220472121400237470ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # # Use this map with 02globalpreferences.ldif.tmpl, to # update/migrate console information. # tells how to replace %...% tokens in those ldif.tmpl files. # # [Parameter resolution rules] # * If the right-hand value is in ` (backquote), the value is eval'ed by perl. # The output should be stored in $returnvalue to pass to the internal hash. # * If the right-hand value is in " (doublequote), the value is passed as is. # * If the right-hand value is not in any quote, the value should be found # in either of the setup inf file (static) or the install inf file (dynamic). # * The right-hand value could have the format Key:"default_value". # In this case, Key is searched in the inf files first. # If the Key is not found, the default_value is set. # * Variables surrounded by @ (e.g., @configdir@) are replaced with the # system path at the compile time. # * The right-hand value can contain variables surrounded by % (e.g., %asid%) # which refers the right-hand value (key) of this map file. # domain = AdminDomain brand = Brand normbrand = NormBrand as_baseversion = BaseVersion ds_baseversion = BaseVersion console_version = ConsoleVersion ds_console_jar = "%normbrand%-ds-%ds_baseversion%.jar" fqdn = "not_used_for_updateconsoleinfo" ds_port = "not_used_for_updateconsoleinfo" ds_suffix = "not_used_for_updateconsoleinfo" 389-admin-1.1.35/admserv/schema/000077500000000000000000000000001220472121400161065ustar00rootroot00000000000000389-admin-1.1.35/admserv/schema/ldif/000077500000000000000000000000001220472121400170245ustar00rootroot00000000000000389-admin-1.1.35/admserv/schema/ldif/00nsroot_backend.ldif.tmpl000066400000000000000000000023211220472121400237700ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=NetscapeRoot,cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: extensibleObject objectClass: nsBackendInstance cn: NetscapeRoot nsslapd-suffix: o=NetscapeRoot nsslapd-cachesize: -1 nsslapd-cachememsize: 10485760 nsslapd-directory: NetscapeRoot dn: cn=o\=NetscapeRoot,cn=mapping tree,cn=config objectClass: top objectClass: extensibleObject objectClass: nsMappingTree cn: o=NetscapeRoot nsslapd-state: backend nsslapd-backend: NetscapeRoot 389-admin-1.1.35/admserv/schema/ldif/01nsroot.ldif.tmpl000066400000000000000000000071371220472121400223340ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: o=NetscapeRoot objectClass: top objectClass: organization o: NetscapeRoot aci: (targetattr="*")(version 3.0; acl "Enable Configuration Administrator Group modification"; allow (all) groupdn="ldap:///cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr="*")(targetfilter=(o=NetscapeRoot))(version 3.0; acl "Default anonymous access"; allow (read, search) userdn="ldap:///anyone";) aci: (targetattr="*")(version 3.0; acl "Enable Group Expansion"; allow (read, search, compare) groupdnattr="uniquemember";) dn: ou=TopologyManagement,o=NetscapeRoot objectClass: top objectClass: organizationalunit ou: TopologyManagement description: Branch for Configuration Administration users and groups aci: (targetattr!="userPassword")(version 3.0; acl "Enable anonymous access"; allow (read, search, compare)userdn="ldap:///anyone";) dn: ou=Groups,ou=TopologyManagement,o=NetscapeRoot objectClass: top objectClass: organizationalunit ou: Groups description: Standard Branch for group entries dn: ou=Administrators,ou=TopologyManagement,o=NetscapeRoot objectClass: top objectClass: organizationalunit ou: Administrators description: Standard branch for Configuration Administrator (uid) entries dn: cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot objectClass: top objectClass: groupofuniquenames cn: Configuration Administrators uniqueMember: uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot dn: uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot objectClass: top objectClass: person objectClass: organizationalperson objectClass: inetorgperson cn: Configuration Administrator sn: Administrator givenName: Configuration uid: %as_uid% userPassword: %as_passwd% dn: ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit objectClass: nsadmindomain ou: %domain% description: Standard branch for configuration information nsAdminDomainName: %domain% dn: ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalunit ou: Global Preferences aci: (targetattr=*)(version 3.0; acl "Enable anonymous access"; allow(read,search) userdn="ldap:///anyone";) dn: ou=Host Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalunit ou: Host Preferences dn: ou=UserPreferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit ou: UserPreferences aci: (targetattr = "*")(version 3.0; acl "Allow saving of User Preferences"; allow (add) userdn = "ldap:///all";) dn: ou=uid\=%as_uid%\,ou\=Administrators\,ou\=TopologyManagement\,o\=NetscapeRoot,ou=UserPreferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot 389-admin-1.1.35/admserv/schema/ldif/02globalpreferences.ldif.tmpl000066400000000000000000000167371220472121400245010ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit objectClass: extensibleObject ou: admin nsmerge: ADD_IF_EMPTY dn: ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalunit objectClass: extensibleObject ou: %as_baseversion% nsmerge: ADD_IF_EMPTY dn: cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: extensibleObject cn: ResourceEditorExtension nsmerge: ADD_IF_EMPTY dn: cn=UserDirectory,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsDirectoryInfo cn: UserDirectory nsDirectoryURL: ldap://%fqdn%:%ds_port%/%ds_suffix% dn: cn=Common,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: nsGlobalParameters objectClass: extensibleObject cn: common nsUniqueAttribute: uid nsUserIDFormat: firstletter_lastname nsUserRDNComponent: uid nsGroupRDNComponent: cn nsmerge: {nsuniqueattribute}ADD_IF_EMPTY nsmerge: {nsuseridformat}ADD_IF_EMPTY nsmerge: {nsuserrdncomponent}ADD_IF_EMPTY nsmerge: {nsgrouprdncomponent}ADD_IF_EMPTY dn: cn=Client,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: nsAdminGlobalParameters objectClass: extensibleObject cn: Client nsAdminEndUserHTMLIndex: [--Category:general,General][--Option:edit.cgi?userpinfo,Personal Information][--Option:edit.cgi?userpasswd,Password] nsNickName: admin,,%brand% Administration Server nsNickName: slapd,slapd,%brand% Directory Server nsNickName: cert,cert,%brand% Certificate Server nsmerge: {nsadminenduserhtmlindex}MULTI_MERGE nsmerge: {nsnickname}MULTI_MERGE dn: cn=PublicViews,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsAdminConsoleUser cn: PublicViews aci: (targetattr = "*")(version 3.0; acl "Allow Authenticated Users to Save Public Views"; allow (all) userdn = "ldap:///all";) dn: cn=CustomView,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef cn: CustomView dn: cn=inetorgPerson,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: inetorgPerson objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorUserPage nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsClassname: com.netscape.management.client.ug.ResEditorNTUser nsClassname: com.netscape.management.client.ug.ResEditorPosixUser nsmerge: {nsclassname}MULTI_MERGE dn: cn=organizationalPerson,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: organizationalPerson objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorUserPage nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsmerge: {nsclassname}MULTI_MERGE dn: cn=groupofuniquenames,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsClassname nsClassname: com.netscape.management.client.ug.ResEditorGroupInfo nsClassname: com.netscape.management.client.ug.ResEditorGroupMembers nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsClassname: com.netscape.management.client.ug.ResEditorPosixGroup dn: cn=groupofuniquenames,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: groupofuniquenames objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorGroupInfo nsClassname: com.netscape.management.client.ug.ResEditorGroupMembers nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsClassname: com.netscape.management.client.ug.ResEditorPosixGroup nsmerge: {nsclassname}MULTI_MERGE dn: cn=organizationalunit,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: organizationalunit objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.OUPage nsClassname: com.netscape.management.client.ug.LanguagePage nsmerge: {nsclassname}MULTI_MERGE dn: cn=defaultObjectClassesContainer,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef cn: DefaultObjectClassesContainer dn: cn=user,cn=defaultObjectClassesContainer,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: user nsDefaultObjectClass: top nsDefaultObjectClass: person nsDefaultObjectClass: organizationalPerson nsDefaultObjectClass: inetorgperson dn: cn=group,cn=defaultObjectClassesContainer,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: group nsDefaultObjectClass: top nsDefaultObjectClass: groupofuniquenames dn: cn=ou,cn=defaultObjectClassesContainer,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: ou nsDefaultObjectClass: top nsDefaultObjectClass: organizationalunit dn: cn=topologyplugin,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef objectClass: extensibleObject cn: topologyplugin nsmerge: ADD_IF_EMPTY dn: cn=defaultplugin,cn=topologyplugin,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstopologyplugin objectClass: extensibleObject objectClass: nsAdminObject cn: defaultplugin nsClassname: com.netscape.management.client.topology.DefaultTopologyPlugin nsmerge: {nsclassname}MULTI_MERGE dn: cn=UI,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: UI objectClass: top objectClass: nsAdminConsoleUser 389-admin-1.1.35/admserv/schema/ldif/10dsdata.ldif.tmpl000066400000000000000000000214701220472121400222440ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: o=NetscapeRoot changetype: modify add: aci aci: (targetattr = "*")(version 3.0; acl "SIE Group (%dsid%)"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsOsVersion replace: nsHardwarePlatform nsOsVersion: %uname_a% nsHardwarePlatform: %uname_m% dn: cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsHost objectClass: groupOfUniqueNames cn: %fqdn% serverHostName: %fqdn% nsOsVersion: %uname_a% nsHardwarePlatform: %uname_m% uniqueMember: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify add: uniqueMember uniqueMember: cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: nsAdminGroup objectClass: groupOfUniqueNames objectClass: nsDirectoryInfo objectClass: top nsAdminGroupName: Server Group nsAdminSIEDN: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsDirectoryInfoRef: cn=UserDirectory,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: Server Group uniqueMember: cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsProductVersion replace: nsBuildNumber replace: nsServerMigrationClassname replace: nsServerCreationClassname nsProductVersion: %ds_version% nsBuildNumber: %ds_buildnum% nsServerMigrationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsServerCreationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: nsApplication objectClass: groupOfUniqueNames objectClass: top cn: %brand% Directory Server nsProductName: %brand% Directory Server nsProductVersion: %ds_version% nsNickName: slapd nsBuildNumber: %ds_buildnum% nsVendor: %vendor% installationTimeStamp: %timestamp% nsExpirationDate: 0 nsBuildSecurity: domestic uniqueMember: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsServerMigrationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsServerCreationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: netscapeServer objectClass: nsDirectoryServer objectClass: nsResourceRef objectClass: nsConfig objectClass: groupOfUniqueNames objectClass: top nsServerSecurity: off nsServerID: slapd-%dsid% nsBindDN: %rootdn% nsBaseDN: %ds_suffix% nsServerPort: %ds_port% nsSecureServerPort: %ds_secure_port% serverProductName: Directory Server (%dsid%) serverVersionNumber: %ds_version% installationTimeStamp: %timestamp% nsSuiteSpotUser: %ds_user% serverHostName: %fqdn% cn: slapd-%dsid% uniqueMember: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot uniqueMember: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) aci: (targetattr="uniquemember || serverProductName || userpassword || description")(targetfilter=(objectclass=netscapeServer))(version 3.0; acl "Enable access delegation"; allow (write) groupdn="ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: serverVersionNumber serverVersionNumber: %ds_version% dn: cn=configuration,cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsClassname replace: nsJarfilename nsClassname: com.netscape.admin.dirserv.DSAdmin@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsJarfilename: %ds_console_jar% dn: cn=configuration,cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: nsResourceRef objectClass: nsAdminObject objectClass: nsDirectoryInfo objectClass: top cn: configuration nsClassname: com.netscape.admin.dirserv.DSAdmin@%ds_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsJarfilename: %ds_console_jar% nsDirectoryInfoRef: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: ou=cn\=slapd-%dsid%\,cn\=%brand% Directory Server\,cn\=Server Group\,cn\=%fqdn%\,ou\=%domain%\,o\=NetscapeRoot,ou=UserPreferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: ou=%escapedrootdn%,ou=UserPreferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: %rootdn% dn: cn=nsroledefinition,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot changetype: modify add: nsClassname nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleInfo@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleMembers@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleAccountPage@%ds_console_jar% dn: cn=nsroledefinition,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: nsroledefinition objectClass: top objectClass: extensibleObject objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleInfo@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleMembers@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleAccountPage@%ds_console_jar% nsmerge: {nsclassname}MULTI_MERGE dn: cn=cossuperdefinition,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot changetype: modify add: nsClassname nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosInfo@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosAttributes@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosTemplate@%ds_console_jar% dn: cn=cossuperdefinition,cn=ResourceEditorExtension,ou=%console_version%,ou=Admin,ou=Global Preferences,ou=%domain%,o=NetscapeRoot cn: cossuperdefinition objectClass: top objectClass: extensibleObject objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosInfo@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosAttributes@%ds_console_jar% nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosTemplate@%ds_console_jar% nsmerge: {nsclassname}MULTI_MERGE 389-admin-1.1.35/admserv/schema/ldif/10rm_dsdata.ldif.tmpl000066400000000000000000000030061220472121400227350ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: o=NetscapeRoot changetype: modify delete: aci aci: (targetattr = "*")(version 3.0; acl "SIE Group"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify delete: uniqueMember uniqueMember: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: delete dn: ou=cn\=slapd-%dsid%\,cn\=%brand% Directory Server\,cn\=Server Group\,cn\=%fqdn%\,ou\=%domain%\,o\=NetscapeRoot,ou=UserPreferences,ou=%domain%,o=NetscapeRoot changetype: delete 389-admin-1.1.35/admserv/schema/ldif/11dstasks.ldif.tmpl000066400000000000000000000155111220472121400224600ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=Tasks,%ds_sie% objectClass: top objectClass: nsResourceRef cn: Tasks dn: cn=Operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation # change description so that it always lists the correct tasks dn: cn=task summary,cn=Operation,cn=Tasks,%ds_sie% changetype: modify replace: description description: start stop restart Backup Restore KeyCert Authenticate CompleteImport CompleteExport dn: cn=task summary,cn=Operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nsConfig description: start stop restart Backup Restore KeyCert Authenticate CompleteImport CompleteExport cn: task summary dn: cn=start,cn=Operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Start@%ds_console_jar%@%as_sie% dn: cn=start,cn=Operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Start@%ds_console_jar%@%as_sie% nsExecRef: ds_start cn: start dn: cn=stop,cn=Operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Stop@%ds_console_jar%@%as_sie% dn: cn=stop,cn=Operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Stop@%ds_console_jar%@%as_sie% nsExecRef: ds_shutdown cn: stop dn: cn=restart,cn=Operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Restart@%ds_console_jar%@%as_sie% dn: cn=restart,cn=Operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restart@%ds_console_jar%@%as_sie% nsExecRef: ds_restart cn: restart dn: cn=Backup,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Backup@%ds_console_jar%@%as_sie% dn: cn=Backup,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Backup@%ds_console_jar%@%as_sie% cn: Backup dn: cn=Restore,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Restore@%ds_console_jar%@%as_sie% dn: cn=Restore,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restore@%ds_console_jar%@%as_sie% cn: Restore dn: cn=KeyCert,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.KeyCert@%ds_console_jar%@%as_sie% dn: cn=KeyCert,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.KeyCert@%ds_console_jar%@%as_sie% cn: KeyCert dn: cn=Authenticate,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.Authenticate@%ds_console_jar%@%as_sie% dn: cn=Authenticate,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Authenticate@%ds_console_jar%@%as_sie% cn: Authenticate dn: cn=CompleteImport,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.CompleteImport@%ds_console_jar%@%as_sie% dn: cn=CompleteImport,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteImport@%ds_console_jar%@%as_sie% cn: CompleteImport dn: cn=CompleteExport,cn=operation,cn=Tasks,%ds_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.admin.dirserv.task.CompleteExport@%ds_console_jar%@%as_sie% dn: cn=CompleteExport,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteExport@%ds_console_jar%@%as_sie% cn: CompleteExport dn: cn=ViewLog,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: viewlog cn: ViewLog dn: cn=ListBackups,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_listdb cn: ListBackups dn: cn=Remove,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_remove cn: Remove dn: cn=CreateVLVIndex,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject cn: CreateVLVIndex dn: cn=AddIndex,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject cn: AddIndex dn: cn=SNMPCtrl,cn=operation,cn=Tasks,%ds_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_snmpctrl cn: SNMPCtrl dn: cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsResourceRef cn: Tasks dn: cn=Operation,cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation dn: cn=Migrate,cn=Operation,cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?migrateInstance cn: Migrate dn: cn=Create,cn=Operation,cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_create cn: Create dn: cn=GetConfigInfo,cn=Operation,cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?getConfigInfo cn: GetConfigInfo dn: cn=MigrateLocalDB,cn=Operation,cn=Tasks,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?migrateLocalDB cn: MigrateLocalDB 389-admin-1.1.35/admserv/schema/ldif/12dsconfig.mod.tmpl000066400000000000000000000033401220472121400224370ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=config changetype: modify add: aci aci: (targetattr="*")(version 3.0; acl "Configuration Administrators Group"; allow (all) groupdn="ldap:///cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr="*")(version 3.0; acl "Configuration Administrator"; allow (all) userdn="ldap:///uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr = "*")(version 3.0; acl "SIE Group"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=SNMP,cn=config changetype: modify add: aci aci: (target="ldap:///cn=SNMP,cn=config")(targetattr !="aci")(version 3.0;acl "snmp";allow (read, search, compare)(userdn = "ldap:///anyone");) dn: oid=2.16.840.1.113730.3.4.9,cn=features,cn=config changetype: modify add: aci aci: (targetattr != "aci")(version 3.0; acl "VLV Request Control"; allow( read, search, compare, proxy ) userdn = "ldap:///all";) 389-admin-1.1.35/admserv/schema/ldif/13dsschema.mod.tmpl000066400000000000000000000027361220472121400224430ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=schema changetype: modify add: aci aci: (target="ldap:///cn=schema")(targetattr !="aci")(version 3.0;acl "anonymous, no acis"; allow (read, search, compare) userdn = "ldap:///anyone";) aci: (targetattr="*")(version 3.0; acl "Configuration Administrators Group"; allow (all) groupdn="ldap:///cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr="*")(version 3.0; acl "Configuration Administrator"; allow (all) userdn="ldap:///uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr = "*")(version 3.0; acl "SIE Group"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) 389-admin-1.1.35/admserv/schema/ldif/14dsmonitor.mod.tmpl000066400000000000000000000017121220472121400226640ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=monitor changetype: modify add: aci aci: (target ="ldap:///cn=monitor*")(targetattr != "aci || connection")(version 3.0; acl "monitor"; allow( read, search, compare ) userdn = "ldap:///anyone";) 389-admin-1.1.35/admserv/schema/ldif/15dspta.mod.tmpl.in000066400000000000000000000020131220472121400223620ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=Pass Through Authentication,cn=plugins,cn=config changetype: mod replace: nsslapd-pluginarg0 nsslapd-pluginarg0: %config_ds_url% dn: cn=Pass Through Authentication,cn=plugins,cn=config changetype: mod replace: nsslapd-pluginEnabled nsslapd-pluginEnabled: on 389-admin-1.1.35/admserv/schema/ldif/16dssuffixadmin.mod.tmpl000066400000000000000000000025121220472121400235130ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: %ds_suffix% changetype: modify add: aci aci: (targetattr="*")(version 3.0; acl "Configuration Administrators Group"; allow (all) groupdn="ldap:///cn=Configuration Administrators,ou=Groups,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr="*")(version 3.0; acl "Configuration Administrator"; allow (all) userdn="ldap:///uid=%as_uid%,ou=Administrators,ou=TopologyManagement,o=NetscapeRoot";) aci: (targetattr = "*")(version 3.0; acl "SIE Group"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%,cn=%brand% Directory Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) 389-admin-1.1.35/admserv/schema/ldif/20asdata.ldif.tmpl000066400000000000000000000144231220472121400222420ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsOsVersion replace: nsHardwarePlatform nsOsVersion: %uname_a% nsHardwarePlatform: %uname_m% dn: cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsHost objectClass: groupOfUniqueNames cn: %fqdn% serverHostName: %fqdn% nsOsVersion: %uname_a% nsHardwarePlatform: %uname_m% uniqueMember: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify add: aci add: uniqueMember aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) userdn="ldap:///cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) uniqueMember: cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: nsAdminGroup objectClass: groupOfUniqueNames objectClass: nsDirectoryInfo objectClass: top nsAdminGroupName: Server Group nsDirectoryInfoRef: cn=UserDirectory,ou=Global Preferences,ou=%domain%,o=NetscapeRoot nsAdminSIEDN: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot cn: Server Group uniqueMember: cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsProductVersion replace: nsBuildNumber replace: nsServerMigrationClassname nsProductVersion: %as_version% nsBuildNumber: %as_buildnum% nsServerMigrationClassname: com.netscape.management.admserv.AdminServerProduct@%as_console_jar% dn: cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: nsApplication objectClass: groupOfUniqueNames cn: %brand% Administration Server nsVendor: %vendor% nsProductName: %brand% Administration Server nsNickName: admin nsProductVersion: %as_version% nsBuildNumber: %as_buildnum% installationTimeStamp: %timestamp% nsBuildSecurity: domestic nsServerMigrationClassname: com.netscape.management.admserv.AdminServerProduct@%as_console_jar% uniqueMember: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot aci: (targetattr=*)(targetfilter=(nsNickName=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: netscapeServer objectClass: nsAdminServer objectClass: nsResourceRef objectClass: groupOfUniqueNames cn: admin-serv-%asid% nsServerID: admin-serv serverProductName: Administration Server serverHostName: %fqdn% installationTimeStamp: %timestamp% uniqueMember: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) aci: (targetattr="uniquemember || serverProductName || userpassword || description")(targetfilter=(objectclass=netscapeServer))(version 3.0; acl "Enable access delegation"; allow (write) groupdn="ldap:///cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: cn=configuration,cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsClassname nsClassname: com.netscape.management.admserv.AdminServer@%as_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=configuration,cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot objectClass: nsConfig objectClass: nsAdminConfig objectClass: nsAdminObject objectClass: nsDirectoryInfo objectClass: top cn: Configuration nsServerPort: %as_port% nsSuiteSpotUser: %as_user% nsServerAddress: %as_addr% nsAdminEnableEnduser: on nsAdminEnableDSGW: on nsDirectoryInfoRef: cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot nsAdminUsers: %admpw% nsErrorLog: %as_error% nsPidLog: %as_pid% nsAccessLog: %as_access% nsAdminCacheLifetime: 600 nsAdminAccessHosts: *.%domain% nsAdminAccessAddresses: * nsAdminOneACLDir: adminacl nsDefaultAcceptLanguage: en nsClassname: com.netscape.management.admserv.AdminServer@%as_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable delegated admin to access configuration"; allow (read, search) groupdn="ldap:///cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot";) dn: ou=cn\=admin-serv-%asid%\,cn\=%brand% Administration Server\,cn\=Server Group\,cn\=%fqdn%\,ou\=%domain%\,o\=NetscapeRoot,ou=UserPreferences,ou=%domain%,o=NetscapeRoot objectClass: top objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=netscaperoot 389-admin-1.1.35/admserv/schema/ldif/21astasks.ldif.tmpl000066400000000000000000000171151220472121400224600ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=Tasks,%as_sie% objectClass: top objectClass: nsResourceRef cn: Tasks dn: cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation dn: cn=Stop,cn=Operation,cn=Tasks,%as_sie% changetype: modify replace: nsClassname replace: nsHelpRef nsClassname: com.netscape.management.admserv.task.Stop@%as_console_jar%@%as_sie% nsHelpRef: %as_help_path%/stopadm.html dn: cn=Stop,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/stopadm.html nsExecRef: stopsrv nsClassname: com.netscape.management.admserv.task.Stop@%as_console_jar%@%as_sie% cn: Stop dn: cn=Restart,cn=Operation,cn=Tasks,%as_sie% changetype: modify replace: nsClassname replace: nsHelpRef nsClassname: com.netscape.management.admserv.task.Restart@%as_console_jar%@%as_sie% nsHelpRef: %as_help_path%/restartadm.html dn: cn=Restart,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/restartadm.html nsExecRef: restartsrv nsClassname: com.netscape.management.admserv.task.Restart@%as_console_jar%@%as_sie% cn: Restart dn: cn=Authenticate,cn=Operation,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/userauth.html dn: cn=Authenticate,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask nsHelpRef: %as_help_path%/userauth.html nsExecRef: userauth cn: Authenticate dn: cn=ListOldServers,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: listOldSrvs cn: ListOldServers dn: cn=StartConfigDS,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask nsExecRef: start_config_ds cn: StartConfigDS dn: cn=MigrateConfig,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: migrateConfig cn: MigrateConfig dn: cn=StatusPing,cn=Operation,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: statusping nsLogSuppress: true cn: StatusPing dn: cn=Configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstaskgroup nsTaskLabel: Configuration Tasks Group cn: Configuration dn: cn=ServerSetup,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsClassname nsClassname: com.netscape.management.admserv.task.ServerSetup@%as_console_jar%@%as_sie% dn: cn=ServerSetup,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: config nsClassname: com.netscape.management.admserv.task.ServerSetup@%as_console_jar%@%as_sie% cn: ServerSetup dn: cn=DirectorySetup,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: dsconfig cn: DirectorySetup dn: cn=UGDirectorySetup,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ugdsconfig cn: UGDirectorySetup dn: cn=AccessSetup,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: admpw cn: AccessSetup dn: cn=Logging,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsClassname replace: nsHelpRef nsClassname: com.netscape.management.admserv.task.Logging@%as_console_jar%@%as_sie% nsHelpRef: %as_help_path%/logging.html dn: cn=Logging,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/logging.html nsExecRef: config nsClassname: com.netscape.management.admserv.task.Logging@%as_console_jar%@%as_sie% cn: Logging dn: cn=SecurityOp,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: security cn: SecurityOp dn: cn=CertSetup,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsClassname replace: nsHelpRef nsClassname: com.netscape.management.admserv.task.CertSetup@%as_console_jar%@%as_sie% nsHelpRef: %as_help_path%/certrequest.html dn: cn=CertSetup,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/certrequest.html nsClassname: com.netscape.management.admserv.task.CertSetup@%as_console_jar%@%as_sie% cn: CertSetup dn: cn=SSLActivate,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/ssl_activate.html dn: cn=SSLActivate,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/ssl_activate.html nsExecRef: sec-activate cn: SSLActivate dn: cn=ReadLog,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/logging.html dn: cn=ReadLog,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/logging.html nsExecRef: ReadLog cn: ReadLog dn: cn=HTMLAdmin,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/htmladmin.html dn: cn=HTMLAdmin,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/htmladmin.html nsExecRef: htmladmin cn: HTMLAdmin dn: cn=StatPingServ,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/statpingserv.html dn: cn=StatPingServ,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/statpingserv.html nsExecRef: statpingserv cn: StatPingServ dn: cn=ViewData,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/viewdata.html dn: cn=ViewData,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/viewdata.html nsExecRef: viewdata cn: ViewData dn: cn=ViewLog,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/viewlog.html dn: cn=ViewLog,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/viewlog.html nsExecRef: viewlog cn: ViewLog dn: cn=MonReplication,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/monreplication.html dn: cn=MonReplication,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/monreplication.html nsExecRef: monreplication cn: MonReplication dn: cn=repl-monitor-cgi.pl,cn=configuration,cn=Tasks,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/monreplication.html dn: cn=repl-monitor-cgi.pl,cn=configuration,cn=Tasks,%as_sie% objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: %as_help_path%/monreplication.html nsExecRef: repl-monitor-cgi.pl cn: repl-monitor-cgi.pl 389-admin-1.1.35/admserv/schema/ldif/22ascommands.ldif.tmpl000066400000000000000000000024151220472121400231320ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK dn: cn=Commands,%as_sie% objectClass: top objectClass: nsResourceRef cn: Commands dn: cn=sync-task-sie-data,cn=Commands,%as_sie% changetype: modify replace: nsHelpRef nsHelpRef: %as_help_path%/sync-task-sie-data.html dn: cn=sync-task-sie-data,cn=Commands,%as_sie% objectClass: top objectClass: nstask nsHelpRef: %as_help_path%/sync-task-sie-data.html nsExecRef: runtime cn: sync-task-sie-data dn: cn=change-sie-password,cn=Commands,%as_sie% objectClass: top objectClass: nstask nsExecRef: runtime cn: change-sie-password 389-admin-1.1.35/admserv/schema/ldif/asmigrate.ldif.tmpl000066400000000000000000000051231220472121400226140ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # this form of LDIF change record format is wrong, wrong, wrong # but were stuck with it because Mozilla perldap LDIF is braindead # the operation lines must all be adjacent - perldap LDIF will throw # away values that are not adjacent - so you must have all of the replace: # lines next to each other, all of the add: lines, delete: lines, etc. dn: cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsVendor replace: nsProductVersion replace: nsBuildNumber replace: installationTimeStamp replace: nsServerMigrationClassname nsVendor: %vendor% nsProductVersion: %as_version% nsBuildNumber: %as_buildnum% installationTimeStamp: %timestamp% nsServerMigrationClassname: com.netscape.management.admserv.AdminServerProduct@%as_console_jar% delete: nsInstalledLocation dn: cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: installationTimeStamp installationTimeStamp: %timestamp% delete: userPassword delete: serverRoot dn: cn=configuration,cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify replace: nsSuiteSpotUser replace: nsAdminUsers replace: nsErrorLog replace: nsPidLog replace: nsAccessLog replace: nsClassName nsSuiteSpotUser: %as_user% nsAdminUsers: %admpw% nsErrorLog: %as_error% nsPidLog: %as_pid% nsAccessLog: %as_access% nsClassname: com.netscape.management.admserv.AdminServer@%as_console_jar%@cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot dn: cn=encryption,cn=configuration,cn=admin-serv-%asid%,cn=%brand% Administration Server,cn=Server Group,cn=%fqdn%,ou=%domain%,o=NetscapeRoot changetype: modify delete: nsCertFile delete: nsKeyFile delete: nsSSL2 delete: nsSSL2Ciphers 389-admin-1.1.35/autogen.sh000077500000000000000000000022531220472121400152100ustar00rootroot00000000000000#!/bin/sh # Check autoconf version AC_VERSION=`autoconf --version | grep '^autoconf' | sed 's/.*) *//'` case $AC_VERSION in '' | 0.* | 1.* | 2.[0-4]* | 2.[0-9] | 2.5[0-8]* ) echo "You must have autoconf version 2.59 or later installed (found version $AC_VERSION)." exit 1 ;; * ) echo "Found autoconf version $AC_VERSION" ;; esac # Check automake version AM_VERSION=`automake --version | grep '^automake' | sed 's/.*) *//'` case $AM_VERSION in 1.1*) echo "Found automake version $AM_VERSION" ;; # 1.10 or later - ok '' | 0.* | 1.[0-8]* | 1.9.[0-5]* ) echo "You must have automake version 1.9.6 or later installed (found version $AM_VERSION)." exit 1 ;; * ) echo "Found automake version $AM_VERSION" ;; esac # Check libtool version LT_VERSION=`libtool --version | grep ' libtool)' | sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/'` case $LT_VERSION in '' | 0.* | 1.[0-4]* | 1.5.[0-9] | 1.5.[0-1]* | 1.5.2[0-1]* ) echo "You must have libtool version 1.5.22 or later installed (found version $LT_VERSION)." exit 1 ;; * ) echo "Found libtool version $LT_VERSION" ;; esac # Run autoreconf echo "Running autoreconf -fvi" autoreconf -fvi 389-admin-1.1.35/buildnum.pl000077500000000000000000000043561220472121400153740ustar00rootroot00000000000000#!/usr/bin/perl # BEGIN COPYRIGHT BLOCK # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK #-------------------------------------------- # buildnum.pl # # Generates a dated build number and writes # out a buildnum.dat file in a user specified # subdirectory. # # Usage: buildnum.pl -p #-------------------------------------------- use Getopt::Std; use FileHandle; autoflush STDERR 1; getopts('p:H'); if ($opt_H) {exitHelp();} # Load arguments $platdir = $opt_p; # Get current time @now = gmtime; # Format buildnum as YYYY.DDD.HHMM $year = $now[5] + 1900; $doy = $now[7] + 1; if ($doy < 100) { $doy = 0 . $doy; } $tod = $now[2] . $now[1]; $buildnum = "$year.$doy.$tod"; if ($platdir) { # Write buildnum.dat $buildnum_file = "./$platdir/buildnum.dat"; open(BUILDNUM,">$buildnum_file") || die "Error: Can't create $buildnum_file: $!\n"; print BUILDNUM "\\\"$buildnum\\\""; close(BUILDNUM); } else { print "\\\"$buildnum\\\""; } #---------- exitHelp subroutine ---------- sub exitHelp { print(STDERR "$0: Generates a dated build number. \tUsage: $0 -p \t-p Platform subdirectory. \t-H Print this help message\n"); exit(0); } 389-admin-1.1.35/compile000077500000000000000000000161031220472121400145640ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999-2012 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 389-admin-1.1.35/config.guess000077500000000000000000001274321220472121400155360ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: 389-admin-1.1.35/config.h.in000066400000000000000000000220161220472121400152310ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* package bug report url */ #undef ADM_PACKAGE_BUGREPORT /* package string */ #undef ADM_PACKAGE_STRING /* package tarball name */ #undef ADM_PACKAGE_TARNAME /* package version */ #undef ADM_PACKAGE_VERSION /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* cpu type pa-risc */ #undef CPU_hppa /* cpu type ia64 */ #undef CPU_ia64 /* cpu type sparc */ #undef CPU_sparc /* Use the service command instead of the stop|start|restart scripts */ #undef ENABLE_SERVICE /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if your system has a working `chown' function. */ #undef HAVE_CHOWN /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the `endpwent' function. */ #undef HAVE_ENDPWENT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* have the function ldap_url_parse_ext */ #undef HAVE_LDAP_URL_PARSE_EXT /* have the function ldap_url_parse_no_defaults */ #undef HAVE_LDAP_URL_PARSE_NO_DEFAULTS /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if `lstat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_LSTAT_EMPTY_STRING_BUG /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `rmdir' function. */ #undef HAVE_RMDIR /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strpbrk' function. */ #undef HAVE_STRPBRK /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* HP-UX */ #undef HPUX /* HP-UX 11 */ #undef HPUX11 /* HP-UX 11.11 */ #undef HPUX11_11 /* HP-UX 11.23 */ #undef HPUX11_23 /* Use FHS layout */ #undef IS_FHS /* Use FHS optional layout */ #undef IS_FHS_OPT /* Linux */ #undef LINUX /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Linux */ #undef Linux /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Domestic security level enabled by default */ #undef NS_DOMESTIC /* OS version */ #undef OSVERSION /* OS HP-UX */ #undef OS_hpux /* OS SOLARIS */ #undef OS_solaris /* package tar name */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* SVR4 */ #undef SVR4 /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* If defined, using MozLDAP for LDAP SDK */ #undef USE_MOZLDAP /* If defined, using OpenLDAP for LDAP SDK */ #undef USE_OPENLDAP /* package version */ #undef VERSION /* use httpd 2.4 */ #undef WITH_APACHE24 /* use systemd to stop/start/restart the servers */ #undef WITH_SYSTEMD /* UNIX */ #undef XP_UNIX /* Source namespace */ #undef _HPUX_SOURCE /* POSIX revision */ #undef _POSIX_C_SOURCE /* _REENTRANT */ #undef _REENTRANT /* SVID_GETTOD */ #undef _SVID_GETTOD /* SVR4 */ #undef __svr4 /* SVR4 */ #undef __svr4__ /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* HP-UX */ #undef hpux /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* SunOS5 */ #undef sunos5 /* Define to `int' if doesn't define. */ #undef uid_t /* Define as `fork' if `vfork' does not work. */ #undef vfork 389-admin-1.1.35/config.sub000077500000000000000000001053271220472121400152000ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: 389-admin-1.1.35/configure000077500000000000000000025124271220472121400151310ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dirsrv-admin 1.1.10. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://bugzilla.redhat.com/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dirsrv-admin' PACKAGE_TARNAME='dirsrv-admin' PACKAGE_VERSION='1.1.10' PACKAGE_STRING='dirsrv-admin 1.1.10' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' PACKAGE_URL='' ac_unique_file="admserv/cgi-src40/viewlog.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_default_prefix=/opt/dirsrv ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS SYSTEMD_FALSE SYSTEMD_TRUE APACHE24_FALSE APACHE24_TRUE APACHE22_FALSE APACHE22_TRUE WINNT_FALSE WINNT_TRUE OPENLDAP_FALSE OPENLDAP_TRUE vendorurl vendor capbrand brand dsgwcookiedir dsgwcgibindir updatedir perldir infdir nssmoddir admmoddir ldifdir admservip admservport pidfile piddir admlogdir httpdgroup httpduser mimemagic httpdconfdir httpdconf manualdir icondir propertydir modnssbindir moddir cmdbindir cgibindir instancename ap_ver_suf extra_cppflags apache_bin apache_prefix apache_conf apache_inc apr_inc icu_bin icu_inc icu_libdir icu_lib adminutil_ver adminutil_libdir adminutil_lib adminutil_inc ol_libver openldap_libdir openldap_lib openldap_inc ldapsdk_libdir ldapsdk_lib ldapsdk_inc sasl_libdir sasl_lib sasl_inc nss_libdir nss_lib nss_inc nspr_libdir nspr_lib nspr_inc enable_service dirsrv_service_name dslibdir instconfigdir SELINUX_FALSE SELINUX_TRUE with_selinux nsspcache GENRB ICU_CONFIG ldap_lib_ldif APR_CONFIG APXS HTTPD dirsrv_systemd_suffix dirsrv_systemd_prefix with_systemddirsrvgroupname with_systemdsystemunitdir PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG initconfigdir SOLARIS_FALSE SOLARIS_TRUE HPUX_FALSE HPUX_TRUE CXXLINK_REQUIRED_FALSE CXXLINK_REQUIRED_TRUE perlexec initdir LIBCRUN LIBCSTD LIBNSL LIBSOCKET BUNDLE_FALSE BUNDLE_TRUE debug_defs PACKAGE_BASE_VERSION PACKAGE_BASE_NAME LIBOBJS CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX host_os host_vendor host_cpu host build_os build_vendor build_cpu build MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_debug enable_bundle enable_rpath with_fhs with_fhs_opt with_initddir with_systemdsystemunitdir with_systemddirsrvgroupname with_fortitude with_httpd enable_threading with_apxs with_apr_config with_nspr with_nspr_inc with_nspr_lib with_nss with_nss_inc with_nss_lib with_sasl with_sasl_inc with_sasl_lib with_openldap with_openldap_inc with_openldap_lib with_ldapsdk with_ldapsdk_inc with_ldapsdk_lib with_icu with_icu_inc with_icu_lib with_icu_bin with_adminutil with_modnss_lib with_modnss_bin with_selinux with_instconfigdir with_dslibdir enable_service ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dirsrv-admin 1.1.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dirsrv-admin] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dirsrv-admin 1.1.10:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable debug features (default: no) --enable-bundle Enable bundled dependencies (default: no) --enable-rpath Allow libtool to add an rpath to $libdir (default: no) --enable-threading Admin Server works best if Apache has threading support. Use --disable-threading to force the use of an Apache without threading support. --enable-service Use the service command instead of the stop|start|restart scripts Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-fhs Use FHS layout --with-fhs-opt Use FHS optional layout --with-initddir=/path Absolute path (not relative like some of the other options) that should contain the SysV init scripts (default '$(sysconfdir)/rc.d') --with-systemdsystemunitdir=PATH Directory for systemd service files (default: $with_systemdsystemunitdir) --with-systemddirsrvgroupname=NAME Name of group target for directory server (default: $with_systemddirsrvgroupname) --with-fortitude=PATH Fortitude root directory (default: $default_fortitudedir) --with-httpd=PATH Full path of Apache binary. Configure will usually find the right one, but if it does not, use this to specify the correct binary. --with-apxs=PATH Path to apxs --with-apr-config=PATH Use apr-config to determine the APR directory. Supply optional path to locate apr-config --with-nspr=PATH Netscape Portable Runtime (NSPR) directory --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory --with-nss=PATH Network Security Services (NSS) directory --with-nss-inc=PATH Network Security Services (NSS) include directory --with-nss-lib=PATH Network Security Services (NSS) library directory --with-sasl=PATH Use sasl from supplied path --with-sasl-inc=PATH SASL include file directory --with-sasl-lib=PATH SASL library directory --with-openldap[=PATH] Use OpenLDAP - optional PATH is path to OpenLDAP SDK --with-openldap-inc=PATH OpenLDAP SDK include directory --with-openldap-lib=PATH OpenLDAP SDK library directory --with-ldapsdk[=PATH] Mozilla LDAP SDK directory --with-ldapsdk-inc=PATH Mozilla LDAP SDK include directory --with-ldapsdk-lib=PATH Mozilla LDAP SDK library directory --with-icu=PATH ICU directory --with-icu-inc=PATH ICU include directory --with-icu-lib=PATH ICU library directory --with-icu-bin=PATH ICU binary directory --with-adminutil=PATH Adminutil directory --with-modnss-lib=PATH MOD_NSS Apache module directory --with-modnss-bin=PATH MOD_NSS binary directory --with-selinux Build SELinux policy --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_BASE_NAME) --with-dslibdir=/path Directory Server library directory (default $libdir/$PACKAGE_BASE_NAME) Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dirsrv-admin configure 1.1.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to http://bugzilla.redhat.com/ ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dirsrv-admin $as_me 1.1.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # include the version information . $srcdir/VERSION.sh { $as_echo "$as_me:${as_lineno-$LINENO}: This is configure for $PACKAGE_TARNAME $PACKAGE_VERSION" >&5 $as_echo "$as_me: This is configure for $PACKAGE_TARNAME $PACKAGE_VERSION" >&6;} cat >>confdefs.h <<_ACEOF #define ADM_PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define ADM_PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define ADM_PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define ADM_PACKAGE_STRING "$PACKAGE_STRING" _ACEOF am__api_version='1.12' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dirsrv-admin' VERSION='1.1.10' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # define these for automake distdir VERSION=$PACKAGE_VERSION PACKAGE=$PACKAGE_TARNAME cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi # disable static libs by default - we only use a couple # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 $as_echo_n "checking for working chown... " >&6; } if ${ac_cv_func_chown_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_chown_works=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include int main () { char *f = "conftest.chown"; struct stat before, after; if (creat (f, 0600) < 0) return 1; if (stat (f, &before) < 0) return 1; if (chown (f, (uid_t) -1, (gid_t) -1) == -1) return 1; if (stat (f, &after) < 0) return 1; return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_chown_works=yes else ac_cv_func_chown_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f conftest.chown fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 $as_echo "$ac_cv_func_chown_works" >&6; } if test $ac_cv_func_chown_works = yes; then $as_echo "#define HAVE_CHOWN 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_closedir_void=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { return closedir (opendir (".")) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_closedir_void=no else ac_cv_func_closedir_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 $as_echo "$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5 $as_echo_n "checking whether lstat accepts an empty string... " >&6; } if ${ac_cv_func_lstat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_lstat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return lstat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_empty_string_bug=no else ac_cv_func_lstat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5 $as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; } if test $ac_cv_func_lstat_empty_string_bug = yes; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_LSTAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R $ac_have_decl _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in setrlimit endpwent ftruncate getcwd gethostbyname inet_ntoa localtime_r memmove memset mkdir munmap putenv rmdir socket strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strstr strtol tzset do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-admin//` # the default prefix - override with --prefix or --with-fhs or --with-fhs-opt # unfortunately, this must be a literal - it should be $PACKAGE_BASE_NAME PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-debug" >&5 $as_echo_n "checking for --enable-debug... " >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } debug_defs="-DDEBUG" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } debug_defs="" fi # Used for legacy style packaging where we bundle all of the dependencies. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-bundle" >&5 $as_echo_n "checking for --enable-bundle... " >&6; } # Check whether --enable-bundle was given. if test "${enable_bundle+set}" = set; then : enableval=$enable_bundle; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } bundle="1"; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } bundle=""; fi if test "$bundle" = "1"; then BUNDLE_TRUE= BUNDLE_FALSE='#' else BUNDLE_TRUE='#' BUNDLE_FALSE= fi # libtool automatically adds --rpath $libdir to each executable, and # there is apparently no standard way to disable this. Also, you cannot # override rpath with LD_LIBRARY_PATH, so this causes problems if you have # and old version of nss/nspr installed in the system $libdir, but you # want to use a different one. So we're disabling this rpath thing by # default and adding a --enable-rpath flag if you really, really want # to do this. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-rpath" >&5 $as_echo_n "checking for --enable-rpath... " >&6; } # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FHS..." >&5 $as_echo "$as_me: checking for FHS..." >&6;} # check for --with-fhs { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fhs" >&5 $as_echo_n "checking for --with-fhs... " >&6; } # Check whether --with-fhs was given. if test "${with_fhs+set}" = set; then : withval=$with_fhs; with_fhs=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$with_fhs" = "yes"; then $as_echo "#define IS_FHS 1" >>confdefs.h fi # check for --with-fhs-opt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fhs-opt" >&5 $as_echo_n "checking for --with-fhs-opt... " >&6; } # Check whether --with-fhs-opt was given. if test "${with_fhs_opt+set}" = set; then : withval=$with_fhs_opt; with_fhs_opt=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$with_fhs_opt" = "yes"; then $as_echo "#define IS_FHS_OPT 1" >>confdefs.h fi if test "$with_fhs" = "yes" -a "$with_fhs_opt" = "yes"; then as_fn_error $? "Can't set both --with-fhs and --with-fhs-opt. Please only use one of these options." "$LINENO" 5 fi $as_echo "#define NS_DOMESTIC 1" >>confdefs.h # server userid, groupid httpduser=nobody httpdgroup=nobody admservport=9830 admservip=0.0.0.0 # this is the subdir under $PACKAGE_BASE_NAME where admin server # specific configs, logs, etc. are found instancename=admin-serv # initdir # initdir is the location for the SysV init scripts - very heavily platform # dependent and not specified in fhs or lsb initdir='$(sysconfdir)/rc.d' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-initddir" >&5 $as_echo_n "checking for --with-initddir... " >&6; } # Check whether --with-initddir was given. if test "${with_initddir+set}" = set; then : withval=$with_initddir; if test "$withval" = yes -o "$withval" = no ; then as_fn_error $? "Please specify a full path with --with-initddir" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 $as_echo "$withval" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi CXXLINK_REQUIRED=0 # on most platforms, we will just use perl from PATH # On some platforms, we cannot. Why not just use any old # perl? Because of perldap. We use a perldap that is # compiled to either 32bit or 64bit, so we must use a native # perl binary compiled with the same bitsize. On Solaris # and HP-UX, /usr/bin/perl is 32 bit, so we cannot use # those with our 64 bit compiled product. perlexec='/usr/bin/env perl' case $host in *-*-linux*) $as_echo "#define XP_UNIX 1" >>confdefs.h $as_echo "#define Linux 1" >>confdefs.h $as_echo "#define LINUX 1" >>confdefs.h platform="linux" initdir='$(sysconfdir)/rc.d/init.d' ;; ia64-hp-hpux*) $as_echo "#define XP_UNIX 1" >>confdefs.h $as_echo "#define hpux 1" >>confdefs.h $as_echo "#define HPUX 1" >>confdefs.h $as_echo "#define HPUX11 1" >>confdefs.h $as_echo "#define HPUX11_23 1" >>confdefs.h $as_echo "#define CPU_ia64 /**/" >>confdefs.h $as_echo "#define OS_hpux 1" >>confdefs.h $as_echo "#define _POSIX_C_SOURCE 199506L" >>confdefs.h $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h # assume 64 bit perlexec='/opt/perl_64/bin/perl' CXXLINK_REQUIRED=1 httpdgroup=nogroup platform="hpux" initconfigdir="/$PACKAGE_BASE_NAME/$instancename" # HPUX doesn't use /etc for this initdir=/init.d ;; hppa*-hp-hpux*) $as_echo "#define XP_UNIX 1" >>confdefs.h $as_echo "#define hpux 1" >>confdefs.h $as_echo "#define HPUX 1" >>confdefs.h $as_echo "#define HPUX11 1" >>confdefs.h $as_echo "#define HPUX11_11 1" >>confdefs.h $as_echo "#define CPU_hppa /**/" >>confdefs.h $as_echo "#define OS_hpux 1" >>confdefs.h $as_echo "#define _POSIX_C_SOURCE 199506L" >>confdefs.h $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h CXXLINK_REQUIRED=1 httpdgroup=nogroup # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" initconfigdir="/$PACKAGE_BASE_NAME/$instancename" # HPUX doesn't use /etc for this initdir=/init.d ;; sparc-sun-solaris*) $as_echo "#define XP_UNIX 1" >>confdefs.h $as_echo "#define SVR4 1" >>confdefs.h $as_echo "#define __svr4 1" >>confdefs.h $as_echo "#define __svr4__ 1" >>confdefs.h $as_echo "#define _SVID_GETTOD 1" >>confdefs.h $as_echo "#define CPU_sparc /**/" >>confdefs.h $as_echo "#define OS_solaris 1" >>confdefs.h $as_echo "#define sunos5 1" >>confdefs.h $as_echo "#define OSVERSION 509" >>confdefs.h $as_echo "#define _REENTRANT 1" >>confdefs.h LIBSOCKET=-lsocket LIBSOCKET=$LIBSOCKET LIBNSL=-lnsl LIBNSL=$LIBNSL LIBCSTD=-lCstd LIBCSTD=$LIBCSTD LIBCRUN=-lCrun LIBCRUN=$LIBCRUN CXXLINK_REQUIRED=1 platform="solaris" # assume 64 bit perlexec='/usr/lib/sparcv9/dirsec/perl5x/bin/perl' initdir='$(sysconfdir)/init.d' ;; *) esac # cmd line overrides default setting above if test -n "$with_initddir" ; then initdir="$with_initddir" fi if test "$CXXLINK_REQUIRED" = 1; then CXXLINK_REQUIRED_TRUE= CXXLINK_REQUIRED_FALSE='#' else CXXLINK_REQUIRED_TRUE='#' CXXLINK_REQUIRED_FALSE= fi if test "$platform" = "hpux"; then HPUX_TRUE= HPUX_FALSE='#' else HPUX_TRUE='#' HPUX_FALSE= fi if test "$platform" = "solaris"; then SOLARIS_TRUE= SOLARIS_FALSE='#' else SOLARIS_TRUE='#' SOLARIS_FALSE= fi # set default initconfigdir if not already set # value will be set so as to be relative to $(sysconfdir) if test -z "$initconfigdir" ; then if test -d /etc/sysconfig ; then initconfigdir=/sysconfig elif test -d /etc/default ; then initconfigdir=/default else initconfigdir="/$PACKAGE_NAME/config" fi fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test -n "$PKG_CONFIG" ; then default_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-systemdsystemunitdir" >&5 $as_echo_n "checking for --with-systemdsystemunitdir... " >&6; } # Check whether --with-systemdsystemunitdir was given. if test "${with_systemdsystemunitdir+set}" = set; then : withval=$with_systemdsystemunitdir; fi if test "$with_systemdsystemunitdir" = yes ; then if test -n "$default_systemdsystemunitdir" ; then with_systemdsystemunitdir=$default_systemdsystemunitdir { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemdsystemunitdir" >&5 $as_echo "$with_systemdsystemunitdir" >&6; } else as_fn_error $? "You must specify --with-systemdsystemconfdir=/full/path/to/systemd/system directory" "$LINENO" 5 fi elif test "$with_systemdsystemunitdir" = no ; then with_systemdsystemunitdir= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemdsystemunitdir" >&5 $as_echo "$with_systemdsystemunitdir" >&6; } fi if test -n "$with_systemdsystemunitdir" ; then if test -z "$with_systemddirsrvgroupname" ; then with_systemddirsrvgroupname=$PACKAGE_BASE_NAME.target fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-systemddirsrvgroupname" >&5 $as_echo_n "checking for --with-systemddirsrvgroupname... " >&6; } # Check whether --with-systemddirsrvgroupname was given. if test "${with_systemddirsrvgroupname+set}" = set; then : withval=$with_systemddirsrvgroupname; fi if test "$with_systemddirsrvgroupname" = yes ; then as_fn_error $? "You must specify --with-systemddirsrvgroupname=name.of.group" "$LINENO" 5 elif test "$with_systemddirsrvgroupname" = no ; then as_fn_error $? "You must specify --with-systemddirsrvgroupname=name.of.group" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemddirsrvgroupname" >&5 $as_echo "$with_systemddirsrvgroupname" >&6; } fi $as_echo "#define WITH_SYSTEMD 1" >>confdefs.h dirsrv_systemd_prefix="${PACKAGE_BASE_NAME}@" dirsrv_systemd_suffix=".service" fi # Check for fortitude # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # check for --with-fortitude default_fortitudedir=/opt/fortitude { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fortitude" >&5 $as_echo_n "checking for --with-fortitude... " >&6; } # Check whether --with-fortitude was given. if test "${with_fortitude+set}" = set; then : withval=$with_fortitude; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } fortitudedir="$withval" elif test "$withval" = "yes" -a -d $default_fortitudedir ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $default_fortitudedir" >&5 $as_echo "using $default_fortitudedir" >&6; } fortitudedir="$default_fortitudedir" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$fortitudedir" ; then # see if there is a mod_nss in fortitude modnsslist=`ls $fortitudedir/modules.local/libmodnss.* 2> /dev/null` if test -n "$modnsslist" ; then nssmoddir="$fortitudedir/modules.local" fi # see if there is a nss_pcache if test -x "$fortitudedir/bin/nss_pcache" ; then modnssbindir="$fortitudedir/bin" fi # see if fortitude supplies apache if test -x "$fortitudedir/sbin/httpd.worker" ; then HTTPD="$fortitudedir/sbin/httpd.worker" fi # see if fortitude supplies apache modules if test -d "$fortitudedir/modules" ; then moddir="$fortitudedir/modules" fi # see if fortitude supplies apxs if test -x "$fortitudedir/sbin/apxs" ; then APXS="$fortitudedir/sbin/apxs" fi # see if fortitude supplies apr-config if test -x "$fortitudedir/bin/apr-config" ; then APR_CONFIG="$fortitudedir/bin/apr-config" fi fi # Check for web server # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-httpd" >&5 $as_echo_n "checking for --with-httpd... " >&6; } # Check whether --with-httpd was given. if test "${with_httpd+set}" = set; then : withval=$with_httpd; if test -x "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } HTTPD="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$HTTPD" ; then # Extract the first word of "httpd.worker", so it can be a program name with args. set dummy httpd.worker; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HTTPD+:} false; then : $as_echo_n "(cached) " >&6 else case $HTTPD in [\\/]* | ?:[\\/]*) ac_cv_path_HTTPD="$HTTPD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HTTPD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HTTPD=$ac_cv_path_HTTPD if test -n "$HTTPD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTTPD" >&5 $as_echo "$HTTPD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$HTTPD" -o ! -x "$HTTPD" ; then # Extract the first word of "httpd", so it can be a program name with args. set dummy httpd; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HTTPD+:} false; then : $as_echo_n "(cached) " >&6 else case $HTTPD in [\\/]* | ?:[\\/]*) ac_cv_path_HTTPD="$HTTPD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HTTPD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HTTPD=$ac_cv_path_HTTPD if test -n "$HTTPD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HTTPD" >&5 $as_echo "$HTTPD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$HTTPD" -o ! -x "$HTTPD" ; then as_fn_error $? "Apache2 httpd server not found" "$LINENO" 5 fi fi httpd_root=`$HTTPD -V | grep HTTPD_ROOT | cut -f2 -d=` httpd_root=`eval echo $httpd_root` httpd_conf_rel=`$HTTPD -V | grep SERVER_CONFIG_FILE | cut -f2 -d=` httpd_conf_rel=`eval echo $httpd_conf_rel` # Server version: Apache/2.2.2 verstr='Server version: Apache/' httpd_ver=`$HTTPD -v | grep "Server version:" | sed -e "s,$verstr,,"` case $httpd_ver in 2.4*) APACHE24=1 ;; 2.2*) APACHE22=1 ;; *) APACHE22= ;; esac httpdconf=${httpd_root}/${httpd_conf_rel} mimemagic=`awk '"MIMEMagicFile" == $1" {print $2}' $httpdconf` if test ! -f "$mimemagic" ; then # assume relative to root mimemagic=${httpd_root}/${mimemagic} fi # check for mime.types file httpdconfdir=`dirname $httpdconf` if test ! -f $httpdconfdir/mime.types ; then httpdconfdir="/etc" if test ! -f $httpdconfdir/mime.types ; then as_fn_error $? "mime.types file not found" "$LINENO" 5 fi fi if test -z "$enable_threading" ; then enable_threading=yes # if not set on cmdline, set default fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-threading" >&5 $as_echo_n "checking for --enable-threading... " >&6; } # Check whether --enable-threading was given. if test "${enable_threading+set}" = set; then : enableval=$enable_threading; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_threading" >&5 $as_echo "$enable_threading" >&6; } # check for worker model { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $HTTPD with threading support" >&5 $as_echo_n "checking for $HTTPD with threading support... " >&6; } httpd_model=`$HTTPD -V | grep "Server MPM:" | awk '{print $3}'` if test "$httpd_model" = Worker ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: good - threading model is supported" >&5 $as_echo "good - threading model is supported" >&6; } else httpd_model=`$HTTPD -V | grep "threaded:" | awk '{print $2}'` if test "$httpd_model" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: good - threading model is supported" >&5 $as_echo "good - threading model is supported" >&6; } else httpd_model=`$HTTPD -V | grep "APACHE_MPM_DIR" | grep "worker"` if test -n "httpd_model" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: good - threading model is supported" >&5 $as_echo "good - threading model is supported" >&6; } elif test "$enable_threading" = yes ; then as_fn_error $? "threading model not supported - use --disable-threading to force use of unthreaded model" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: NOTICE - threading support explicitly disabled - Admin Server authorization cache will not work correctly" >&5 $as_echo "NOTICE - threading support explicitly disabled - Admin Server authorization cache will not work correctly" >&6; } fi fi fi # check for --with-apxs { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-apxs" >&5 $as_echo_n "checking for --with-apxs... " >&6; } # Check whether --with-apxs was given. if test "${with_apxs+set}" = set; then : withval=$with_apxs; if test -x "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } APXS=$withval else echo as_fn_error $? "$withval not found or not executable" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$APXS" ; then # first look for APXS in same dir as HTTPD apachedir=`dirname $HTTPD` if test -x "$apachedir/apxs" ; then APXS="$apachedir/apxs" else # Extract the first word of "apxs", so it can be a program name with args. set dummy apxs; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_APXS+:} false; then : $as_echo_n "(cached) " >&6 else case $APXS in [\\/]* | ?:[\\/]*) ac_cv_path_APXS="$APXS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_APXS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi APXS=$ac_cv_path_APXS if test -n "$APXS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APXS" >&5 $as_echo "$APXS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$APXS" ; then as_fn_error $? "Apache2 apxs program not found" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr-config..." >&5 $as_echo "$as_me: checking for apr-config..." >&6;} # check for --with-apr-config { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-apr-config" >&5 $as_echo_n "checking for --with-apr-config... " >&6; } # Check whether --with-apr-config was given. if test "${with_apr_config+set}" = set; then : withval=$with_apr_config; if test -x "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } APR_CONFIG=$withval fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$APR_CONFIG" ; then # first look for APR_CONFIG in the bin dir if HTTPD is in the sbin dir apachedir=`dirname $HTTPD` parentdir=`dirname $apachedir` if test -x "$parentdir/bin/apr-1-config" ; then APR_CONFIG="$parentdir/bin/apr-1-config" elif test -x "$parentdir/bin/apr-config" ; then APR_CONFIG="$parentdir/bin/apr-config" else for ac_prog in apr-1-config apr-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_APR_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $APR_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_APR_CONFIG="$APR_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/opt/hpws/apache/bin:/usr/local/apache/bin:/usr/bin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_APR_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi APR_CONFIG=$ac_cv_path_APR_CONFIG if test -n "$APR_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $APR_CONFIG" >&5 $as_echo "$APR_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$APR_CONFIG" && break done test -n "$APR_CONFIG" || APR_CONFIG="NO_APR_CONFIG" fi if test -z "$APR_CONFIG" ; then as_fn_error $? "Apache2 apr-config program not found - please specify with --with-apr-config=/path/to/apr-config" "$LINENO" 5 fi fi if test -z "$moddir" ; then if test -n "$APXS" -a -x "$APXS" ; then moddir=`$APXS -q LIBEXECDIR` fi if test -z "$moddir" ; then moddir='$(libdir)/httpd/modules' fi fi apr_inc=`$APR_CONFIG --includes` apache_inc=`$APXS -q INCLUDEDIR` apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then as_fn_error $? "apr.h is not in your Apache include dir as reported by apxs. Use --with-apxs to have apxs tell us where to find it." "$LINENO" 5 fi fi apr_version=`$APR_CONFIG --version` case $apr_version in 1.*) ap_ver_suf="-2.2" ;; 0.9*) ap_ver_suf= ;; *) as_fn_error $? "APR version $apr_version is not supported by this module" "$LINENO" 5 ;; esac if test -n "$APACHE24" ; then $as_echo "#define WITH_APACHE24 1" >>confdefs.h fi # Check for library dependencies # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSPR..." >&5 $as_echo "$as_me: checking for NSPR..." >&6;} # check for --with-nspr { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nspr" >&5 $as_echo_n "checking for --with-nspr... " >&6; } # Check whether --with-nspr was given. if test "${with_nspr+set}" = set; then : withval=$with_nspr; if test -e "$withval"/include/nspr.h -a -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } NSPRDIR=$withval nspr_inc="-I$NSPRDIR/include" nspr_lib="-L$NSPRDIR/lib" nspr_libdir="$NSPRDIR/lib" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-nspr-inc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nspr-inc" >&5 $as_echo_n "checking for --with-nspr-inc... " >&6; } # Check whether --with-nspr-inc was given. if test "${with_nspr_inc+set}" = set; then : withval=$with_nspr_inc; if test -e "$withval"/nspr.h then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } nspr_inc="-I$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-nspr-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nspr-lib" >&5 $as_echo_n "checking for --with-nspr-lib... " >&6; } # Check whether --with-nspr-lib was given. if test "${with_nspr_lib+set}" = set; then : withval=$with_nspr_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } nspr_lib="-L$withval" nspr_libdir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if NSPR is not found yet, try pkg-config # last resort if test -z "$nspr_inc" -o -z "$nspr_lib" -o -z "$nspr_libdir"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nspr with pkg-config" >&5 $as_echo_n "checking for nspr with pkg-config... " >&6; } if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I nspr` nspr_lib=`$PKG_CONFIG --libs-only-L nspr` nspr_libdir=`$PKG_CONFIG --libs-only-L nspr | sed -e s/-L// | sed -e s/\ .*$//` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system NSPR" >&5 $as_echo "using system NSPR" >&6; } elif $PKG_CONFIG --exists dirsec-nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I dirsec-nspr` nspr_lib=`$PKG_CONFIG --libs-only-L dirsec-nspr` nspr_libdir=`$PKG_CONFIG --libs-only-L dirsec-nspr | sed -e s/-L// | sed -e s/\ .*$//` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system dirsec NSPR" >&5 $as_echo "using system dirsec NSPR" >&6; } else as_fn_error $? "NSPR not found, specify with --with-nspr." "$LINENO" 5 fi fi fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS..." >&5 $as_echo "$as_me: checking for NSS..." >&6;} # check for --with-nss { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nss" >&5 $as_echo_n "checking for --with-nss... " >&6; } # Check whether --with-nss was given. if test "${with_nss+set}" = set; then : withval=$with_nss; if test -e "$withval"/include/nss.h -a -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } NSSDIR=$withval nss_inc="-I$NSSDIR/include" nss_lib="-L$NSSDIR/lib" nss_libdir="$NSSDIR/lib" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-nss-inc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nss-inc" >&5 $as_echo_n "checking for --with-nss-inc... " >&6; } # Check whether --with-nss-inc was given. if test "${with_nss_inc+set}" = set; then : withval=$with_nss_inc; if test -e "$withval"/nss.h then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } nss_inc="-I$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-nss-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-nss-lib" >&5 $as_echo_n "checking for --with-nss-lib... " >&6; } # Check whether --with-nss-lib was given. if test "${with_nss_lib+set}" = set; then : withval=$with_nss_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } nss_lib="-L$withval" nss_libdir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if NSS is not found yet, try pkg-config # last resort if test -z "$nss_inc" -o -z "$nss_lib" -o -z "$nss_libdir"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss with pkg-config" >&5 $as_echo_n "checking for nss with pkg-config... " >&6; } if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists nss; then nss_inc=`$PKG_CONFIG --cflags-only-I nss` nss_lib=`$PKG_CONFIG --libs-only-L nss` nss_libdir=`$PKG_CONFIG --variable=libdir nss` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system NSS" >&5 $as_echo "using system NSS" >&6; } elif $PKG_CONFIG --exists dirsec-nss; then nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss` nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss` nss_libdir=`$PKG_CONFIG --variable=libdir dirsec-nss` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system dirsec NSS" >&5 $as_echo "using system dirsec NSS" >&6; } else as_fn_error $? "NSS not found, specify with --with-nss." "$LINENO" 5 fi fi fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # -*- tab-width: 4; -*- # Configure paths for SASL { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl..." >&5 $as_echo "$as_me: checking for sasl..." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-sasl" >&5 $as_echo_n "checking for --with-sasl... " >&6; } # Check whether --with-sasl was given. if test "${with_sasl+set}" = set; then : withval=$with_sasl; if test "$withval" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test -f /usr/include/sasl/sasl.h; then sasl_inc="-I/usr/include/sasl" elif test -f /usr/include/sasl.h; then sasl_inc="-I/usr/include" else as_fn_error $? "sasl.h not found" "$LINENO" 5 fi elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } if test -f "$withval/include/sasl/sasl.h"; then sasl_inc="-I$withval/include/sasl" elif test -f "$withval/include/sasl.h"; then sasl_inc="-I$withval/include" else as_fn_error $? "sasl.h not found" "$LINENO" 5 fi sasl_lib="-L$withval/lib" sasl_libdir="$withval/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } as_fn_error $? "sasl not found in $withval" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-sasl-inc" >&5 $as_echo_n "checking for --with-sasl-inc... " >&6; } # Check whether --with-sasl-inc was given. if test "${with_sasl_inc+set}" = set; then : withval=$with_sasl_inc; if test -f "$withval"/sasl.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } sasl_inc="-I$withval" else echo as_fn_error $? "$withval/sasl.h not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-sasl-lib" >&5 $as_echo_n "checking for --with-sasl-lib... " >&6; } # Check whether --with-sasl-lib was given. if test "${with_sasl_lib+set}" = set; then : withval=$with_sasl_lib; if test -d "$withval"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } sasl_lib="-L$withval" sasl_libdir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$sasl_inc"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl.h" >&5 $as_echo_n "checking for sasl.h... " >&6; } if test -f /usr/include/sasl/sasl.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using /usr/include/sasl/sasl.h" >&5 $as_echo "using /usr/include/sasl/sasl.h" >&6; } sasl_inc="-I/usr/include/sasl" elif test -f /usr/include/sasl.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using /usr/include/sasl.h" >&5 $as_echo "using /usr/include/sasl.h" >&6; } sasl_inc="-I/usr/include" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "sasl not found, specify with --with-sasl." "$LINENO" 5 fi fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2009 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenLDAP..." >&5 $as_echo "$as_me: checking for OpenLDAP..." >&6;} # check for --with-openldap { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openldap" >&5 $as_echo_n "checking for --with-openldap... " >&6; } # Check whether --with-openldap was given. if test "${with_openldap+set}" = set; then : withval=$with_openldap; if test "$withval" = yes then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system OpenLDAP" >&5 $as_echo "using system OpenLDAP" >&6; } elif test "$withval" = no then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } OPENLDAPDIR=$withval openldap_incdir="$OPENLDAPDIR/include" openldap_inc="-I$openldap_incdir" openldap_lib="-L$OPENLDAPDIR/lib" openldap_libdir="$OPENLDAPDIR/lib" with_openldap=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-openldap-inc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openldap-inc" >&5 $as_echo_n "checking for --with-openldap-inc... " >&6; } # Check whether --with-openldap-inc was given. if test "${with_openldap_inc+set}" = set; then : withval=$with_openldap_inc; if test -e "$withval"/ldap.h then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } openldap_incdir="$withval" openldap_inc="-I$withval" with_openldap=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-openldap-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openldap-lib" >&5 $as_echo_n "checking for --with-openldap-lib... " >&6; } # Check whether --with-openldap-lib was given. if test "${with_openldap_lib+set}" = set; then : withval=$with_openldap_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } openldap_lib="-L$withval" openldap_libdir="$withval" with_openldap=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if OPENLDAP is not found yet, try pkg-config if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenLDAP with pkg-config" >&5 $as_echo_n "checking for OpenLDAP with pkg-config... " >&6; } if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists openldap; then openldap_inc=`$PKG_CONFIG --cflags-only-I openldap` openldap_lib=`$PKG_CONFIG --libs-only-L openldap` openldap_libdir=`$PKG_CONFIG --libs-only-L openldap | sed -e s/-L// | sed -e s/\ .*$//` openldap_incdir=`$PKG_CONFIG --variable=includedir openldap` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system OpenLDAP from pkg-config" >&5 $as_echo "using system OpenLDAP from pkg-config" >&6; } else openldap_incdir="/usr/include" openldap_inc="-I$openldap_incdir" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no OpenLDAP pkg-config files" >&5 $as_echo "no OpenLDAP pkg-config files" >&6; } fi fi fi if test "$with_openldap" = yes ; then save_cppflags="$CPPFLAGS" CPPFLAGS="$openldap_inc $nss_inc $nspr_inc" ac_fn_c_check_header_mongrel "$LINENO" "ldap_features.h" "ac_cv_header_ldap_features_h" "$ac_includes_default" if test "x$ac_cv_header_ldap_features_h" = xyes; then : else as_fn_error $? "specified with-openldap but ldap_features.h not found" "$LINENO" 5 fi ol_ver_maj=`grep LDAP_VENDOR_VERSION_MAJOR $openldap_incdir/ldap_features.h | awk '{print $3}'` ol_ver_min=`grep LDAP_VENDOR_VERSION_MINOR $openldap_incdir/ldap_features.h | awk '{print $3}'` ol_ver_pat=`grep LDAP_VENDOR_VERSION_PATCH $openldap_incdir/ldap_features.h | awk '{print $3}'` ol_libver="-${ol_ver_maj}.${ol_ver_min}" save_ldflags="$LDFLAGS" LDFLAGS="$openldap_lib $LDFLAGS" as_ac_Lib=`$as_echo "ac_cv_lib_ldap$ol_libver''_ldap_initialize" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap$ol_libver" >&5 $as_echo_n "checking for ldap_initialize in -lldap$ol_libver... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap$ol_libver $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : have_ldap_lib=1 fi if test -z "$have_ldap_lib" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_initialize=yes else ac_cv_lib_ldap_ldap_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_initialize" >&5 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; } if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then : unset ol_libver else as_fn_error $? "specified with-openldap but libldap not found" "$LINENO" 5 fi fi as_ac_Lib=`$as_echo "ac_cv_lib_ldap$ol_libver''_ldap_url_parse_ext" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_url_parse_ext in -lldap$ol_libver" >&5 $as_echo_n "checking for ldap_url_parse_ext in -lldap$ol_libver... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap$ol_libver $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldap_url_parse_ext (); int main () { return ldap_url_parse_ext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : $as_echo "#define HAVE_LDAP_URL_PARSE_EXT 1" >>confdefs.h fi ldap_lib_ldif="" LDFLAGS="$LDFLAGS" as_ac_Lib=`$as_echo "ac_cv_lib_ldap$ol_libver''_ldif_open" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldif_open in -lldap$ol_libver" >&5 $as_echo_n "checking for ldif_open in -lldap$ol_libver... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap$ol_libver $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ldif_open (); int main () { return ldif_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : ldap_lib_ldif= else ldap_lib_ldif=-lldif$ol_libver fi LDFLAGS="$save_ldflags" CPPFLAGS="$save_cppflags" $as_echo "#define USE_OPENLDAP 1" >>confdefs.h fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla LDAPSDK..." >&5 $as_echo "$as_me: checking for Mozilla LDAPSDK..." >&6;} # check for --with-ldapsdk { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ldapsdk" >&5 $as_echo_n "checking for --with-ldapsdk... " >&6; } # Check whether --with-ldapsdk was given. if test "${with_ldapsdk+set}" = set; then : withval=$with_ldapsdk; if test "$withval" = yes then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } elif test "$withval" = no then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } LDAPSDKDIR=$withval ldapsdk_inc="-I$LDAPSDKDIR/include" ldapsdk_lib="-L$LDAPSDKDIR/lib" ldapsdk_libdir="$LDAPSDKDIR/lib" with_ldapsdk=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi if test "$with_ldapsdk" = yes -a "$with_openldap" = yes then as_fn_error $? "Cannot use both LDAPSDK and OpenLDAP." "$LINENO" 5 fi if test "$with_ldapsdk" != yes -a "$with_openldap" != yes then as_fn_error $? "Either LDAPSDK or OpenLDAP must be used." "$LINENO" 5 fi else if test "$with_openldap" = yes then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } with_ldapsdk=yes fi fi # check for --with-ldapsdk-inc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ldapsdk-inc" >&5 $as_echo_n "checking for --with-ldapsdk-inc... " >&6; } # Check whether --with-ldapsdk-inc was given. if test "${with_ldapsdk_inc+set}" = set; then : withval=$with_ldapsdk_inc; if test -e "$withval"/ldap.h then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } ldapsdk_inc="-I$withval" with_ldapsdk=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-ldapsdk-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ldapsdk-lib" >&5 $as_echo_n "checking for --with-ldapsdk-lib... " >&6; } # Check whether --with-ldapsdk-lib was given. if test "${with_ldapsdk_lib+set}" = set; then : withval=$with_ldapsdk_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } ldapsdk_lib="-L$withval" ldapsdk_libdir="$withval" with_ldapsdk=yes else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if LDAPSDK is not found yet, try pkg-config # last resort if test "$with_ldapsdk" = yes ; then if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib" -o -z "$ldapsdk_libdir"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mozldap with pkg-config" >&5 $as_echo_n "checking for mozldap with pkg-config... " >&6; } if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists mozldap6; then mozldappkg=mozldap6 elif $PKG_CONFIG --exists mozldap; then mozldappkg=mozldap else as_fn_error $? "LDAPSDK not found, specify with --with-ldapsdk-inc|-lib." "$LINENO" 5 fi ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldappkg` ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldappkg` ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ .*$//` if test -z "$ldapsdk_libdir" ; then ldapsdk_libdir=`$PKG_CONFIG --variable=libdir $mozldappkg` fi if test -z "$ldapsdk_libdir" ; then ldapsdk_libdir="$libdir" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system $mozldappkg" >&5 $as_echo "using system $mozldappkg" >&6; } fi fi fi if test "$with_ldapsdk" = yes ; then if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then as_fn_error $? "LDAPSDK not found, specify with --with-ldapsdk-inc|-lib." "$LINENO" 5 fi save_cppflags="$CPPFLAGS" CPPFLAGS="$ldapsdk_inc $nss_inc $nspr_inc" ac_fn_c_check_header_compile "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "#include #if LDAP_VENDOR_VERSION < 600 #error The LDAP C SDK version is not supported #endif " if test "x$ac_cv_header_ldap_h" = xyes; then : isversion6=1 else isversion6= fi CPPFLAGS="$save_cppflags" if test -z "$isversion6" ; then as_fn_error $? "The LDAPSDK version in $ldapsdk_inc/ldap-standard.h is not supported" "$LINENO" 5 fi $as_echo "#define USE_MOZLDAP 1" >>confdefs.h $as_echo "#define HAVE_LDAP_URL_PARSE_NO_DEFAULTS 1" >>confdefs.h fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBICU..." >&5 $as_echo "$as_me: checking for LIBICU..." >&6;} # check for --with-icu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icu" >&5 $as_echo_n "checking for --with-icu... " >&6; } # Check whether --with-icu was given. if test "${with_icu+set}" = set; then : withval=$with_icu; if test -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } ICUDIR="$withval" icu_lib="-L$ICUDIR/lib" icu_libdir="$ICUDIR/lib" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi icu_inc="-I$withval/include" icu_bin="$withval/bin" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-icu-inc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icu-inc" >&5 $as_echo_n "checking for --with-icu-inc... " >&6; } # Check whether --with-icu-inc was given. if test "${with_icu_inc+set}" = set; then : withval=$with_icu_inc; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } icu_inc="-I$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-icu-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icu-lib" >&5 $as_echo_n "checking for --with-icu-lib... " >&6; } # Check whether --with-icu-lib was given. if test "${with_icu_lib+set}" = set; then : withval=$with_icu_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } icu_lib="-L$withval" icu_libdir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-icu-bin { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icu-bin" >&5 $as_echo_n "checking for --with-icu-bin... " >&6; } # Check whether --with-icu-bin was given. if test "${with_icu_bin+set}" = set; then : withval=$with_icu_bin; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } icu_bin="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if ICU is not found yet, try pkg-config # last resort if test -z "$icu_lib"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu with icu-config" >&5 $as_echo_n "checking for icu with icu-config... " >&6; } # Extract the first word of "icu-config", so it can be a program name with args. set dummy icu-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ICU_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ICU_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ICU_CONFIG=$ac_cv_path_ICU_CONFIG if test -n "$ICU_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5 $as_echo "$ICU_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$ICU_CONFIG"; then icu_lib=`$ICU_CONFIG --ldflags-searchpath` icu_libdir=`$ICU_CONFIG --libdir` icu_inc=`$ICU_CONFIG --cppflags-searchpath` icu_bin=`$ICU_CONFIG --bindir` { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system ICU" >&5 $as_echo "using system ICU" >&6; } else as_fn_error $? "ICU not found, specify with --with-icu." "$LINENO" 5 fi fi # Extract the first word of "genrb", so it can be a program name with args. set dummy genrb; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GENRB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GENRB"; then ac_cv_prog_GENRB="$GENRB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$icu_bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GENRB="1" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GENRB=$ac_cv_prog_GENRB if test -n "$GENRB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENRB" >&5 $as_echo "$GENRB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$GENRB" ; then as_fn_error $? "genrb not found in icu_bin $icu_bin or PATH $PATH - please specify ICU bin directory" "$LINENO" 5 fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ADMINUTIL..." >&5 $as_echo "$as_me: checking for ADMINUTIL..." >&6;} # check for --with-adminutil { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-adminutil" >&5 $as_echo_n "checking for --with-adminutil... " >&6; } # Check whether --with-adminutil was given. if test "${with_adminutil+set}" = set; then : withval=$with_adminutil; if test -d "$withval"/include -a -d "$withval"/lib then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } ADMINUTILDIR=$withval adminutil_lib="-L$ADMINUTILDIR/lib" adminutil_libdir="$ADMINUTILDIR/lib" adminutil_incdir=$ADMINUTILDIR/include if ! test -e "$adminutil_incdir/libadminutil/admutil.h" ; then as_fn_error $? "$withval include dir not found" "$LINENO" 5 fi adminutil_inc="-I$adminutil_incdir" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # if ADMINUTIL is not found yet, try pkg-config # last resort if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for adminutil with pkg-config" >&5 $as_echo_n "checking for adminutil with pkg-config... " >&6; } # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists 389-adminutil; then adminutil_inc=`$PKG_CONFIG --cflags-only-I 389-adminutil` adminutil_lib=`$PKG_CONFIG --libs-only-L 389-adminutil` adminutil_libdir=`$PKG_CONFIG --libs-only-L 389-adminutil | sed -e s/-L// | sed -e s/\ .*$//` elif $PKG_CONFIG --exists adminutil; then adminutil_inc=`$PKG_CONFIG --cflags-only-I adminutil` adminutil_lib=`$PKG_CONFIG --libs-only-L adminutil` adminutil_libdir=`$PKG_CONFIG --libs-only-L adminutil | sed -e s/-L// | sed -e s/\ .*$//` else as_fn_error $? "ADMINUTIL not found, specify with --with-adminutil." "$LINENO" 5 fi fi fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOD_NSS..." >&5 $as_echo "$as_me: checking for MOD_NSS..." >&6;} # check for --with-modnss-lib { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-modnss-lib" >&5 $as_echo_n "checking for --with-modnss-lib... " >&6; } # Check whether --with-modnss-lib was given. if test "${with_modnss_lib+set}" = set; then : withval=$with_modnss_lib; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } nssmoddir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for --with-modnss-bin { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-modnss-bin" >&5 $as_echo_n "checking for --with-modnss-bin... " >&6; } # Check whether --with-modnss-bin was given. if test "${with_modnss_bin+set}" = set; then : withval=$with_modnss_bin; if test -d "$withval" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $withval" >&5 $as_echo "using $withval" >&6; } modnssbindir="$withval" else echo as_fn_error $? "$withval not found" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # else, parse httpd.conf or httpconfdir/nss.conf if test -z "$modnssbindir" ; then nsspcache=`grep NSSPassPhraseHelper $httpdconf|awk '{print $2}'` if test -z "$nsspcache" ; then nsspcache=`grep NSSPassPhraseHelper $httpd_root/conf.d/* | awk '{print $2}'` fi if test -z "$nsspcache" ; then # same directory as Apache? modnssbindir=`dirname $HTTPD` nsspcache="$modnssbindir/nss_pcache" fi if test -z "$nsspcache" -o ! -f "$nsspcache" ; then # Extract the first word of "nss_pcache", so it can be a program name with args. set dummy nss_pcache; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_nsspcache+:} false; then : $as_echo_n "(cached) " >&6 else case $nsspcache in [\\/]* | ?:[\\/]*) ac_cv_path_nsspcache="$nsspcache" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_nsspcache="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi nsspcache=$ac_cv_path_nsspcache if test -n "$nsspcache"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nsspcache" >&5 $as_echo "$nsspcache" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -n "$nsspcache" -a -f "$nsspcache" ; then modnssbindir=`dirname $nsspcache` else modnssbindir= fi fi if test -z "$nssmoddir" ; then nssmoddir="$moddir" fi if test ! -f "$modnssbindir/nss_pcache" ; then as_fn_error $? "Could not find the mod_nss pass phrase helper $modnssbindir/nss_pcache" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using mod_nss pass phrase helper $modnssbindir/nss_pcache" >&5 $as_echo "Using mod_nss pass phrase helper $modnssbindir/nss_pcache" >&6; } fi if test ! -d "$nssmoddir" ; then as_fn_error $? "Could not find the mod_nss module directory $nssmoddir" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using mod_nss module directory $nssmoddir" >&5 $as_echo "Using mod_nss module directory $nssmoddir" >&6; } fi # Check for SELinux # BEGIN COPYRIGHT BLOCK # Copyright (C) 2009 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SELinux..." >&5 $as_echo "$as_me: checking for SELinux..." >&6;} # check for --with-selinux { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-selinux" >&5 $as_echo_n "checking for --with-selinux... " >&6; } # Check whether --with-selinux was given. if test "${with_selinux+set}" = set; then : withval=$with_selinux; with_selinux=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$with_selinux" = "yes"; then SELINUX_TRUE= SELINUX_FALSE='#' else SELINUX_TRUE='#' SELINUX_FALSE= fi # check for --with-instconfigdir { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-instconfigdir" >&5 $as_echo_n "checking for --with-instconfigdir... " >&6; } # Check whether --with-instconfigdir was given. if test "${with_instconfigdir+set}" = set; then : withval=$with_instconfigdir; if test $withval = yes ; then as_fn_error $? "Please specify a full path with --with-instconfigdir" "$LINENO" 5 fi instconfigdir="$withval" else instconfigdir='$(sysconfdir)/$(PACKAGE_BASE_NAME)' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $instconfigdir" >&5 $as_echo "$instconfigdir" >&6; } # check for --with-dslibdir { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dslibdir" >&5 $as_echo_n "checking for --with-dslibdir... " >&6; } # Check whether --with-dslibdir was given. if test "${with_dslibdir+set}" = set; then : withval=$with_dslibdir; if test $withval = yes ; then as_fn_error $? "Please specify a full path with --with-dslibdir" "$LINENO" 5 fi dslibdir="$withval" else dslibdir='$(libdir)/$(PACKAGE_BASE_NAME)' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dslibdir" >&5 $as_echo "$dslibdir" >&6; } # check for --enable-service # set default value based on availability of the service command # don't use service with systemd if test -z "$with_systemdsystemunitdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-service" >&5 $as_echo_n "checking for --enable-service... " >&6; } # Check whether --enable-service was given. if test "${enable_service+set}" = set; then : enableval=$enable_service; if test x"$enableval" = xyes ; then enable_service=yes else enable_service= fi else enable_service= fi if test -n "$enable_service" ; then $as_echo "#define ENABLE_SERVICE 1" >>confdefs.h dirsrv_service_name="$PACKAGE_BASE_NAME" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_service" >&5 $as_echo "$enable_service" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else enable_service= fi # installation paths - by default, configure will just # use /usr as the prefix for everything, which means # /usr/etc and /usr/var. FHS sez to use /etc and /var. # The with-fhs-opt option will use the # prefix, but it's sysconfdir and localstatedir will be # /etc/opt, and /var/opt. if test "$with_fhs_opt" = "yes"; then # Override sysconfdir and localstatedir if FHS optional # package was requested. sysconfdir='/etc/opt' localstatedir='/var/opt' # relative to datadir infdir=/inf htmldir=/html icondir=/icons manualdir=/manual ldifdir=/data updatedir=/updates-admin # relative to libdir # CGI program directory cgibindir=/cgi-bin dsgwcgibindir=/dsgw-cgi-bin # where our private Apache modules will go admmoddir=/modules perldir=/perl # log files, relative to localstatedir admlogdir=/$PACKAGE_BASE_NAME/$instancename/log # the pid dir, relative to localstatedir piddir=/$PACKAGE_BASE_NAME/$instancename/run # location of property/resource files, relative to datadir propertydir=/properties # relative to $localstatedir dsgwcookiedir=/$PACKAGE_BASE_NAME/dsgw/cookies else if test "$with_fhs" = "yes"; then ac_default_prefix=/usr prefix=$ac_default_prefix exec_prefix=$prefix sysconfdir='/etc' localstatedir='/var' fi # relative to datadir infdir=/$PACKAGE_BASE_NAME/inf htmldir=/$PACKAGE_BASE_NAME/html icondir=/$PACKAGE_BASE_NAME/icons manualdir=/$PACKAGE_BASE_NAME/manual ldifdir=/$PACKAGE_BASE_NAME/data updatedir=/$PACKAGE_BASE_NAME/updates-admin # relative to libdir # CGI program directory cgibindir=/$PACKAGE_BASE_NAME/cgi-bin dsgwcgibindir=/$PACKAGE_BASE_NAME/dsgw-cgi-bin # where our private Apache modules will go admmoddir=/$PACKAGE_BASE_NAME/modules perldir=/$PACKAGE_BASE_NAME/perl # log files, relative to localstatedir admlogdir=/log/$PACKAGE_BASE_NAME # the pid dir, relative to localstatedir piddir=/run/$PACKAGE_BASE_NAME # location of property/resource files, relative to datadir propertydir=/$PACKAGE_BASE_NAME/properties # relative to $localstatedir dsgwcookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies fi pidfile=$instancename.pid # write out paths for binary components # extra stuff for Apache modules # write out paths for data/config files # these are needed for selinux policy for the dsgw if test "$with_openldap" = "yes"; then OPENLDAP_TRUE= OPENLDAP_FALSE='#' else OPENLDAP_TRUE='#' OPENLDAP_FALSE= fi # WINNT should be true if building on Windows system not using # cygnus, mingw, or the like and using cmd.exe as the shell if false; then WINNT_TRUE= WINNT_FALSE='#' else WINNT_TRUE='#' WINNT_FALSE= fi if test -n "$APACHE22"; then APACHE22_TRUE= APACHE22_FALSE='#' else APACHE22_TRUE='#' APACHE22_FALSE= fi if test -n "$APACHE24"; then APACHE24_TRUE= APACHE24_FALSE='#' else APACHE24_TRUE='#' APACHE24_FALSE= fi if test -n "$with_systemdsystemunitdir"; then SYSTEMD_TRUE= SYSTEMD_FALSE='#' else SYSTEMD_TRUE='#' SYSTEMD_FALSE= fi # libtool on fedora/rhel contains some gcc-isms which cause problems # if not using gcc (e.g. Forte on Solaris, aCC on HP-UX) # we remove them here if test "$GCC" != yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Not using gcc - fixing libtool to remove gcc-isms . . ." >&5 $as_echo "$as_me: Not using gcc - fixing libtool to remove gcc-isms . . ." >&6;} cp -p libtool libtool.orig cp -p libtool libtool.tmp # dnl note the special chars [ and ] - since m4 treats [ and ] specially, # we have to use the quadrigraph [ for [ and ] for ] - and you thought # perl produced write-only code . . . sed -e '/^gcc_dir/ d' \ -e '/^gcc_ver/ d' \ -e 's/^predep_objects=.*echo \("[^"]*"\).*$/predep_objects=\1/' \ -e 's/^postdep_objects=.*echo \("[^"]*"\).*$/postdep_objects=\1/' \ -e 's/^compiler_lib_search_path=.*echo \("[^"]*"\).*$/compiler_lib_search_path=\1/' \ -e 's/^sys_lib_search_path_spec=.*echo \("[^"]*"\).*$/sys_lib_search_path_spec=\1/' \ libtool > libtool.tmp cp -p libtool.tmp libtool rm -f libtool.tmp fi if test "$enable_rpath" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Fixing libtool to remove automatic rpath to $libdir . . ." >&5 $as_echo "$as_me: Fixing libtool to remove automatic rpath to $libdir . . ." >&6;} cp -p libtool libtool.orig cp -p libtool libtool.tmp sed -e '/^runpath_var/ d' \ -e '/^hardcode_libdir_flag_spec/ d' \ libtool > libtool.tmp cp -p libtool.tmp libtool rm -f libtool.tmp fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUNDLE_TRUE}" && test -z "${BUNDLE_FALSE}"; then as_fn_error $? "conditional \"BUNDLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CXXLINK_REQUIRED_TRUE}" && test -z "${CXXLINK_REQUIRED_FALSE}"; then as_fn_error $? "conditional \"CXXLINK_REQUIRED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HPUX_TRUE}" && test -z "${HPUX_FALSE}"; then as_fn_error $? "conditional \"HPUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SOLARIS_TRUE}" && test -z "${SOLARIS_FALSE}"; then as_fn_error $? "conditional \"SOLARIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SELINUX_TRUE}" && test -z "${SELINUX_FALSE}"; then as_fn_error $? "conditional \"SELINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OPENLDAP_TRUE}" && test -z "${OPENLDAP_FALSE}"; then as_fn_error $? "conditional \"OPENLDAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then as_fn_error $? "conditional \"WINNT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${APACHE22_TRUE}" && test -z "${APACHE22_FALSE}"; then as_fn_error $? "conditional \"APACHE22\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${APACHE24_TRUE}" && test -z "${APACHE24_FALSE}"; then as_fn_error $? "conditional \"APACHE24\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SYSTEMD_TRUE}" && test -z "${SYSTEMD_FALSE}"; then as_fn_error $? "conditional \"SYSTEMD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dirsrv-admin $as_me 1.1.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dirsrv-admin config.status 1.1.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi 389-admin-1.1.35/configure.ac000066400000000000000000000434261220472121400155040ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([dirsrv-admin], [1.1.10], [http://bugzilla.redhat.com/]) AC_CONFIG_SRCDIR([admserv/cgi-src40/viewlog.c]) # include the version information . $srcdir/VERSION.sh AC_MSG_NOTICE(This is configure for $PACKAGE_TARNAME $PACKAGE_VERSION) AC_DEFINE_UNQUOTED([ADM_PACKAGE_VERSION], "$PACKAGE_VERSION", [package version]) AC_DEFINE_UNQUOTED([ADM_PACKAGE_TARNAME], "$PACKAGE_TARNAME", [package tarball name]) AC_DEFINE_UNQUOTED([ADM_PACKAGE_BUGREPORT], "$PACKAGE_BUGREPORT", [package bug report url]) AC_DEFINE_UNQUOTED([ADM_PACKAGE_STRING], "$PACKAGE_STRING", [package string]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) # define these for automake distdir VERSION=$PACKAGE_VERSION PACKAGE=$PACKAGE_TARNAME AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [package version]) AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE", [package tar name]) AM_MAINTAINER_MODE AC_CANONICAL_HOST AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AM_PROG_CC_C_O # disable static libs by default - we only use a couple AC_DISABLE_STATIC AC_PROG_LIBTOOL # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT AC_C_CONST AC_HEADER_STDBOOL AC_TYPE_UID_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM # Checks for library functions. AC_FUNC_CHOWN AC_FUNC_CLOSEDIR_VOID AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK AC_FUNC_LSTAT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_MMAP AC_TYPE_SIGNAL AC_FUNC_STAT AC_FUNC_STRERROR_R AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS([setrlimit endpwent ftruncate getcwd gethostbyname inet_ntoa localtime_r memmove memset mkdir munmap putenv rmdir socket strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strstr strtol tzset]) PACKAGE_BASE_NAME=`echo $PACKAGE_NAME | sed -e s/-admin//` AC_SUBST(PACKAGE_BASE_NAME) # the default prefix - override with --prefix or --with-fhs or --with-fhs-opt # unfortunately, this must be a literal - it should be $PACKAGE_BASE_NAME AC_PREFIX_DEFAULT([/opt/dirsrv]) PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'` AC_SUBST(PACKAGE_BASE_VERSION) AC_MSG_CHECKING(for --enable-debug) AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]), [ AC_MSG_RESULT(yes) debug_defs="-DDEBUG" ], [ AC_MSG_RESULT(no) debug_defs="" ]) AC_SUBST([debug_defs]) # Used for legacy style packaging where we bundle all of the dependencies. AC_MSG_CHECKING(for --enable-bundle) AC_ARG_ENABLE(bundle, AS_HELP_STRING([--enable-bundle], [Enable bundled dependencies (default: no)]), [ AC_MSG_RESULT(yes) bundle="1"; ], [ AC_MSG_RESULT(no) bundle=""; ]) AM_CONDITIONAL(BUNDLE,test "$bundle" = "1") # libtool automatically adds --rpath $libdir to each executable, and # there is apparently no standard way to disable this. Also, you cannot # override rpath with LD_LIBRARY_PATH, so this causes problems if you have # and old version of nss/nspr installed in the system $libdir, but you # want to use a different one. So we're disabling this rpath thing by # default and adding a --enable-rpath flag if you really, really want # to do this. AC_MSG_CHECKING(for --enable-rpath) AC_ARG_ENABLE(rpath, AS_HELP_STRING([--enable-rpath], [Allow libtool to add an rpath to $libdir (default: no)])) m4_include(m4/fhs.m4) AC_DEFINE([NS_DOMESTIC], [1], [Domestic security level enabled by default]) # server userid, groupid httpduser=nobody httpdgroup=nobody admservport=9830 admservip=0.0.0.0 # this is the subdir under $PACKAGE_BASE_NAME where admin server # specific configs, logs, etc. are found instancename=admin-serv # initdir # initdir is the location for the SysV init scripts - very heavily platform # dependent and not specified in fhs or lsb initdir='$(sysconfdir)/rc.d' AC_MSG_CHECKING(for --with-initddir) AC_ARG_WITH(initddir, AS_HELP_STRING([--with-initddir=/path], [Absolute path (not relative like some of the other options) that should contain the SysV init scripts (default '$(sysconfdir)/rc.d')]), [ if test "$withval" = yes -o "$withval" = no ; then AC_ERROR([Please specify a full path with --with-initddir]) fi AC_MSG_RESULT($withval) ], [ AC_MSG_RESULT(no) ]) CXXLINK_REQUIRED=0 # on most platforms, we will just use perl from PATH # On some platforms, we cannot. Why not just use any old # perl? Because of perldap. We use a perldap that is # compiled to either 32bit or 64bit, so we must use a native # perl binary compiled with the same bitsize. On Solaris # and HP-UX, /usr/bin/perl is 32 bit, so we cannot use # those with our 64 bit compiled product. perlexec='/usr/bin/env perl' case $host in *-*-linux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) AC_DEFINE([Linux], [1], [Linux]) AC_DEFINE([LINUX], [1], [Linux]) platform="linux" initdir='$(sysconfdir)/rc.d/init.d' ;; ia64-hp-hpux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) AC_DEFINE([hpux], [1], [HP-UX]) AC_DEFINE([HPUX], [1], [HP-UX]) AC_DEFINE([HPUX11], [1], [HP-UX 11]) AC_DEFINE([HPUX11_23], [1], [HP-UX 11.23]) AC_DEFINE([CPU_ia64], [], [cpu type ia64]) AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) # assume 64 bit perlexec='/opt/perl_64/bin/perl' CXXLINK_REQUIRED=1 httpdgroup=nogroup platform="hpux" initconfigdir="/$PACKAGE_BASE_NAME/$instancename" # HPUX doesn't use /etc for this initdir=/init.d ;; hppa*-hp-hpux*) AC_DEFINE([XP_UNIX], [1], [UNIX]) AC_DEFINE([hpux], [1], [HP-UX]) AC_DEFINE([HPUX], [1], [HP-UX]) AC_DEFINE([HPUX11], [1], [HP-UX 11]) AC_DEFINE([HPUX11_11], [1], [HP-UX 11.11]) AC_DEFINE([CPU_hppa], [], [cpu type pa-risc]) AC_DEFINE([OS_hpux], [1], [OS HP-UX]) AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision]) AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace]) CXXLINK_REQUIRED=1 httpdgroup=nogroup # assume 64 bit perlexec='/opt/perl_64/bin/perl' platform="hpux" initconfigdir="/$PACKAGE_BASE_NAME/$instancename" # HPUX doesn't use /etc for this initdir=/init.d ;; sparc-sun-solaris*) AC_DEFINE([XP_UNIX], [1], [UNIX]) AC_DEFINE([SVR4], [1], [SVR4]) AC_DEFINE([__svr4], [1], [SVR4]) AC_DEFINE([__svr4__], [1], [SVR4]) AC_DEFINE([_SVID_GETTOD], [1], [SVID_GETTOD]) AC_DEFINE([CPU_sparc], [], [cpu type sparc]) AC_DEFINE([OS_solaris], [1], [OS SOLARIS]) AC_DEFINE([sunos5], [1], [SunOS5]) AC_DEFINE([OSVERSION], [509], [OS version]) AC_DEFINE([_REENTRANT], [1], [_REENTRANT]) dnl socket nsl and dl are required to link several programs LIBSOCKET=-lsocket AC_SUBST([LIBSOCKET], [$LIBSOCKET]) LIBNSL=-lnsl AC_SUBST([LIBNSL], [$LIBNSL]) dnl Cstd and Crun are required to link any C++ related code (ICU) LIBCSTD=-lCstd AC_SUBST([LIBCSTD], [$LIBCSTD]) LIBCRUN=-lCrun AC_SUBST([LIBCRUN], [$LIBCRUN]) CXXLINK_REQUIRED=1 platform="solaris" # assume 64 bit perlexec='/usr/lib/sparcv9/dirsec/perl5x/bin/perl' initdir='$(sysconfdir)/init.d' ;; *) esac # cmd line overrides default setting above if test -n "$with_initddir" ; then initdir="$with_initddir" fi AC_SUBST(initdir) AC_SUBST(perlexec) AM_CONDITIONAL([CXXLINK_REQUIRED], test "$CXXLINK_REQUIRED" = 1) AM_CONDITIONAL([HPUX],test "$platform" = "hpux") AM_CONDITIONAL([SOLARIS],test "$platform" = "solaris") # set default initconfigdir if not already set # value will be set so as to be relative to $(sysconfdir) if test -z "$initconfigdir" ; then if test -d /etc/sysconfig ; then initconfigdir=/sysconfig elif test -d /etc/default ; then initconfigdir=/default else initconfigdir="/$PACKAGE_NAME/config" fi fi AC_SUBST(initconfigdir) PKG_PROG_PKG_CONFIG if test -n "$PKG_CONFIG" ; then default_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` fi AC_MSG_CHECKING(for --with-systemdsystemunitdir) AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=PATH], [Directory for systemd service files (default: $with_systemdsystemunitdir)]) ) if test "$with_systemdsystemunitdir" = yes ; then if test -n "$default_systemdsystemunitdir" ; then with_systemdsystemunitdir=$default_systemdsystemunitdir AC_MSG_RESULT([$with_systemdsystemunitdir]) else AC_MSG_ERROR([You must specify --with-systemdsystemconfdir=/full/path/to/systemd/system directory]) fi elif test "$with_systemdsystemunitdir" = no ; then with_systemdsystemunitdir= else AC_MSG_RESULT([$with_systemdsystemunitdir]) fi AC_SUBST(with_systemdsystemunitdir) if test -n "$with_systemdsystemunitdir" ; then if test -z "$with_systemddirsrvgroupname" ; then with_systemddirsrvgroupname=$PACKAGE_BASE_NAME.target fi AC_MSG_CHECKING(for --with-systemddirsrvgroupname) AC_ARG_WITH([systemddirsrvgroupname], AS_HELP_STRING([--with-systemddirsrvgroupname=NAME], [Name of group target for directory server (default: $with_systemddirsrvgroupname)]) ) if test "$with_systemddirsrvgroupname" = yes ; then AC_MSG_ERROR([You must specify --with-systemddirsrvgroupname=name.of.group]) elif test "$with_systemddirsrvgroupname" = no ; then AC_MSG_ERROR([You must specify --with-systemddirsrvgroupname=name.of.group]) else AC_MSG_RESULT([$with_systemddirsrvgroupname]) fi AC_SUBST(with_systemddirsrvgroupname) AC_DEFINE([WITH_SYSTEMD], [1], [use systemd to stop/start/restart the servers]) dirsrv_systemd_prefix="${PACKAGE_BASE_NAME}@" dirsrv_systemd_suffix=".service" AC_SUBST(dirsrv_systemd_prefix) AC_SUBST(dirsrv_systemd_suffix) fi # Check for fortitude m4_include(m4/fortitude.m4) # Check for web server m4_include(m4/httpd.m4) if test -n "$APACHE24" ; then AC_DEFINE([WITH_APACHE24], [1], [use httpd 2.4]) fi # Check for library dependencies m4_include(m4/nspr.m4) m4_include(m4/nss.m4) m4_include(m4/sasl.m4) m4_include(m4/openldap.m4) m4_include(m4/mozldap.m4) m4_include(m4/icu.m4) m4_include(m4/adminutil.m4) m4_include(m4/mod_nss.m4) # Check for SELinux m4_include(m4/selinux.m4) AM_CONDITIONAL(SELINUX,test "$with_selinux" = "yes") # check for --with-instconfigdir AC_MSG_CHECKING(for --with-instconfigdir) AC_ARG_WITH(instconfigdir, AS_HELP_STRING([--with-instconfigdir=/path], [Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_BASE_NAME)]), [ if test $withval = yes ; then AC_ERROR([Please specify a full path with --with-instconfigdir]) fi instconfigdir="$withval" ], [ dnl this value is expanded out in Makefile.am instconfigdir='$(sysconfdir)/$(PACKAGE_BASE_NAME)' ]) AC_SUBST(instconfigdir) AC_MSG_RESULT([$instconfigdir]) # check for --with-dslibdir AC_MSG_CHECKING(for --with-dslibdir) AC_ARG_WITH(dslibdir, AS_HELP_STRING([--with-dslibdir=/path], [Directory Server library directory (default $libdir/$PACKAGE_BASE_NAME)]), [ if test $withval = yes ; then AC_ERROR([Please specify a full path with --with-dslibdir]) fi dslibdir="$withval" ], [ dnl this value is expanded out in Makefile.am dslibdir='$(libdir)/$(PACKAGE_BASE_NAME)' ]) AC_SUBST(dslibdir) AC_MSG_RESULT([$dslibdir]) # check for --enable-service # set default value based on availability of the service command # don't use service with systemd if test -z "$with_systemdsystemunitdir" ; then AC_MSG_CHECKING(for --enable-service) AC_ARG_ENABLE(service, AS_HELP_STRING([--enable-service], [Use the service command instead of the stop|start|restart scripts]), [if test x"$enableval" = xyes ; then enable_service=yes else enable_service= fi], [enable_service=] ) if test -n "$enable_service" ; then AC_DEFINE([ENABLE_SERVICE], [1], [Use the service command instead of the stop|start|restart scripts]) dirsrv_service_name="$PACKAGE_BASE_NAME" AC_SUBST(dirsrv_service_name) AC_MSG_RESULT([$enable_service]) else AC_MSG_RESULT([no]) fi else enable_service= fi AC_SUBST(enable_service) # installation paths - by default, configure will just # use /usr as the prefix for everything, which means # /usr/etc and /usr/var. FHS sez to use /etc and /var. # The with-fhs-opt option will use the # prefix, but it's sysconfdir and localstatedir will be # /etc/opt, and /var/opt. if test "$with_fhs_opt" = "yes"; then # Override sysconfdir and localstatedir if FHS optional # package was requested. sysconfdir='/etc/opt' localstatedir='/var/opt' # relative to datadir infdir=/inf htmldir=/html icondir=/icons manualdir=/manual ldifdir=/data updatedir=/updates-admin # relative to libdir # CGI program directory cgibindir=/cgi-bin dsgwcgibindir=/dsgw-cgi-bin # where our private Apache modules will go admmoddir=/modules perldir=/perl # log files, relative to localstatedir admlogdir=/$PACKAGE_BASE_NAME/$instancename/log # the pid dir, relative to localstatedir piddir=/$PACKAGE_BASE_NAME/$instancename/run # location of property/resource files, relative to datadir propertydir=/properties # relative to $localstatedir dsgwcookiedir=/$PACKAGE_BASE_NAME/dsgw/cookies else if test "$with_fhs" = "yes"; then ac_default_prefix=/usr prefix=$ac_default_prefix exec_prefix=$prefix dnl as opposed to the default /usr/etc sysconfdir='/etc' dnl as opposed to the default /usr/var localstatedir='/var' fi # relative to datadir infdir=/$PACKAGE_BASE_NAME/inf htmldir=/$PACKAGE_BASE_NAME/html icondir=/$PACKAGE_BASE_NAME/icons manualdir=/$PACKAGE_BASE_NAME/manual ldifdir=/$PACKAGE_BASE_NAME/data updatedir=/$PACKAGE_BASE_NAME/updates-admin # relative to libdir # CGI program directory cgibindir=/$PACKAGE_BASE_NAME/cgi-bin dsgwcgibindir=/$PACKAGE_BASE_NAME/dsgw-cgi-bin # where our private Apache modules will go admmoddir=/$PACKAGE_BASE_NAME/modules perldir=/$PACKAGE_BASE_NAME/perl # log files, relative to localstatedir admlogdir=/log/$PACKAGE_BASE_NAME # the pid dir, relative to localstatedir piddir=/run/$PACKAGE_BASE_NAME # location of property/resource files, relative to datadir propertydir=/$PACKAGE_BASE_NAME/properties # relative to $localstatedir dsgwcookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies fi pidfile=$instancename.pid # write out paths for binary components AC_SUBST(PACKAGE_NAME) AC_SUBST(nspr_inc) AC_SUBST(nspr_lib) AC_SUBST(nspr_libdir) AC_SUBST(nss_inc) AC_SUBST(nss_lib) AC_SUBST(nss_libdir) AC_SUBST(sasl_inc) AC_SUBST(sasl_lib) AC_SUBST(sasl_libdir) AC_SUBST(ldapsdk_inc) AC_SUBST(ldapsdk_lib) AC_SUBST(ldapsdk_libdir) AC_SUBST(openldap_inc) AC_SUBST(openldap_lib) AC_SUBST(openldap_libdir) AC_SUBST(ol_libver) AC_SUBST(adminutil_inc) AC_SUBST(adminutil_lib) AC_SUBST(adminutil_libdir) AC_SUBST(adminutil_ver) AC_SUBST(icu_lib) AC_SUBST(icu_libdir) AC_SUBST(icu_inc) AC_SUBST(icu_bin) # extra stuff for Apache modules AC_SUBST(APXS) AC_SUBST(apr_inc) AC_SUBST(apache_inc) AC_SUBST(apache_conf) AC_SUBST(apache_prefix) AC_SUBST(apache_bin) AC_SUBST(extra_cppflags) AC_SUBST(ap_ver_suf) # write out paths for data/config files AC_SUBST(instconfigdir) AC_SUBST(instancename) AC_SUBST(cgibindir) AC_SUBST(cmdbindir) AC_SUBST(moddir) AC_SUBST(modnssbindir) AC_SUBST(propertydir) AC_SUBST(htmldir) AC_SUBST(icondir) AC_SUBST(manualdir) AC_SUBST(httpdconf) AC_SUBST(httpdconfdir) AC_SUBST(mimemagic) AC_SUBST(httpduser) AC_SUBST(httpdgroup) AC_SUBST(admlogdir) AC_SUBST(piddir) AC_SUBST(pidfile) AC_SUBST(admservport) AC_SUBST(admservip) AC_SUBST(HTTPD) AC_SUBST(ldifdir) AC_SUBST(admmoddir) AC_SUBST(nssmoddir) AC_SUBST(infdir) AC_SUBST(perldir) AC_SUBST(updatedir) # these are needed for selinux policy for the dsgw AC_SUBST(dsgwcgibindir) AC_SUBST(dsgwcookiedir) AC_SUBST(brand) AC_SUBST(capbrand) AC_SUBST(vendor) AC_SUBST(vendorurl) AM_CONDITIONAL([OPENLDAP],[test "$with_openldap" = "yes"]) # WINNT should be true if building on Windows system not using # cygnus, mingw, or the like and using cmd.exe as the shell AM_CONDITIONAL([WINNT], false) AM_CONDITIONAL([APACHE22], [test -n "$APACHE22"]) AM_CONDITIONAL([APACHE24], [test -n "$APACHE24"]) AM_CONDITIONAL([SYSTEMD], [test -n "$with_systemdsystemunitdir"]) # libtool on fedora/rhel contains some gcc-isms which cause problems # if not using gcc (e.g. Forte on Solaris, aCC on HP-UX) # we remove them here if test "$GCC" != yes ; then AC_MSG_NOTICE([Not using gcc - fixing libtool to remove gcc-isms . . .]) cp -p libtool libtool.orig cp -p libtool libtool.tmp # dnl note the special chars @<:@ and @:>@ - since m4 treats [ and ] specially, # we have to use the quadrigraph @<:@ for [ and @:>@ for ] - and you thought # perl produced write-only code . . . sed -e '/^gcc_dir/ d' \ -e '/^gcc_ver/ d' \ -e 's/^predep_objects=.*echo \("@<:@^"@:>@*"\).*$/predep_objects=\1/' \ -e 's/^postdep_objects=.*echo \("@<:@^"@:>@*"\).*$/postdep_objects=\1/' \ -e 's/^compiler_lib_search_path=.*echo \("@<:@^"@:>@*"\).*$/compiler_lib_search_path=\1/' \ -e 's/^sys_lib_search_path_spec=.*echo \("@<:@^"@:>@*"\).*$/sys_lib_search_path_spec=\1/' \ libtool > libtool.tmp cp -p libtool.tmp libtool rm -f libtool.tmp fi if test "$enable_rpath" != "yes" ; then AC_MSG_NOTICE([Fixing libtool to remove automatic rpath to $libdir . . .]) cp -p libtool libtool.orig cp -p libtool libtool.tmp sed -e '/^runpath_var/ d' \ -e '/^hardcode_libdir_flag_spec/ d' \ libtool > libtool.tmp cp -p libtool.tmp libtool rm -f libtool.tmp fi AC_CONFIG_FILES([Makefile]) AC_OUTPUT 389-admin-1.1.35/depcomp000077500000000000000000000505521220472121400145710ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 389-admin-1.1.35/include/000077500000000000000000000000001220472121400146305ustar00rootroot00000000000000389-admin-1.1.35/include/base/000077500000000000000000000000001220472121400155425ustar00rootroot00000000000000389-admin-1.1.35/include/base/buffer.h000066400000000000000000000126431220472121400171720ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef BASE_BUFFER_H #define BASE_BUFFER_H #ifndef NOINTNSAPI #define INTNSAPI #endif /* !NOINTNSAPI */ /* * buffer.h: For performing buffered I/O on a file or socket descriptor. * * This is an abstraction to allow I/O to be performed regardless of the * current system. That way, an integer file descriptor can be used under * UNIX but a stdio FILE structure could be used on systems which don't * support that or don't support it as efficiently. * * Two abstractions are defined: A file buffer, and a network buffer. A * distinction is made so that mmap() can be used on files (but is not * required). Also, the file buffer takes a file name as the object to * open instead of a file descriptor. A lot of the network buffering * is almost an exact duplicate of the non-mmap file buffering. * * If an error occurs, system-independent means to obtain an error string * are also provided. However, if the underlying system is UNIX the error * may not be accurate in a threaded environment. * * Rob McCool * */ #ifndef NETSITE_H #include "../netsite.h" #endif /* !NETSITE_H */ #ifndef BASE_FILE_H #include "file.h" #endif /* !BASE_FILE_H */ #ifndef PUBLIC_BASE_BUFFER_H #include "public/base/buffer.h" #endif /* !PUBLIC_BASE_BUFFER_H */ #ifdef INTNSAPI /* --- Begin function prototypes --- */ NSPR_BEGIN_EXTERN_C /* * buffer_open opens a new buffer reading the specified file, with an I/O * buffer of size sz, and returns a new buffer structure which will hold * the data. * * If FILE_UNIX_MMAP is defined, this may return NULL. If it does, check * system_errmsg to get a message about the error. */ NSAPI_PUBLIC filebuf_t *INTfilebuf_open(SYS_FILE fd, int sz); /* * filebuf_open_nostat is a convenience function for mmap() buffer opens, * if you happen to have the stat structure already. */ /* * filebuf_create is a convenience function if the file is already open * or mmap'd. It creates a new filebuf for use with the mmap'd file. * If mmap_ptr is NULL, or MMAP is not supported on this system, it * creates a buffer with buffer size bufsz. */ NSAPI_PUBLIC filebuf_t *INTfilebuf_create(SYS_FILE fd, caddr_t mmap_ptr, int mmap_len, int bufsz); #ifdef FILE_MMAP #include NSAPI_PUBLIC filebuf_t *INTfilebuf_open_nostat(SYS_FILE fd, int sz, struct stat *finfo); #endif /* FILE_MMAP */ #ifdef XP_WIN32 NSAPI_PUBLIC filebuf_t *INTpipebuf_open(SYS_FILE fd, int sz, struct stat *finfo); #endif /* XP_WIN32 */ /* * buffer_next loads size more bytes into the given buffer and returns the * first one, or BUFFER_EOF on EOF and BUFFER_ERROR on error. */ #ifndef FILE_MMAP NSAPI_PUBLIC int INTfilebuf_next(filebuf_t *buf, int advance); #endif /* !FILE_MMAP */ #ifdef XP_WIN32 NSAPI_PUBLIC int INTpipebuf_next(filebuf_t *buf, int advance); #endif /* XP_WIN32 */ #ifdef XP_WIN32 NSAPI_PUBLIC void INTpipebuf_close(filebuf_t *buf); #endif /* XP_WIN32 */ /* * buffer_grab will set the buffer's inbuf array to an array of sz bytes * from the buffer's associated object. It returns the number of bytes * actually read (between 1 and sz). It returns IO_EOF upon EOF or IO_ERROR * upon error. The cursize entry of the structure will reflect the size * of the iobuf array. * * The buffer will take care of allocation and deallocation of this array. */ NSAPI_PUBLIC int INTfilebuf_grab(filebuf_t *buf, int sz); #ifdef XP_WIN32 NSAPI_PUBLIC int INTpipebuf_grab(filebuf_t *buf, int sz); #endif /* XP_WIN32 */ /* * filebuf_buf2sd assumes that nothing has been read from the filebuf, * and just sends the file out to the given socket. Returns IO_ERROR on error * and the number of bytes sent otherwise. * * Does not currently support you having read from the buffer previously. This * can be changed transparently. */ NSAPI_PUBLIC int INTfilebuf_buf2sd(filebuf_t *buf, SYS_NETFD sd); #ifdef XP_WIN32 /* * NT pipe version of filebuf_buf2sd. */ NSAPI_PUBLIC int INTpipebuf_buf2sd(filebuf_t *buf, SYS_NETFD sd, int len); #endif /* XP_WIN32 */ NSPR_END_EXTERN_C #ifdef FILE_MMAP #define filebuf_open_nostat INTfilebuf_open_nostat #endif /* FILE_MMAP */ #define filebuf_open INTfilebuf_open #define filebuf_close INTfilebuf_close #define filebuf_next INTfilebuf_next #define filebuf_grab INTfilebuf_grab #define filebuf_create INTfilebuf_create #define filebuf_buf2sd INTfilebuf_buf2sd #ifdef XP_WIN32 #define pipebuf_open INTpipebuf_open #define pipebuf_close INTpipebuf_close #define pipebuf_next INTpipebuf_next #define pipebuf_grab INTpipebuf_grab #define pipebuf_buf2sd INTpipebuf_buf2sd #endif /* XP_WIN32 */ #endif /* INTNSAPI */ #endif /* !BASE_BUFFER_H */ 389-admin-1.1.35/include/base/eventhandler.h000066400000000000000000000047061220472121400204010ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * eventhandler.h: Handle registration of event handlers * * This is a facility in the NT server to provide a way to register event * handling functions. Often there is a need to send a control signal of some * kind to the server. This could be a signal for the server to rotate its * logs, or a signal to collect and return statistical information of some kind * such as perfmon stats. * * This file specifies the structures and functions necessary to set up this * kind of asynchronous special event handling. * * Aruna Victor 2/21/96 */ #ifndef EVENTHANDLER_H #define EVENTHANDLER_H #include "netsite.h" /* ------------------------------ Structures ------------------------------ */ /* EVENT_HANDLER specifies 1. The name of the event. This is the event that the event handler will create and wait on for a signal. 2. The name of the function should be called to handle the event. 3. The argument that should be passed to this function. 4. The next EVENT_HANDLER on the list this structure is on. */ typedef struct event_handler { int event_number; char *event_name; void (*_event_handler)(void *); void *argument; struct event_handler *next; } EVENT_HANDLER; /* ------------------------------ Prototypes ------------------------------ */ NSPR_BEGIN_EXTERN_C char *initialize_event_handler(char *serverid); char *terminate_event_handler(); char *add_handler(char *event, void (*fn)(void *), void *arg); char *delete_handler(char *event); char *add_rotation_handler(char *event, void (*fn)(void *), void *arg); NSPR_END_EXTERN_C #endif /* !EVENTHANDLER */ 389-admin-1.1.35/include/base/eventlog.h000066400000000000000000000026071220472121400175430ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* EVENTLOG.H * * This file contains the defines that make NT an installable service. * * 1/12/95 aruna */ /* Functions in eventlog.c */ #ifndef _EVENTLOG_H_ #define _EVENTLOG_H_ #include "netsite.h" #if defined(XP_WIN32) NSPR_BEGIN_EXTERN_C NSAPI_PUBLIC HANDLE InitializeLogging(char *szEventLogName); NSAPI_PUBLIC BOOL TerminateLogging(HANDLE hEventSource); NSAPI_PUBLIC BOOL LogErrorEvent(HANDLE hEventSource, WORD fwEventType, WORD fwCategory, DWORD IDEvent, LPTSTR chMsg, LPTSTR lpszMsg); NSPR_END_EXTERN_C #endif /* XP_WIN32 */ #endif 389-admin-1.1.35/include/base/file.h000066400000000000000000000107251220472121400166370ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef BASE_FILE_H #define BASE_FILE_H #ifndef NOINTNSAPI #define INTNSAPI #endif /* !NOINTNSAPI */ /* GLOBAL FUNCTIONS: * DESCRIPTION: * system-specific functions for reading/writing files */ #ifndef NETSITE_H #include "../netsite.h" #endif /* !NETSITE_H */ #ifndef PUBLIC_BASE_FILE_H #include "public/base/file.h" #endif /* !PUBLIC_BASE_FILE_H */ /* --- Begin function prototypes --- */ #ifdef INTNSAPI NSPR_BEGIN_EXTERN_C void INTsystem_errmsg_init(void); NSAPI_PUBLIC SYS_FILE INTsystem_fopenRO(char *path); NSAPI_PUBLIC SYS_FILE INTsystem_fopenWA(char *path); NSAPI_PUBLIC SYS_FILE INTsystem_fopenRW(char *path); NSAPI_PUBLIC SYS_FILE INTsystem_fopenWT(char *path); NSAPI_PUBLIC int INTsystem_fread(SYS_FILE fd, char *buf, int sz); NSAPI_PUBLIC int INTsystem_fwrite(SYS_FILE fd,char *buf,int sz); NSAPI_PUBLIC int INTsystem_fwrite_atomic(SYS_FILE fd, char *buf, int sz); NSAPI_PUBLIC int INTsystem_lseek(SYS_FILE fd, int off, int wh); NSAPI_PUBLIC int INTsystem_fclose(SYS_FILE fd); NSAPI_PUBLIC int INTsystem_stat(char *name, struct stat *finfo); NSAPI_PUBLIC int INTsystem_rename(char *oldpath, char *newpath); NSAPI_PUBLIC int INTsystem_unlink(char *path); NSAPI_PUBLIC int INTsystem_tlock(SYS_FILE fd); NSAPI_PUBLIC int INTsystem_flock(SYS_FILE fd); NSAPI_PUBLIC int INTsystem_ulock(SYS_FILE fd); #ifdef XP_WIN32 NSAPI_PUBLIC SYS_DIR INTdir_open(char *path); NSAPI_PUBLIC SYS_DIRENT *INTdir_read(SYS_DIR ds); NSAPI_PUBLIC void INTdir_close(SYS_DIR ds); #endif /* XP_WIN32 */ /* --- OBSOLETE ---------------------------------------------------------- * The following macros/functions are obsolete and are only maintained for * compatibility. Do not use them. 11-19-96 * ----------------------------------------------------------------------- */ #ifdef XP_WIN32 NSAPI_PUBLIC char *INTsystem_winsockerr(void); NSAPI_PUBLIC char *INTsystem_winerr(void); NSAPI_PUBLIC int INTsystem_pread(SYS_FILE fd, char *buf, int sz); NSAPI_PUBLIC int INTsystem_pwrite(SYS_FILE fd, char *buf, int sz); NSAPI_PUBLIC void INTfile_unix2local(char *path, char *p2); #endif /* XP_WIN32 */ NSAPI_PUBLIC int INTsystem_nocoredumps(void); NSAPI_PUBLIC int INTfile_setinherit(SYS_FILE fd, int value); NSAPI_PUBLIC int INTfile_notfound(void); NSAPI_PUBLIC char *INTsystem_errmsg(void); NSAPI_PUBLIC int INTsystem_errmsg_fn(char **buff, size_t maxlen); NSPR_END_EXTERN_C #define system_errmsg_init INTsystem_errmsg_init #define system_fopenRO INTsystem_fopenRO #define system_fopenWA INTsystem_fopenWA #define system_fopenRW INTsystem_fopenRW #define system_fopenWT INTsystem_fopenWT #define system_fread INTsystem_fread #define system_fwrite INTsystem_fwrite #define system_fwrite_atomic INTsystem_fwrite_atomic #define system_lseek INTsystem_lseek #define system_fclose INTsystem_fclose #define system_stat INTsystem_stat #define system_rename INTsystem_rename #define system_unlink INTsystem_unlink #define system_tlock INTsystem_tlock #define system_flock INTsystem_flock #define system_ulock INTsystem_ulock #ifdef XP_WIN32 #define dir_open INTdir_open #define dir_read INTdir_read #define dir_close INTdir_close #endif /* XP_WIN32 */ /* Obsolete */ #ifdef XP_WIN32 #define system_winsockerr INTsystem_winsockerr #define system_winerr INTsystem_winerr #define system_pread INTsystem_pread #define system_pwrite INTsystem_pwrite #define file_unix2local INTfile_unix2local #endif /* XP_WIN32 */ #define system_nocoredumps INTsystem_nocoredumps #define file_setinherit INTfile_setinherit #define file_notfound INTfile_notfound #define rtfile_notfound INTfile_notfound #define system_errmsg INTsystem_errmsg #define system_errmsg_fn INTsystem_errmsg_fn #endif /* INTNSAPI */ #endif /* BASE_FILE_H */ 389-admin-1.1.35/include/base/nsassert.h000066400000000000000000000020241220472121400175530ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * nsassert.h * * Handler for Asserts * */ #ifndef BASE_NSASSERT_H #define BASE_NSASSERT_H #include #define NS_ASSERT(x) PR_ASSERT(x) #endif /* !BASE_NSASSERT_H */ 389-admin-1.1.35/include/base/nterr.h000066400000000000000000000017731220472121400170550ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef _NTERR_H #define _NTERR_H NSPR_BEGIN_EXTERN_C char * FindError(int error); NSAPI_PUBLIC void HashNtErrors(); NSPR_END_EXTERN_C #endif /* _NTERR_H */ 389-admin-1.1.35/include/base/nterrors.h000066400000000000000000000031701220472121400175720ustar00rootroot00000000000000/* DO NOT EDIT THIS FILE - it is automatically generated */ typedef struct _NtError { int ErrorNumber; char *ErrorString; struct _NtError *next; } NtError; NtError NtErrorStrings[] = { { 10004 , "WSAEINTR" }, { 10009 , "WSAEBADF" }, { 10013 , "WSAEACCES" }, { 10014 , "WSAEFAULT" }, { 10022 , "WSAEINVAL" }, { 10024 , "WSAEMFILE" }, { 10035 , "WSAEWOULDBLOCK" }, { 10036 , "WSAEINPROGRESS" }, { 10037 , "WSAEALREADY" }, { 10038 , "WSAENOTSOCK" }, { 10039 , "WSAEDESTADDRREQ" }, { 10040 , "WSAEMSGSIZE" }, { 10041 , "WSAEPROTOTYPE" }, { 10042 , "WSAENOPROTOOPT" }, { 10043 , "WSAEPROTONOSUPPORT" }, { 10044 , "WSAESOCKTNOSUPPORT" }, { 10045 , "WSAEOPNOTSUPP" }, { 10046 , "WSAEPFNOSUPPORT" }, { 10047 , "WSAEAFNOSUPPORT" }, { 10048 , "WSAEADDRINUSE" }, { 10049 , "WSAEADDRNOTAVAIL" }, { 10050 , "WSAENETDOWN" }, { 10051 , "WSAENETUNREACH" }, { 10052 , "WSAENETRESET" }, { 10053 , "WSAECONNABORTED" }, { 10054 , "WSAECONNRESET" }, { 10055 , "WSAENOBUFS" }, { 10056 , "WSAEISCONN" }, { 10057 , "WSAENOTCONN" }, { 10058 , "WSAESHUTDOWN" }, { 10059 , "WSAETOOMANYREFS" }, { 10060 , "WSAETIMEDOUT" }, { 10061 , "WSAECONNREFUSED" }, { 10062 , "WSAELOOP" }, { 10063 , "WSAENAMETOOLONG" }, { 10064 , "WSAEHOSTDOWN" }, { 10065 , "WSAEHOSTUNREACH" }, { 10066 , "WSAENOTEMPTY" }, { 10067 , "WSAEPROCLIM" }, { 10068 , "WSAEUSERS" }, { 10069 , "WSAEDQUOT" }, { 10070 , "WSAESTALE" }, { 10071 , "WSAEREMOTE" }, { 10101 , "WSAEDISCON" }, { 10091 , "WSASYSNOTREADY" }, { 10092 , "WSAVERNOTSUPPORTED" }, { 10093 , "WSANOTINITIALISED" }, { 11001 , "WSAHOST_NOT_FOUND" }, { 11002 , "WSATRY_AGAIN" }, { 11003 , "WSANO_RECOVERY" }, { 11004 , "WSANO_DATA" }, { 0, NULL } }; 389-admin-1.1.35/include/base/systems.h000066400000000000000000000274601220472121400174330ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef BASE_SYSTEMS_H #define BASE_SYSTEMS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifndef NOINTNSAPI #define INTNSAPI #endif /* !NOINTNSAPI */ /* * systems.h: Lists of defines for systems * * This sets what general flavor the system is (UNIX, etc.), * and defines what extra functions your particular system needs. */ /* --- Begin common definitions for all supported platforms --- */ #define DAEMON_ANY #define DAEMON_STATS /* --- End common definitions for all supported platforms --- */ /* --- Begin platform-specific definitions --- */ #if defined(AIX) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_RLIMIT #undef BSD_SIGNALS /* AIX can handle really big shoes */ #define DAEMON_LISTEN_SIZE 4096 #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW|RTLD_GLOBAL #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATFS #define HAVE_ATEXIT #define HAVE_PW_R /* reent passwd routines */ #define HAVE_STRERROR_R #define HAVE_STRTOK_R #define HAVE_TIME_R 2 /* arg count */ #define HAVE_STRFTIME /* no cftime */ #define JAVA_STATIC_LINK #undef NEED_CRYPT_H #define NEED_SETEID_PROTO /* setegid, seteuid */ #define NEED_STRINGS_H /* for strcasecmp */ #define NET_SOCKETS #define SA_HANDLER_T(x) (void (*)(int))x #define SHMEM_MMAP_FLAGS MAP_SHARED #ifdef HW_THREADS #define THREAD_ANY #endif #elif defined(BSDI) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_MAIL #define BSD_RLIMIT #define BSD_SIGNALS #define BSD_TIME #define DAEMON_UNIX_MOBRULE #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED) #define HAS_STATFS #define HAVE_ATEXIT #undef NEED_CRYPT_PROTO #define NET_SOCKETS #define NO_DOMAINNAME #define SHMEM_MMAP_FLAGS MAP_SHARED #define JAVA_STATIC_LINK #elif defined(HPUX) #define ACCELERATOR_CACHE #define AUTH_DBM #undef BSD_RLIMIT #undef BSD_SIGNALS #ifdef MCC_PROXY #define DAEMON_NEEDS_SEMAPHORE #else #undef DAEMON_NEEDS_SEMAPHORE #endif #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_HPSHL #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_PRIVATE #define HAS_STATFS #define HAVE_ATEXIT #define JAVA_STATIC_LINK #undef NEED_CRYPT_H #define NET_SOCKETS #define SA_HANDLER_T(x) (void (*)(int))x /* warning: mmap doesn't work under 9.04 */ #define SHMEM_MMAP_FLAGS MAP_FILE | MAP_VARIABLE | MAP_SHARED #elif defined (IRIX) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_RLIMIT #undef BSD_SIGNALS #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define HAVE_STRTOK_R #ifdef IRIX6_2 #define HAVE_TIME_R 2 /* arg count */ #else #define HAVE_TIME_R 3 /* arg count */ #define NEED_SETEID_PROTO /* setegid, seteuid */ #endif #define JAVA_STATIC_LINK #define NEED_CRYPT_H #define NET_SOCKETS #define SA_HANDLER_T(x) (void (*)(int))x #define SHMEM_MMAP_FLAGS MAP_SHARED #define THROW_HACK throw() #elif defined(LINUX) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_MAIL #define BSD_RLIMIT #define BSD_SIGNALS #define BSD_TIME #define DAEMON_UNIX_MOBRULE #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS (MAP_FILE | MAP_SHARED) #define HAS_STATFS #define HAVE_ATEXIT #undef NEED_CRYPT_PROTO #define NET_SOCKETS #define NO_DOMAINNAME #define SHMEM_MMAP_FLAGS MAP_SHARED #define SA_HANDLER_T(x) (void (*)(int))x #define JAVA_STATIC_LINK #elif defined(NCR) #define ACCELERATOR_CACHE #define AUTH_DBM #undef BSD_RLIMIT /* #define DAEMON_NEEDS_SEMAPHORE */ #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define HAVE_STRTOK_R #define JAVA_STATIC_LINK #define NEED_CRYPT_H #define NEED_FILIO #define NEED_GHN_PROTO #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined(NEC) #define ACCELERATOR_CACHE #define DNS_CACHE #define AUTH_DBM #undef BSD_RLIMIT #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DLL_CAPABLE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define HAVE_STRTOK_R #define HAVE_TIME_R 2 /* arg count */ #define JAVA_STATIC_LINK #define NEED_CRYPT_H #define NEED_FILIO #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined(OSF1) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_RLIMIT #undef BSD_SIGNALS #define BSD_TIME #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAVE_ATEXIT #define HAVE_STRFTIME /* no cftime */ #define HAVE_TIME_R 2 /* ctime_r arg count */ #define NET_SOCKETS #define SA_HANDLER_T(x) (void (*)(int))x #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined(SCO) #define ACCELERATOR_CACHE #define AUTH_DBM #undef BSD_RLIMIT #undef BSD_SIGNALS #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #undef NEED_CRYPT_H #undef NEED_FILIO #undef NEED_GHN_PROTO #undef NEED_SETEID_PROTO /* setegid, seteuid */ #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #define SA_HANDLER_T(x) (void (*)(int))x #elif defined(SNI) #define ACCELERATOR_CACHE #define AUTH_DBM #undef BSD_RLIMIT #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define JAVA_STATIC_LINK #define NEED_CRYPT_H #define NEED_FILIO #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #define USE_PIPE #elif defined(SOLARIS) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_RLIMIT #undef BSD_SIGNALS #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define HAVE_PW_R #define HAVE_STRTOK_R #define HAVE_TIME_R 3 /* arg count */ #define NEED_CRYPT_H #define NEED_FILIO #define NEED_GHN_PROTO #include #define NET_SOCKETS #if OSVERSION > 504 #define SA_HANDLER_T(x) x #endif #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined (SONY) #define AUTH_DBM #undef BSD_RLIMIT #define DAEMON_NEEDS_SEMAPHORE #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAVE_ATEXIT #define NEED_CRYPT_H #define NEED_FILIO #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined(SUNOS4) #define ACCELERATOR_CACHE #define AUTH_DBM #define BSD_MAIL #define BSD_RLIMIT #define BSD_SIGNALS #define BSD_TIME #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS 1 #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATFS #undef HAVE_ATEXIT #undef NEED_CRYPT_H #define NEED_CRYPT_PROTO #define NEED_FILIO #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #elif defined(UNIXWARE) #define ACCELERATOR_CACHE #define AUTH_DBM #undef BSD_RLIMIT #define DAEMON_UNIX_MOBRULE #define DLL_CAPABLE #define DLL_DLOPEN #define DLL_DLOPEN_FLAGS RTLD_NOW #define DNS_CACHE #define FILE_INHERIT_FCNTL #define FILE_MMAP_FLAGS MAP_SHARED #define HAS_STATVFS #define HAVE_ATEXIT #define NEED_CRYPT_H #define NEED_FILIO #define NEED_GHN_PROTO #define NEED_SETEID_PROTO /* setegid, seteuid */ #define NET_SOCKETS #define SHMEM_MMAP_FLAGS MAP_SHARED #ifndef boolean #define boolean boolean #endif #elif defined (XP_WIN32) /* Windows NT */ #include #include typedef void* PASSWD; #define ACCELERATOR_CACHE #define AUTH_DBM /* size has been raised to 200 with NT 4.0 server; NT 4.0 workstation is still * limited */ #define DAEMON_LISTEN_SIZE 200 #define DAEMON_WIN32 #define DLL_CAPABLE #define DLL_WIN32 #define DNS_CACHE #define LOG_BUFFERING #define HAVE_STRFTIME /* no cftime */ #define NEED_CRYPT_PROTO #define NEEDS_WRITEV #define NET_SOCKETS #define NO_DOMAINNAME #ifdef BUILD_DLL #define NSAPI_PUBLIC __declspec(dllexport) #else #define NSAPI_PUBLIC #endif /* BUILD_DLL */ #define THREAD_ANY #define THREAD_NSPR_KERNEL #define USE_NSPR #define USE_STRFTIME /* no cftime */ #endif /* Windows NT */ /* Pick up the configuration symbols in the public interface */ #ifndef PUBLIC_BASE_SYSTEMS_H #include "public/base/systems.h" #endif /* PUBLIC_BASE_SYSTEMS_H */ /* --- Begin defaults for values not defined above --- */ #ifndef DAEMON_LISTEN_SIZE #define DAEMON_LISTEN_SIZE 128 #endif /* !DAEMON_LISTEN_SIZE */ #ifndef SA_HANDLER_T #define SA_HANDLER_T(x) (void (*)())x #endif #ifndef THROW_HACK #define THROW_HACK /* as nothing */ #endif /* --- End defaults for values not defined above --- */ /* --- Begin the great debate --- */ /* NS_MAIL builds sec-key.c which calls systhread_init, which requires */ /* that USE_NSPR is defined when systhr.c is compiled. --lachman */ /* MCC_PROXY does the same thing now --nbreslow -- LIKE HELL --ari */ #if (defined(MCC_HTTPD) || defined(MCC_ADMSERV) || defined(MCC_PROXY) || defined(NS_MAIL)) && defined(XP_UNIX) #define USE_NSPR /* XXXrobm This is UNIX-only for the moment */ #define LOG_BUFFERING #ifdef SW_THREADS #define THREAD_NSPR_USER #else #define THREAD_NSPR_KERNEL #ifdef IRIX #undef SEM_FLOCK #define SEM_IRIX #endif #endif #define THREAD_ANY #endif /* --- End the great debate --- */ #ifndef APSTUDIO_READONLY_SYMBOLS #ifndef NSPR_PRIO_H #include #define NSPR_PRIO_H #endif /* !NSPR_PRIO_H */ /* * These types have to be defined early, because they are defined * as (void *) in the public API. */ #ifndef SYS_FILE_T typedef PRFileDesc *SYS_FILE; #define SYS_FILE_T PRFileDesc * #endif /* !SYS_FILE_T */ #ifndef SYS_NETFD_T typedef PRFileDesc *SYS_NETFD; #define SYS_NETFD_T PRFileDesc * #endif /* !SYS_NETFD_T */ #ifdef SEM_WIN32 typedef HANDLE SEMAPHORE; #define SEMAPHORE_T HANDLE #define SEM_ERROR NULL /* That oughta hold them (I hope) */ #define SEM_MAXVALUE 32767 #elif defined(SEM_IRIX) #ifndef OS_ULOCKS_H #include #define OS_ULOCKS_H #endif /* !OS_ULOCKS_H */ typedef struct { usptr_t *arena; usema_t *sem; } semirix_s; typedef semirix_s* SEMAPHORE; #define SEMAPHORE_T semirix_s * #define SEM_ERROR NULL #elif defined(SEM_FLOCK) #define SEMAPHORE_T SYS_FILE typedef SYS_FILE SEMAPHORE; #define SEM_ERROR NULL #else /* ! SEM_WIN32, !SEM_IRIX */ typedef int SEMAPHORE; #define SEMAPHORE_T int #define SEM_ERROR -1 #endif /* SEM_WIN32 */ #endif /* !APSTUDIO_READONLY_SYMBOLS */ #endif /* BASE_SYSTEMS_H */ 389-admin-1.1.35/include/base/util.h000066400000000000000000000142331220472121400166730ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef BASE_UTIL_H #define BASE_UTIL_H #ifndef NOINTNSAPI #define INTNSAPI #endif /* !NOINTNSAPI */ /* * util.h: A hodge podge of utility functions and standard functions which * are unavailable on certain systems * * Rob McCool */ /* Needed for various reentrant functions */ #define DEF_CTIMEBUF 26 #define DEF_ERRBUF 256 #define DEF_PWBUF 256 #ifndef BASE_BUFFER_H #include "buffer.h" /* filebuf for getline */ #endif /* !BASE_BUFFER_H */ #ifndef PUBLIC_BASE_UTIL_H #include "public/base/util.h" #endif /* !PUBLIC_BASE_UTIL_H */ /* --- Begin common function prototypes --- */ #ifdef INTNSAPI NSPR_BEGIN_EXTERN_C NSAPI_PUBLIC int INTutil_getline(filebuffer *buf, int lineno, int maxlen, char *l); NSAPI_PUBLIC char **INTutil_env_create(char **env, int n, int *pos); NSAPI_PUBLIC char *INTutil_env_str(char *name, char *value); NSAPI_PUBLIC void INTutil_env_replace(char **env, char *name, char *value); NSAPI_PUBLIC void INTutil_env_free(char **env); NSAPI_PUBLIC char **INTutil_env_copy(char **src, char **dst); NSAPI_PUBLIC char *INTutil_env_find(char **env, char *name); NSAPI_PUBLIC char *INTutil_hostname(void); NSAPI_PUBLIC int INTutil_chdir2path(char *path); NSAPI_PUBLIC int INTutil_is_mozilla(char *ua, char *major, char *minor); NSAPI_PUBLIC int INTutil_is_url(char *url); NSAPI_PUBLIC int INTutil_later_than(struct tm *lms, char *ims); NSAPI_PUBLIC int INTutil_time_equal(struct tm *lms, char *ims); NSAPI_PUBLIC int INTutil_str_time_equal(char *t1, char *t2); NSAPI_PUBLIC void INTutil_uri_parse(char *uri); NSAPI_PUBLIC void INTutil_uri_unescape(char *s); NSAPI_PUBLIC char *INTutil_uri_escape(char *d, char *s); NSAPI_PUBLIC char *INTutil_url_escape(char *d, char *s); NSAPI_PUBLIC char *INTutil_sh_escape(char *s); NSAPI_PUBLIC int INTutil_mime_separator(char *sep); NSAPI_PUBLIC int INTutil_itoa(int i, char *a); NSAPI_PUBLIC int INTutil_vsprintf(char *s, register const char *fmt, va_list args); NSAPI_PUBLIC int INTutil_sprintf(char *s, const char *fmt, ...); NSAPI_PUBLIC int INTutil_vsnprintf(char *s, int n, register const char *fmt, va_list args); NSAPI_PUBLIC int INTutil_snprintf(char *s, int n, const char *fmt, ...); NSAPI_PUBLIC char *INTutil_strtok(char *s1, const char *s2, char **lasts); NSAPI_PUBLIC struct tm *INTutil_localtime(const time_t *clock, struct tm *res); NSAPI_PUBLIC char *INTutil_ctime(const time_t *clock, char *buf, int buflen); NSAPI_PUBLIC char *INTutil_strerror(int errnum, char *msg, size_t buflen); NSAPI_PUBLIC struct tm *INTutil_gmtime(const time_t *clock, struct tm *res); NSAPI_PUBLIC char *INTutil_asctime(const struct tm *tm,char *buf, int buflen); #ifdef NEED_STRCASECMP NSAPI_PUBLIC int INTutil_strcasecmp(CASECMPARG_T char *one, CASECMPARG_T char *two); #endif /* NEED_STRCASECMP */ #ifdef NEED_STRNCASECMP NSAPI_PUBLIC int INTutil_strncasecmp(CASECMPARG_T char *one, CASECMPARG_T char *two, int n); #endif /* NEED_STRNCASECMP */ NSAPI_PUBLIC char *util_local_to_utf8(const char *src); /* --- End common function prototypes --- */ /* --- Begin Unix-only function prototypes --- */ #ifdef XP_UNIX NSAPI_PUBLIC int INTutil_can_exec(struct stat *finfo, uid_t uid, gid_t gid); NSAPI_PUBLIC struct passwd *INTutil_getpwnam(const char *name, struct passwd *result, char *buffer, int buflen); NSAPI_PUBLIC pid_t INTutil_waitpid(pid_t pid, int *statptr, int options); #endif /* XP_UNIX */ /* --- End Unix-only function prototypes --- */ NSPR_END_EXTERN_C #define util_getline INTutil_getline #define util_env_create INTutil_env_create #define util_env_str INTutil_env_str #define util_env_replace INTutil_env_replace #define util_env_free INTutil_env_free #define util_env_copy INTutil_env_copy #define util_env_find INTutil_env_find #define util_hostname INTutil_hostname #define util_chdir2path INTutil_chdir2path #define util_is_mozilla INTutil_is_mozilla #define util_is_url INTutil_is_url #define util_later_than INTutil_later_than #define util_time_equal INTutil_time_equal #define util_str_time_equal INTutil_str_time_equal #define util_uri_parse INTutil_uri_parse #define util_uri_unescape INTutil_uri_unescape #define util_uri_escape INTutil_uri_escape #define util_url_escape INTutil_url_escape #define util_sh_escape INTutil_sh_escape #define util_mime_separator INTutil_mime_separator #define util_itoa INTutil_itoa #define util_vsprintf INTutil_vsprintf #define util_sprintf INTutil_sprintf #define util_vsnprintf INTutil_vsnprintf #define util_snprintf INTutil_snprintf #define util_strcasecmp INTutil_strcasecmp #define util_strncasecmp INTutil_strncasecmp #define util_strtok INTutil_strtok #define util_localtime INTutil_localtime #define util_ctime INTutil_ctime #define util_strerror INTutil_strerror #define util_gmtime INTutil_gmtime #define util_asctime INTutil_asctime #ifdef XP_UNIX #define util_can_exec INTutil_can_exec #define util_getpwnam INTutil_getpwnam #define util_waitpid INTutil_waitpid #endif /* XP_UNIX */ #ifdef NEED_STRCASECMP #define util_strcasecmp INTutil_strcasecmp #define strcasecmp INTutil_strcasecmp #endif /* NEED_STRCASECMP */ #ifdef NEED_STRINGS_H /* usually for strcasecmp */ #include #endif #ifdef NEED_STRNCASECMP #define util_strncasecmp INTutil_strncasecmp #define strncasecmp INTutil_strncasecmp #endif /* NEED_STRNCASECMP */ #endif /* INTNSAPI */ #endif /* !BASE_UTIL_H */ 389-admin-1.1.35/include/i18n.h000066400000000000000000000035001220472121400155560ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef I18N_H #define I18N_H /* Make NSAPI_PUBLIC available */ #include "base/systems.h" #include "libadminutil/resource.h" /* * Function prototypes for application and libraries */ #ifdef __cplusplus extern "C" { #endif /******************************/ /* XP_GetStringFromDatabase() */ /******************************/ NSAPI_PUBLIC extern char* XP_GetStringFromDatabase(char* strLibraryName, char* strLanguage, int iToken); #ifdef __cplusplus } #endif /*******************************************************************************/ /* * Macros to simplify calls to XP_GetStringFromDatabase * (need one argument instead of three) */ #define XP_GetAdminStr(DBTTokenName) \ XP_GetStringFromDatabase(LIBRARY_NAME, \ "en", \ DBTTokenName) /*******************************************************************************/ #endif 389-admin-1.1.35/include/libadmin/000077500000000000000000000000001220472121400164075ustar00rootroot00000000000000389-admin-1.1.35/include/libadmin/backup.h000066400000000000000000000066351220472121400200370ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef backup_h #define backup_h #include typedef struct { char *name; char *path; char *fullPath; int version; long timestamp; char *extraInfo; /* used by higher level backup software */ } ADM_bkFile; /* A file and version to make a tag from */ typedef struct { int file; /* index of file */ int version; } ADM_bkTagEl; typedef struct { long timestamp; int numCohorts; ADM_bkTagEl *cohorts; /* what the file versions are */ char *log; } ADM_bkTag; typedef struct { int modifiable; /* 0 - r/o, 1 - can modify, > 1 - modified */ long quota; /* how much disk space can backups take? */ int maxTags; /* how many tags can backups take? */ char *root; /* what directory files are relative to */ char *backupDir; SYS_FILE f; int numFiles; ADM_bkFile *files; int numTags; ADM_bkTag *tags; } ADM_bkTree; typedef void (*ADM_bkAddResultFunc)( void *, ADM_bkTree *, int, int ); /*********************************************************************** ** GLOBAL FUNCTIONS: ** DESCRIPTION: ** These functions implement a method of backing up a list of related ** files. ** ** EXAMPLE: ** This quicky looks at all the files mentioned in /tmp/backups/backups.conf ** and compares the modified times. If any files are changed, it backs them ** up. ** ** ADM_bk_makeBackups( "/tmp/backups/backups.conf", "/tmp", ** "Meaningless Log Entry" ); ** ** RESTRICTIONS: ** You must remember to use ADM_bk_initTree and ADM_bk_done, or the files ** may become inconsistent ***********************************************************************/ NSPR_BEGIN_EXTERN_C NSAPI_PUBLIC int ADM_bk_newConfFile( char *dir, char *fileName ); NSAPI_PUBLIC ADM_bkTree * ADM_bk_initTree( char *root, char *confFile, int readOnly, int waitForLock ); NSAPI_PUBLIC void ADM_bk_done( ADM_bkTree *tree ); NSAPI_PUBLIC int ADM_bk_addFile( ADM_bkTree *tree, char *nickname, char *path, char *extraInfo, char *log ); NSAPI_PUBLIC int ADM_bk_restoreFile( ADM_bkTree *tree, int file, int version ); NSAPI_PUBLIC int ADM_bk_restoreToTime( ADM_bkTree *tree, long timestamp, ADM_bkAddResultFunc, ADM_bkAddResultFunc, void *parameter ); NSAPI_PUBLIC int ADM_bk_doBackups( ADM_bkTree *tree, char *log ); NSAPI_PUBLIC int ADM_bk_makeBackups( char *confFile, char *root, char *log ); NSAPI_PUBLIC int ADM_bk_findFile( ADM_bkTree *tree, char *name ); NSAPI_PUBLIC void ADM_bk_expire( ADM_bkTree * ); NSAPI_PUBLIC void ADM_bk_setQuota( ADM_bkTree *, long ); NSAPI_PUBLIC void ADM_bk_setMaxTags( ADM_bkTree *, int ); NSPR_END_EXTERN_C #endif /* backup_h */ 389-admin-1.1.35/include/libadmin/cluster.h000066400000000000000000000105401220472121400202410ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * cluster.h * * Revision History By Whom Note * 96/08/30 Adrian Chan Initial Version */ #ifndef CLUSTER_H #define CLUSTER_H #define CL_RPT 10 /* normal cluster table report style */ #define CL_RPT_NONE 20 /* no output from rexec */ #define CL_RPT_STDOUT 30 /* send rexec output to stdout */ #define CL_INFO 0 /* normal status message */ #define CL_SUCC 1 /* rexec succeeded */ #define CL_FAIL 2 /* rexec failed */ #include typedef struct cluster_server { int CLidx; /* index in cluster_server_list struct */ char *server_ident; /* admin server's style server identifier */ char *nsAdmin_URL; /* full URL to admin server's */ char *nsAdmin_protocol; /* what protocol referred to in URL */ char *nsAdmin_hostname; /* what host referred to in URL */ int nsAdmin_port; /* what port referred to in URL */ char *request; /* full request to this server */ int request_status; /* status of remote execution */ } CL_server; typedef struct cluster_server_list { int total_selected; /* number of selected remote server */ CL_server *server; /* array of target servers */ } CL_server_list; typedef struct cluster_request { char *product; /* admin style to describe a product */ unsigned char *auth_info; /* authentication info about user */ char *method; /* method used to contact admin server */ char *action; /* relative or absolute path to command */ char *expect; /* success string to match from remote */ char *form_data; /* data to pass to remote for POST action */ int servers_executing; /* how many servers left executing */ } CL_request; NSPR_BEGIN_EXTERN_C /* Parse HTTP header from sockd and match against remote_server_identifier */ NSAPI_PUBLIC int parse_http_header(PRFileDesc *sockd, bufstruct *nbuf, char *remote_server_identifier); /* Monitor returned data for start/end of file tag: CF_BOUNDARY */ NSAPI_PUBLIC int parse_xfile_boundary(PRFileDesc *sockd, bufstruct *nbuf); /* Monitor returned data for transfer file name: CF_NEWCONFIG */ NSAPI_PUBLIC int parse_xfilename(PRFileDesc *sockd, bufstruct *nbuf, char *filename); /* message about empty cluster db */ NSAPI_PUBLIC int CL_emptyDatabase(); /* Get the remote admin server URL for specific server from cluster db */ NSAPI_PUBLIC int CL_getAdminURL(char *product, CL_server *server, int *errcode); /* Get username/password from the environment */ NSAPI_PUBLIC int CL_getUserAuth(unsigned char **auth, int *errcode); /* Get cluster request information submitted */ NSAPI_PUBLIC int CL_getRequest(CL_request *req, int *errcode); /* Get all targeted cluster server information into server_list */ NSAPI_PUBLIC int CL_getTargetServers(char *product, CL_server_list *server_list, int *errcode); /* Setup the cluster report layout engine */ NSAPI_PUBLIC int CL_reportLayout(CL_request *req, CL_server_list *server_list); /* Update the status field */ NSAPI_PUBLIC int CL_reportStatus(int style, CL_server *server, CL_request *request, int type, char *mesg); /* Added information to the details section */ NSAPI_PUBLIC int CL_reportDetails(int style, CL_server *server, CL_request *request, char *details); /* Single remote exec */ NSAPI_PUBLIC int nsAdmin_rexec(CL_server *server, CL_request *request, int rpt_style); /* Will go through server_list and call nsAdmin_rexec */ NSAPI_PUBLIC int CL_rexec(CL_request *req, CL_server_list *server_list, int *errcode); NSPR_END_EXTERN_C #endif /* CLUSTER_H */ 389-admin-1.1.35/include/libadmin/dbtlibadmin.h000066400000000000000000000025101220472121400210270ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define LIBRARY_NAME "libadmin" #include "i18n.h" BEGIN_STR(libadmin) ResDef( DBT_LibraryID_, -1, dbtlibadminid )/* extracted from dbtlibadmin.h*/ ResDef( DBT_help_, 1, " Help " )/*extracted from template.c*/ ResDef( DBT_ok_, 2, " OK " )/*extracted from template.c*/ ResDef( DBT_reset_, 3, " Reset " )/*extracted from template.c*/ ResDef( DBT_done_, 4, " Done " )/*extracted from template.c*/ ResDef( DBT_cancel_, 5, " Cancel " )/*extracted from template.c*/ END_STR(libadmin) 389-admin-1.1.35/include/libadmin/ds_base.h000066400000000000000000000213061220472121400201620ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * ds_base.h: base routines for batman admin * * Erh-Yuan Tsai */ #include "libadmin/libadmin.h" #include #include #include #include #ifdef XP_UNIX #include #include #include #else #include #include #include #include #endif /* Batman has three configurations */ #define CATALOG_SERVER 1 #define RDS_SERVER 2 #define MINI_SERVER 3 #ifdef XP_WIN32 #define COL_SIZE 60 #else #define COL_SIZE 150 #endif /* ----------------------------------------------- */ /* *** dynamic arrray *** */ typedef struct _dyn_array{ int size; /* current array size */ int delta; /* size to increase while overflow */ int index; /* next availabe slot */ void **entry; } dyn_array; dyn_array *create_dyn_array(int size, int delta); void destroy_dyn_array(dyn_array *ary, void(*free_elm)()); int dyn_add(dyn_array *ary, void *data); void dyn_delete(dyn_array *ary, int inx); void *dyn_data(dyn_array *ary, int index); int dyn_size(dyn_array *ary); /* ----------------------------------------------- */ /* *** utilities for batman admin *** */ int module_index(char *module); char *module_name(int which); char *module_dir(int which); char *get_ns_home(); char *get_server_home(); char *get_batman_http_dir(int whichone, int module); char *get_ds_dir(int whichone, int module); char *get_ds_logs_dir(int whichone, int module); char *get_ds_pid_file(int whichone, int module); char *get_ds_conf_dir(int whichone, int module); /* ----------------------------------------------- */ /* *** robot_cf.conf *** */ int put_robot_conf(int module, char *process, char *filter); void get_robot_conf(int module, char *process, char *filter); /* ----------------------------------------------- */ /* *** server.conf ie(rdm.conf) *** */ char *get_server_conf(int module); void read_server_conf(int module); void write_server_conf(int module); char *get_server_var(int module, char *name); int set_server_var(int module, char *name, char *val); /* --------- OLD ROUTINES ---------------------- */ #ifndef BATMAN_ADMIN void old_delete_mag_var(int offset); void old_read_mag_conf(void); void old_write_mag_conf(void); pblock *old_get_mag_init(char *fn); pblock *old_get_mag_init_ext(char *fn, char *key, char *data); void old_set_mag_init(char *fn, char *key, char *val, int nargs, ...); void old_delete_mag_init(char *fn); void delete_mag_init_fun(char *fn, char *key, char *val); char *get_mag_var(char *name); void set_obj_var(char *action, char *fn, char *name, char *val); void del_obj_var(char *action, char *fn); void old_delete_mag_var(int offset); /* -- NT Registry -- */ /* These are needed only by NT server 1.12. */ char *get_http_dir(); #endif /* ----------------------------------------------- */ /* ---- CSID, csid.conf ----- */ /* ----------------------------------------------- */ typedef struct _csid { char *csid; /* csid char string: x-catalog://:/ */ char *verity_home; /* verity home: .../plugins/ns-catalog/db/verity/common */ char *verity_col; /* verity collection: .../plugins/ns-catalog/db/verity/collections/ */ char *alias; /* filename for alias: .../plugins/ns-catalog/config/alias.conf */ char *viewcache; /* filename for catalog-database .../plugins/ns-catalog/db/rd.db */ char *statistics; /* filename for statistics log .../logs/statistics.log */ char *dbdir; /* database directory: .../plugins/ns-catalog/db */ char *schema_d; /* schema description file: .../plugins/ns-catalog/db/schema.rdm */ char *server_d; /* server description file: .../plugins/ns-catalog/db/server.rdm */ char *taxonomy_d; /* taxonomy description file: .../plugins/ns-catalog/db/taxonomy.rdm */ char *import_c; /* import configuration file: .../plugins/ns-catalog/config/import.conf */ } csid_type; csid_type *create_csid(); void destroy_csid(void *a_csid); #define MAX_CSID_TYPE 4 int type_index(char *buf); char *type_name(int inx); /* a structure for CSID */ typedef struct { char *host; char *port; char *server; int ssl; } csid_stru; csid_stru *csid2stru(char *csid); dyn_array *get_csid_list(int module); char *stru2csid(csid_stru *c_stru); void free_csid_stru(csid_stru *c_stru); char *get_csid_conf(int module); dyn_array *read_csid_list(char *filename); void write_csid_list(char *filename, dyn_array *ary); void csid_delete(dyn_array *csid_ary, char *csid); void csid_add(dyn_array *ary, csid_type *csid); csid_type *get_csid(dyn_array *ary, char *name); csid_type *dup_csid(csid_type *id); dyn_array *set_default_csid(); char *get_csid_servid(int module); /* ----------------------------------------------- */ void batman_success(char *description); /* ----------------------------------------------- */ /* ----------------------------------------------- */ /* Routines stolean from netsite/lib/cs */ /* ----------------------------------------------- */ typedef unsigned int (*CSHashFn)(void *); typedef int (*CSCompareFn)(void *, void *); typedef void *(*CSCopyFn)(void *); typedef void (*CSFreeFn)(void *); typedef struct cs_list_node CSListNode; typedef struct cs_list CSList; typedef struct cs_list CSStack; typedef struct cs_list CSQueue; typedef struct cs_list CSPriQ; typedef struct cs_hashtbl CSHashTable; typedef struct cs_hashtblstats CSHashTableStats; typedef struct _ncs_io_access_s CSIO; #define CSIO_MEMORY 0x01 #define CSIO_FILE 0x10 #define CSIO_BOTH ((CSIO_MEMORY)|(CSIO_FILE)) #define CSIO_IS_IN_FILE(p) ((p)->location & CSIO_FILE) #define CSIO_IS_IN_MEMORY(p) ((p)->location & CSIO_MEMORY) #define CSIO_BUFSZ 4096 /* 4k is good for disk */ struct _ncs_io_access_s { unsigned location; /* Data is in memory, file, or both */ char *data; /* Memory buffer */ size_t datalen; /* len of valid data in data buffer */ size_t current; /* current position in buffer */ size_t allocated; /* #bytes allocated in mem buffer */ size_t max_alloc; /* max memory buffer to allocate */ size_t chunksize; /* size of the chunks to allocate */ char *filename; /* File which contains data */ SYS_FILE fd; /* file pointer, for current */ int is_temporary; /* Is this a temporary file? */ char *fdbuf; /* to speed up small appecs */ int fdbufsz; /* amount of data in fdbuf */ }; struct cs_list_node { void *data; struct cs_list_node *next; }; struct cs_list { CSListNode *head, *tail; unsigned int nnodes; CSFreeFn fr; CSCompareFn cmp; CSCopyFn cp; }; struct cs_hashtbl { CSList **buckets; int hashsize; unsigned int nnodes; CSHashFn hf; CSCopyFn cp; CSCompareFn cmp; CSFreeFn fr; }; struct cs_hashtblstats { int nobjs; int nbuckets; int longest_chain; int total_chain; double mean; double stddev; }; typedef struct { pblock *pb; CSQueue *urls; } ProcessNode; extern CSQueue *processq; void dsenum_load_process_cf(char *fn); /* ----------------------------------------------- */ void do_stat_error(char *errstr, int print_errno); int do_stat_log(char *success, char *statline); /* ----------------------------------------------- */ /* Routines for setup cron jobs */ void setup_weekday(char *in_str, char *weekday); void setup_schedule_time(char *time_str, char *days_str); char *get_cgi_time(); char *get_cgi_day(); /* ----------------------------------------------- */ 389-admin-1.1.35/include/libadmin/dstats.h000066400000000000000000000052641220472121400200710ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* -*- Mode: C; tab-width: 4 -*- * * dstats.h: Daemon statistics * * * * * * Ari Luotonen * Copyright (c) 1996 Netscape Communcations Corporation * */ #ifndef NS_DSTATS_H #define NS_DSTATS_H #include "base/daemon.h" typedef struct { int idle, empty, active; int process, read, write, resolv; } dstats; typedef struct _DStatsHandle { /* private data */ void * mapped; size_t mapped_size; #ifdef XP_UNIX int fd; #else HANDLE mapHandle; #endif StatHeader *hdr; StatSlot *stats; StatSlot totals; int nslots; int last_restart_cookie; /* public data */ dstats snew; dstats sold; } DStatsHandle; NSPR_BEGIN_EXTERN_C /* * Open the statistics file for the server running on the * specified port. * * Returns the handle to daemon statistics on success. * Returns NULL on failure, and sets 'err_title' and 'err_msg' * to point to an error title and message strings. * * */ NSAPI_PUBLIC DStatsHandle *dstats_open(int port, char *addr, char **err_title, char **err_msg); /* * Grab and compile the current statistics from the statistics file. * * */ NSAPI_PUBLIC dstats *dstats_snapshot(DStatsHandle *handle); /* * Un-mmap and close the statistics file, and free the statistics * context. * * */ NSAPI_PUBLIC void dstats_close(DStatsHandle *handle); /* * dstats_poll_for_restart() returns true iff the server has * restarted since dstats_open() or the last call to * dstats_poll_for_restart(). * * Return value is 1 if the server has soft restarted, in * which case it's ok to continue to use the same statistics. * * Return value is 2 if the server has hard restarted, and * the daemon stats file must be re-opened to re-attach to * active statistics. * */ NSAPI_PUBLIC int dstats_poll_for_restart(DStatsHandle *handle); NSPR_END_EXTERN_C #endif /* ! NS_DSTATS_H */ 389-admin-1.1.35/include/libadmin/hadm_msgs.i000066400000000000000000000277401220472121400205350ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * hadm_msgs.i: The text that can be returned from the httpd/newadmin/src * files * * Mike McCool */ /* Reserve 40 string ID's per program */ BGN_MSG(httpd_admsrc_msg) STR(FORM_INVAL_QS, HADM_BASE+1, "You accessed this form with an invalid query string.") STR(FORM_NOPOST, HADM_BASE+2, "This form does not work with POST. Please access this form using only the pages provided.") STR(ERR_NOSTAT, HADM_BASE+3, "Could not stat file.") STR(ERR_FAIL_CREAT, HADM_BASE+4, "Failed to create specified path object") STR(ERR_FAIL_OPEN, HADM_BASE+5, "Failed to open specified path object") STR(ERR_FAIL_RENAME, HADM_BASE+6, "rename() failed to update object") STR(ERR_FAIL_UNIQUE, HADM_BASE+7, "Failed to obtain unique name under") STR(ERR_FAIL_AUTH, HADM_BASE+8, "Failed authentication") STR(ERR_FAIL_DNSLOOKUP, HADM_BASE+9, "Failed DNS Lookup") STR(ERR_FAIL_SSLSOCKET, HADM_BASE+10, "Failed to obtain a new SSL socket") STR(ERR_FAIL_SSLENABLE, HADM_BASE+11, "Failed to enable SSL on socket") STR(ERR_FAIL_SSLCONN, HADM_BASE+12, "Failed to connect through SSL to remote host") STR(ERR_FAIL_SSLREAD, HADM_BASE+13, "Failed to read from SSL type socket") STR(ERR_FAIL_SSLWRITE, HADM_BASE+14, "Failed to write to SSL type socket") STR(CLERR_BAD_HEADER, HADM_BASE+40, "Invalid HTTP Header from remote") STR(CLERR_BAD_URL, HADM_BASE+41, "Specifed URL is not complete") STR(CLERR_BAD_XFER, HADM_BASE+42, "Remote server failure") STR(CLERR_NOT_ADMIN, HADM_BASE+43, "Remote is not a " CAPBRAND " Administration Server") STR(CLERR_NOT_INIT, HADM_BASE+44, "Must invoke from ns-admin") STR(CLERR_NO_ACTION, HADM_BASE+45, "Missing ACTION attribute") STR(CLERR_NO_EXPECT, HADM_BASE+46, "Missing EXPECT attribute string") STR(CLERR_NO_HANDSHAKE, HADM_BASE+47, "Can't contact remote admin server") STR(CLERR_NO_MEM, HADM_BASE+48, "Out of memory") STR(CLERR_NO_METHOD, HADM_BASE+49, "Missing METHOD attribute") STR(CLERR_NO_MIXSEC, HADM_BASE+50, "Can't mix secure/insecure environment") STR(CLERR_NO_PASS, HADM_BASE+51, "Missing password") STR(CLERR_NO_PORT, HADM_BASE+52, "Missing port number") STR(CLERR_NO_PRODUCT, HADM_BASE+53, "No cluster product is selected") STR(CLERR_NO_PROTOCOL, HADM_BASE+54, "Missing protocol attribute") STR(CLERR_NO_RHOST, HADM_BASE+55, "Missing remote host name") STR(CLERR_NO_SERVER, HADM_BASE+56, "No cluster server is specified") STR(CLERR_NO_TARGET, HADM_BASE+57, "No cluster server is selected") STR(CLERR_NO_USER, HADM_BASE+58, "Missing user information") STR(CLXFER_ADM_RESPONSE, HADM_BASE+59, "Send: Request from %s") STR(CLXFER_ADM_SENDFILE, HADM_BASE+60, "Sent: %s") STR(CLXFER_ERR_OPENFILE, HADM_BASE+61, "%sUnable to open %s (%d).\n") STR(CLXFER_NO_FILESEP, HADM_BASE+62, "Missing start/stop file marker") STR(CLXFER_NO_FILEMARK, HADM_BASE+63, "Missing or unmatched filename") STR(CGI_DIR_WHICH, HADM_BASE+80, "Which entry?") STR(CGI_DIR_LOG_DEL, HADM_BASE+81, "Remove: CGI directory %s") STR(CGI_DIR_SUC_DEL, HADM_BASE+82, "Directory mapping removed.") STR(CGI_DIR_MAP_NF, HADM_BASE+83, "Mapping not found") STR(CGI_DIR_MAP_NF_L, HADM_BASE+84, "The mapping you tried to edit was not found.") STR(CGI_DIR_RM_HTML, HADM_BASE+85, "
You can remove this mapping.

\n") STR(CGI_DIR_URL_PFX, HADM_BASE+86, "URL prefix") STR(CGI_DIR_URL_PFX_L, HADM_BASE+87, "You should enter a prefix that the server can recognize and remap to the CGI directory.") STR(CGI_DIR_DIR_MAP, HADM_BASE+88, "Directory to map to") STR(CGI_DIR_DIR_MAP_L, HADM_BASE+89, "You should enter the name of the directory to use as a CGI directory.") STR(CGI_DIR_ERR_BADDIR, HADM_BASE+90, "Bad directory to map to") STR(CGI_DIR_ERR_BADDIR_L, HADM_BASE+91, "Please give an absolute path for the CGI directory.") STR(CGI_DIR_LOG_CHNG, HADM_BASE+92, "Change: URL prefix %s, CGI dir %s") STR(CGI_DIR_SUC_CHNG, HADM_BASE+93, "Mapping changed.") STR(CGI_DIR_ERR_MAP_EX, HADM_BASE+94, "Mapping exists") STR(CGI_DIR_ERR_MAP_EX_L, HADM_BASE+95, "That mapping already exists. You can use this form to view your current mappings.") STR(CGI_DIR_LOG_ADD, HADM_BASE+96, "Add: URL prefix %s, CGI dir %s") STR(CGI_DIR_ERR_NOEX, HADM_BASE+97, "Warning: The directory %s does not exist.") STR(CGI_DIR_SUC_ADD, HADM_BASE+98, "A CGI directory mapping has been added.") STR(WINCGI_DIR_DEBUG, HADM_BASE+99, "Script Tracing") STR(WINCGI_DIR_DEBUG_L, HADM_BASE+100, "You should specify if script tracing is on or off.") STR(WINCGI_DIR_LOG_CHNG, HADM_BASE+101, "Change: Debug %s") STR(WINCGI_DIR_LOG_ACT, HADM_BASE+102, "Activated WINCGI: %s") STR(SHELLCGI_DIR_LOG_ACT, HADM_BASE+103, "Activated Shell CGI: %s") STR(CGI_FT_ERR_ACT, HADM_BASE+120, "Activate / Deactivate CGI") STR(CGI_FT_ERR_ACT_L, HADM_BASE+121, "You should specify whether CGI should be active or not.") STR(CGI_FT_SUC_NOCHNG, HADM_BASE+122, "CGI preferences not changed.") STR(CGI_FT_LOG_ACT, HADM_BASE+123, "Activated CGI: %s") STR(CGI_FT_SUC_ACT, HADM_BASE+124, "CGI has been activated.") STR(CGI_FT_LOG_DEACT, HADM_BASE+125, "Deactivated CGI: %s") STR(CGI_FT_SUC_DEACT, HADM_BASE+126, "CGI has been deactivated.") STR(CHARSET_LOG_CHARSET, HADM_BASE+160, "Charset: %s for %s") STR(CHARSET_LOG_RMCHARSET, HADM_BASE+161, "Charset: Removed from %s") STR(CHARSET_SUC_CHARSET, HADM_BASE+162, "Character set changed.") STR(CHROOT_SUC_CHROOT, HADM_BASE+200, "Your server has been given a chroot directory.") STR(COLLADDD_ERR_SELECT, HADM_BASE+240, "Select a collection") STR(COLLADDD_ERR_SELECT_L, HADM_BASE+241, "Please choose a collection.") STR(COLLADDD_ERR_ADD_DOCS, HADM_BASE+242, "Documents to add") STR(COLLADDD_ERR_ADD_DOCS_L, HADM_BASE+243, "Please enter documents to add.") STR(COLLADDD_ERR_OPEN_DOCROOT, HADM_BASE+244, "Could not open document root file.") STR(COLLADDD_ERR_NOINSERT, HADM_BASE+245, "Could not insert files into collection.") STR(COLLADDD_SUC_ADDED, HADM_BASE+246, "Documents have been added") STR(COLLNEW_ERR_NAME, HADM_BASE+280, "Collection name") STR(COLLNEW_ERR_NAME_L, HADM_BASE+281, "You should enter the name of the collection to create.") STR(COLLNEW_ERR_EXISTS, HADM_BASE+282, "Collection exists") STR(COLLNEW_ERR_EXISTS_L, HADM_BASE+283, "That collection already exists. Either remove the old one or choose a new name.") STR(COLLNEW_ERR_NODIR, HADM_BASE+284, "Directory to index") STR(COLLNEW_ERR_NODIR_L, HADM_BASE+285, "You should enter the directory to index for this collection.") STR(COLLNEW_ERR_BADDIR, HADM_BASE+286, "Bad directory to map to") STR(COLLNEW_ERR_BADDIR_L, HADM_BASE+287, "Please give an absolute path for the directory to index.") STR(COLLNEW_ERR_DESCS, HADM_BASE+288, "Descriptions") STR(COLLNEW_ERR_DESCS_L, HADM_BASE+289, "Choose either to add descriptions, or not to.") STR(COLLNEW_ERR_NODESC, HADM_BASE+290, "You chose to add a description, but did not enter one.") STR(COLLNEW_ERR_DOCS, HADM_BASE+291, "Documents") STR(COLLNEW_ERR_DOCS_L, HADM_BASE+292, "You should choose either to add documents or not to.") STR(COLLNEW_ERR_NODOCS, HADM_BASE+293, "You chose to add a documents, but did not enter any.") STR(COLLNEW_ERR_NOMAP, HADM_BASE+294, "No mapping to directory") STR(COLLNEW_ERR_NOMAP_L, HADM_BASE+295, "Could not find any way for an HTTP user to access the directory to index.") STR(COLLNEW_ERR_NOINSERT, HADM_BASE+296, "Collection creation failed (insert)") STR(COLLNEW_ERR_NOINDEX, HADM_BASE+297, "Index files failed (insert)") STR(COLLNEW_ERR_NOCREATE, HADM_BASE+298, "Collection creation failed (create)") STR(COLLNEW_ERR_NOCREATE_L, HADM_BASE+299, "Collection creation failed (%d, create)") STR(COLLNEW_ERR_WRITEDR, HADM_BASE+300, "Could not write docroot file") STR(COLLNEW_ERR_WRITEUM, HADM_BASE+301, "Could not write URL map file") STR(COLLNEW_SUCCESS, HADM_BASE+302, "A new collection has been created.") STR(COLLOPT_ERR_SELECT, HADM_BASE+320, "Select a collection") STR(COLLOPT_ERR_SELECT_L, HADM_BASE+321, "You should choose a collection.") STR(COLLOPT_SUC_OPT, HADM_BASE+322, "Collection has been optimized.") STR(COLLRM_ERR_SELECT, HADM_BASE+360, "Select a collection") STR(COLLRM_ERR_SELECT_L, HADM_BASE+361, "You should choose a collection.") STR(COLLRM_SUCCESS, HADM_BASE+362, "The collection has been removed.") STR(COLLRMD_ERR_SELECT, HADM_BASE+400, "Select a collection") STR(COLLRMD_ERR_SELECT_L, HADM_BASE+401, "You should choose a collection.") STR(COLLRMD_ERR_REMOVE, HADM_BASE+402, "Remove") STR(COLLRMD_ERR_REMOVE_L, HADM_BASE+403, "You should choose either to remove or not to.") STR(COLLRMD_ERR_NODR, HADM_BASE+404, "Could not open document root file.") STR(COLLRMD_ERR_NOREMOVE, HADM_BASE+405, "Failed to remove files from collection.") STR(COLLRMD_SUCCESS, HADM_BASE+406, "Documents have been removed") STR(COLLRP_ERR_SELECT, HADM_BASE+440, "Select a collection") STR(COLLRP_ERR_SELECT_L, HADM_BASE+441, "You should choose a collection.") STR(COLLRP_SUCCESS, HADM_BASE+442, "Collection repaired.") STR(COLLUPD_ERR_SELECT, HADM_BASE+480, "Select a collection") STR(COLLUPD_ERR_SELECT_L, HADM_BASE+481, "You should choose a collection.") STR(COLLUPD_ERR_DOCS, HADM_BASE+482, "Add documents") STR(COLLUPD_ERR_DOCS_L, HADM_BASE+483, "You should choose either to add documents or not to.") STR(COLLUPD_ERR_NODOCS, HADM_BASE+484, "Could not open document root file.") STR(COLLUPD_ERR_NOUPD, HADM_BASE+485, "Could not update files.") STR(COLLUPD_SUCCESS, HADM_BASE+486, "Documents have been updated.") STR(COLLVW_ERR_NODIR, HADM_BASE+520, "Could not open collection directory.") STR(COLLVW_NOCOLLS, HADM_BASE+521, "

No collections exist

") STR(COLLVW_VIEWTHIS, HADM_BASE+522, "View this collection") STR(SWMHOME_WHICH, HADM_BASE+560, "Which entry?") STR(SWMHOME_LOG_DEL, HADM_BASE+561, "Remove: URL host %s") STR(SWMHOME_SUC_DEL, HADM_BASE+562, "URL host removed.") STR(SWMHOME_HOME_NF, HADM_BASE+563, "Host not found") STR(SWMHOME_HOME_NF_L, HADM_BASE+564, "The host you tried to edit was not found.") STR(SWMHOME_LOG_CHNG, HADM_BASE+565, "Change: Host %s to page %s") STR(SWMHOME_SUC_CHNG, HADM_BASE+566, "URL host changed.") STR(SWMHOME_ERR_MAP_EX, HADM_BASE+567, "Mapping already exists") STR(SWMHOME_ERR_MAP_EX_L, HADM_BASE+568, "That mapping already exists. Please use the edit button to edit it.") STR(SWMHOME_LOG_ADD, HADM_BASE+569, "Add: URL host %s, page %s") STR(SWMHOME_SUC_ADD, HADM_BASE+570, "Host mapping added.") STR(SWMHOME_URL_HOST, HADM_BASE+571, "URL host") STR(SWMHOME_URL_HOST_L, HADM_BASE+572, "You should enter a host will map to the given home page.") STR(SWMHOME_URL_HOME, HADM_BASE+573, "Home page") STR(SWMHOME_URL_HOME_L, HADM_BASE+574, "You should enter a file name from the document root, or a full path to a file to use as this virtual server's home page.") STR(FILECMDS_ERR_ACT, HADM_BASE+575, "Activate / Deactivate file commands") STR(FILECMDS_ERR_ACT_L, HADM_BASE+576, "Please specify whether or not you will allow file manipulation commands.") STR(FILECMDS_SUC_NOCHNG, HADM_BASE+577, "File manipulation preferences not changed.") STR(FILECMDS_LOG_ACT, HADM_BASE+578, "Activated file manipulation: %s") STR(FILECMDS_SUC_ACT, HADM_BASE+579, "File manipulation has been activated.") STR(FILECMDS_LOG_DEACT, HADM_BASE+580, "Deactivated file manipulation: %s") STR(FILECMDS_SUC_DEACT, HADM_BASE+581, "File manipulation has been deactivated.") END_MSG(httpd_admsrc_msg) 389-admin-1.1.35/include/libadmin/hinstall.h000066400000000000000000000075321220472121400204050ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * hinstall.h: Macros I use in the httpd install programs * * Rob McCool */ #ifndef NS_HINSTALL_H #define NS_HINSTALL_H #include "install.h" /* ------------------------------ Documents ------------------------------- */ #define SERVER_PAGE "server.html" #define DEFAULT_SERVCONF "server.conf" #define DOCS_PAGE "docs.html" #define DEFAULT_DOCSCONF "docs.conf" #define ADM_PAGE "admserv.html" #ifdef MCC_PROXY #define PROXY_PAGE "proxy.html" #define DEFAULT_PROXYCONF "proxy.conf" #endif /* MCC_PROXY */ #define REVIEW_PAGE "review.html" #define FINISH_PAGE "finish.html" #define UPGRADE_FORM "upgform.html" #define UPGRADE_PAGE "upgrade.html" #define QUIT_PAGE "quit.html" /* Constants for the new server root */ #ifdef XP_UNIX #ifdef MCC_PROXY #define PRODUCT_DIR "proxy" #define PRODUCT_BIN "ns-proxy" #else /* ! MCC_PROXY */ #ifdef MCC_HTTPD #ifdef NS_UNSECURE #define PRODUCT_DIR "httpd" #define PRODUCT_BIN "ns-httpd" #else #define PRODUCT_DIR "https" #define PRODUCT_BIN "ns-httpd" #endif #endif #endif /* ! MCC_PROXY */ #else /* XP_WIN32 */ #ifdef MCC_HTTPD #ifdef NS_UNSECURE #define PRODUCT_DIR "httpd" #define PRODUCT_BIN "ns-httpd.exe" #else #define PRODUCT_DIR "https" #define PRODUCT_BIN "ns-https.exe" #endif #endif #endif /* XP_WIN32 */ /* ------------------------------ Structures ------------------------------ */ struct servconf { char *servname; char *servport; char *servaddr; char *servid; char *servroot; char *servuser; #ifdef XP_WIN32 char *password; #endif /* XP_WIN32 */ char *minprocs; char *maxprocs; char *dns; char *clf; #ifdef MCC_PROXY char *ext; #endif /* MCC_PROXY */ char *slog; char **lines; }; struct docsconf { #ifdef MCC_PROXY int proxy_http; /* bool */ int proxy_ftp; /* bool */ int proxy_gopher; /* bool */ int proxy_https; /* bool */ int tunnel_ssl_https; /* bool */ int tunnel_ssl_snews; /* bool */ int caching; /* bool */ char *cache_root; /* directory */ long cache_size; /* MB */ long cache_capacity; /* MB */ int cache_ndirs; /* 1..256 */ int cache_dim; /* 0..8 */ int cache_http; /* bool */ int cache_ftp; /* bool */ int cache_gopher; /* bool */ int cache_ims_always; /* bool */ long cache_max_uncheck_http; /* seconds */ long cache_max_uncheck_ftp; /* seconds */ long cache_max_uncheck_gopher; /* seconds */ int cache_use_lm; /* bool */ float cache_lm_factor; /* float */ #else /* ! MCC_PROXY */ char *docroot; char *idxfiles; char *fancyidx; char *homepage; #endif /* !MCC_PROXY */ char **lines; }; /* ------------------------------ Prototypes ------------------------------ */ struct servconf *servconf_create(void); void servconf_write(struct servconf *sc, char *fn); struct servconf *servconf_scan(char *filename); struct docsconf *docsconf_create(void); void docsconf_write(struct docsconf *dc, char *fn); struct docsconf *docsconf_scan(char *filename); #endif 389-admin-1.1.35/include/libadmin/install.h000066400000000000000000000026221220472121400202300ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * install.h: Macros I use in the install programs * * Rob McCool */ #ifndef NS_INSTALL_H #define NS_INSTALL_H #include /* FILE struct */ /* ------------------------------- Globals -------------------------------- */ /* ------------------------------ Structures ------------------------------ */ /* -------------------------------- Macros -------------------------------- */ /* ------------------------------ Prototypes ------------------------------ */ NSPR_BEGIN_EXTERN_C int try_bind(char *addr, int port); NSPR_END_EXTERN_C #endif 389-admin-1.1.35/include/libadmin/la_msgs.i000066400000000000000000000042251220472121400202110ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * la_msgs.i: The text that can be returned from the admin library * * Mike McCool */ /* Reserve 20 string ID's per script / libadmin object file. */ BGN_MSG(libadmin_msg) STR(ADMLOG_ERR_NOOPEN, LA_BASE+1, "Could not open admin logfile.") STR(ADMLOG_ERR_NOLOCK, LA_BASE+2, "Could not lock admin logfile.") STR(ADMLOG_ERR_NOUNLOCK, LA_BASE+3, "Could not unlock admin logfile.") STR(RES_ENTIRE_SERVER, LA_BASE+20, "the entire server") STR(RES_OBJECT_NAMED, LA_BASE+21, "the object named %s") STR(RES_DIRECTORY, LA_BASE+22, "the directory %s") STR(RES_FILES, LA_BASE+23, "files matching %s") STR(RES_FILE, LA_BASE+24, "the file %s") #ifdef MCC_HTTPD /* template->style usability */ STR(RES_TMPL, LA_BASE+25, "the style %s") #else STR(RES_TMPL, LA_BASE+25, "the template %s") #endif STR(RES_WILD, LA_BASE+26, "files matching %s") STR(ADMSERV_ERR_NOREAD_NSADM, LA_BASE+40, "Could not read configuration file ns-admin.conf.") STR(ADMSERV_ERR_NOWRITE_NSADM, LA_BASE+41, "Could not write configuration file ns-admin.conf.") STR(ADMSERV_LOG_SET_VAR, LA_BASE+42, "'%s' set to '%s'") STR(ADMSERV_LOG_RM_VAR, LA_BASE+43, "'%s' removed") STR(ADMSERV_LOG_ADD_VAR, LA_BASE+44, "'%s' added, value '%s'") STR(ADMSERV_ERR_ADMDIR_NOREAD, LA_BASE+45, "Could not open admserv directory for server listing.") END_MSG(libadmin_msg) 389-admin-1.1.35/include/libadmin/libadmin.h000066400000000000000000000466751220472121400203610ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * libadmin.h - All functions contained in libadmin.a * * All blame goes to Mike McCool */ #ifndef libadmin_h #define libadmin_h #include #include "base/systems.h" #include "base/util.h" #ifdef XP_UNIX #include #else /* XP_WIN32 */ #include #endif /* XP_WIN32 */ #include "prinit.h" #include "prthread.h" #include "prlong.h" #define NSPR_INIT(Program) (PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 8)) #undef howmany NSPR_BEGIN_EXTERN_C #ifdef XP_UNIX #define FILE_PATHSEP '/' #define OPEN_MODE "r" #define QUOTE "" #define CONVERT_TO_NATIVE_FS(Filename) #define CONVERT_TO_HTTP_FORMAT(Filename) #define WSACleanup() #define GET_QUERY_STRING() (getenv("QUERY_STRING")) #define NOT_ABSOLUTE_PATH(str) (str[0] != '/') #define CREATE_DIRECTORY(Directory) #else /* XP_WIN32 */ #define verify_adm_dbm #define add_user_dbm #define find_user_dbm #define list_users_dbm #define modify_user_dbm #define remove_user_dbm #define dbm_open #define dbm_close #define dbm_store #define lstat stat #define popen _popen #define pclose _pclose #define CONVERT_TO_NATIVE_FS(Filename) \ { \ register char *s; \ if (Filename) \ for (s = Filename; *s; s++) \ if ( *s == '/') \ *s = '\\'; \ } #define CONVERT_TO_HTTP_FORMAT(Filename) \ { \ register char *s; \ if (Filename) \ for (s = Filename; *s; s++) \ if ( *s == '\\') \ *s = '/'; \ } #define FILE_PATHSEP '/' #define OPEN_MODE "r+b" #define QUOTE "\"" #ifdef GET_QUERY_STRING #undef GET_QUERY_STRING #endif #define GET_QUERY_STRING() (GetQueryNT()) /* Defined in util.c */ NSAPI_PUBLIC char *GetQueryNT(void); #define NOT_ABSOLUTE_PATH(str) \ ((str[0] != '/') && (str[0] != '\\') && (str[2] != '/') && (str[2] != '\\')) #define CREATE_DIRECTORY(Directory) CreateDirectory(Directory, NULL) #endif /* XP_WIN32 */ /* error types */ #define FILE_ERROR 0 #define MEMORY_ERROR 1 #define SYSTEM_ERROR 2 #define INCORRECT_USAGE 3 #define ELEM_MISSING 4 #define REGISTRY_DATABASE_ERROR 5 #define NETWORK_ERROR 6 #define GENERAL_FAILURE 7 #define WARNING 8 /* The upper bound on error types */ #define MAX_ERROR 9 /* The default error type (in case something goes wrong */ #define DEFAULT_ERROR 3 /* The change types for admin logging */ #define TO_STATUS "status" #define TO_ADMIN "admserv" #define TO_USERDB "userdb" #define TO_SEC "security" #define TO_BACKUP "backup" #define TO_CACHE "cache" #define TO_BUCONF "bu.conf" #define TO_LDAP "ldap" /* The indexes for conf file backup purposes */ #define BK_MAGNUS 0 #define BK_OBJ 1 #define BK_MIMETYPES 2 #define BK_BU 3 #define BK_ACLFILE 4 /* The extension for backup files to use. Emacs weenies like "%s.~%d~" */ /* But real vi men like this one */ #define BACKUP_EXT "%s.v%d" /* Need also a way to identify the backup files when we're doing an ls */ #define BACKUP_SHORT ".v" /* Frame window names. */ #define INDEX_NAME "index" #define MESSAGE_NAME "msgs" #define TOP_NAME "tabs" #define BOTTOM_NAME "category" #define OPTIONS_NAME "options" #define CONTENT_NAME "content" #define COPY_NAME "copy" #define INFO_IDX_NAME "infowin" #define INFO_TOPIC_NAME "infotopic" #define HELP_WIN_OPTIONS "'scrollbars=yes,resizable=1,width=500,height=500'" /* Resource types */ #define NAME "name" #define FILE_OR_DIR "path" #define TEMPLATE "tmpl" #define WILDCARD "wild" /* A really big form line */ #define BIG_LINE 1024 /* Max size for a pathname */ #ifndef PATH_MAX #define PATH_MAX 256 #endif /* Boundary string for uploading / downloading config files. */ #define CF_BOUNDARY "--Config_File_Boundary--" #define CF_NEWCONFIG "--NewConfigFile:" #define CF_MTIME "--LastMod:" #define CF_ERRSTR "--Error: " #define CFTRANS_BIN "bin/cftrans" #define CF_REMOTE_URL "#RemoteUrl " #define HTML_ERRCOLOR "#AA0000" #define MOCHA_NAME "javascript" /* Internationalization stuffs. If we define MSG_RETURN, then create a * function which will return a string of the given identifier. If we * define MSG_DBM, it creates a function you can call to create the DBM * properly. Finally, if nothing else, it will create a mapping from * the string's name to its proper ID number. */ /* store_msg is in mkdbm.c, in the admin stuff */ /* get_msg.c */ NSAPI_PUBLIC char *get_msg(int msgid); NSAPI_PUBLIC void store_msg(int msgid, char *msg); #if defined(MSG_RETURN) #define BGN_MSG(arg) static char *(arg)(int i) { switch(i) { #define STR(name, id, msg) case (id): return(msg); #define END_MSG(arg) } return 0; } #elif defined(MSG_DBM) #define BGN_MSG(arg) void (arg)() { #define STR(name, id, msg) store_msg(id, msg); #define END_MSG(arg) } #else #define BGN_MSG(arg) enum { #define STR(name, id, msg) name=id, #define END_MSG(arg) arg=0 }; #endif /* The files where the messages are kept. */ #define LA_BASE 1000 #define LA_BASE_END 1999 #define LA_DBM_LOC "./la_msgs" #define HADM_BASE 2000 #define HADM_BASE_END 5999 #define HADM_DBM_LOC "./hadm_msgs" #include "la_msgs.i" #include "hadm_msgs.i" /* Open a .html file to parse it. Returns a file ptr (simple fn, really) */ /* error one doesn't call report_error so we lose the infinite loop prob */ /* form_get.c */ NSAPI_PUBLIC FILE *open_html_file(char *filename); NSAPI_PUBLIC FILE *open_error_file(char *filename); /* Same as open_html_file, but opens the html file from the specified */ /* language subdirectory, if available, else from the default language */ /* subdirectory. */ /* form_get.c */ NSAPI_PUBLIC FILE* open_html_file_lang(char* filename,char* language); /* Parse an HTML file and return it to the client. */ /* form_get.c */ NSAPI_PUBLIC void return_html_file(char *filename); /* Parse an HTML file, return it to the client, but don't set the referer */ /* form_get.c */ NSAPI_PUBLIC void return_html_noref(char *filename); /* Output an input of an arbitrary type. Not really that flexible. */ /* form_get.c */ NSAPI_PUBLIC void output_input(char *type, char *name, char *value, char *other); /* Get the next line from the file. Returns 0 when EOF is encountered. */ /* form_get.c */ NSAPI_PUBLIC int next_html_line(FILE *f, char *line); /* Get the referer from the config file */ /* referer.c */ NSAPI_PUBLIC char *get_referer(char **config); /* Redirect the person to the Referer, or give a short error message */ /* referer.c */ NSAPI_PUBLIC void redirect_to_referer(char *addition); /* Opens the referer in the content window using JavaScript */ /* referer.c */ NSAPI_PUBLIC void js_open_referer(void); /* Redirect to the given script. Assumes that SCRIPT_NAME is set to a script */ /* referer.c */ NSAPI_PUBLIC void redirect_to_script(char *script); /* Filter a line using templates, and spit the results to stdout */ /* template.c */ NSAPI_PUBLIC int parse_line(char *line, char **input); /* Since everyone seems to be doing this independently, at least centralize the code. Useful for onClicks and automatic help */ NSAPI_PUBLIC char *helpJavaScript(); NSAPI_PUBLIC char *helpJavaScriptForTopic( char *topic ); /* Check to see if a directive the parser didn't know about is a given * directive */ /* template.c */ NSAPI_PUBLIC int directive_is(char *target, char *directive); /* Export the pageheader because sec-icrt uses it --MLM */ /* template.c */ NSAPI_PUBLIC void pageheader(char **vars, char **config); /* Report an error. Takes 3 args: 1. Category of error * 2. Some more specific category info (opt) * 3. A short explanation of the error. * * report_warning: same thing except doesn't exit when done whining */ /* error.c */ NSAPI_PUBLIC void output_alert(int type, char *info, char *details, int wait); NSAPI_PUBLIC void report_error(int type, char *info, char *details); NSAPI_PUBLIC void report_warning(int type, char *info, char *details); /* Some simple buffering tools */ /* Keeps a buffer for network info, and a buffer for returning lines */ /* httpcon.c */ typedef struct bufstruct { char *buf; int bufsize; int curpos; int inbuf; char *hbuf; int hbufsize; int hbufpos; } bufstruct; /* Make a new buffer. Flush the rest of a buffer (leaving the contents * unread. Delete a buffer structure. */ /* httpcon.c */ NSAPI_PUBLIC bufstruct *new_buffer(int bufsize); NSAPI_PUBLIC void flush_buffer(bufstruct *buf); NSAPI_PUBLIC void delete_buffer(bufstruct *buf); /* stdio replacement for a network connection (so shoot me) */ /* httpcon.c */ NSAPI_PUBLIC char *get_line_from_fd(PRFileDesc *fd, bufstruct *buf); /* send a line to a remote server (equivalent to write()) */ /* httpcon.c */ NSAPI_PUBLIC int send_line_to_fd(PRFileDesc *fd, char *line, int linesize); /* Decompose a URL into protocol, server, port, and URI. You needn't allocate * the strings you're passing, will be done for you. */ /* httpcon.c */ NSAPI_PUBLIC int decompose_url(char *url, char **protocol, char **server, unsigned int *port, char **uri); /* Take a status line "HTTP/1.0 200 OK" or some such and produce a protocol * status number. */ /* httpcon.c */ NSAPI_PUBLIC int parse_status_line(char *statusline); /* Returns whether the headers have now ended (with the line you give it) */ /* httpcon.c */ NSAPI_PUBLIC int is_end_of_headers(char *hline); /* Make an HTTP request to a given server, running on a given port, * with the given initial request. Returns a FD that can be used * to read / write to the connection. */ /* Note: Reports status to stdout in HTML form. Bad? Perhaps... */ /* httpcon.c */ NSAPI_PUBLIC PRFileDesc *make_http_request(char *protocol, char *server, unsigned int port, char *request, int timeout, int *errcode); /* Terminate an HTTP request session (see above) */ /* httpcon.c */ NSAPI_PUBLIC void end_http_request(PRFileDesc *req_socket); /* Verify that given server is an admin server. */ NSAPI_PUBLIC int verify_is_admin(char *protocol, char *server, int port); /* Log a change in the verbose admin log. kind is a string representing * what kind of change it was (see #defines at top of file, such as MAGNUS_LOG) * Change is the text of the change, in printf format (so you can give args). */ /* admlog.c */ NSAPI_PUBLIC void log_change(char *kind, char *change, ...); /* Performs the request rq, for server (in list) whichsrv, using auth as * auth info. * * successmsg is the prefix on lines that are returned from the remote * server that indicate success. */ /* pcontrol.c */ NSAPI_PUBLIC int perform_request(char *req, int whichsrv, char *auth, char *successmsg); /* Escapes a shell command for system() calls. NOTE: This string should * be large enough to handle expansion!!!! */ /* util.c */ NSAPI_PUBLIC void escape_for_shell(char *cmd); /* * Escape src DN string (RFC 4514) * Result * Success: * return value: 0 * src includes dn special characters * --> *dist returns escaped string; caller needs to free it. * src does not include dn special characters --> *dist == NULL * Failure * return value: -1 */ int escape_for_dn(char *src, char **dist); /* Lists all files in a directory. If dashA list .files except . and .. */ /* util.c */ NSAPI_PUBLIC char **list_directory(char *path, int dashA); /* Does a given file exist? */ /* util.c */ NSAPI_PUBLIC int file_exists(char *filename); /* What's the size of a given file? */ /* util.c */ NSAPI_PUBLIC int get_file_size(char *path); /* Return: LastModificationTime(f1) < LastModificationTime(f2) ? */ /* util.c */ NSAPI_PUBLIC int mtime_is_earlier(char *file1, char *file2); /* Return: the last mod time of fn */ /* util.c */ NSAPI_PUBLIC time_t get_mtime(char *fn); /* Does this string have all numbers? */ /* util.c */ NSAPI_PUBLIC int all_numbers(char *target); /* Valid floating point number? */ NSAPI_PUBLIC int all_numbers_float(char *target); /* Get the server's URL. */ /* util.c */ NSAPI_PUBLIC char *get_serv_url(void); /* This is basically copy_file from the install section, with the error * reporting changed to match the admin stuff. Since some stuff depends * on copy_file being the install version, I'll cheat and call this one * cp_file. */ /* util.c */ NSAPI_PUBLIC void cp_file(char *sfile, char *dfile, int mode); /* Delete the file with the given path. Returns positive value on failure.*/ /* util.c */ NSAPI_PUBLIC int delete_file(char *path); /* Simply creates a directory that you give it. Checks for errors and * all that. (Not to be confused with create_subdirs in install, since * it relies on some installation stuff.) */ /* util.c */ NSAPI_PUBLIC void create_dir(char *dir, int mode); /* uuencode a given buffer. both src and dst need to be allocated. dst * should be 1 1/4 as big as src (i saved some math and just made it twice * as big when I called it) */ /* util.c */ NSAPI_PUBLIC int do_uuencode(unsigned char *src, unsigned char *dst, int srclen); /* Word wrap a string to fit into a JavaScript alert box. */ /* str is the string, width is the width to wrap to, linefeed is the string * to use as a linefeed. */ /* util.c */ #define WORD_WRAP_WIDTH 80 NSAPI_PUBLIC char *alert_word_wrap(char *str, int width, char *linefeed); /* Scans a file and puts all of its lines into a char * array. Strips * trailing whitespace */ /* ns-util.c */ NSAPI_PUBLIC char **scan_tech(char *fn); /* Writes the lines to the given file */ /* ns-util.c */ NSAPI_PUBLIC int write_tech(char *fn, char **lines); /************************************************************************** * This is should really be in base/file.h, but we don't want to tread on * toes. * Implement fgets without the error complaints the util_getline has. The * calling function is smart enough to deal with partial lines. * Also include a sleep that has the same functionality as Unix for NT. *************************************************************************/ NSAPI_PUBLIC char *system_gets( char *, int, filebuffer * ); #ifdef XP_UNIX NSAPI_PUBLIC int system_zero( SYS_FILE ); #else /* XP_WIN32 */ #define system_zero( f ) \ SetFilePointer( PR_FileDesc2NativeHandle( f ), 0, NULL, FILE_BEGIN );\ SetEndOfFile( PR_FileDesc2NativeHandle( f ) ) #define sleep( t ) Sleep( (t) * 1000 ) #endif /* XP_WIN32 */ NSAPI_PUBLIC char *cookieValue( char *, char * ); NSAPI_PUBLIC void jsPWDialogSrc( int inScript, char *otherJS ); NSAPI_PUBLIC int IsCurrentTemplateNSPlugin(char* templateName); /************************** Miscellaneous *************************/ NSAPI_PUBLIC char * jsEscape(char *src); NSAPI_PUBLIC void htmladmin_strcat_escaped( char *s1, char *s2 ); NSAPI_PUBLIC char *htmladmin_strdup_escaped( char *s ); /* returns true if the given path is a valid directory, false otherwise */ NSAPI_PUBLIC int util_is_dir_ok(const char *path); /* returns true if the given path is a valid file, false otherwise */ NSAPI_PUBLIC int util_is_file_ok(const char *path); /* returns true if the file was found somewhere, false otherwise */ NSAPI_PUBLIC int util_find_file_in_paths( char *filebuf, /* this will be filled in with the full path/filename if found, '\0' otherwise */ size_t bufsize, /* size of filebuf e.g. sizeof(filebuf) */ const char *filename, /* the base filename to look for */ const char *path, /* path given by caller */ const char *arpath, /* path relative to ADMSERV_ROOT */ const char *nrpath /* path relative to NETSITE_ROOT */ ); /* Get the path to the directory containing config files */ NSAPI_PUBLIC char* util_get_conf_dir(void); /* Get the path to the directory containing security files */ NSAPI_PUBLIC char* util_get_security_dir(void); /* Get the path to the directory containing log files */ NSAPI_PUBLIC char* util_get_log_dir(void); /* Get the path to the directory containing pid file */ NSAPI_PUBLIC char* util_get_pid_dir(void); /* Get the path to the directory containing html files */ NSAPI_PUBLIC const char* util_get_html_dir(void); /* Get the path to the directory containing icon/image files */ NSAPI_PUBLIC const char* util_get_icon_dir(void); /* make sure the given name looks like a good file name */ NSAPI_PUBLIC int util_is_valid_path_string(const char *); /* Make sure the given file/dir exists. Optionally check to see if the other given file/dir exists and is a child of the given file/dir */ NSAPI_PUBLIC int util_verify_file_or_dir(const char *path, PRFileType, const char *child, size_t, PRFileType); NSAPI_PUBLIC int util_psetHasObjectClass(PsetHndl pset, const char *ocname); NSAPI_PUBLIC const char * util_urlparse_err2string(int err); /* there are various differences among url parsers - directory server needs the ability to parse partial URLs - those with no dn - and needs to be able to tell if it is a secure url (ldaps) or not */ NSAPI_PUBLIC int util_ldap_url_parse(const char *url, LDAPURLDesc **ludpp, int require_dn, int *secure); NSAPI_PUBLIC int util_ldap_get_lderrno(LDAP *ld, char **m, char **s); /* Perform LDAP init and return an LDAP* handle. If ldapurl is given, that is used as the basis for the protocol, host, port, and whether to use starttls (given on the end as ldap://..../?????starttlsOID If hostname is given, LDAP or LDAPS is assumed, and this will override the hostname from the ldapurl, if any. If port is > 0, this is the port number to use. It will override the port in the ldapurl, if any. If no port is given in port or ldapurl, the default will be used based on the secure setting (389 for ldap, 636 for ldaps) secure takes 1 of 2 values - 0 means regular ldap, 1 means ldaps filename is the ldapi file name - if this is given, and no other options are given, ldapi is assumed. */ LDAP * util_ldap_init( const char *certdir, /* contains the key/cert dbs */ const char *ldapurl, /* full ldap url */ const char *hostname, /* can also use this to override host in url */ int port, /* can also use this to override port in url */ int secure, /* 0 for ldap, 1 for ldaps */ int shared, /* if true, LDAP* will be shared among multiple threads */ const char *filename /* for ldapi */ ); /* * Does the correct bind operation simple/sasl/cert depending * on the arguments passed in. */ NSAPI_PUBLIC int util_ldap_bind( LDAP *ld, /* ldap connection */ const char *bindid, /* usually a bind DN for simple bind */ const char *creds, /* usually a password for simple bind */ const char *mech, /* name of mechanism */ LDAPControl **serverctrls, /* additional controls to send */ LDAPControl ***returnedctrls, /* returned controls */ struct timeval *timeout, /* timeout */ int *msgidp /* pass in non-NULL for async handling */ ); NSAPI_PUBLIC void util_ldap_perror(LDAP *ld, const char *fmt, ...); NSAPI_PUBLIC char ** util_ldap_get_values(LDAP *ld, LDAPMessage *entry, const char *attrtype); NSAPI_PUBLIC void util_ldap_value_free(char **vals); NSPR_END_EXTERN_C #endif /* libadmin_h */ 389-admin-1.1.35/include/libadmin/sconf.h000066400000000000000000000046051220472121400176750ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef SNMP_M_CONF #define SNMP_M_CONF typedef struct community_entry { char * name; char * operation; } community_entry; typedef struct community_list { community_entry * community; struct community_list * next; } community_list; typedef struct manager_entry { char * name; char * trap_port; char * community; } manager_entry; typedef struct manager_list { manager_entry * manager; struct manager_list * next; } manager_list; /* input community name , operation, full path file name and flag 0 -- remove 1 -- create/modify */ void modify_community(char *, char *, char *, int); /* input full path of config file name */ community_list * get_community_list(char *); /* input community_list and full path of config file name return 0 success, others fails*/ int write_community_list(community_list *, char *); void free_community_all_list(community_list *); /* assistant functions */ void free_community_entry(community_entry *); void free_community_list(community_list *); /* input manager name , trap port, community, full path file name and flag 0 -- remove 1 -- create/modify */ void modify_manager(char *, char *, char *, char *, int); /* input full path of config file name */ manager_list * get_manager_list(char *); /* input community_list and full path of config file name return 0 success, others fails*/ int write_manager_list(manager_list *, char *); void free_manager_all_list(manager_list *); /* assistant functions */ void free_manager_entry(manager_entry *); void free_manager_list(manager_list *); #endif 389-admin-1.1.35/include/libdsa/000077500000000000000000000000001220472121400160665ustar00rootroot00000000000000389-admin-1.1.35/include/libdsa/dsalib.h000066400000000000000000000250111220472121400174740ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #ifndef __dsalib_h #define __dsalib_h #include #include #include #ifdef HPUX #include /* for PATH_MAX */ #endif #include #include /* error types */ #define DS_FILE_ERROR 0 #define DS_MEMORY_ERROR 1 #define DS_SYSTEM_ERROR 2 #define DS_INCORRECT_USAGE 3 #define DS_ELEM_MISSING 4 #define DS_REGISTRY_DATABASE_ERROR 5 #define DS_NETWORK_ERROR 6 #define DS_GENERAL_FAILURE 7 #define DS_WARNING 8 /* The upper bound on error types */ #define DS_MAX_ERROR 9 /* The default error type (in case something goes wrong */ #define DS_DEFAULT_ERROR 3 #ifndef BIG_LINE #define BIG_LINE 1024 #endif #ifndef PATH_MAX #if defined( _WIN32 ) #define PATH_MAX _MAX_PATH #else #define PATH_MAX 256 #endif /* _WIN32 */ #endif /* PATH_MAX */ #ifndef HTML_ERRCOLOR #define HTML_ERRCOLOR "#AA0000" #endif #ifndef CONTENT_NAME #define CONTENT_NAME "content" #endif /* config file/path info */ #define DS_CONFIG_DIR "DS_CONFIG_DIR" #define DS_CONFIG_FILE "dse.ldif" #define DS_ORIGCONFIG_FILE "dse_original.ldif" #define DS_CONFIG_LOCKDIR "nsslapd-lockdir:" #define DS_CONFIG_ERRLOG "nsslapd-errorlog:" #ifdef XP_UNIX #define FILE_PATHSEP '/' #define FILE_PATHSEPP "/" #define FILE_PARENT "../" #define WSACleanup() #elif defined(XP_WIN32) #define FILE_PATHSEP '/' #define FILE_PATHSEPP "\\\\" #define FILE_PARENT "..\\" #endif /* XP_WIN32 */ #define PATH_SIZE 1024 #define ERR_SIZE 8192 /* NT doesn't strictly need these, but the libadmin API which is emulated below uses them. */ #define NEWSCRIPT_MODE 0755 #define NEWFILE_MODE 0644 #define NEWDIR_MODE 0755 #if defined( XP_WIN32 ) #define DS_EXPORT_SYMBOL __declspec( dllexport ) #else #define DS_EXPORT_SYMBOL #endif #if defined( XP_WIN32 ) #define ENQUOTE "\"" #else #define ENQUOTE "" #endif #ifndef FILE_SEP #ifdef XP_WIN32 #define FILE_SEP '\\' #else #define FILE_SEP '/' #endif #endif /* only used if not WITH_SYSTEMD and not ENABLE_SERVICE */ #define START_SCRIPT "start-slapd" #if defined( XP_WIN32 ) #define SLAPD_NAME "slapd" #else #define SLAPD_NAME "ns-slapd" #endif #define MOCHA_NAME "javascript" /* * Return values from ds_get_updown_status() */ #define DS_SERVER_UP 1 #define DS_SERVER_DOWN 0 #define DS_SERVER_UNKNOWN -1 /* * Return values from ds_bring_up_server() */ #define DS_SERVER_ALREADY_UP -2 #define DS_SERVER_ALREADY_DOWN -3 #define DS_SERVER_PORT_IN_USE -4 #define DS_SERVER_MAX_SEMAPHORES -5 #define DS_SERVER_CORRUPTED_DB -6 #define DS_SERVER_NO_RESOURCES -7 #define DS_SERVER_COULD_NOT_START -8 /* * Other return values */ #define DS_UNKNOWN_ERROR -1 #define DS_NO_INSTANCE_DIR -10 #define DS_CANNOT_EXEC -11 #define DS_CANNOT_OPEN_STAT_FILE -12 #define DS_NULL_PARAMETER -13 #define DS_SERVER_MUST_BE_DOWN -14 #define DS_CANNOT_OPEN_BACKUP_FILE -15 #define DS_NOT_A_DIRECTORY -16 #define DS_CANNOT_CREATE_DIRECTORY -17 #define DS_CANNOT_OPEN_LDIF_FILE -18 #define DS_IS_A_DIRECTORY -19 #define DS_CANNOT_CREATE_FILE -20 #define DS_UNDEFINED_VARIABLE -21 #define DS_NO_SUCH_FILE -22 #define DS_CANNOT_DELETE_FILE -23 #define DS_UNKNOWN_SNMP_COMMAND -24 #define DS_NON_NUMERIC_VALUE -25 #define DS_NO_LOGFILE_NAME -26 #define DS_CANNOT_OPEN_LOG_FILE -27 #define DS_HAS_TOBE_READONLY_MODE -28 #define DS_INVALID_LDIF_FILE -29 /* * Types of config files. */ #define DS_REAL_CONFIG 1 #define DS_TMP_CONFIG 2 /* * Maximum numeric value we will accept in admin interface * We may at some point need per-option bounds, but for now, * there's just one global maximum. */ #define DS_MAX_NUMERIC_VALUE 4294967295 /* 2^32 - 1 */ /* Use our own macro for rpt_err, so we can put our own error code in NMC_STATUS */ #undef rpt_err #define rpt_err(CODE, STR1, STR2, STR3) \ fprintf( stdout, "NMC_ErrInfo: %s\n", (STR1) ); \ fprintf( stdout, "NMC_STATUS: %d\n", CODE ) /* * Flags for ds_display_config() */ #define DS_DISP_HRB 1 /* horizontal line to begin with */ #define DS_DISP_HRE 2 /* horizontal line to end with */ #define DS_DISP_TB 4 /* table begin */ #define DS_DISP_TE 8 /* table end */ #define DS_DISP_EOL 16 /* End Of Line */ #define DS_DISP_NOMT 32 /* display only non empty */ #define DS_DISP_NOIN 64 /* display with no input field */ #define DS_DISP_HELP 128 /* display with a help button */ #define DS_DISP_PLAIN 256 /* No table, no nothin */ #define DS_SIMPLE (DS_DISP_EOL | DS_DISP_NOIN | DS_DISP_HELP) /* * dci_type for ds_cfg_info */ #define DS_ATTR_STRING 1 #define DS_ATTR_NUMBER 2 #define DS_ATTR_ONOFF 3 #define DS_ATTR_LIMIT 4 /* a number where -1 is displayed as blank */ struct ds_cfg_info { char *dci_varname; char *dci_display; int dci_type; char *dci_help; }; extern struct ds_cfg_info ds_cfg_info[]; /* * varname for ds_showparam() * NOTE: these must be kept in synch with the ds_cfg_info array defined * in ../lib/dsalib_conf.c */ #define DS_LOGLEVEL 0 #define DS_REFERRAL 1 #define DS_AUDITFILE 2 #define DS_LOCALHOST 3 #define DS_PORT 4 #define DS_SECURITY 5 #define DS_SECURE_PORT 6 #define DS_SSL3CIPHERS 7 #define DS_PASSWDHASH 8 #define DS_ACCESSLOG 9 #define DS_ERRORLOG 10 #define DS_ROOTDN 11 #define DS_ROOTPW 12 #define DS_SUFFIX 13 #define DS_LOCALUSER 14 #define DS_BAKDIR 15 #define DS_TMPDIR 16 #define DS_INSTDIR 17 #define DS_CFG_MAX 18 /* MUST be one greater than the last option */ /* These control how long we wait for the server to start up or shutdown */ #define SERVER_START_TIMEOUT 600 /* seconds */ #define SERVER_STOP_TIMEOUT SERVER_START_TIMEOUT /* same as start timeout */ typedef int (*DS_RM_RF_ERR_FUNC)(const char *path, const char *op, void *arg); #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern DS_EXPORT_SYMBOL char *ds_get_instance_dir(); extern DS_EXPORT_SYMBOL char *ds_get_admserv_based_root(); extern DS_EXPORT_SYMBOL void ds_log_debug_message(char *msg); extern DS_EXPORT_SYMBOL void ds_log_env(char **envp); extern DS_EXPORT_SYMBOL int ds_get_updown_status(); extern DS_EXPORT_SYMBOL void ds_print_startstop(int stop); extern DS_EXPORT_SYMBOL int ds_bring_up_server_install(int verbose, char *root, char *errorlog); extern DS_EXPORT_SYMBOL int ds_bring_up_server(int verbose); extern DS_EXPORT_SYMBOL char *ds_get_server_name(); extern DS_EXPORT_SYMBOL char *ds_get_short_name(); extern DS_EXPORT_SYMBOL void ds_send_error(char *errstr, int print_errno); extern DS_EXPORT_SYMBOL void ds_send_status(char *str); extern DS_EXPORT_SYMBOL char *ds_get_errors_name(); extern DS_EXPORT_SYMBOL char *ds_get_access_name(); extern DS_EXPORT_SYMBOL char *ds_get_audit_name(); extern DS_EXPORT_SYMBOL char *ds_get_logfile_name(int config_type); extern DS_EXPORT_SYMBOL int ds_bring_down_server(); extern DS_EXPORT_SYMBOL void ds_print_server_status(int isrunning); extern DS_EXPORT_SYMBOL int ds_get_file_size(char *fileName); extern DS_EXPORT_SYMBOL void ds_display_tail(char *fileName, int timeOut, int startSeek, char *doneMsg, char *lastLine); extern DS_EXPORT_SYMBOL char **ds_get_bak_dirs(); extern DS_EXPORT_SYMBOL char **ds_get_config(int type); extern DS_EXPORT_SYMBOL void ds_free_config(char **conf_list); extern DS_EXPORT_SYMBOL char *ds_get_config_dir(); extern DS_EXPORT_SYMBOL void ds_set_config_dir(char *config_dir); extern DS_EXPORT_SYMBOL char *ds_get_run_dir(); extern DS_EXPORT_SYMBOL void ds_set_run_dir(char *run_dir); extern DS_EXPORT_SYMBOL char *ds_get_bak_dir(); extern DS_EXPORT_SYMBOL void ds_set_bak_dir(char *bak_dir); extern DS_EXPORT_SYMBOL int ds_check_config(int type); #if defined(USE_OPENLDAP) extern DS_EXPORT_SYMBOL char **ds_get_conf_from_file(LDIFFP *conf); #else extern DS_EXPORT_SYMBOL char **ds_get_conf_from_file(FILE *conf); #endif extern DS_EXPORT_SYMBOL char *ds_get_var_name(int varnum); extern DS_EXPORT_SYMBOL char *ds_get_value(char **ds_config, char *parm, int phase, int occurance); extern DS_EXPORT_SYMBOL int ds_file_exists(char *filename); extern DS_EXPORT_SYMBOL char *ds_get_config_value( int option ); extern DS_EXPORT_SYMBOL char **ds_get_file_list( char *dir ); extern DS_EXPORT_SYMBOL char *ds_get_tmp_dir(); extern DS_EXPORT_SYMBOL void ds_dostounixpath(char *szText); /* Change the effective UID and GID of this process to those associated with the given localuser (if any). */ extern DS_EXPORT_SYMBOL char* ds_become_localuser_name (char* localuser); /* Change the effective UID and GID of this process to those associated with ds_config's localuser (if any). */ extern DS_EXPORT_SYMBOL char* ds_become_localuser (char** ds_config); /* Change the effective UID and GID of this process back to what they were before calling ds_become_localuser(). */ extern DS_EXPORT_SYMBOL char* ds_become_original(); /* Display an error to the user and exit from a CGI */ extern DS_EXPORT_SYMBOL void ds_report_error(int type, char *errmsg, char *details); /* Display a warning to the user */ extern DS_EXPORT_SYMBOL void ds_report_warning(int type, char *errmsg, char *details); /* show a message to be parsed by the non-HTML front end */ extern DS_EXPORT_SYMBOL void ds_show_message(const char *message); extern DS_EXPORT_SYMBOL void alter_startup_line(char *startup_line); extern DS_EXPORT_SYMBOL char *ds_system_errmsg(void); /* remove a registry key and report an error message if unsuccessful */ extern DS_EXPORT_SYMBOL int ds_remove_reg_key(void *base, const char *format, ...); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __dsalib_h */ 389-admin-1.1.35/include/libdsa/dsalib_pw.h000066400000000000000000000023771220472121400202140ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #ifndef __dsalib_pw_h #define __dsalib_pw_h extern DS_EXPORT_SYMBOL void dsparm_help_button(char *var_name, char *dispname, char *helpinfo); extern DS_EXPORT_SYMBOL LDAP* bind_as_root (char** cfg, char* rootdn, char* rootpw); extern DS_EXPORT_SYMBOL void get_pw_policy(char*** pValue, char** cfg); extern DS_EXPORT_SYMBOL void ds_showpw( char** cfg); #endif /* __dsalib_pw_h */ 389-admin-1.1.35/include/libdsa/dsalib_schema.h000066400000000000000000000155611220472121400210250ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * Routines to parse schema LDIF * * -atom * */ #ifndef __DSALIB_SCHEMA_H #define __DSALIB_SCHEMA_H__ /************************************************************************ BNF for attributes and objectclasses: AttributeTypeDescription = "(" whsp numericoid whsp ; AttributeType identifier [ "NAME" qdescrs ] ; name used in AttributeType [ "DESC" qdstring ] ; description [ "OBSOLETE" whsp ] [ "SUP" woid ] ; derived from this other ; AttributeType [ "EQUALITY" woid ; Matching Rule name [ "ORDERING" woid ; Matching Rule name [ "SUBSTR" woid ] ; Matching Rule name [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3 [ "SINGLE-VALUE" whsp ] ; default multi-valued [ "COLLECTIVE" whsp ] ; default not collective [ "NO-USER-MODIFICATION" whsp ]; default user modifiable [ "USAGE" whsp AttributeUsage ]; default user applications whsp ")" ObjectClassDescription = "(" whsp numericoid whsp ; ObjectClass identifier [ "NAME" qdescrs ] [ "DESC" qdstring ] [ "OBSOLETE" whsp ] [ "SUP" oids ] ; Superior ObjectClasses [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ] ; default structural [ "MUST" oids ] ; AttributeTypes [ "MAY" oids ] ; AttributeTypes whsp ")" ************************************************************************/ /* * ds_check_valid_oid: check to see if an oid is valid. * Oids should only contain digits and dots. * * returns 1 if valid, 0 if not */ DS_EXPORT_SYMBOL int ds_check_valid_oid (char *oid); /* * ds_check_valid_name: check to see if an attribute name or an objectclass * name is valid. A valid name contains only digits, letters, or hyphens * * returns 1 if valid, 0 if not * */ DS_EXPORT_SYMBOL int ds_check_valid_name (char *name); /* * ds_get_oc_desc: * * Input : pointer to string containing an ObjectClassDescription * Returns : pointer to string containing objectclass DESC * * The caller must free the return value * */ DS_EXPORT_SYMBOL char * ds_get_oc_desc (char *oc); /* * ds_get_oc_name: * * Input : pointer to string containing an ObjectClassDescription * Returns: pointer to string containing objectclass name. * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_oc_name (char *o); /* * ds_get_attr_name: * * Input : pointer to string containing an AttributeTypeDescription * Returns: pointer to string containing an attribute name. * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_attr_name (char *a); /* * ds_get_oc_superior: * * Input : pointer to string containing an ObjectClassDescription * Returns: pointer to string containing the objectclass's SUP (superior/parent) * objectclass * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_oc_superior (char *o); /* * ds_get_attr_desc: * * Input : Pointer to string containing an AttributeTypeDescription * Returns: Pointer to string containing the attribute's description * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_attr_desc (char *a); /* * ds_get_attr_syntax: * * Input: Pointer to string containing an AttributeTypeDescription * Returns: Pointer to string containing the attribute's syntax * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_attr_syntax (char *a); /* * ds_get_attr_oid: * * Input : Pointer to string containing an AttributeTypeDescription * Returns: Pointer to string containing an attribute's oid * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_attr_oid (char *a); /* * ds_get_attr_name: * * Input : Pointer to string containing an AttributeTypeDescription * Returns: Pointer to string containing the attribute's name * * The caller must free the return value * */ DS_EXPORT_SYMBOL char *ds_get_attr_name (char *a); /* * syntax_oid_to_english: convert an attribute syntax oid to something more * human readable * * Input : string containing numeric OID for a attribute syntax * Returns: Human readable string */ DS_EXPORT_SYMBOL char *syntax_oid_to_english (char *oid); /* StripSpaces: Remove all leading and trailing spaces from a string */ DS_EXPORT_SYMBOL char *StripSpaces (char **s); /* ds_print_required_attrs: * * input: pointer to string containing an ObjectClassDescription * * prints JavaScript array containing the required attributes of an objectclass * The array name is oc__requires */ DS_EXPORT_SYMBOL void ds_print_required_attrs (char *o); /* ds_print_allowed_attrs: * * input: pointer to string containing an ObjectClassDescription * * prints JavaScript array containing the allowed attributes of an objectclass * The array name is oc__allows */ DS_EXPORT_SYMBOL void ds_print_allowed_attrs (char *o); /* ds_print_oc_oid: * * input: pointer to string containing an ObjectClassDescription * * prints JavaScript string containing an objectclass oid * The variable name is oc__oid */ DS_EXPORT_SYMBOL void ds_print_oc_oid (char *o); /* ds_print_oc_superior: * * input: pointer to string containing an ObjectClassDescription * * prints JavaScript string containing an objectclass superior * The variable name is oc__superior */ DS_EXPORT_SYMBOL void ds_print_oc_superior (char *o); /* underscore2hyphen: * transform underscores to hyphens in a string */ DS_EXPORT_SYMBOL char *underscore2hyphen (char *src); /* hyphen2underscore: * transform hyphens to underscores in a string */ DS_EXPORT_SYMBOL char *hyphen2underscore (char *src); #endif /* __DSALIB_SCHEMA_H__ */ 389-admin-1.1.35/include/netsite.h000066400000000000000000000171751220472121400164670ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef NETSITE_H #define NETSITE_H #ifndef NOINTNSAPI #define INTNSAPI #endif /* !NOINTNSAPI */ /* * Standard defs for NetSite servers. */ /* ** Macro shorthands for conditional C++ extern block delimiters. ** Don't redefine for compatability with NSPR. */ #ifndef NSPR_BEGIN_EXTERN_C #ifdef __cplusplus #define NSPR_BEGIN_EXTERN_C extern "C" { #define NSPR_END_EXTERN_C } #else #define NSPR_BEGIN_EXTERN_C #define NSPR_END_EXTERN_C #endif #endif /* NSPR_BEGIN_EXTERN_C */ #ifdef __cplusplus #define EXTERNC extern "C" #else #define EXTERNC #endif #ifndef BASE_SYSTEMS_H #include "base/systems.h" #endif /* !BASE_SYSTEMS_H */ #ifndef VOID #define VOID void #endif #ifdef XP_UNIX /* * Provide some typedefs that are commonly used on windows * * DO NOT USE THESE! They will be deleted later! * */ #define CONST const typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef FLOAT *PFLOAT; typedef BOOL *PBOOL; typedef BOOL *LPBOOL; typedef BYTE *PBYTE; typedef BYTE *LPBYTE; typedef int *PINT; typedef int *LPINT; typedef WORD *PWORD; typedef WORD *LPWORD; typedef long *LPLONG; typedef DWORD *PDWORD; typedef DWORD *LPDWORD; typedef void *LPVOID; #if !defined (boolean) && !defined (__GNUC__) typedef int boolean; #endif #endif #define NS_TRUE 1 #define NS_FALSE 0 NSPR_BEGIN_EXTERN_C /* -------------------------- System version on NT------------------------- */ /* Encode the server version as a number to be able to provide inexpensive * dynamic checks on server version - this isn't added in yet. */ #define ENTERPRISE_VERSION 1 #define PERSONAL_VERSION 2 #define CATALOG_VERSION 3 #define RDS_VERSION 4 #define CMS_VERSION 5 #define DS_VERSION 6 #define server_fasttrack (0) #define server_enterprise (1) /* This definition of MAGNUS_VERSION_STRING on NT should be used * only when building the ns-http DLL */ #if defined(MCC_HTTPD) && defined(XP_WIN32) && !defined(USE_ADMSERV) && !defined(MCC_ADMSERV) #define MAGNUS_VERSION_STRING INTsystem_version() #endif /* XP_WIN32 */ /* Set server's version dynamically */ NSAPI_PUBLIC void INTsystem_version_set(char *ptr); #ifndef APSTUDIO_READONLY_SYMBOLS /* Include the public netsite.h definitions */ #ifndef PUBLIC_NETSITE_H #ifdef MALLOC_DEBUG #define NS_MALLOC_DEBUG #endif /* MALLOC_DEBUG */ #include "public/netsite.h" #endif /* PUBLIC_NETSITE_H */ #endif /* !APSTUDIO_READONLY_SYMBOLS */ /* * If NS_MALLOC_DEBUG is defined, declare the debug version of the memory * allocation API. */ #ifdef NS_MALLOC_DEBUG #define PERM_MALLOC(size) INTsystem_malloc_perm(size, __LINE__, __FILE__) NSAPI_PUBLIC void *INTsystem_malloc_perm(int size, int line, char *file); #define PERM_CALLOC(size) INTsystem_calloc_perm(size, __LINE__, __FILE__) NSAPI_PUBLIC void *INTsystem_calloc_perm(int size, int line, char *file); #define PERM_REALLOC(ptr, size) INTsystem_realloc_perm(ptr, size, __LINE__, __FILE__) NSAPI_PUBLIC void *INTsystem_realloc_perm(void *ptr, int size, int line, char *file); #define PERM_FREE(ptr) INTsystem_free_perm((void *) ptr, __LINE__, __FILE__) NSAPI_PUBLIC void INTsystem_free_perm(void *ptr, int line, char *file); #define PERM_STRDUP(ptr) INTsystem_strdup_perm(ptr, __LINE__, __FILE__) NSAPI_PUBLIC char *INTsystem_strdup_perm(const char *ptr, int line, char *file); #endif /* NS_MALLOC_DEBUG */ /* * Only the mainline needs to set the malloc key. */ void setThreadMallocKey(int key); /* This probably belongs somewhere else, perhaps with a different name */ NSAPI_PUBLIC char *INTdns_guess_domain(char * hname); /* --- Begin public functions --- */ #ifdef INTNSAPI NSAPI_PUBLIC char *INTsystem_version(); /* Depending on the system, memory allocated via these macros may come from an arena. If these functions are called from within an Init function, they will be allocated from permanent storage. Otherwise, they will be freed when the current request is finished. */ #define MALLOC(size) INTsystem_malloc(size) NSAPI_PUBLIC void *INTsystem_malloc(int size); #define CALLOC(size) INTsystem_calloc(size) NSAPI_PUBLIC void *INTsystem_calloc(int size); #define REALLOC(ptr, size) INTsystem_realloc(ptr, size) NSAPI_PUBLIC void *INTsystem_realloc(void *ptr, int size); #define FREE(ptr) INTsystem_free((void *) ptr) NSAPI_PUBLIC void INTsystem_free(void *ptr); #define STRDUP(ptr) INTsystem_strdup(ptr) NSAPI_PUBLIC char *INTsystem_strdup(const char *ptr); /* These macros always provide permanent storage, for use in global variables and such. They are checked at runtime to prevent them from returning NULL. */ #ifndef NS_MALLOC_DEBUG #define PERM_MALLOC(size) INTsystem_malloc_perm(size) NSAPI_PUBLIC void *INTsystem_malloc_perm(int size); #define PERM_CALLOC(size) INTsystem_calloc_perm(size) NSAPI_PUBLIC void *INTsystem_calloc_perm(int size); #define PERM_REALLOC(ptr, size) INTsystem_realloc_perm(ptr, size) NSAPI_PUBLIC void *INTsystem_realloc_perm(void *ptr, int size); #define PERM_FREE(ptr) INTsystem_free_perm((void *) ptr) NSAPI_PUBLIC void INTsystem_free_perm(void *ptr); #define PERM_STRDUP(ptr) INTsystem_strdup_perm(ptr) NSAPI_PUBLIC char *INTsystem_strdup_perm(const char *ptr); #endif /* !NS_MALLOC_DEBUG */ /* Thread-Private data key index for accessing the thread-private memory pool. * Each thread creates its own pool for allocating data. The MALLOC/FREE/etc * macros have been defined to check the thread private data area with the * thread_malloc_key index to find the address for the pool currently in use. * * If a thread wants to use a different pool, it must change the thread-local- * storage[thread_malloc_key]. */ NSAPI_PUBLIC int INTgetThreadMallocKey(void); /* Not sure where to put this. */ NSAPI_PUBLIC void INTmagnus_atrestart(void (*fn)(void *), void *data); #endif /* INTNSAPI */ /* --- End public functions --- */ NSPR_END_EXTERN_C #define system_version_set INTsystem_version_set #define dns_guess_domain INTdns_guess_domain #ifdef INTNSAPI #define system_version INTsystem_version #define system_malloc INTsystem_malloc #define system_calloc INTsystem_calloc #define system_realloc INTsystem_realloc #define system_free INTsystem_free #define system_strdup INTsystem_strdup #define system_malloc_perm INTsystem_malloc_perm #define system_calloc_perm INTsystem_calloc_perm #define system_realloc_perm INTsystem_realloc_perm #define system_free_perm INTsystem_free_perm #define system_strdup_perm INTsystem_strdup_perm #define getThreadMallocKey INTgetThreadMallocKey #define magnus_atrestart INTmagnus_atrestart #endif /* INTNSAPI */ #endif /* NETSITE_H */ 389-admin-1.1.35/include/nt/000077500000000000000000000000001220472121400152515ustar00rootroot00000000000000389-admin-1.1.35/include/nt/magnus.h000066400000000000000000000050451220472121400167200ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ //--------------------------------------------------------------------------// // // // Name: magnus.h // // Platforms: WIN32 // // ...................................................................... // // This file contains the declarations of the server initialization // // and control functions. // // ...................................................................... // // Revision History: // // 01-12-95 Initial Version, Aruna Victor (aruna@netscape.com) // // 12-30-96 3.0 registry changes, cleanup, Andy Hakim (ahakim) // //--------------------------------------------------------------------------// //--------------------------------------------------------------------------// // macros // //--------------------------------------------------------------------------// #define CLOSEHANDLE(X) \ { \ if(X) \ { \ CloseHandle(X); \ X = 0; \ } \ } //--------------------------------------------------------------------------// // function prototypes // //--------------------------------------------------------------------------// // functions in ntinit.c BOOL InitializeService(); // functions in ntmagnus.c NSAPI_PUBLIC int magnus_init(); NSAPI_PUBLIC void magnus_restart(int fs); NSAPI_PUBLIC int threads_init(); NSAPI_PUBLIC VOID SuspendHttpdService(); 389-admin-1.1.35/include/nt/messages.h000066400000000000000000000262321220472121400172360ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* Microsoft Developer Support Copyright (c) 1992 Microsoft Corporation This file contains the message definitions for the Win32 messages.exe sample program. ------------------------------------------------------------------------- HEADER SECTION The header section defines names and language identifiers for use by the message definitions later in this file. The MessageIdTypedef, SeverityNames, FacilityNames, and LanguageNames keywords are optional and not required. The MessageIdTypedef keyword gives a typedef name that is used in a type cast for each message code in the generated include file. Each message code appears in the include file with the format: #define name ((type) 0xnnnnnnnn) The default value for type is empty, and no type cast is generated. It is the programmer's responsibility to specify a typedef statement in the application source code to define the type. The type used in the typedef must be large enough to accomodate the entire 32-bit message code. The SeverityNames keyword defines the set of names that are allowed as the value of the Severity keyword in the message definition. The set is delimited by left and right parentheses. Associated with each severity name is a number that, when shifted left by 30, gives the bit pattern to logical-OR with the Facility value and MessageId value to form the full 32-bit message code. The default value of this keyword is: SeverityNames=( Success=0x0 Informational=0x1 Warning=0x2 Error=0x3 ) Severity values occupy the high two bits of a 32-bit message code. Any severity value that does not fit in two bits is an error. The severity codes can be given symbolic names by following each value with :name The FacilityNames keyword defines the set of names that are allowed as the value of the Facility keyword in the message definition. The set is delimited by left and right parentheses. Associated with each facility name is a number that, when shift it left by 16 bits, gives the bit pattern to logical-OR with the Severity value and MessageId value to form the full 32-bit message code. The default value of this keyword is: FacilityNames=( System=0x0FF Application=0xFFF ) Facility codes occupy the low order 12 bits of the high order 16-bits of a 32-bit message code. Any facility code that does not fit in 12 bits is an error. This allows for 4,096 facility codes. The first 256 codes are reserved for use by the system software. The facility codes can be given symbolic names by following each value with :name The LanguageNames keyword defines the set of names that are allowed as the value of the Language keyword in the message definition. The set is delimited by left and right parentheses. Associated with each language name is a number and a file name that are used to name the generated resource file that contains the messages for that language. The number corresponds to the language identifier to use in the resource table. The number is separated from the file name with a colon. The initial value of LanguageNames is: LanguageNames=(English=1:MSG00001) Any new names in the source file which don't override the built-in names are added to the list of valid languages. This allows an application to support private languages with descriptive names. ------------------------------------------------------------------------- MESSAGE DEFINITION SECTION Following the header section is the body of the Message Compiler source file. The body consists of zero or more message definitions. Each message definition begins with one or more of the following statements: MessageId = [number|+number] Severity = severity_name Facility = facility_name SymbolicName = name The MessageId statement marks the beginning of the message definition. A MessageID statement is required for each message, although the value is optional. If no value is specified, the value used is the previous value for the facility plus one. If the value is specified as +number then the value used is the previous value for the facility, plus the number after the plus sign. Otherwise, if a numeric value is given, that value is used. Any MessageId value that does not fit in 16 bits is an error. The Severity and Facility statements are optional. These statements specify additional bits to OR into the final 32-bit message code. If not specified they default to the value last specified for a message definition. The initial values prior to processing the first message definition are: Severity=Success Facility=Application The value associated with Severity and Facility must match one of the names given in the FacilityNames and SeverityNames statements in the header section. The SymbolicName statement allows you to associate a C/C++ symbolic constant with the final 32-bit message code. */ // // Values are 32 bit values layed out as follows: // // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 // +---+-+-+-----------------------+-------------------------------+ // |Sev|C|R| Facility | Code | // +---+-+-+-----------------------+-------------------------------+ // // where // // Sev - is the severity code // // 00 - Success // 01 - Informational // 10 - Warning // 11 - Error // // C - is the Customer code flag // // R - is a reserved bit // // Facility - is the facility code // // Code - is the facility's status code // // // Define the facility codes // #define FACILITY_SYSTEM 0x0 #define FACILITY_STARTUP 0x5 #define FACILITY_RUNTIME 0x1 #define FACILITY_REGISTRY 0x7 #define FACILITY_NETWORK 0x4 #define FACILITY_SERVICE 0x3 #define FACILITY_FILESYSTEM 0x6 #define FACILITY_CGI 0x2 // // Define the severity codes // #define STATUS_SEVERITY_WARNING 0x2 #define STATUS_SEVERITY_SUCCESS 0x0 #define STATUS_SEVERITY_INFORMATIONAL 0x1 #define STATUS_SEVERITY_ERROR 0x3 // // MessageId: MSG_BAD_CONF_INIT // // MessageText: // // Netsite:%1 %2 // #define MSG_BAD_CONF_INIT ((DWORD)0xC0050001L) // // MessageId: MSG_BAD_EREPORT_INIT // // MessageText: // // Netsite:%1 %2 // #define MSG_BAD_EREPORT_INIT ((DWORD)0xC0050002L) // // MessageId: MSG_BAD_STARTUP // // MessageText: // // Netsite:%1 %2 // #define MSG_BAD_STARTUP ((DWORD)0xC0050003L) // // MessageId: MSG_BAD_WINSOCK_INIT // // MessageText: // // Netsite Initialization:%1 %2 // #define MSG_BAD_WINSOCK_INIT ((DWORD)0xC0050004L) // // MessageId: MSG_BAD_CGISEM_CREATE // // MessageText: // // Netsite Initialization:%1 %2 // #define MSG_BAD_CGISEM_CREATE ((DWORD)0xC0050005L) // // MessageId: MSG_BAD_PROCESSSEM_CREATE // // MessageText: // // Netsite:Initialization:%1 %2 // #define MSG_BAD_PROCESSSEM_CREATE ((DWORD)0xC0050006L) // // MessageId: MSG_STARTUP_SUCCESSFUL // // MessageText: // // Netsite:%1 %2 // #define MSG_STARTUP_SUCCESSFUL ((DWORD)0x00050007L) // // MessageId: MSG_BAD_REGISTRY_PARAMETER // // MessageText: // // Netsite:%1 %2 // #define MSG_BAD_REGISTRY_PARAMETER ((DWORD)0x80050008L) // // MessageId: MSG_BAD_GENERAL_FUNCTION // // MessageText: // // Netsite:Execution of Initialization Function failed %1 %2 // #define MSG_BAD_GENERAL_FUNCTION ((DWORD)0xC0050009L) // // MessageId: MSG_BAD_SETCIPHERS // // MessageText: // // Netsite: %1 %2 // #define MSG_BAD_SETCIPHERS ((DWORD)0xC0050010L) // // MessageId: MSG_BAD_REGISTRY_KEY_OPEN // // MessageText: // // Netsite Initialization:Open of %1 %2 // #define MSG_BAD_REGISTRY_KEY_OPEN ((DWORD)0xC0050011L) // // MessageId: MSG_BAD_REGISTRY_KEY_ENUM // // MessageText: // // Netsite Initialization:Enumeration of %1 %2 // #define MSG_BAD_REGISTRY_KEY_ENUM ((DWORD)0xC0050012L) // // MessageId: MSG_BAD_REGISTRY_VALUE_ENUM // // MessageText: // // Netsite Initialization:Enumeration of Values of %1 %2 // #define MSG_BAD_REGISTRY_VALUE_ENUM ((DWORD)0xC0050013L) // // MessageId: MSG_BAD_OBJECT_VALUE // // MessageText: // // Netsite startup:Use Values "name" or "ppath" for object key.Incorrect Parameter %1 %2 // #define MSG_BAD_OBJECT_VALUE ((DWORD)0xC0050014L) // // MessageId: MSG_BAD_PBLOCK // // MessageText: // // Netsite startup:Could not enter Parameter %1 %2 // #define MSG_BAD_PBLOCK ((DWORD)0xC0050015L) // // MessageId: MSG_BAD_CLIENT_VALUE // // MessageText: // // Netsite startup:Use Values "dns" or "ip" for client key.Incorrect Parameter %1 %2 // #define MSG_BAD_CLIENT_VALUE ((DWORD)0xC0050016L) // // MessageId: MSG_BAD_DIRECTIVE // // MessageText: // // Netsite startup:Incorrect Directive Value %1 %2 // #define MSG_BAD_DIRECTIVE ((DWORD)0xC0050017L) // // MessageId: MSG_BAD_PARAMETER // // MessageText: // // Netsite startup:Incorrect Parameter %1 %2 // #define MSG_BAD_PARAMETER ((DWORD)0xC0050018L) // // MessageId: MSG_WD_RESTART // // MessageText: // // Web Server: %1 // The server terminated abnormally with error code %2. // An attempt will be made to restart it. // #define MSG_WD_RESTART ((DWORD)0xC0050019L) // // MessageId: MSG_WD_STARTFAILED // // MessageText: // // Web Server: %1 // The server could not be started. // Command line used: %2 // #define MSG_WD_STARTFAILED ((DWORD)0xC005001AL) // // MessageId: MSG_WD_BADPASSWORD // // MessageText: // // Web Server: %1 // Incorrect SSL password entered. // #define MSG_WD_BADPASSWORD ((DWORD)0xC005001BL) // // MessageId: MSG_WD_BADCMDLINE // // MessageText: // // Web Server: %1 // Invalid command line specified: %2 // #define MSG_WD_BADCMDLINE ((DWORD)0xC005001CL) // // MessageId: MSG_WD_STRING // // MessageText: // // Web Server: %1 // %2 // #define MSG_WD_STRING ((DWORD)0xC005001DL) // // MessageId: MSG_WD_REGISTRY // // MessageText: // // Web Server: %1 // Could not open registry key: %2 // #define MSG_WD_REGISTRY ((DWORD)0xC005001EL) // // MessageId: MSG_CRON_STARTFAILED // // MessageText: // // Web Server: %1 // The scheduled job (%2) could not be started. // #define MSG_CRON_STARTFAILED ((DWORD)0xC005001FL) 389-admin-1.1.35/include/nt/nsapi.h000066400000000000000000000214611220472121400165400ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * Aruna Victor */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef void * (SafFunction)(); SafFunction **SafTable; __declspec(dllexport) int InitSafTable(SafFunction *Table); /* Functions from ntbuffer.c */ #define FILEBUF_OPEN 1 #define NETBUF_OPEN 2 #define FILEBUF_OPEN_NOSTAT 3 #define PIPEBUF_OPEN 4 #define PIPEBUF_CLOSE 5 #define FILEBUF_NEXT 6 #define NETBUF_NEXT 7 #define PIPEBUF_NEXT 8 #define FILEBUF_CLOSE 9 #define NETBUF_CLOSE 10 #define FILEBUF_GRAB 11 #define NETBUF_GRAB 12 #define PIPEBUF_GRAB 13 #define NETBUF_BUF2SD 14 #define FILEBUF_BUF2SD 15 #define PIPEBUF_BUF2SD 16 #define PIPEBUF_NETBUF2SD 17 /* Functions from daemon.h */ #define NTDAEMON_RUN 18 #define CHILD_STATUS 19 /* Functions from file.h */ #define SYSTEM_FREAD 20 #define SYSTEM_PREAD 21 #define SYSTEM_FOPENRO 22 #define SYSTEM_FOPENWA 23 #define SYSTEM_FOPENRW 24 #define SYSTEM_FCLOSE 25 #define SYSTEM_NOCOREDUMPS 26 #define SYSTEM_FWRITE 27 #define SYSTEM_FWRITE_ATOMIC 28 #define SYSTEM_WINERR 29 #define SYSTEM_WINSOCKERR 30 #define FILE_NOTFOUND 31 #define SYSTEM_STAT 32 #define SYSTEM_INITLOCK 33 #define FILE_UNIX2LOCAL 34 #define DIR_OPEN 35 #define DIR_READ 36 #define DIR_CLOSE 37 /* Functions from sem.h */ #define SEM_INIT 40 #define SEM_TERMINATE 41 #define SEM_GRAB 42 #define SEM_TGRAB 43 #define SEM_RELEASE 44 /* Functions from session.h */ #define SESSION_CREATE 45 #define SESSION_FREE 46 #define SESSION_DNS_LOOKUP 47 /* Functions from cinfo.h */ #define CINFO_INIT 70 #define CINFO_TERMINATE 71 #define CINFO_MERGE 72 #define CINFO_FIND 73 #define CINFO_LOOKUP 74 #define CINFO_DUMP_DATABASE 75 /* Functions from ereport.h */ #define EREPORT 80 #define EREPORT_INIT 81 #define EREPORT_TERMINATE 82 #define EREPORT_GETFD 83 /* Functions from minissl.h */ #define SSL_CLOSE 90 #define SSL_SOCKET 91 #define SSL_GET_SOCKOPT 92 #define SSL_SET_SOCKOPT 93 #define SSL_BIND 94 #define SSL_LISTEN 95 #define SSL_ACCEPT 96 #define SSL_READ 97 #define SSL_WRITE 98 #define SSL_GETPEERNAME 99 /* Functions from net.h */ #define NET_BIND 110 #define NET_READ 111 #define NET_WRITE 112 #define NET_FIND_FQDN 113 #define NET_IP2HOST 114 #define NET_SENDMAIL 115 /* Functions from pblock.h */ #define PARAM_CREATE 120 #define PARAM_FREE 121 #define PBLOCK_CREATE 122 #define PBLOCK_FREE 123 #define PBLOCK_FINDVAL 124 #define PBLOCK_NVINSERT 125 #define PBLOCK_NNINSERT 126 #define PBLOCK_PINSERT 127 #define PBLOCK_STR2PBLOCK 128 #define PBLOCK_PBLOCK2STR 129 #define PBLOCK_COPY 130 #define PBLOCK_PB2ENV 131 #define PBLOCK_FR 132 /* Functions from systhr.h */ #define SYSTHREAD_START 133 #define SYSTHREAD_ATTACH 134 #define SYSTHREAD_TERMINATE 135 #define SYSTHREAD_SLEEP 136 #define SYSTHREAD_INIT 137 #define SYSTHREAD_NEWKEY 138 #define SYSTHREAD_GETDATA 139 #define SYSTHREAD_SETDATA 140 /* Functions from shmem.h */ #define SHMEM_ALLOC 141 #define SHMEM_FREE 142 /* Functions from eventlog.h */ #define INITIALIZE_ADMIN_LOGGING 143 #define INITIALIZE_HTTPD_LOGGING 144 #define INITIALIZE_HTTPS_LOGGING 145 #define TERMINATE_ADMIN_LOGGING 146 #define TERMINATE_HTTPD_LOGGING 147 #define TERMINATE_HTTPS_LOGGING 148 #define LOG_ERROR_EVENT 149 /* Functions from shexp.h */ #define SHEXP_VALID 160 #define SHEXP_MATCH 161 #define SHEXP_CMP 162 #define SHEXP_CASECMP 163 /* Functions from systems.h */ #define UTIL_STRCASECMP 170 #define UTIL_STRNCASECMP 171 /* Functions from util.h */ #define UTIL_GETLINE 180 #define UTIL_ENV_CREATE 181 #define UTIL_ENV_STR 182 #define NTUTIL_ENV_STR 183 #define UTIL_ENV_REPLACE 184 #define UTIL_ENV_FREE 185 #define UTIL_ENV_FIND 186 #define UTIL_HOSTNAME 187 #define UTIL_CHDIR2PATH 188 #define UTIL_IS_MOZILLA 189 #define UTIL_IS_URL 190 #define UTIL_LATER_THAN 191 #define UTIL_URI_IS_EVIL 192 #define UTIL_URI_PARSE 193 #define UTIL_URI_UNESCAPE 194 #define UTIL_URI_ESCAPE 195 #define UTIL_URL_ESCAPE 196 #define UTIL_SH_ESCAPE 197 #define UTIL_ITOA 198 #define UTIL_VSPRINTF 199 #define UTIL_SPRINTF 200 #define UTIL_VSNPRINTF 201 #define UTIL_SNPRINTF 202 /* Functions from magnus.h */ #define MAGNUS_ATRESTART 203 /* Functions from conf.h */ #define CONF_INIT 207 #define CONF_TERMINATE 208 #define CONF_GETGLOBALS 209 #define CONF_VARS2DAEMON 210 /* Functions from req.h */ #define REQUEST_CREATE 211 #define REQUEST_FREE 212 #define REQUEST_RESTART_INTERNAL 213 #define REQUEST_TRANSLATE_URI 214 #define REQUEST_HEADER 215 #define REQUEST_STAT_PATH 216 #define REQUEST_URI2PATH 217 #define REQUEST_PATHCHECKS 218 #define REQUEST_FILEINFO 219 #define REQUEST_HANDLE_PROCESSED 220 #define REQUEST_SERVICE 221 #define REQUEST_HANDLE 222 /* Functions from object.h */ #define DIRECTIVE_NAME2NUM 223 #define DIRECTIVE_NUM2NAME 224 #define OBJECT_CREATE 225 #define OBJECT_FREE 226 #define OBJECT_ADD_DIRECTIVE 227 #define OBJECT_EXECUTE 228 /* Functions from objset.h */ #define OBJSET_SCAN_BUFFER 230 #define OBJSET_CREATE 231 #define OBJSET_FREE 232 #define OBJSET_FREE_SETONLY 233 #define OBJSET_NEW_OBJECT 234 #define OBJSET_ADD_OBJECT 235 #define OBJSET_FINDBYNAME 236 #define OBJSET_FINDBYPPATH 237 /* Functions from http.h */ #define HTTP_PARSE_REQUEST 240 #define HTTP_SCAN_HEADERS 241 #define HTTP_START_RESPONSE 242 #define HTTP_HDRS2_ENV 243 #define HTTP_STATUS 244 #define HTTP_SET_FINFO 245 #define HTTP_DUMP822 246 #define HTTP_FINISH_REQUEST 247 #define HTTP_HANDLE_SESSION 248 #define HTTP_URI2URL 249 /* Functions from func.h */ #define FUNC_INIT 251 #define FUNC_FIND 252 #define FUNC_EXEC 253 #define FUNC_INSERT 254 /* Functions from log.h */ #define LOG_ERROR 260 /* robm Functions added in 2.0 */ #define SYSTEM_FOPENWT 261 #define SYSTEM_MALLOC 262 #define SYSTEM_FREE 263 #define SYSTEM_REALLOC 264 #define SYSTEM_STRDUP 265 #define UPLOAD_FILE 266 #define CRIT_INIT 267 #define CRIT_ENTER 268 #define CRIT_EXIT 269 #define CRIT_TERMINATE 270 #define SYSTHREAD_CURRENT 271 #define NET_ACCEPT 272 #define NET_CLOSE 273 #define NET_CONNECT 274 #define NET_IOCTL 275 #define NET_LISTEN 276 #define NET_SETSOCKOPT 277 #define NET_SOCKET 278 /* Daryoush Functions added in 3.0 */ #define NSORB_INIT 279 #define NSORB_INST_ID 280 #define NSORB_GET_INST 281 #define NSORB_REG_INT 282 #define NSORB_FIND_OBJ 283 #define NSORB_GET_INTERFACE 284 #define ARR_NEW 285 #define ARR_FREE 286 #define ARR_GET_OBJ 288 #define ARR_GET_LAST_OBJ 289 #define ARR_NEW_OBJ 290 #define ARR_GET_NUM_OBJ 291 #define ARR_RESET 292 #define ARR_REMOVEOBJ 293 #define ARR_GET_OBJ_NUM 294 #define CM_BT_NEW 295 #define CM_BT_ADD_NODE 296 #define CM_BT_FIND_NODE 297 #define CM_BT_DEL_NODE 298 #define CM_BT_DESTROY 299 #define CM_BT_GET_NUM 300 #define CM_BT_TRAVEL 301 #define CM_STR_NEW 302 #define CM_STR_ADD 303 #define CM_STR_REL 304 #define CM_STR_FREE 305 #define CM_STR_GET 306 #define CM_STR_SIZE 307 #define CM_COPY_STR 308 #define CM_MAKE_UID 309 #define MS_NEW 310 #define MS_CREATE 311 389-admin-1.1.35/include/nt/nsserver.h000066400000000000000000000034351220472121400172760ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /**************************************************************************** * * nsserver.h * ***************************************************************************/ #define NSDRV_LAUNCH_NAVIGATOR DRV_USER #define NSDRV_DRIVERS_REFRESH DRV_USER+1 #define NSDRV_DRIVERS_INSTALLED DRV_USER+2 #define NSDRV_DRIVER_STATUS DRV_USER+3 #define NSDRV_DRIVER_START DRV_USER+4 #define NSDRV_DRIVER_STOP DRV_USER+5 #define NSDRV_DRIVER_STARTUP DRV_USER+6 typedef enum { SERVER_TYPE_ADMIN, SERVER_TYPE_FASTTRACK, } SERVER_TYPE; typedef enum { SERVER_STATUS_STOPPED, SERVER_STATUS_RUNNING, } SERVER_STATUS; typedef enum { SERVER_STARTUP_DISABLED, SERVER_STARTUP_MANUAL, SERVER_STARTUP_AUTOMATIC, } SERVER_STARTUP; typedef struct { int serverNumber; SERVER_TYPE type; SERVER_STATUS status; SERVER_STARTUP startup; char serverID[1]; } SERVER_INFO, * SERVER_INFO_PTR; 389-admin-1.1.35/include/nt/regparms.h000066400000000000000000000104571220472121400172510ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ //--------------------------------------------------------------------------// // // // Name: regparms.h // // Platforms: WIN32 // // ...................................................................... // // This module contains registry key definations used throughout the // // server. // // ...................................................................... // // //--------------------------------------------------------------------------// #define KEY_COMPANY BRAND #define KEY_APP_PATH "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" #define KEY_RUN_ONCE "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce" #define KEY_SNMP_SERVICE "SNMP\\Parameters\\ExtensionAgents" #define KEY_EVENTLOG_MESSAGES "EventLogMessages" #define VALUE_IMAGE_PATH "ImagePath" #define VALUE_CONFIG_PATH "ConfigurationPath" #define VALUE_ROOT_PATH "RootPath" #define VALUE_APP_PATH "Pathname" #define PROGRAM_GROUP_NAME KEY_COMPANY " Server Family" #define STR_PRODUCT_TYPE "Server" #define STR_EXE ".exe" /* Admin IDs */ #define ADM_ID_PRODUCT "admin" #define ADM_NAME_SHORT "Administration" #define ADM_VERSION ADM_PACKAGE_VERSION #define ADM_NAME_VERSION "Administration " ADM_VERSION #define ADM_NAME_SERVER "Administration Server" #define ADM_NAME_FULL KEY_COMPANY " " ADM_NAME_SERVER #define ADM_NAME_FULL_VERSION ADM_NAME_FULL " " ADM_VERSION #define ADM_NAME_SERVICE ADM_NAME_FULL_VERSION #define ADM_EXE "ns-admin.exe" #define ADM_EXE_START "admin.exe" #define ADM_ID_SERVICE "admin-serv" #define ADM_KEY_ROOT "Administration\\" ADM_VERSION #define ADM_DIR_ROOT "admin" #define ADM_NAME_UNINSTALL "Uninstall Administration Server " ADM_VERSION /* original definitions */ // Upper-level registry parameters #define SERVICE_NAME ADM_ID_SERVICE #define EVENTLOG_APPNAME ADM_NAME_VERSION #define SERVICE_EXE ADM_EXE #define SERVICE_PREFIX ADM_NAME_VERSION #define SVR_ID_PRODUCT ADM_ID_PRODUCT #define SVR_NAME_SHORT ADM_NAME_SHORT #define SVR_VERSION ADM_VERSION #define SVR_NAME_VERSION ADM_NAME_VERSION #define SVR_NAME_SERVER ADM_NAME_SERVER #define SVR_NAME_FULL ADM_NAME_FULL #define SVR_NAME_FULL_VERSION ADM_NAME_FULL_VERSION #define SVR_NAME_SERVICE ADM_NAME_SERVICE #define SVR_EXE ADM_EXE #define SVR_EXE_START ADM_EXE_START #define SVR_ID_SERVICE ADM_ID_SERVICE #define SVR_KEY_ROOT ADM_KEY_ROOT #define SVR_DIR_ROOT ADM_DIR_ROOT #define SVR_NAME_UNINSTALL ADM_NAME_UNINSTALL #define VERSION_KEY "CurrentVersion" // Configuration Parameters #define SOFTWARE_KEY "Software" // NT Perfmon DLL entries #define KEY_PERFORMANCE "Performance" #define PERF_MICROSOFT_KEY "SOFTWARE\\Microsoft\\Windows NT\\Perflib\\009" #define PERF_COUNTER_KEY "Counter" #define PERF_HELP_KEY "Help" #define PERF_OPEN_FUNCTION "OpenNSPerformanceData" #define PERF_COLLECT_FUNCTION "CollectNSPerformanceData" #define PERF_CLOSE_FUNCTION "CloseNSPerformanceData" #define PERF_CTR_INI "nsctrs.ini" 389-admin-1.1.35/include/nt/resource.h000066400000000000000000000035711220472121400172570ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by netsite.rc // #define IDB_BITMAP1 101 #define DLG_STARTUP_ERROR 101 #define IDI_NETSITE 102 #define IDI_ICON1 104 #define DLG_GETPASSWORD 106 #define IDI_ICON2 107 #define IDD_PASSWORD 108 #define IDI_KEY 109 #define IDD_PIN 110 #define IDEDIT 1000 #define IDC_ERRORLOG 1001 #define ID_EXIT 1001 #define IDC_ERRORMSG 1002 #define IDC_STARTUP_ERROR 1003 #define IDC_STATIC -1 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 110 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1002 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif 389-admin-1.1.35/include/ntos.h000066400000000000000000000131071220472121400157660ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /********************************************************************** * ntOS.h - functionality used bt NT Operating System * **********************************************************************/ #ifndef _ntos_h #define _ntos_h #ifdef __cplusplus extern "C" { /* Assume C declarations for C++ */ #endif /* __cplusplus */ #ifdef ISHIELD_DLL #define NS_WINAPI WINAPI #else #define NS_WINAPI #endif /* prototypes for info.c */ typedef enum { OS_WIN95, OS_WINNT, OS_WIN32S, OS_UNKNOWN } OS_TYPE; typedef enum { PROCESSOR_I386, PROCESSOR_ALPHA, PROCESSOR_MIPS, PROCESSOR_PPC, PROCESSOR_UNKNOWN } PROCESSOR_TYPE; OS_TYPE NS_WINAPI INFO_GetOperatingSystem (); DWORD NS_WINAPI INFO_GetOSMajorVersion (); DWORD NS_WINAPI INFO_GetOSMinorVersion (); void NS_WINAPI OS_GetComputerName (LPTSTR computerName, int nComputerNameLength ); PROCESSOR_TYPE NS_WINAPI OS_GetProcessor (); DWORD NS_WINAPI INFO_GetOSServicePack (); /* prototypes for path.c */ DWORD NS_WINAPI PATH_RemoveRelative ( char * path ); DWORD NS_WINAPI PATH_ConvertNtSlashesToUnix( LPCTSTR lpszNtPath, LPSTR lpszUnixPath ); DWORD NS_WINAPI PATH_GetNextFileInDirectory ( long hFile, char * path, char * lpFileName ); DWORD NS_WINAPI PATH_GetNextSubDirectory( long hFile, char * path, char * lpSubDirectoryName, char * lpSubDirectoryPrefix ); DWORD NS_WINAPI PATH_DeleteRecursively ( char * path ); /* prototypes for registry.c */ BOOL NS_WINAPI REG_CheckIfKeyExists( HKEY hKey, LPCTSTR registryKey ); BOOL NS_WINAPI REG_CreateKey( HKEY hKey, LPCTSTR registryKey ); BOOL NS_WINAPI REG_DeleteKey( HKEY hKey, LPCTSTR registryKey ); BOOL NS_WINAPI REG_DeleteValue( HKEY hKey, LPCTSTR registryKey, LPCSTR valueName ); BOOL NS_WINAPI REG_GetRegistryParameter( HKEY hKey, LPCTSTR registryKey, LPTSTR QueryValueName, LPDWORD ValueType, LPBYTE ValueBuffer, LPDWORD ValueBufferSize ); BOOL NS_WINAPI REG_SetRegistryParameter( HKEY hKey, LPCTSTR registryKey, LPTSTR valueName, DWORD valueType, LPCTSTR ValueString, DWORD valueStringLength ); BOOL NS_WINAPI REG_GetSubKeysInfo( HKEY hKey, LPCTSTR registryKey, LPDWORD lpdwNumberOfSubKeys, LPDWORD lpdwMaxSubKeyLength ); BOOL NS_WINAPI REG_GetSubKey( HKEY hKey, LPCTSTR registryKey, DWORD nSubKeyIndex, LPTSTR registrySubKeyBuffer, DWORD subKeyBufferSize ); /* prototypes for service.c */ #define SERVRET_ERROR 0 #define SERVRET_INSTALLED 1 #define SERVRET_STARTING 2 #define SERVRET_STARTED 3 #define SERVRET_STOPPING 4 #define SERVRET_REMOVED 5 DWORD NS_WINAPI SERVICE_GetNTServiceStatus(LPCTSTR szServiceName, LPDWORD lpLastError ); DWORD NS_WINAPI SERVICE_InstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ); DWORD NS_WINAPI SERVICE_ReinstallNTService(LPCTSTR szServiceName, LPCTSTR szServiceDisplayName, LPCTSTR szServiceExe ); DWORD NS_WINAPI SERVICE_RemoveNTService(LPCTSTR szServiceName); DWORD NS_WINAPI SERVICE_StartNTService(LPCTSTR szServiceName); DWORD NS_WINAPI SERVICE_StartNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError); DWORD NS_WINAPI SERVICE_StopNTService(LPCTSTR szServiceName); DWORD NS_WINAPI SERVICE_StopNTServiceAndWait(LPCTSTR szServiceName, LPDWORD lpdwLastError); /* prototypes for pmddeml.c */ DWORD PMDDEML_Open ( void ); BOOL PMDDEML_Close ( DWORD idInst ); BOOL PMDDEML_CreateProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); BOOL PMDDEML_DeleteProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); BOOL PMDDEML_ShowProgramManagerGroup ( DWORD idInst, LPCTSTR lpszGroupName ); BOOL PMDDEML_AddIconToProgramManagerGroup ( DWORD idInst, LPCTSTR lpszCmdLine, LPCTSTR lpszTitle, LPCTSTR lpszIconPath, LPCTSTR lpszWorkingDir, BOOL bReplace ); BOOL PMDDEML_DeleteIconInProgramManagerGroup ( DWORD idInst, LPCTSTR lpszTitle ); BOOL PMDDEML_GetProgramGroupInfo(DWORD idInst, LPSTR lpProgramGroup, char *szBuffer, DWORD cbBuffer); /* prototypes for tcpip.c */ #define TCPIP_NO_ERROR 0 #define TCPIP_UNSUPPORTED_OS 1 #define TCPIP_NO_WINSOCK_DLL 2 #define TCPIP_NO_TCPIP 3 #define TCPIP_NETWORK_DOWN 4 /* The Windows Sockets implementation has detected that the network subsystem has failed. */ #define TCPIP_NETWORK_ERROR 5 #define TCPIP_HOST_NOT_FOUND 6 /* Authoritative Answer Host not found. */ #define TCPIP_HOST_SERVER_DOWN 7 /* Non-Authoritative Host not found, or SERVERFAIL */ #define TCPIP_HOST_VALID_NAME 8 /* Valid name, no data record of requested type. */ DWORD NS_WINAPI TCPIP_GetDefaultHostName( LPTSTR lpszFullHostName, LPTSTR lpszHostName, LPTSTR lpszDomainName ); DWORD NS_WINAPI TCPIP_VerifyHostName( LPCTSTR lpszHostName ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif 389-admin-1.1.35/include/public/000077500000000000000000000000001220472121400161065ustar00rootroot00000000000000389-admin-1.1.35/include/public/base/000077500000000000000000000000001220472121400170205ustar00rootroot00000000000000389-admin-1.1.35/include/public/base/buffer.h000066400000000000000000000021331220472121400204410ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_BASE_BUFFER_H #define PUBLIC_BASE_BUFFER_H /* * File: buffer.h * * Description: * * Deprecated include file. */ #ifndef PUBLIC_NSAPI_H #include "../nsapi.h" #endif /* !PUBLIC_NSAPI_H */ #endif /* !PUBLIC_BASE_BUFFER_H */ 389-admin-1.1.35/include/public/base/file.h000066400000000000000000000021231220472121400201060ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_BASE_FILE_H #define PUBLIC_BASE_FILE_H /* * File: file.h * * Description: * * Deprecated include file. */ #ifndef PUBLIC_NSAPI_H #include "../nsapi.h" #endif /* !PUBLIC_NSAPI_H */ #endif /* !PUBLIC_BASE_FILE_H */ 389-admin-1.1.35/include/public/base/systems.h000066400000000000000000000133241220472121400207030ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_BASE_SYSTEMS_H #define PUBLIC_BASE_SYSTEMS_H #include /* * File: systems.h * * Description: * * This file defines various platform-dependent symbols, which are * used to configure platform-dependent aspects of the API. */ /* --- Begin native platform configuration definitions --- */ #if defined(AIX) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #define NEED_STRCASECMP #define NEED_STRNCASECMP #define TCPLEN_T size_t #elif defined(BSDI) #define BSD_FLOCK #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(HPUX) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK /* warning: mmap doesn't work under 9.04 */ #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined (IRIX) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(LINUX) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(NCR) #define CASECMPARG_T unsigned #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define NEED_STRCASECMP #define NEED_STRNCASECMP #ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(NEC) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define NEED_STRCASECMP #define NEED_STRNCASECMP #ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(OSF1) #undef BSD_FLOCK #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(SCO) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(SNI) #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define NEED_STRCASECMP #define NEED_STRNCASECMP #ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define socketpair(a,b,c,d) pipe(d) #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(SOLARIS) #undef FILE_UNIX /* avoid redefinition message */ #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS /* The Solaris routines return ENOSPC when too many semaphores are SEM_UNDO. */ #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined (SONY) #define FILE_UNIX #define FILE_UNIX_MMAP #define NEED_STRCASECMP #define NEED_STRNCASECMP #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(SUNOS4) #define BSD_FLOCK #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #elif defined(UNIXWARE) #define CASECMPARG_T const #define FILE_UNIX #define FILE_UNIX_MMAP #define MALLOC_POOLS #define NEED_STRCASECMP #define NEED_STRNCASECMP #ifndef S_ISLNK #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #endif #define SEM_FLOCK #define SHMEM_UNIX_MMAP #define ZERO(ptr,len) memset(ptr,0,len) #define TCPLEN_T size_t #elif defined (XP_WIN32) /* Windows NT */ #include #include typedef void* PASSWD; #define caddr_t PCHAR #define CASECMPARG_T const #define FILE_WIN32 #define FILE_WIN32_MMAP #define MALLOC_POOLS #define NEED_STRCASECMP #define NEED_STRNCASECMP #define NET_WINSOCK #define NSAPI_PUBLIC __declspec(dllexport) /* The stat call under NT doesn't define these macros */ #ifndef S_ISDIR #define S_ISDIR(mode) ((mode&S_IFMT) == S_IFDIR) #endif #ifndef S_ISREG #define S_ISREG(mode) ((mode&S_IFMT) == S_IFREG) #endif #ifndef S_ISLNK #define S_ISLNK(x) (0) #endif #define SEM_WIN32 #define SHMEM_WIN32_MMAP #define ZERO(ptr, len) ZeroMemory(ptr, len) #endif /* Windows NT */ #ifndef NSPR_BEGIN_EXTERN_C #ifdef __cplusplus #define NSPR_BEGIN_EXTERN_C extern "C" { #define NSPR_END_EXTERN_C } #else #define NSPR_BEGIN_EXTERN_C #define NSPR_END_EXTERN_C #endif /* __cplusplus */ #endif /* !NSPR_BEGIN_EXTERN_C */ #ifndef TCPLEN_T #define TCPLEN_T int #endif #ifndef NSAPI_PUBLIC #define NSAPI_PUBLIC #endif /* !NSAPI_PUBLIC */ #if defined(NEED_STRCASECMP) || defined(NEED_STRNCASECMP) #ifndef CASECMPARG_T #define CASECMPARG_T const #endif /* !CASECMPARG_T */ #endif /* NEED_STRCASECMP || NEED_STRNCASECMP */ #if !defined(ZERO) && defined(HAVE_MEMSET) #define ZERO(ptr, len) memset(ptr,0,len) #endif #endif /* PUBLIC_BASE_SYSTEMS_H */ 389-admin-1.1.35/include/public/base/util.h000066400000000000000000000021221220472121400201430ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_BASE_UTIL_H #define PUBLIC_BASE_UTIL_H /* * File: util.h * * Description: * * Deprecated include file. */ #ifndef PUBLIC_NSAPI_H #include "../nsapi.h" #endif /* !PUBLIC_NSAPI_H */ #endif /* PUBLIC_BASE_UTIL_H */ 389-admin-1.1.35/include/public/netsite.h000066400000000000000000000021151220472121400177310ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_NETSITE_H #define PUBLIC_NETSITE_H /* * File: netsite.h * * Description: * * Deprecated include file. */ #ifndef PUBLIC_NSAPI_H #include "nsapi.h" #endif /* !PUBLIC_NSAPI_H */ #endif /* !PUBLIC_NETSITE_H */ 389-admin-1.1.35/include/public/nsapi.h000066400000000000000000000175671220472121400174110ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #ifndef PUBLIC_NSAPI_H #define PUBLIC_NSAPI_H /* * File: nsapi.h * * Description: * * This file defines an interface for extending the server with * in-process plug-ins. */ #include "base/systems.h" #if defined(FILE_UNIX_MMAP) || defined(FILE_WIN32_MMAP) || defined(HAVE_MMAP) #define FILE_MMAP #if !defined(FILE_UNIX_MMAP) && (defined(HAVE_MMAP) && !defined(XP_WIN32)) #define FILE_UNIX_MMAP #endif #endif /* --- Begin miscellaneous definitions --- */ /* Carriage return and line feed */ #define CR 13 #define LF 10 /* Return codes from file I/O routines */ #define IO_OKAY 1 #define IO_ERROR -1 #define IO_EOF 0 #define NETBUF_EOF -1 #define NETBUF_ERROR -2 /* The disk page size on this machine. */ #define FILE_BUFFERSIZE 4096 #ifdef XP_UNIX #define FILE_PATHSEP '/' #define FILE_PARENT "../" #elif defined(XP_WIN32) #define FILE_PATHSEP '/' #define FILE_PARENT "..\\" #endif /* XP_WIN32 */ /* * The REQ_ return codes. These codes are used to determine what the server * should do after a particular module completes its task. * * Func type functions return these as do many internal functions. */ /* The function performed its task, proceed with the request */ #define REQ_PROCEED 0 /* The entire request should be aborted: An error occurred */ #define REQ_ABORTED -1 /* The function performed no task, but proceed anyway. */ #define REQ_NOACTION -2 /* Tear down the session and exit */ #define REQ_EXIT -3 /* Restart the entire request-response process */ #define REQ_RESTART -4 /* --- End miscellaneous definitions --- */ /* --- Begin native platform includes --- */ #if defined(FILE_UNIX) || defined(FILE_UNIX_MMAP) #include /* caddr_t */ #include #include #include #endif #ifdef FILE_WIN32 #include #endif /* FILE_WIN32 */ #ifdef NET_WINSOCK #include struct iovec { char *iov_base; unsigned iov_len; }; #else #if !defined(SUNOS4) && !defined(HPUX) #include #endif #include /* struct timeval */ #include #include /* sockaddr and in_addr */ #include #endif /* NET_WINSOCK */ #include #include /* isspace */ #include #include #include #include #include #include #ifdef XP_UNIX #include #include /* struct passwd */ #endif /* XP_UNIX */ #include "libadminutil/psetc.h" /* --- End native platform includes --- */ /* --- Begin type definitions --- */ #ifndef SYS_FILE_T typedef void *SYS_FILE; #define SYS_FILE_T void * #endif /* !SYS_FILE_T */ #define SYS_ERROR_FD ((SYS_FILE)-1) #ifndef SYS_NETFD_T typedef void *SYS_NETFD; #define SYS_NETFD_T void * #endif /* !SYS_NETFD_T */ /* Error value for a SYS_NETFD */ #ifndef SYS_NET_ERRORFD #define SYS_NET_ERRORFD ((SYS_NETFD)-1) #endif /* !SYS_NET_ERRORFD */ /* * Type: filebuffer, filebuf_t * * Description: * * This structure is used to represent a buffered file. On some * systems the file may be memory-mapped. A filebuffer is created * by filebuf_open(), and destroyed by filebuf_close(). * * Notes: * * Direct access to the members of this structure, not using * macros defined here, is discouraged. * * The filebuf alias that used to be defined for this type was * found to conflict with a C++ class of the same name, so it * has been renamed to filebuf_t. * * The inbuf field used to be (char *), but is now (unsigned char *) * to simplify handling of 8-bit data. The value returned by the * filebuf_getc() macro is the (unsigned char) casted to (int), or * an error code. Unfortunately, IO_EOF cannot be distinguished * from a zero byte, but a new function, filebuf_iseof(), is * provided that will indicate definitively whether EOF has been * reached. */ #ifdef FILE_MMAP /* Version of filebuffer when memory-mapped files are supported */ typedef struct { SYS_FILE fd; #ifdef FILE_UNIX_MMAP caddr_t fp; #else /* FILE_WIN32_MMAP */ HANDLE fdmap; char *fp; #endif /* FILE_UNIX_MMAP */ int len; unsigned char *inbuf; /* for buffer_grab */ int cursize; int pos; char *errmsg; } filebuffer; /* Return next character or IO_EOF */ #define filebuf_getc(b) ((b)->pos == (b)->len ? IO_EOF : (int)((b)->fp)[(b)->pos++]) #define filebuf_iseof(b) ((b)->pos == (b)->len) #else /* Version of filebuffer with no memory-mapped file support */ typedef struct { SYS_FILE fd; int pos, cursize, maxsize; unsigned char *inbuf; char *errmsg; } filebuffer; /* Return next character, IO_EOF, or IO_ERROR */ #define filebuf_getc(b) \ ((b)->pos != (b)->cursize ? (int)((b)->inbuf[(b)->pos++]) : filebuf_next(b,1)) #endif /* FILE_MMAP */ /* C++ streamio defines a filebuf class. */ typedef filebuffer filebuf_t; #ifdef XP_WIN32 /* Use a filebuffer to read data from a pipe */ #define pipebuf_getc(b) \ ((b)->pos != (b)->cursize ? (int)((b)->inbuf[(b)->pos++]) : pipebuf_next(b,1)) #endif /* XP_WIN32 */ #ifdef XP_UNIX typedef struct passwd *PASSWD; typedef DIR* SYS_DIR; typedef struct dirent SYS_DIRENT; #endif /* XP_UNIX */ #ifdef XP_WIN32 typedef struct { char *d_name; } dirent_s; typedef struct { HANDLE dp; WIN32_FIND_DATA fdata; dirent_s de; } dir_s; typedef dir_s* SYS_DIR; typedef dirent_s SYS_DIRENT; #endif /* XP_WIN32 */ /* --- End type definitions --- */ #ifndef FILE_MMAP #define filebuf_open_nostat(fd,sz,finfo) filebuf_open(fd,sz) #endif #ifdef XP_UNIX #define dir_open opendir #define dir_read readdir #define dir_close closedir #define dir_create(path) mkdir(path, 0755) #define dir_remove rmdir #define system_chdir chdir #define file_unix2local(path,p2) strcpy(p2,path) #endif /* XP_UNIX */ #ifdef XP_WIN32 #define dir_create _mkdir #define dir_remove _rmdir #define system_chdir SetCurrentDirectory #endif /* XP_WIN32 */ /* * Thread-safe variants of localtime and gmtime */ #define system_localtime(curtime, ret) util_localtime(curtime, ret) #define system_gmtime(curtime, ret) util_gmtime(curtime, ret) /* --- OBSOLETE ---------------------------------------------------------- * The following macros/functions are obsolete and are only maintained for * compatibility. Do not use them. 11-19-96 * ----------------------------------------------------------------------- */ #define SYS_STDERR STDERR_FILENO #ifdef XP_WIN32 typedef HANDLE pid_t; #define ERROR_PIPE \ (ERROR_BROKEN_PIPE | ERROR_BAD_PIPE |\ ERROR_PIPE_BUSY | ERROR_PIPE_LISTENING | ERROR_PIPE_NOT_CONNECTED) #define CONVERT_TO_PRINTABLE_FORMAT(Filename) \ { \ register char *s; \ if (Filename) \ for (s = Filename; *s; s++) \ if ( *s == '\\') \ *s = '/'; \ } #define CONVERT_TO_NATIVE_FS(Filename) \ { \ register char *s; \ if (Filename) \ for (s = Filename; *s; s++) \ if ( *s == '/') \ *s = '\\'; \ } #else /* !XP_WIN32 */ #endif /* XP_WIN32 */ #endif /* !PUBLIC_NSAPI_H */ 389-admin-1.1.35/install-sh000077500000000000000000000332551220472121400152210ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 389-admin-1.1.35/lib/000077500000000000000000000000001220472121400137535ustar00rootroot00000000000000389-admin-1.1.35/lib/base/000077500000000000000000000000001220472121400146655ustar00rootroot00000000000000389-admin-1.1.35/lib/base/file.cpp000066400000000000000000000331321220472121400163120ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * file.c: system specific functions for reading/writing files * * See file.h for formal definitions of what these functions do * * Rob McCool */ #include "base/file.h" #if defined(BSD_RLIMIT) || defined(HAVE_SETRLIMIT) #include #include #else #include #include #endif #ifdef XP_WIN32 #include /* time */ #include /* stat */ #include #include #include /* Removed for ns security integration #include */ #endif #include #include "private/pprio.h" #include "prlock.h" extern "C" char *nscperror_lookup(int err); /* --- globals -------------------------------------------------------------*/ /* PRFileDesc * SYS_ERROR_FD = NULL; */ const int errbuf_size = 256; const unsigned int LOCKFILERANGE=0x7FFFFFFF; PRLock *_atomic_write_lock = NULL; /* --------------------------------- stat --------------------------------- */ /* XXXMB - Can't convert to PR_GetFileInfo because we directly exported * the stat interface... Damn. */ NSAPI_PUBLIC int system_stat(char *path, struct stat *finfo) { #ifdef XP_WIN32 int chop, l; /* The NT stat is very peculiar about directory names. */ /* XXX aruna - there is a bug here, maybe in the C runtime. * Stating the same path in a separate program succeeds. From * jblack's profiling, this needs to be replaced by the Win32 * calls anyway.*/ l = strlen(path); if((path[l - 1] == '/') && (!(isalpha(path[0]) && (!strcmp(&path[1], ":/"))))) { chop = 1; path[--l] = '\0'; } else chop = 0; #endif /* XP_WIN32 */ #ifdef XP_UNIX if(stat(path, finfo) == -1) return -1; #else /* XP_WIN32 */ if(_stat(path, (struct _stat *)finfo) == -1) { /* XXXMB - this sucks; * try to convert to an error code we'll expect... */ switch(errno) { case ENOENT: PR_SetError(PR_FILE_NOT_FOUND_ERROR, errno); break; default: PR_SetError(PR_UNKNOWN_ERROR, errno); break; } return -1; } /* NT sets the time fields to -1 if it thinks that the file * is a device ( like com1.html, lpt1.html etc) In this case * simply set last modified time to the current time.... */ if (finfo->st_mtime == -1) { finfo->st_mtime = time(NULL); } if (finfo->st_atime == -1) { finfo->st_atime = 0; } if (finfo->st_ctime == -1) { finfo->st_ctime = 0; } if(chop) path[l++] = '/'; #endif /* XP_WIN32 */ if(S_ISREG(finfo->st_mode) && (path[strlen(path) - 1] == '/')) { /* File with trailing slash */ errno = ENOENT; return -1; } return 0; } NSAPI_PUBLIC int system_fread(SYS_FILE fd, char *buf, int sz) { /* XXXMB - this is the *one* function which does return a length * instead of the IO_ERROR/IO_OKAY. */ return PR_Read(fd, buf, sz); } NSAPI_PUBLIC int system_fwrite(SYS_FILE fd, char *buf, int sz) { int n,o,w; for(n=sz,o=0; n; n-=w,o+=w) { if((w = PR_Write(fd, &buf[o], n)) < 0) return IO_ERROR; } return IO_OKAY; } /* ---------------------------- Standard UNIX ----------------------------- */ #ifdef XP_UNIX #include /* flock */ NSAPI_PUBLIC int system_fwrite_atomic(SYS_FILE fd, char *buf, int sz) { int ret; #if 0 if(flock(fd,LOCK_EX) == -1) return IO_ERROR; #endif ret = system_fwrite(fd,buf,sz); #if 0 if(flock(fd,LOCK_UN) == -1) return IO_ERROR; /* ??? */ #endif return ret; } /* -------------------------- system_nocoredumps -------------------------- */ NSAPI_PUBLIC int system_nocoredumps(void) { #if defined(BSD_RLIMIT) || defined(HAVE_SETRLIMIT) struct rlimit rl; rl.rlim_cur = 0; rl.rlim_max = 0; return setrlimit(RLIMIT_CORE, &rl); #else signal(SIGQUIT, exit); signal(SIGILL, exit); signal(SIGTRAP, exit); signal(SIGABRT, exit); signal(SIGIOT, exit); signal(SIGEMT, exit); signal(SIGFPE, exit); signal(SIGBUS, exit); signal(SIGSEGV, exit); signal(SIGSYS, exit); return 0; #endif } #endif /* XP_UNIX */ /* --------------------------- file_setinherit ---------------------------- */ NSAPI_PUBLIC int file_setinherit(SYS_FILE fd, int value) { #if defined(XP_WIN32) int ret; // ret = SetHandleInformation((HANDLE)PR_FileDesc2NativeHandle(fd), 0, value?HANDLE_FLAG_INHERIT:0); // This function did nothing before since the mask was set to 0. ret = SetHandleInformation((HANDLE)PR_FileDesc2NativeHandle(fd), HANDLE_FLAG_INHERIT, value?HANDLE_FLAG_INHERIT:0); return ret==0?-1:0; #elif defined(XP_UNIX) int flags = 0; PRInt32 nativeFD; PRFileDesc *bottom = fd; while (bottom->lower != NULL) { bottom = bottom->lower; } nativeFD = PR_FileDesc2NativeHandle(bottom); #if 0 fprintf(stderr, "\nInfo(file_setinherit): Native file descriptor is %d\n", nativeFD); #endif flags = fcntl(nativeFD, F_GETFD, 0); if(flags == -1) return -1; if(value) flags &= (~FD_CLOEXEC); else flags |= FD_CLOEXEC; fcntl(nativeFD, F_SETFD, flags); return 0; /* Comment out for ns security/ nspr integration (HACK for NOW) int flags = fcntl(PR_FileDesc2NativeHandle(fd), F_GETFD, 0); if(flags == -1) return -1; if(value) flags &= (~FD_CLOEXEC); else flags |= FD_CLOEXEC; fcntl(PR_FileDesc2NativeHandle(fd), F_SETFD, flags); return 0; */ #endif } NSAPI_PUBLIC SYS_FILE system_fopenRO(char *p) { SYS_FILE f = PR_Open(p, PR_RDONLY, 0); if (!f) return SYS_ERROR_FD; return f; } NSAPI_PUBLIC SYS_FILE system_fopenWA(char *p) { SYS_FILE f = PR_Open(p, PR_RDWR|PR_CREATE_FILE|PR_APPEND, 0644); if (!f) return SYS_ERROR_FD; return f; } NSAPI_PUBLIC SYS_FILE system_fopenRW(char *p) { SYS_FILE f = PR_Open(p, PR_RDWR|PR_CREATE_FILE, 0644); if (!f) return SYS_ERROR_FD; return f; } NSAPI_PUBLIC SYS_FILE system_fopenWT(char *p) { SYS_FILE f = PR_Open(p, PR_RDWR|PR_CREATE_FILE|PR_TRUNCATE, 0644); if (!f) return SYS_ERROR_FD; return f; } NSAPI_PUBLIC int system_fclose(SYS_FILE fd) { return (PR_Close(fd)); } #ifdef FILE_WIN32 int CgiBuffering; NSAPI_PUBLIC SYS_FILE system_fopen(char *path, int access, int flags) { char p2[MAX_PATH]; SYS_FILE ret; HANDLE fd; if (strlen(path) >= MAX_PATH) { return SYS_ERROR_FD; } file_unix2local(path, p2); fd = CreateFile(p2, access, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, flags, 0, NULL); ret = PR_ImportFile((int32)fd); if(ret == INVALID_HANDLE_VALUE) return SYS_ERROR_FD; return ret; } NSAPI_PUBLIC int system_pread(SYS_FILE fd, char *buf, int BytesToRead) { unsigned long BytesRead = 0; int result = 0; BOOLEAN TimeoutSet = FALSE; /* XXXMB - nspr20 should be able to do this; but right now it doesn't * return proper error info. * fix it later... */ if(ReadFile((HANDLE)PR_FileDesc2NativeHandle(fd), (LPVOID)buf, BytesToRead, &BytesRead, NULL) == FALSE) { if (GetLastError() == ERROR_BROKEN_PIPE) { return IO_EOF; } else { return IO_ERROR; } } return (BytesRead ? BytesRead : IO_EOF); } NSAPI_PUBLIC int system_pwrite(SYS_FILE fd, char *buf, int BytesToWrite) { unsigned long BytesWritten; if (WriteFile((HANDLE)PR_FileDesc2NativeHandle(fd), (LPVOID)buf, BytesToWrite, &BytesWritten, NULL) == FALSE) { return IO_ERROR; } return BytesWritten; } NSAPI_PUBLIC int system_fwrite_atomic(SYS_FILE fd, char *buf, int sz) { int ret; #if 0 if(system_flock(fd) == IO_ERROR) return IO_ERROR; #endif /* XXXMB - this is technically thread unsafe, but it catches any * callers of fwrite_atomic when we're single threaded and just coming * to life. */ if (!_atomic_write_lock) { _atomic_write_lock = PR_NewLock(); } PR_Lock(_atomic_write_lock); ret = system_fwrite(fd,buf,sz); PR_Unlock(_atomic_write_lock); #if 0 if(system_ulock(fd) == IO_ERROR) return IO_ERROR; #endif return ret; } NSAPI_PUBLIC void file_unix2local(char *path, char *p2) { /* Try to handle UNIX-style paths */ if((!strchr(path, FILE_PATHSEP))) { int x; for(x = 0; path[x]; x++) p2[x] = (path[x] == '/' ? '\\' : path[x]); p2[x] = '\0'; } else strcpy(p2, path); } NSAPI_PUBLIC int system_nocoredumps(void) { return 0; } /* --------------------------- system_winerr ------------------------------ */ #include #include #include "util.h" NSAPI_PUBLIC char *system_winsockerr(void) { int errn = WSAGetLastError(); return FindError(errn); } NSAPI_PUBLIC char *system_winerr(void) { int errn = GetLastError(); if (errn == 0) errn = WSAGetLastError(); return FindError(errn); } /* ------------------------- Dir related stuff ---------------------------- */ NSAPI_PUBLIC SYS_DIR dir_open(char *pathp) { dir_s *ret = (dir_s *) MALLOC(sizeof(dir_s)); char path[MAX_PATH]; int l; if (strlen(pathp) >= MAX_PATH) { return NULL; } l = util_sprintf(path, "%s", pathp) - 1; path[strlen(pathp)] = '\0'; if(path[strlen(path) - 1] != FILE_PATHSEP) strcpy (path + strlen(path), "\\*.*"); else util_sprintf(path, "%s*.*", path); ret->de.d_name = NULL; if( (ret->dp = FindFirstFile(path, &ret->fdata)) != INVALID_HANDLE_VALUE) return ret; FREE(ret); return NULL; } NSAPI_PUBLIC SYS_DIRENT *dir_read(SYS_DIR ds) { if(FindNextFile(ds->dp, &ds->fdata) == FALSE) return NULL; if(ds->de.d_name) FREE(ds->de.d_name); ds->de.d_name = STRDUP(ds->fdata.cFileName); return &ds->de; } NSAPI_PUBLIC void dir_close(SYS_DIR ds) { FindClose(ds->dp); if(ds->de.d_name) FREE(ds->de.d_name); FREE(ds); } #endif /* FILE_WIN32 */ NSAPI_PUBLIC int file_notfound(void) { #ifdef FILE_WIN32 int errn = PR_GetError(); return (errn == PR_FILE_NOT_FOUND_ERROR); #else return (errno == ENOENT); #endif } #define ERRMSG_SIZE 35 #include "util.h" NSAPI_PUBLIC int system_errmsg_fn(char **buff, size_t maxlen) { char static_error[128]; char *lmsg = 0; /* Local message pointer */ size_t msglen = 0; PRErrorCode nscp_error; #ifdef XP_WIN32 LPTSTR sysmsg = 0; #endif nscp_error = PR_GetError(); /* If there is a NSPR error, but it is "unknown", try to get the OSError * and use that instead. */ if (nscp_error == PR_UNKNOWN_ERROR) errno = PR_GetOSError(); if (nscp_error != 0 && nscp_error != PR_UNKNOWN_ERROR){ char *nscp_error_msg; nscp_error_msg = nscperror_lookup(nscp_error); if(nscp_error_msg){ PR_SetError(0, 0); lmsg = nscp_error_msg; } else { util_snprintf(static_error, ERRMSG_SIZE, "unknown error %d", nscp_error); lmsg = static_error; } } else { #if defined(XP_WIN32) msglen = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, GetLastError(), LOCALE_SYSTEM_DEFAULT, (LPTSTR)&sysmsg, 0, 0); if (msglen > 0) lmsg = sysmsg; else lmsg = system_winerr(); SetLastError(0); #else lmsg = strerror(errno); errno = 0; #endif } /* At this point lmsg points to something. */ msglen = strlen(lmsg); if (*buff == NULL) *buff = STRDUP(lmsg); else if (maxlen > msglen) memcpy(*buff, lmsg, msglen+1); else msglen = 0; #ifdef XP_WIN32 /* NT's FormatMessage() dynamically allocated the msg; free it */ if (sysmsg) LocalFree(sysmsg); #endif return msglen; } NSAPI_PUBLIC char * system_errmsg(void) { char *buff = 0; system_errmsg_fn(&buff, errbuf_size); if (buff == 0) buff = "Could not retrieve system error message"; return buff; } NSAPI_PUBLIC int system_rename(char *oldpath, char *newpath) { return rename(oldpath, newpath); } NSAPI_PUBLIC int system_unlink(char *path) { return PR_Delete(path)==PR_FAILURE?-1:0; } NSAPI_PUBLIC int system_lseek(SYS_FILE fd, int off, int wh) { switch (wh) { case 0: return PR_Seek(fd, off, PR_SEEK_SET); break; case 1: return PR_Seek(fd, off, PR_SEEK_CUR); break; case 2: return PR_Seek(fd, off, PR_SEEK_END); break; default: return -1; } } NSAPI_PUBLIC int system_tlock(SYS_FILE fd) { return PR_TLockFile(fd); } NSAPI_PUBLIC int system_flock(SYS_FILE fd) { return PR_LockFile(fd); } NSAPI_PUBLIC int system_ulock(SYS_FILE fd) { return PR_UnlockFile(fd); } 389-admin-1.1.35/lib/base/nscperror.c000066400000000000000000000143501220472121400170510ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* nscperrors.c * Very crude error handling for nspr and libsec. */ #include "netsite.h" #define NSCP_NSPR_ERROR_BASE (-6000) #define NSCP_NSPR_MAX_ERROR (NSCP_NSPR_ERROR_BASE + 29) #define NSCP_LIBSEC_ERROR_BASE (-8192) #define NSCP_LIBSEC_MAX_ERROR (NSCP_LIBSEC_ERROR_BASE + 63) #define NSCP_LIBSSL_ERROR_BASE (-12288) #define NSCP_LIBSSL_MAX_ERROR (NSCP_LIBSSL_ERROR_BASE + 19) typedef struct nscp_error_t { int errorNumber; const char *errorString; } nscp_error_t; nscp_error_t nscp_nspr_errors[] = { { 0, "NSPR error" }, { 1, "Out of memory" }, { 2, "Bad file descriptor" }, { 3, "Data temporarily not available" }, { 4, "Access fault" }, { 5, "Invalid method" }, { 6, "Illegal access" }, { 7, "Unknown error" }, { 8, "Pending interrupt" }, { 9, "Not implemented" }, { 10, "IO error" }, { 11, "IO timeout error" }, { 12, "IO already pending error" }, { 13, "Directory open error" }, { 14, "Invalid Argument" }, { 15, "Address not available" }, { 16, "Address not supported" }, { 17, "Already connected" }, { 18, "Bad address" }, { 19, "Address already in use" }, { 20, "Connection refused" }, { 21, "Network unreachable" }, { 22, "Connection timed out" }, { 23, "Not connected" }, { 24, "Load library error" }, { 25, "Unload library error" }, { 26, "Find symbol error" }, { 27, "Connection reset by peer" }, { 28, "Range Error" }, { 29, "File Not Found Error" } }; nscp_error_t nscp_libsec_errors[] = { { 0, "SEC_ERROR_IO" }, { 1, "SEC_ERROR_LIBRARY_FAILURE" }, { 2, "SEC_ERROR_BAD_DATA" }, { 3, "SEC_ERROR_OUTPUT_LEN" }, { 4, "SEC_ERROR_INPUT_LEN" }, { 5, "SEC_ERROR_INVALID_ARGS" }, { 6, "SEC_ERROR_INVALID_ALGORITHM" }, { 7, "SEC_ERROR_INVALID_AVA" }, { 8, "SEC_ERROR_INVALID_TIME" }, { 9, "SEC_ERROR_BAD_DER" }, { 10, "SEC_ERROR_BAD_SIGNATURE" }, { 11, "SEC_ERROR_EXPIRED_CERTIFICATE" }, { 12, "SEC_ERROR_REVOKED_CERTIFICATE" }, { 13, "SEC_ERROR_UNKNOWN_ISSUER" }, { 14, "SEC_ERROR_BAD_KEY" }, { 15, "SEC_ERROR_BAD_PASSWORD" }, { 16, "SEC_ERROR_UNUSED" }, { 17, "SEC_ERROR_NO_NODELOCK" }, { 18, "SEC_ERROR_BAD_DATABASE" }, { 19, "SEC_ERROR_NO_MEMORY" }, { 20, "SEC_ERROR_UNTRUSTED_ISSUER" }, { 21, "SEC_ERROR_UNTRUSTED_CERT" }, { 22, "SEC_ERROR_DUPLICATE_CERT" }, { 23, "SEC_ERROR_DUPLICATE_CERT_TIME" }, { 24, "SEC_ERROR_ADDING_CERT" }, { 25, "SEC_ERROR_FILING_KEY" }, { 26, "SEC_ERROR_NO_KEY" }, { 27, "SEC_ERROR_CERT_VALID" }, { 28, "SEC_ERROR_CERT_NOT_VALID" }, { 29, "SEC_ERROR_CERT_NO_RESPONSE" }, { 30, "SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE" }, { 31, "SEC_ERROR_CRL_EXPIRED" }, { 32, "SEC_ERROR_CRL_BAD_SIGNATURE" }, { 33, "SEC_ERROR_CRL_INVALID" }, { 34, "SEC_ERROR_" }, { 35, "SEC_ERROR_" }, { 36, "SEC_ERROR_" }, { 37, "SEC_ERROR_" }, { 38, "SEC_ERROR_" }, { 39, "SEC_ERROR_" }, { 40, "SEC_ERROR_" }, { 41, "SEC_ERROR_" }, { 42, "SEC_ERROR_" }, { 43, "SEC_ERROR_" }, { 44, "SEC_ERROR_" }, { 45, "SEC_ERROR_" }, { 46, "SEC_ERROR_" }, { 47, "SEC_ERROR_" }, { 48, "SEC_ERROR_" }, { 49, "SEC_ERROR_" }, { 50, "SEC_ERROR_" }, { 51, "SEC_ERROR_" }, { 52, "SEC_ERROR_" }, { 53, "SEC_ERROR_" }, { 54, "SEC_ERROR_" }, { 55, "SEC_ERROR_" }, { 56, "SEC_ERROR_" }, { 57, "SEC_ERROR_" }, { 58, "SEC_ERROR_" }, { 59, "SEC_ERROR_" }, { 60, "SEC_ERROR_" }, { 61, "SEC_ERROR_" }, { 62, "SEC_ERROR_" }, { 63, "SEC_ERROR_NEED_RANDOM" } }; nscp_error_t nscp_libssl_errors[] = { { 0, "SSL_ERROR_EXPORT_ONLY_SERVER" }, { 1, "SSL_ERROR_US_ONLY_SERVER" }, { 2, "SSL_ERROR_NO_CYPHER_OVERLAP" }, { 3, "SSL_ERROR_NO_CERTIFICATE" }, { 4, "SSL_ERROR_BAD_CERTIFICATE" }, { 5, "unused SSL error #5" }, { 6, "SSL_ERROR_BAD_CLIENT - the server has encountered bad data from the client." }, { 7, "SSL_ERROR_BAD_SERVER" }, { 8, "SSL_ERROR_UNSUPPORTED_CERTIFICATE_TYPE" }, { 9, "SSL_ERROR_UNSUPPORTED_VERSION" }, { 10, "unused SSL error #10" }, { 11, "SSL_ERROR_WRONG_CERTIFICATE" }, { 12, "SSL_ERROR_BAD_CERT_DOMAIN" }, { 13, "SSL_ERROR_POST_WARNING" }, { 14, "SSL_ERROR_SSL2_DISABLED" }, { 15, "SSL_ERROR_BAD_MAC_READ - SSL has received a record with an incorrect Message Authentication Code." }, { 16, "SSL_ERROR_BAD_MAC_ALERT - SSL has received an error indicating an incorrect Message Authentication Code." }, { 17, "SSL_ERROR_BAD_CERT_ALERT - the server cannot verify your certificate." }, { 18, "SSL_ERROR_REVOKED_CERT_ALERT - the server has rejected your certificate as revoked." }, { 19, "SSL_ERROR_EXPIRED_CERT_ALERT - the server has rejected your certificate as expired." }, }; const char * nscperror_lookup(int error) { if ((error >= NSCP_NSPR_ERROR_BASE) && (error <= NSCP_NSPR_MAX_ERROR)) { return nscp_nspr_errors[error-NSCP_NSPR_ERROR_BASE].errorString; } else if ((error >= NSCP_LIBSEC_ERROR_BASE) && (error <= NSCP_LIBSEC_MAX_ERROR)) { return nscp_libsec_errors[error-NSCP_LIBSEC_ERROR_BASE].errorString; } else if ((error >= NSCP_LIBSSL_ERROR_BASE) && (error <= NSCP_LIBSSL_MAX_ERROR)) { return nscp_libssl_errors[error-NSCP_LIBSSL_ERROR_BASE].errorString; } else { return (const char *)NULL; } } 389-admin-1.1.35/lib/base/nscputil.cpp000066400000000000000000000717331220472121400172450ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * util.c: A hodge podge of utility functions and standard functions which * are unavailable on certain systems * * Rob McCool */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #ifdef XP_UNIX #include #include #include #include "prthread.h" #endif /* XP_UNIX */ #include "base/util.h" #ifdef XP_UNIX #include #endif /* WIN32 */ #ifdef XP_WIN32 #define VC_EXTRALEAN // Exclude rarely-used stuff from afxwin.h #include // MFC core and standard components` #include #endif #ifdef _WIN32 static char *win_char_converter(const char *instr, int bFromUTF8); #else #include #endif #ifndef _WIN32 #include #include /* for nl_langinfo() */ #endif #if defined(_HPUX_SOURCE) #define UTIL_CHARSET_UTF8 "utf8" /* HP/UX */ #else #define UTIL_CHARSET_UTF8 "UTF-8" /* all others */ #endif #if defined(_HPUX_SOURCE) #define UTIL_CHARSET_DEFAULT "roma8" /* HP/UX */ #elif defined(__GLIBC__) #define UTIL_CHARSET_DEFAULT "US-ASCII" /* glibc, e.g. Linux */ #else #define UTIL_CHARSET_DEFAULT "646" /* all others */ #endif #ifdef __cplusplus extern "C" { #endif static char *convertor( const char *src, int fromUtf8 ); #ifndef _WIN32 static const char *GetCurrentCharset(void); #endif #ifdef __cplusplus } #endif /* ----------------------------- util_getline ----------------------------- */ #define LF 10 #define CR 13 NSAPI_PUBLIC int util_getline(filebuf_t *buf, int lineno, int maxlen, char *l) { int i, x; x = 0; while(1) { switch(i = (int)filebuf_getc(buf)) { case IO_EOF: l[x] = '\0'; return 1; case LF: if(x && (l[x-1] == '\\')) { --x; continue; } l[x] = '\0'; return 0; case IO_ERROR: util_sprintf(l, "I/O error reading file at line %d", lineno); return -1; case CR: continue; default: l[x] = (char) i; if(++x == maxlen) { util_sprintf(l, "line %d is too long", lineno); return -1; } break; } } } /* ---------------------------- util_can_exec ----------------------------- */ #ifdef XP_UNIX NSAPI_PUBLIC int util_can_exec(struct stat *fi, uid_t uid, gid_t gid) { if(!uid) return 1; if((fi->st_mode & S_IXOTH) || ((gid == fi->st_gid) && (fi->st_mode & S_IXGRP)) || ((uid == fi->st_uid) && (fi->st_mode & S_IXUSR))) return 1; return 0; } #endif /* XP_UNIX */ /* --------------------------- util_env_create ---------------------------- */ NSAPI_PUBLIC char **util_env_create(char **env, int n, int *pos) { int x; if(!env) { *pos = 0; return (char **) MALLOC((n + 1)*sizeof(char *)); } else { for(x = 0; (env[x]); x++); env = (char **) REALLOC(env, (n + x + 1)*(sizeof(char *))); *pos = x; return env; } } /* ---------------------------- util_env_free ----------------------------- */ NSAPI_PUBLIC void util_env_free(char **env) { register char **ep = env; for(ep = env; *ep; ep++) FREE(*ep); FREE(env); } /* ----------------------------- util_env_str ----------------------------- */ NSAPI_PUBLIC char *util_env_str(char *name, char *value) { char *t,*tp; t = (char *) MALLOC(strlen(name)+strlen(value)+2); /* 2: '=' and '\0' */ for(tp=t; (*tp = *name); tp++,name++); for(*tp++ = '='; (*tp = *value); tp++,value++); return t; } /* --------------------------- util_env_replace --------------------------- */ NSAPI_PUBLIC void util_env_replace(char **env, char *name, char *value) { int x, y, z; char *i; for(x = 0; env[x]; x++) { i = strchr(env[x], '='); *i = '\0'; if(!strcmp(env[x], name)) { y = strlen(env[x]); z = strlen(value); env[x] = (char *) REALLOC(env[x], y + z + 2); util_sprintf(&env[x][y], "=%s", value); return; } *i = '='; } } /* ---------------------------- util_env_find ----------------------------- */ NSAPI_PUBLIC char *util_env_find(char **env, char *name) { char *i; int x, r; for(x = 0; env[x]; x++) { i = strchr(env[x], '='); *i = '\0'; r = !strcmp(env[x], name); *i = '='; if(r) return i + 1; } return NULL; } /* ---------------------------- util_env_copy ----------------------------- */ NSAPI_PUBLIC char **util_env_copy(char **src, char **dst) { char **src_ptr; int src_cnt; int index; if (!src) return NULL; for (src_cnt = 0, src_ptr = src; *src_ptr; src_ptr++, src_cnt++); if (!src_cnt) return NULL; dst = util_env_create(dst, src_cnt, &index); for (src_ptr = src, index=0; *src_ptr; index++, src_ptr++) dst[index] = STRDUP(*src_ptr); dst[index] = NULL; return dst; } /* ---------------------------- util_hostname ----------------------------- */ /* * MOVED TO NET.C TO AVOID INTERDEPENDENCIES */ /* --------------------------- util_chdir2path ---------------------------- */ NSAPI_PUBLIC int util_chdir2path(char *path) { /* use FILE_PATHSEP to accomodate WIN32 */ char *t = strrchr(path, FILE_PATHSEP); int ret; if(!t) return -1; *t = '\0'; #ifdef XP_UNIX ret = chdir(path); #else /* WIN32 */ ret = SetCurrentDirectory(path); #endif /* XP_UNIX */ /* use FILE_PATHSEP instead of chdir to accomodate WIN32 */ *t = FILE_PATHSEP; return ret; } /* --------------------------- util_is_mozilla ---------------------------- */ NSAPI_PUBLIC int util_is_mozilla(char *ua, char *major, char *minor) { if((!ua) || strncasecmp(ua, "Mozilla/", 8)) return 0; /* Major version. I punted on supporting versions like 10.0 */ if(ua[8] > major[0]) return 1; else if((ua[8] < major[0]) || (ua[9] != '.')) return 0; /* Minor version. Support version numbers like 0.96 */ if(ua[10] < minor[0]) return 0; else if((ua[10] > minor[0]) || (!minor[1])) return 1; if((!isdigit(ua[11])) || (ua[11] < minor[1])) return 0; else return 1; } /* ----------------------------- util_is_url ------------------------------ */ #include /* isalpha */ NSAPI_PUBLIC int util_is_url(char *url) { char *t = url; while(*t) { if(*t == ':') return 1; if(!isalpha(*t)) return 0; ++t; } return 0; } /* --------------------------- util_later_than ---------------------------- */ int _mstr2num(char *str) { if(!strcasecmp(str, "Jan")) return 0; if(!strcasecmp(str, "Feb")) return 1; if(!strcasecmp(str, "Mar")) return 2; if(!strcasecmp(str, "Apr")) return 3; if(!strcasecmp(str, "May")) return 4; if(!strcasecmp(str, "Jun")) return 5; if(!strcasecmp(str, "Jul")) return 6; if(!strcasecmp(str, "Aug")) return 7; if(!strcasecmp(str, "Sep")) return 8; if(!strcasecmp(str, "Oct")) return 9; if(!strcasecmp(str, "Nov")) return 10; if(!strcasecmp(str, "Dec")) return 11; return -1; } int _time_compare(struct tm *lms, char *ims, int later_than_op) { int y = 0, mnum = 0, d = 0, h = 0, m = 0, s = 0, x; char t[128]; /* Supported formats start with weekday (which we don't care about) */ /* The sizeof(t) is to avoid buffer overflow with t */ if((!(ims = strchr(ims,' '))) || (strlen(ims) > (sizeof(t) - 2))) return 0; while(*ims && isspace(*ims)) ++ims; if((!(*ims)) || (strlen(ims) < 2)) return 0; /* Standard HTTP (RFC 850) starts with dd-mon-yy */ if(ims[2] == '-') { /* Warning - hardcoded 128 is sizeof(t) - scanf is not security conscious */ sscanf(ims, "%128s %d:%d:%d", t, &h, &m, &s); t[sizeof(t)-1] = 0; if(strlen(t) < 6) return 0; t[2] = '\0'; t[6] = '\0'; d = atoi(t); mnum = _mstr2num(&t[3]); x = atoi(&t[7]); /* Postpone wraparound until 2070 */ y = x + (x < 70 ? 2000 : 1900); } /* The ctime format starts with a month name */ else if(isalpha(*ims)) { /* Warning - hardcoded 128 is sizeof(t) - scanf is not security conscious */ sscanf(ims,"%128s %d %d:%d:%d %*s %d", t, &d, &h, &m, &s, &y); t[sizeof(t)-1] = 0; mnum = _mstr2num(t); } /* RFC 822 */ else { /* Warning - hardcoded 128 is sizeof(t) - scanf is not security conscious */ sscanf(ims, "%d %128s %d %d:%d:%d", &d, t, &y, &h, &m, &s); t[sizeof(t)-1] = 0; mnum = _mstr2num(t); } if (later_than_op) { if( (x = (1900 + lms->tm_year) - y) ) return x < 0; if(mnum == -1) return 0; /* XXXMB - this will fail if you check if december 31 1996 is later * than january 1 1997 */ if((x = lms->tm_mon - mnum) || (x = lms->tm_mday - d) || (x = lms->tm_hour - h) || (x = lms->tm_min - m) || (x = lms->tm_sec - s)) return x < 0; return 1; } else { return (mnum != -1 && 1900 + lms->tm_year == y && lms->tm_mon == mnum && lms->tm_mday == d && lms->tm_hour == h && lms->tm_min == m && lms->tm_sec == s); } } /* Returns 0 if lms later than ims * Returns 1 if equal * Returns 1 if ims later than lms */ NSAPI_PUBLIC int util_later_than(struct tm *lms, char *ims) { return _time_compare(lms, ims, 1); } NSAPI_PUBLIC int util_time_equal(struct tm *lms, char *ims) { return _time_compare(lms, ims, 0); } /* util_str_time_equal() * * Function to compare if two time strings are equal * * Acceptible date formats: * Saturday, 17-Feb-96 19:41:34 GMT * Sat, 17 Mar 1996 19:41:34 GMT * * Argument t1 MUST be RFC1123 format. * * Note- it is not the intention of this routine to *always* match * There are cases where we would return != when the strings might * be equal (especially with case). The converse should not be true. * * Return 0 if equal, -1 if not equal. */ #define MINIMUM_LENGTH 18 #define RFC1123_DAY 5 #define RFC1123_MONTH 8 #define RFC1123_YEAR 12 #define RFC1123_HOUR 17 #define RFC1123_MINUTE 20 #define RFC1123_SECOND 23 NSAPI_PUBLIC int util_str_time_equal(char *t1, char *t2) { int index; /* skip over leading whitespace... */ while(*t1 && isspace(*t1)) ++t1; while(*t2 && isspace(*t2)) ++t2; /* Check weekday */ if ( (t1[0] != t2[0]) || (t1[1] != t2[1]) ) return -1; /* Skip to date */ while(*t2 && !isspace(*t2)) ++t2; t2++; /* skip if not strings not long enough */ if ( (strlen(t1) < MINIMUM_LENGTH) || (strlen(t2) < MINIMUM_LENGTH) ) return -1; if ( (t1[RFC1123_DAY] != t2[0]) || (t1[RFC1123_DAY+1] != t2[1]) ) return -1; /* Skip to the month */ t2 += 3; if ( (t1[RFC1123_MONTH] != t2[0]) || (t1[RFC1123_MONTH+1] != t2[1]) || (t1[RFC1123_MONTH+2] != t2[2]) ) return -1; /* Skip to year */ t2 += 4; if ( (t1[RFC1123_YEAR] != t2[0]) ) { /* Assume t2 is RFC 850 format */ if ( (t1[RFC1123_YEAR+2] != t2[0]) || (t1[RFC1123_YEAR+3] != t2[1]) ) return -1; /* skip to hour */ t2 += 3; } else { /* Assume t2 is RFC 1123 format */ if ( (t1[RFC1123_YEAR+1] != t2[1]) || (t1[RFC1123_YEAR+2] != t2[2]) || (t1[RFC1123_YEAR+3] != t2[3]) ) return -1; /* skip to hour */ t2 += 5; } /* check date */ for (index=0; index<8; index++) { if ( t1[RFC1123_HOUR+index] != t2[index] ) return -1; } /* Ignore timezone */ return 0; } /* ---------------------------- util_uri_parse ---------------------------- */ NSAPI_PUBLIC void util_uri_parse(char *uri) { int spos = 0, tpos = 0; int l = strlen(uri); while(uri[spos]) { if(uri[spos] == '/') { if((spos != l) && (uri[spos+1] == '.')) { if(uri[spos+2] == '/') spos += 2; else if((spos <= (l-3)) && (uri[spos+2] == '.') && (uri[spos+3] == '/')) { spos += 3; while((tpos > 0) && (uri[--tpos] != '/')) uri[tpos] = '\0'; } else uri[tpos++] = uri[spos++]; } else { if(uri[spos+1] != '/') uri[tpos++] = uri[spos++]; else spos++; } } else uri[tpos++] = uri[spos++]; } uri[tpos] = '\0'; } /* -------------------- util_uri_unescape_and_normalize -------------------- */ #ifdef XP_WIN32 /* The server calls this function to unescape the URI and also normalize * the uri. Normalizing the uri converts all "\" characters in the URI * and pathinfo portion to "/". Does not touch "\" in query strings. */ void util_uri_unescape_and_normalize(char *s) { char *t, *u; for(t = s, u = s; *t; ++t, ++u) { if((*t == '%') && t[1] && t[2]) { *u = ((t[1] >= 'A' ? ((t[1] & 0xdf) - 'A')+10 : (t[1] - '0'))*16) + (t[2] >= 'A' ? ((t[2] & 0xdf) - 'A')+10 : (t[2] - '0')); t += 2; } else if(u != t) *u = *t; if (*u == '\\') /* normalize */ *u = '/'; } *u = *t; } #endif /* XP_WIN32 */ /* -------------------------- util_uri_unescape --------------------------- */ NSAPI_PUBLIC void util_uri_unescape(char *s) { char *t, *u; for(t = s, u = s; *t; ++t, ++u) { if((*t == '%') && t[1] && t[2]) { *u = ((t[1] >= 'A' ? ((t[1] & 0xdf) - 'A')+10 : (t[1] - '0'))*16) + (t[2] >= 'A' ? ((t[2] & 0xdf) - 'A')+10 : (t[2] - '0')); t += 2; } else if(u != t) *u = *t; } *u = *t; } /* --------------------------- util_uri_escape ---------------------------- */ NSAPI_PUBLIC char *util_uri_escape(char *od, char *s) { char *d; if(!od) od = (char *) MALLOC((strlen(s)*3) + 1); d = od; while(*s) { if(strchr("% ?#:+&*\"<>\r\n", *s)) { sprintf(d, "%%%2x", *s); ++s; d += 3; } else *d++ = *s++; } *d = '\0'; return od; } /* --------------------------- util_url_escape ---------------------------- */ NSAPI_PUBLIC char *util_url_escape(char *od, char *s) { char *d; if(!od) od = (char *) MALLOC((strlen(s)*3) + 1); d = od; while(*s) { if(strchr("% +*\"<>\r\n", *s)) { sprintf(d, "%%%.2x", *s); ++s; d += 3; } else *d++ = *s++; } *d = '\0'; return od; } /* ------------------------- util_mime_separator -------------------------- */ NSAPI_PUBLIC int util_mime_separator(char *sep) { srand(time(NULL)); return util_sprintf(sep, "%c%c--%d%d%d", CR, LF, rand(), rand(), rand()); } /* ------------------------------ util_itoa ------------------------------- */ /* * Assumption: Reversing the digits will be faster in the general case * than doing a log10 or some nasty trick to find the # of digits. */ NSAPI_PUBLIC int util_itoa(int i, char *a) { register int x, y, p; register char c; int negative; negative = 0; if(i < 0) { *a++ = '-'; negative = 1; i = -i; } p = 0; while(i > 9) { a[p++] = (i%10) + '0'; i /= 10; } a[p++] = i + '0'; if(p > 1) { for(x = 0, y = p - 1; x < y; ++x, --y) { c = a[x]; a[x] = a[y]; a[y] = c; } } a[p] = '\0'; return p + negative; } /* ----------------------------- util_sprintf ----------------------------- */ #include "prprf.h" /* XXXrobm the NSPR interfaces don't allow me to just pass in a buffer without a size */ #define UTIL_PRF_MAXSIZE 1048576 NSAPI_PUBLIC int util_vsnprintf(char *s, int n, register const char *fmt, va_list args) { return PR_vsnprintf(s, n, fmt, args); } NSAPI_PUBLIC int util_snprintf(char *s, int n, const char *fmt, ...) { int rc; va_list args; va_start(args, fmt); rc = PR_vsnprintf(s, n, fmt, args); va_end(args); return rc; } NSAPI_PUBLIC int util_vsprintf(char *s, register const char *fmt, va_list args) { return PR_vsnprintf(s, UTIL_PRF_MAXSIZE, fmt, args); } NSAPI_PUBLIC int util_sprintf(char *s, const char *fmt, ...) { int rc; va_list args; va_start(args, fmt); rc = PR_vsnprintf(s, UTIL_PRF_MAXSIZE, fmt, args); va_end(args); return rc; } /* ---------------------------- util_sh_escape ---------------------------- */ NSAPI_PUBLIC char *util_sh_escape(char *s) { char *ns = (char *) MALLOC(strlen(s) * 2 + 1); /* worst case */ register char *t, *u; for(t = s, u = ns; *t; ++t, ++u) { if(strchr("&;`'\"|*?~<>^()[]{}$\\ #!", *t)) *u++ = '\\'; *u = *t; } *u = '\0'; return ns; } /* --------------------------- util_strcasecmp ---------------------------- */ #ifdef NEED_STRCASECMP /* These are stolen from mcom/lib/xp */ NSAPI_PUBLIC int util_strcasecmp(CASECMPARG_T char *one, CASECMPARG_T char *two) { CASECMPARG_T char *pA; CASECMPARG_T char *pB; for(pA=one, pB=two; *pA && *pB; pA++, pB++) { int tmp = tolower(*pA) - tolower(*pB); if (tmp) return tmp; } if (*pA) return 1; if (*pB) return -1; return 0; } #endif /* NEED_STRCASECMP */ #ifdef NEED_STRNCASECMP NSAPI_PUBLIC int util_strncasecmp(CASECMPARG_T char *one, CASECMPARG_T char *two, int n) { CASECMPARG_T char *pA; CASECMPARG_T char *pB; for(pA=one, pB=two;; pA++, pB++) { int tmp; if (pA == one+n) return 0; if (!(*pA && *pB)) return *pA - *pB; tmp = tolower(*pA) - tolower(*pB); if (tmp) return tmp; } } #endif /* NEED_STRNCASECMP */ #ifdef XP_UNIX /* * Local Thread Safe version of waitpid. This prevents the process * from blocking in the system call. */ NSAPI_PUBLIC pid_t util_waitpid(pid_t pid, int *statptr, int options) { pid_t rv; for(rv = 0; !rv; PR_Sleep(500)) { rv = waitpid(pid, statptr, options | WNOHANG); if (rv == -1) { if (errno == EINTR) { rv = 0; /* sleep and try again */ } else { // ereport(LOG_WARN, "waitpid failed for pid %d:%s", pid, system_errmsg()); ; } } } return rv; } #endif /* * Various reentrant routines by mikep. See util.h and systems.h */ /* * These are only necessary if we turn on interrupts in NSPR */ #ifdef NEED_RELOCKS #include "crit.h" #define RE_LOCK(name) \ static CRITICAL name##_crit = 0; \ if (name##_crit == 0) name##_crit = crit_init(); \ crit_enter(name##_crit) #define RE_UNLOCK(name) crit_exit(name##_crit) #else #define RE_LOCK(name) /* nada */ #define RE_UNLOCK(name) /* nil */ #endif NSAPI_PUBLIC char * util_strtok(register char *s, register const char *delim, register char **lasts) { #ifdef HAVE_STRTOK_R return strtok_r(s, delim, lasts); #else /* * THIS IS THE THREAD SAFE VERSION OF strtok captured from * public NetBSD. Note that no locks are needed */ register char *spanp; register int c, sc; char *tok; if (s == NULL && (s = *lasts) == NULL) return (NULL); /* * Skip (span) leading delimiters (s += strspn(s, delim), * sort of). */ cont: c = *s++; for (spanp = (char *)delim; (sc = *spanp++) != 0;) { if (c == sc) goto cont; } if (c == 0) { /* no non-delimiter characters */ *lasts = NULL; return (NULL); } tok = s - 1; /* * Scan token (scan for delimiters: s += strcspn(s, delim), * sort of). * Note that delim must have one NUL; we stop if we see that, too. */ for (;;) { c = *s++; spanp = (char *)delim; do { if ((sc = *spanp++) == c) { if (c == 0) s = NULL; else s[-1] = 0; *lasts = s; return (tok); } } while (sc != 0); } /* NOTREACHED */ #endif /* no strtok_r */ } #ifndef XP_WIN32 NSAPI_PUBLIC struct passwd * util_getpwnam(const char *name, struct passwd *result, char *buffer, int buflen) { #ifdef HAVE_PW_R #ifdef AIX #ifdef AIX4_3 return ((int)getpwnam_r(name, result, buffer, buflen, &result) == 0 ? result : NULL); #else return ((int)getpwnam_r(name, result, buffer, buflen) == 0 ? result : NULL); #endif #else return getpwnam_r(name, result, buffer, buflen); #endif /* AIX */ #else char *lastp; struct passwd *r; RE_LOCK(pw); r = getpwnam(name); if (!r) return r; result->pw_gid = r->pw_gid; result->pw_uid = r->pw_uid; /* Hope this buffer is long enough */ if (buffer) util_snprintf(buffer, buflen, "%s:%s:%d:%d:%s:%s:%s", r->pw_name, r->pw_passwd, r->pw_uid, r->pw_gid, r->pw_gecos, r->pw_dir, r->pw_shell); RE_UNLOCK(pw); result->pw_name = util_strtok(buffer, ":", &lastp); result->pw_passwd = util_strtok(NULL, ":", &lastp); (void) util_strtok(NULL, ":", &lastp); (void) util_strtok(NULL, ":", &lastp); result->pw_gecos = util_strtok(NULL, ":", &lastp); result->pw_dir = util_strtok(NULL, ":", &lastp); result->pw_shell = util_strtok(NULL, ":", &lastp); return result; #endif } #endif NSAPI_PUBLIC struct tm * util_localtime(const time_t *clock, struct tm *res) { #ifdef HAVE_TIME_R return localtime_r(clock, res); #else struct tm *rv; time_t zero = 0x7fffffff; RE_LOCK(localtime); RE_UNLOCK(localtime); rv = localtime(clock); if (!rv) rv = localtime(&zero); if (rv) *res = *rv; else return NULL; return res; #endif } NSAPI_PUBLIC char * util_ctime(const time_t *clock, char *buf, int buflen) { /* * From cgi-src/restore.c refering to XP_WIN32: * MLM - gross, but it works, better now FLC */ #if !defined(HAVE_TIME_R) || defined(XP_WIN32) RE_LOCK(ctime); strncpy(buf, ctime(clock), buflen); buf[buflen - 1] = '\0'; RE_UNLOCK(ctime); return buf; #elif HAVE_TIME_R == 2 return ctime_r(clock, buf); #else /* HAVE_TIME_R == 3 */ return ctime_r(clock, buf, buflen); #endif } NSAPI_PUBLIC struct tm * util_gmtime(const time_t *clock, struct tm *res) { #ifdef HAVE_TIME_R return gmtime_r(clock, res); #else struct tm *rv; time_t zero = 0x7fffffff; RE_LOCK(gmtime); rv = gmtime(clock); RE_UNLOCK(gmtime); if (!rv) rv = gmtime(&zero); if (rv) *res = *rv; else return NULL; return res; #endif } NSAPI_PUBLIC char * util_asctime(const struct tm *tm, char *buf, int buflen) { #if HAVE_TIME_R == 2 return asctime_r(tm, buf); #elif HAVE_TIME_R == 3 return asctime_r(tm, buf, buflen); #else RE_LOCK(asctime); strncpy(buf, asctime(tm), buflen); buf[buflen - 1] = '\0'; RE_UNLOCK(asctime); return buf; #endif } NSAPI_PUBLIC char * util_strerror(int errnum, char *msg, size_t buflen) { #ifdef HAVE_STRERROR_R /* More IBM real-genius */ return (strerror_r(errnum, msg, buflen) == 0) ? msg : NULL; #else /* RE_LOCK(strerror); I don't think this is worth the trouble */ (void)strncpy(msg, strerror(errnum), buflen); msg[buflen - 1] = '\0'; return msg; /* RE_UNLOCK(strerror); */ #endif } /* returns a malloc'd string */ static const char * GetCurrentCharset(void) { static char *locale = NULL; const char *charset; if ( NULL == locale ) { locale = setlocale(LC_CTYPE, ""); /* need to call this once */ } charset = nl_langinfo( CODESET ); if ( NULL == charset || '\0' == *charset ) { charset = UTIL_CHARSET_DEFAULT; } return strdup( charset ); } #ifdef _WIN32 static char * convertor( const char *src, int fromUtf8 ) { return win_char_converter( src, fromUtf8 ); } #else /* _WIN32 */ static char * convertor( const char *src, int fromUtf8 ) { const char *src_charset = NULL; iconv_t convdesc; char *outbuf, *curoutbuf; size_t inbytesleft, outbytesleft; src_charset = GetCurrentCharset(); if (0 == strcasecmp(src_charset, UTIL_CHARSET_UTF8)) { outbuf = strdup(src); if ( NULL == outbuf ) { perror( "convert_to_utf8 - strdup" ); } return outbuf; } /* Get a converter */ if (fromUtf8) { convdesc = iconv_open( src_charset, UTIL_CHARSET_UTF8 ); } else { convdesc = iconv_open( UTIL_CHARSET_UTF8, src_charset ); } if ( (iconv_t)-1 == convdesc ) { if ( errno == EINVAL ) { fprintf( stderr, "%s: conversion from %s to %s is not supported\n", "convertor", src_charset, UTIL_CHARSET_UTF8 ); } else { perror( src_charset ); } return NULL; } /* Allocate room for the UTF-8 equivalent (maximum expansion = 6 times) */ /* XXX is that correct? */ inbytesleft = strlen( src ); outbytesleft = 6 * inbytesleft + 1; if ( NULL == ( outbuf = (char *)malloc( outbytesleft ))) { perror( "convert_to_utf8 - malloc" ); iconv_close( convdesc ); return NULL; } curoutbuf = outbuf; /* * Three steps for a good conversion: * 1) Insert the initial shift sequence if any. * 2) Convert our characters. * 3) Insert the closing shift sequence, if any. */ if ( (size_t)-1 == iconv( convdesc, NULL, NULL, &curoutbuf, &outbytesleft ) /* initial shift seq. */ #ifdef LINUX || (size_t)-1 == iconv( convdesc, (char **)&src, &inbytesleft, &curoutbuf, &outbytesleft ) /* convert our chars. */ #else || (size_t)-1 == iconv( convdesc, &src, &inbytesleft, &curoutbuf, &outbytesleft ) /* convert our chars. */ #endif || (size_t)-1 == iconv( convdesc, NULL, NULL, &curoutbuf, &outbytesleft )) { /* closing shift seq. */ perror( "convert_to_utf8 - iconv" ); iconv_close( convdesc ); return NULL; } *curoutbuf = '\0'; /* zero-terminate the resulting string */ return outbuf; } #endif /* else _WIN32 */ #ifdef _WIN32 /* returns a malloc'd string */ static char * win_char_converter(const char *instr, int bFromUTF8) { char *outstr = NULL; int inlen, wclen, outlen; LPWSTR wcstr; if (instr == NULL) return NULL; if ((inlen = strlen(instr)) <= 0) return NULL; /* output never becomes longer than input, XXXmcs: really true? ** thus we don't have to ask for the length */ wcstr = (LPWSTR) malloc( sizeof( WCHAR ) * (inlen+1) ); if (!wcstr) return NULL; wclen = MultiByteToWideChar(bFromUTF8 ? CP_UTF8 : CP_ACP, 0, instr, inlen, wcstr, inlen); outlen = WideCharToMultiByte(bFromUTF8 ? CP_ACP : CP_UTF8, 0, wcstr, wclen, NULL, 0, NULL, NULL); if (outlen > 0) { outstr = (char *) malloc(outlen + 2); outlen = WideCharToMultiByte(bFromUTF8 ? CP_ACP : CP_UTF8, 0, wcstr, wclen, outstr, outlen, NULL, NULL); if (outlen > 0) *(outstr+outlen) = _T('\0'); else return NULL; } free( wcstr ); return outstr; } #endif /* _WIN32 */ #ifdef __cplusplus extern "C" { #endif NSAPI_PUBLIC char * util_local_to_utf8(const char *src) { char *utf8; if ( src == NULL ) { /* trivial case # 1 */ utf8 = NULL; } else if ( *src == '\0' ) { /* trivial case # 2 */ utf8 = strdup( "" ); } else { utf8 = convertor( src, 0 ); /* the real deal */ if ( utf8 == NULL ) { utf8 = strdup ( src ); } } return utf8; } #ifdef __cplusplus } #endif 389-admin-1.1.35/lib/base/system.cpp000066400000000000000000000124141220472121400167170ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * system.c: A grab bag of system-level abstractions * * Many authors */ #include "netsite.h" #include "base/nsassert.h" #ifdef MAGNUS_VERSION_STRING #define MY_VERSION_STRING MAGNUS_VERSION_STRING #else #define MY_VERSION_STRING ADM_PACKAGE_VERSION #endif #ifdef XP_WIN32 #include static char *version = MY_VERSION_STRING; #endif #include "base/systems.h" /* find out if we have malloc pools */ static int thread_malloc_key = -1; #ifdef MCC_DEBUG #define DEBUG_MALLOC #endif #ifdef DEBUG_MALLOC /* The debug malloc routines provide several functions: * * - detect allocated memory overflow/underflow * - detect multiple frees * - intentionally clobbers malloc'd buffers * - intentionally clobbers freed buffers */ #define DEBUG_MAGIC 0x12345678 #define DEBUG_MARGIN 32 #define DEBUG_MARGIN_CHAR '*' #define DEBUG_MALLOC_CHAR '.' #define DEBUG_FREE_CHAR 'X' #endif /* DEBUG_MALLOC */ /* On NT, the server version string is not statically encoded based * upon a product compile define but dynamically set by the server * exe at startup. */ NSAPI_PUBLIC char *system_version() { #ifdef XP_WIN32 return version; #else /* XP_UNIX */ return MY_VERSION_STRING; #endif /* XP_UNIX */ } NSAPI_PUBLIC void system_version_set(char *server_version) { #ifdef XP_WIN32 version = PERM_STRDUP(server_version); #endif } NSAPI_PUBLIC void *system_malloc(int size) { return malloc(size); } NSAPI_PUBLIC void *system_calloc(int size) { void *ret; ret = malloc(size); if(ret) ZERO(ret, size); return ret; } NSAPI_PUBLIC void *system_realloc(void *ptr, int size) { return realloc(ptr, size); } NSAPI_PUBLIC void system_free(void *ptr) { NS_ASSERT(ptr); free(ptr); } NSAPI_PUBLIC char *system_strdup(const char *ptr) { NS_ASSERT(ptr); return strdup(ptr); } NSAPI_PUBLIC void *system_malloc_perm(int size) { #ifndef DEBUG_MALLOC return malloc(size); #else char *ptr = (char *)malloc(size + 2*DEBUG_MARGIN+2*sizeof(int)); char *real_ptr; int *magic; int *length; magic = (int *)ptr; *magic = DEBUG_MAGIC; ptr += sizeof(int); length = (int *)ptr; *length = size; ptr += sizeof(int); memset(ptr, DEBUG_MARGIN_CHAR, DEBUG_MARGIN); ptr += DEBUG_MARGIN; memset(ptr, DEBUG_MALLOC_CHAR, size); real_ptr = ptr; ptr += size; memset(ptr, DEBUG_MARGIN_CHAR, DEBUG_MARGIN); return real_ptr; #endif } NSAPI_PUBLIC void *system_calloc_perm(int size) { void *ret = system_malloc_perm(size); if(ret) ZERO(ret, size); return ret; } NSAPI_PUBLIC void *system_realloc_perm(void *ptr, int size) { #ifndef DEBUG_MALLOC return realloc(ptr, size); #else int *magic, *length; char *baseptr; char *cptr; cptr = (char *)ptr - DEBUG_MARGIN - 2 * sizeof(int); magic = (int *)cptr; if (*magic == DEBUG_MAGIC) { cptr += sizeof(int); length = (int *)cptr; if (*length < size) { char *newptr = (char *)system_malloc_perm(size); memcpy(newptr, ptr, *length); system_free_perm(ptr); return newptr; }else { return ptr; } } else { return realloc(ptr, size); } #endif } NSAPI_PUBLIC void system_free_perm(void *ptr) { #ifdef DEBUG_MALLOC int *length, *magic; char *baseptr, *cptr; int index; NS_ASSERT(ptr); cptr = baseptr = ((char *)ptr) - DEBUG_MARGIN - 2*sizeof(int); magic = (int *)cptr; if (*magic == DEBUG_MAGIC) { cptr += sizeof(int); length = (int *)cptr; cptr += sizeof(int); for (index=0; index #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadmin/libadmin.h" #include "libadmin/cluster.h" #include "base/util.h" #include #include #include #ifndef XP_WIN32 #include #include #include #include #endif #if defined(SOLARIS) #include #endif /* SOLARIS */ #include "ssl.h" /* * parse_http_header: * * return: 0 on success (server is OK and user is authenticated) * -1 on unmatched remote server (wrt remote_server_id) * -2 on bad authentication. */ NSAPI_PUBLIC int parse_http_header(PRFileDesc *sockd, bufstruct *nbuf, char *remote_server_id) { char *line; /* pointing to each received ASCII line */ int server_OK; /* indicates if remote admin server is good */ int auth_OK; server_OK = 0; auth_OK = 1; while( (line = get_line_from_fd(sockd, nbuf)) != (char *) NULL) { if (is_end_of_headers(line)) { if (!server_OK) { end_http_request(sockd); return(-1); } if (!auth_OK) { end_http_request(sockd); return(-2); } return(0); } if (!strncasecmp(line, "HTTP/", 5)) { if (strstr(line, " 401 Unauthorized")) { auth_OK = 0; } } if (!strncasecmp(line, "Server: ", 8)) { if (strstr(line, remote_server_id)) { server_OK = 1; } } } return(-1); } 389-admin-1.1.35/lib/libadmin/error.c000066400000000000000000000064151220472121400170350ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * error.c - Handle error recovery * * All blame to Mike McCool */ #include "libadmin/libadmin.h" #if 0 #include "cgiutils/cgi-util.h" #endif #include #include #include #ifdef XP_WIN32 #include #include "base/nterr.h" #endif #define ERROR_HTML "error.html" /* Be sure to edit libadmin.h and add new #define types for these headers. */ char *error_headers[MAX_ERROR] = {"File System Error", "Memory Error", "System Error", "Incorrect Usage", "Form Element Missing", "Registry Database Error", "Network Error", "Unexpected Failure", "Warning"}; #ifdef XP_UNIX #define get_error() errno #define verbose_error() system_errmsg() #else /* XP_WIN32 */ int get_error() { int error = GetLastError(); return(error ? error: WSAGetLastError()); } char *verbose_error() { /* Initialize error hash tables */ HashNtErrors(); return alert_word_wrap(system_errmsg(), WORD_WRAP_WIDTH, "\\n"); } #endif /* XP_WIN32 */ void _report_error(int type, char *info, char *details, int shouldexit) { /* Be sure headers are terminated. */ fputs("\n", stdout); fprintf(stdout, "\n"); if(shouldexit) { WSACleanup(); exit(0); } } /* * Format and output a call to the JavaScript alert() function. * The caller must ensure a JavaScript context. */ NSAPI_PUBLIC void output_alert(int type, char *info, char *details, int wait) { char *wrapped=NULL; int err; if(type >= MAX_ERROR) type=DEFAULT_ERROR; wrapped=alert_word_wrap(details, WORD_WRAP_WIDTH, "\\n"); if(!info) info=""; fprintf(stdout, (wait) ? "confirm(\"" : "alert(\""); fprintf(stdout, "%s:%s\\n%s", error_headers[type], info, wrapped); if(type==FILE_ERROR || type==SYSTEM_ERROR) { err = get_error(); if(err != 0) fprintf(stdout, "\\n\\nThe system returned error number %d, " "which is %s.", err, verbose_error()); } fprintf(stdout, "\");"); } NSAPI_PUBLIC void report_error(int type, char *info, char *details) { _report_error(type, info, details, 1); } NSAPI_PUBLIC void report_warning(int type, char *info, char *details) { _report_error(type, info, details, 0); } 389-admin-1.1.35/lib/libadmin/form_get.c000066400000000000000000000063011220472121400175000ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * form_get.c - Functions to help with handling GET requests * * All blame to Mike McCool */ #include "libadmin/libadmin.h" #include #include #include #include #include #include "prprf.h" NSAPI_PUBLIC FILE *open_error_file(char *filename) { FILE *f = NULL; char line[BIG_LINE]; PR_snprintf(line, sizeof(line), "%s%c%s", util_get_html_dir(), FILE_PATHSEP, filename); if(!(f = fopen(line, "r"))) { fprintf(stdout, "\n

Catastrophic error

\n"); fprintf(stdout, "Cannot open any administrative HTML files (errno " "is %d).\n", errno); exit(0); } return f; } NSAPI_PUBLIC FILE *open_html_file(char *filename) { FILE *f = NULL; char line[BIG_LINE]; PR_snprintf(line, sizeof(line), "%s%c%s", util_get_html_dir(), FILE_PATHSEP, filename); if(!(f = fopen(line, "r"))) { report_error(FILE_ERROR, line, "Could not open the HTML file. " "Perhaps the permissions have changed or someone " "has moved the file."); } return f; } NSAPI_PUBLIC int next_html_line(FILE *f, char *line) { if(!(fgets(line, BIG_LINE, f))) { #ifdef XP_UNIX fclose(f); return 0; #else /* XP_WIN32 */ if (feof(f)) { fclose(f); return 0; } #endif /* XP_WIN32 */ } else return 1; } NSAPI_PUBLIC void output_input(char *type, char *name, char *value, char *other) { char * cp; char * dp; int qcnt = 0; /* Do a backslash quote on any double quotes in the value string */ if (value) { /* Count the double-quotes */ cp = value; while ((cp = strpbrk(cp, "\"")) != 0) { ++cp; ++qcnt; } if (qcnt > 0) { /* Allocate buffer for result string */ dp = (char *)MALLOC(strlen(value) + (qcnt * 5) + 1); cp = value; value = dp; while (*cp) { if (*cp == '"') { strcpy(dp, """); dp += 6; cp += 1; } else { *dp++ = *cp++; } } *dp = 0; } } fprintf(stdout, "%s", type, name, (value) ? value : "", (other) ? other : "", ((strcmp(type, "radio")) && (strcmp(type, "checkbox"))) ? "\n" : ""); if (value && (qcnt > 0)) { FREE(value); } } 389-admin-1.1.35/lib/libadmin/httpcon.c000066400000000000000000000221531220472121400173600ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * httpcon.c - Make HTTP requests, do proper buffering of HTTP requests, * etc. * * All blame to Mike McCool */ #include "libadmin/libadmin.h" #include "libadmsslutil/admsslutil.h" #include "libadmin/cluster.h" /* Removed for new ns security #include "sec.h" */ #include #include #include #include #include #include #include #include /* Stuff for making a new HTTP connection. (Cross platform?) */ #include #ifndef XP_WIN32 #include #include #include #include #include #endif #include "nspr.h" #include "private/pprio.h" #include "ssl.h" #include "libadmin/libadmin.h" extern int XP_ERRNO_EWOULDBLOCK; /* Hack here for ns security integration, do not know why SEC_Init is removed from public header */ #if 0 extern void SEC_Init(void); #endif /* #define DEBUG_TRACE 1 */ #undef DEBUG_TRACE #ifdef DEBUG_TRACE FILE *dbf = NULL; int numconns = 0; char *dbd = "/tmp/http_trace.%d"; char dbp[256]; #endif #define HBUF_SIZE 256 #define NBUF_SIZE 1024 #define SERVSSL_ERROR_LEN 1024 #define ADMIN_ID "Netscape-Administrator" #define HEAD_REQ "HEAD / HTTP/1.0\n\n" /* Wrappers so we can do SSL stuffs */ #ifdef XP_UNIX #define sys_socket socket #define sys_connect connect #define sys_read read #define sys_write write #else /* XP_WIN32 */ #define sys_socket socket #define sys_connect connect #define sys_read(fd, line, linesize) recv(fd, line, linesize, 0) #define sys_write(fd, line, linesize) send(fd, line, linesize, 0) #endif /* XP_WIN32 */ /* Buffer grunt work */ NSAPI_PUBLIC bufstruct * new_buffer(int bufsize) { bufstruct *ans = (bufstruct *) MALLOC(sizeof(bufstruct) + 2); char *buffer = (char *) MALLOC(bufsize+2); ans->buf = buffer; ans->bufsize = bufsize; ans->curpos = 0; ans->inbuf = 0; ans->hbuf = (char *) MALLOC(HBUF_SIZE+2); ans->hbufsize = HBUF_SIZE; ans->hbufpos = 0; return ans; } NSAPI_PUBLIC void flush_buffer(bufstruct *buf) { buf->buf[0] = '\0'; buf->curpos = 0; buf->inbuf = 0; buf->hbuf[0] = '\0'; buf->hbufpos = 0; } NSAPI_PUBLIC void delete_buffer(bufstruct *buf) { FREE(buf->buf); FREE(buf->hbuf); FREE(buf); } char _consume(PRFileDesc *sock, char *buf, int bufsize, int *curpos, int *inbuf) { int retcode; int numread = 0; char ans; while (*inbuf == 0) { numread = PR_Read(sock, buf, bufsize); if(numread < 0) { retcode = PR_GetOSError(); if ((retcode == PR_WOULD_BLOCK_ERROR) || (retcode == EAGAIN) || (retcode == 0)) { continue; } else { return '\0'; /* report_error(SYSTEM_ERROR, "Read failed", "Network read failed."); */ } } else if(numread == 0) { return '\0'; } else if(numread < bufsize) { buf[numread] = '\0'; } *inbuf = numread; *curpos = 0; } ans = buf[*curpos]; (*curpos)++; (*inbuf)--; return ans; } /* stdio replacement for a network connection (so shoot me) */ NSAPI_PUBLIC char * get_line_from_fd(PRFileDesc * fd, bufstruct *buf) { char ch; /* Clear the header buffer before getting the next line. */ buf->hbufpos=0; buf->hbuf[buf->hbufpos] = '\0'; while( (ch = _consume(fd, buf->buf, buf->bufsize, &(buf->curpos), &(buf->inbuf))) ) { if (ch == CR) continue; buf->hbuf[buf->hbufpos] = ch; ++buf->hbufpos; if(buf->hbufpos >= buf->hbufsize) { buf->hbufsize+=HBUF_SIZE; buf->hbuf = (char *) REALLOC(buf->hbuf, buf->hbufsize+2); } buf->hbuf[buf->hbufpos] = '\0'; if(ch == LF) { break; } } if(!ch) return NULL; #ifdef DEBUG_TRACE fprintf(dbf, "R:%s", buf->hbuf); #endif return buf->hbuf; } /* send data to a fd */ NSAPI_PUBLIC int send_line_to_fd(PRFileDesc * fd, char *line, int linesize) { #ifdef DEBUG_TRACE fprintf(dbf, "W:%s", line); #endif return(PR_Write(fd, line, linesize)); } /* Decompose a URL into protocol, server, port, and URI */ NSAPI_PUBLIC int decompose_url(char *url, /* IN format: http[s]://server:port/uri */ char **protocol, /* OUT http or https or ftp or ... */ char **server, /* OUT nodename in url */ uint *port, /* OUT port number in url */ char **uri) /* OUT uri port in url */ { char *work = STRDUP(url); char *tmp; char *s_port = NULL; /* munge the URL */ *protocol = work; tmp = strchr(work, ':'); *tmp++ = '\0'; /* 'tmp' should now be: //server:port/uri */ if((*tmp++ != '/') || (*tmp++ != '/')) { /* * suggest library routine to return status instead of aborting... * report_error(INCORRECT_USAGE, url, "Decompose URL got non-URL."); */ return(-1); } *server = tmp; while((*tmp != ':') && (*tmp != '/')) tmp++; if(*tmp == ':') { char save; *tmp++ = '\0'; s_port = tmp; while(isdigit(*tmp)) tmp++; save = *tmp; *tmp = '\0'; *port = atoi(s_port); *tmp = save; } else { if(!strcmp(*protocol, "https")) *port=443; else *port=80; } if(*tmp == '\0') *uri = "/"; else *uri = tmp; return(0); } NSAPI_PUBLIC int is_end_of_headers(char *hline) { return ((hline[0] == LF) || ((hline[0] == CR) && (hline[1] == LF))); } NSAPI_PUBLIC int parse_status_line(char *statusline) { char *hline = STRDUP(statusline); char *t1 = strchr(hline, ' '); char *t2; int ans = 0; if(t1) { t1++; t2 = strchr(t1, ' '); if(t2) { *t2 = '\0'; ans = atoi(t1); } } FREE(hline); return ans; } /* Simple status report stuff */ void _report_status(char *status) { fprintf(stdout, "%s
\n", status); fflush(stdout); } NSAPI_PUBLIC PRFileDesc* make_http_request(char *protocol, char *server, unsigned int port, char *request, int timeout, int *errcode) { PRFileDesc *req_socket= NULL; int retcode; PRNetAddr netAddr; /* removed for new ns security integration struct sockaddr_in *sin = (struct sockaddr_in *) MALLOC(sizeof(struct sockaddr_in)); */ PRHostEnt *hstruct; PRHostEnt hent; char buf[PR_NETDB_BUF_SIZE]; PRStatus err = PR_FAILURE; const char *configdir = util_get_conf_dir(); const char *secdir = util_get_security_dir(); /* removed for new ns security integration memset((char *) sin, 0, sizeof(*sin)); */ if(!isdigit(server[0])) { err = PR_GetHostByName(server, buf, PR_NETDB_BUF_SIZE, &hent); } if (err == PR_FAILURE) { *errcode = ERR_FAIL_DNSLOOKUP; return NULL; } hstruct = &hent; PR_InitializeNetAddr(PR_IpAddrNull, (PRUint16)port, &netAddr); netAddr.inet.ip = *((PRUint32*)hstruct->h_addr_list[0]); /* removed for new ns security integration sin->sin_addr = *((struct in_addr *)hstruct->h_addr_list[0]); */ req_socket = PR_NewTCPSocket(); if(req_socket == NULL) { *errcode = ERR_FAIL_SSLSOCKET; return NULL; } /* sin->sin_family = AF_INET; sin->sin_port = htons((unsigned short)port); */ if (!strcmp(protocol, "https")) { req_socket = SSLSocket_init(req_socket, configdir, secdir); if (req_socket == NULL) { *errcode = PR_GetError(); report_error(SYSTEM_ERROR, "SEC Init Failed", "unable to initialize a secure socket"); } } retcode = PR_Connect(req_socket, &netAddr, PR_SecondsToInterval(timeout)); if (retcode != 0) { PR_Close(req_socket); *errcode = PR_GetError(); return NULL; } #ifdef DEBUG_TRACE sprintf(dbp, dbd, numconns++); dbf = fopen(dbp, "w"); fprintf(dbf, "W:%s", request); #endif retcode = PR_Write(req_socket, request, strlen(request)); if (retcode == -1) { PR_Close(req_socket); *errcode = PR_GetError(); return NULL; } return req_socket; } NSAPI_PUBLIC void end_http_request(PRFileDesc *req_socket) { PR_Close(req_socket); #ifdef DEBUG_TRACE fclose(dbf); dbf = NULL; #endif } 389-admin-1.1.35/lib/libadmin/install.c000066400000000000000000000045451220472121400173540ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * install.c: Routines shared among server (not to be confused with * Netsite) installation programs * * Rob McCool */ #include "libadmin/libadmin.h" #include "libadmin/install.h" #include "base/systems.h" /* ZERO */ #include "base/util.h" /* sprintf */ #include #ifdef XP_WIN32 #define EACCES WSAEACCES #define EADDRINUSE WSAEADDRINUSE #include #include #else #include #endif /* XP_WIN32 */ /* -------------------------------- try_* --------------------------------- */ /* robm This doesn't use net_ abstractions because they drag in SSL */ NSAPI_PUBLIC int try_bind(char *addr, int port) { int sd; struct sockaddr_in sa_server; int ret; #ifdef XP_WIN32 WSADATA wsd; if(WSAStartup(MAKEWORD(1, 1), &wsd) != 0) return -1; #endif if ((sd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP)) == -1) goto you_lose; /* if((setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (void *)&one, sizeof(one))) == -1) goto you_lose; */ ZERO((char *) &sa_server, sizeof(sa_server)); sa_server.sin_family=AF_INET; sa_server.sin_addr.s_addr = (addr ? inet_addr(addr) : htonl(INADDR_ANY)); sa_server.sin_port=htons(port); ret = bind(sd, (struct sockaddr *) &sa_server,sizeof(sa_server)); /* if(ret != -1) listen(sd, 5); */ #ifdef XP_UNIX close(sd); #else closesocket(sd); WSACleanup(); #endif return ret; you_lose: #ifdef XP_WIN32 WSACleanup(); #endif return -1; } 389-admin-1.1.35/lib/libadmin/referer.c000066400000000000000000000052771220472121400173430ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * referer.c - Handle issues with going back from whence you came * * All blame to Mike McCool * Totally rewritten by Fred Cox, under guidance by above. */ #include "libadmin/libadmin.h" #include #include #include #include "prprf.h" #define REFER_VAR "adminReferer" NSAPI_PUBLIC char * get_referer( char **qqqq ) { return cookieValue( REFER_VAR, NULL ); } static char * fixAddition( char *url, char *addition ) { if ( addition ) { char *result = (char *)MALLOC( strlen( url ) + strlen( addition ) + 1 ); int i; for ( i = 0 ; url[i] && url[i] != '?' ; ++i ) { result[i] = url[i]; } result[i] = '?'; result[i+1] = '\0'; strcat( result, addition ); return result; } else { return STRDUP( url ); } } NSAPI_PUBLIC void redirect_to_referer( char *addition ) { char *url; char *ref; ref = cookieValue( REFER_VAR, NULL ); url = fixAddition(ref, addition ); fprintf( stderr, "Content-type: text/html\n\n" "\n", url ); FREE( url ); } NSAPI_PUBLIC void js_open_referer( void ) { char *ref; ref = cookieValue( REFER_VAR, NULL ); fprintf( stdout, "\n", ref ); } /* Blame Rob. */ NSAPI_PUBLIC void redirect_to_script(char *script) { char urlbuf[BIG_LINE]; char *ptr; PR_snprintf(urlbuf, sizeof(urlbuf), "%s%s", getenv("SERVER_URL"), getenv("SCRIPT_NAME")); if ((ptr = strrchr(urlbuf, '/'))) { int maxsize = sizeof(urlbuf)-((ptr-urlbuf)+2); /* one for the '/' and one for the '0' */ PL_strncpyz(ptr + 1, script, maxsize); } else { PR_snprintf(urlbuf, sizeof(urlbuf), "%s/%s", getenv("SERVER_URL"), script); } printf("Location: %s\n\n", urlbuf); } 389-admin-1.1.35/lib/libadmin/template.c000066400000000000000000000450221220472121400175140ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * template.c: The actual HTML templates in a static variable * * All blame to Mike McCool */ #include #include #include #include "template.h" #include "libadmin/libadmin.h" #include "libadmin/dbtlibadmin.h" #include "base/util.h" #include "prprf.h" /* If you add something to this structure, save yourself a lot of grief and put a space after the name. */ static struct template_s templates[] = { {"IF ", "FUNC conditional"}, {"ELSE ", "FUNC conditional"}, {"ENDIF ", "FUNC conditional"}, {"TITLE ", "%s\n" "\n"}, {"PAGEHEADER ", "FUNC pageheader"}, {"DOCSWITCHER ", ""}, {"COPYRIGHT ", ""}, {"RESOURCEPICKER ", "FUNC respicker"}, {"BOOKTRACK ", "FUNC booktrack"}, {"BEGININFO ", "\n" "" #if 0 "" "
" "%s
" "\"*\""\n"}, #endif "\n"}, {"ADDINFO ", "
"}, {"ENDINFO ", "
\n
\n"}, {"SUBMIT ", "FUNC submit\n"}, {"BEGINELEM ", "
"},
/*  {"ELEM ", "
%s"}, */ {"ELEM ", "\n%s"}, /* {"ENDELEM ", "
\n"}, */ {"ENDELEM ", "\n"}, {"ELEMADD ", "%s"}, /* {"ELEMDIV ", "
"}, */ {"ELEMDIV ", "\n"}, {"REFERER ", "FUNC link_referer"}, {"INDEX ", "%s\n"}, {"RESTART ", "%s\n"}, {"ACCESS ", "FUNC makeurl"}, {"COMMIT ", "%s\n"}, {"BACKOUT ", "
If you don't want to %s, you can " "return to the server manager.
\n"}, {"CURSERVNAME", "FUNC curservname"}, {"VERIFY ", "FUNC verify"}, {"HELPLINK", "FUNC helplink"}, {"HELPBUTTON", "FUNC helpbutton"}, {"DIALOGSUBMIT", "FUNC dialogsubmit"} }; #define MAXTEMPLATE (sizeof(templates)/sizeof(templates[0])) int get_directive(char *string); void conditional(char *input, char **vars, int index); void booktrack(char *input, char **vars); void docswitcher(char *input); void link_referer(char **input, char **vars); char **get_vars(char *string); static void output(char *string); void makeurl(char **vars); void curservname(void); void pageheader(char **vars, char **config); void submit(int verify, char **vars); void helplink(); void helpbutton(char *topic); void dialogsubmit(char *topic); static int status = -1; /* Filter a page. Takes the page to filter as an argument. Uses above * filters to process. */ NSAPI_PUBLIC int parse_line(char *line_input, char **input) { register int index; char *position; int dirlen = strlen(DIRECTIVE_START); char **vars; if(!strncmp(line_input, DIRECTIVE_START, dirlen)) { position = (char *) (line_input + dirlen); index = get_directive(position); /* did we get one? */ if(index != -1) { /* if so, get the vars. */ position += strlen(templates[index].name); vars = get_vars(position); /* Dispatch the correct function (done for readability, * although I'm starting to wonder if I should bother) */ if(!strncmp(templates[index].format, "FUNC ", 5)) { if(!strncmp(templates[index].format+5, "conditional", 11)) conditional(input[0], vars, index); else if(!strncmp(templates[index].format+5, "booktrack", 9)) booktrack(input[0], vars); else if(!strncmp(templates[index].format+5, "docswitcher", 11)) docswitcher(input[0]); else if(!strncmp(templates[index].format+5, "link_referer",12)) link_referer(input, vars); else if(!strncmp(templates[index].format+5, "makeurl",7)) makeurl(vars); else if(!strncmp(templates[index].format+5, "curservname",11)) curservname(); else if(!strncmp(templates[index].format+5, "pageheader",10)) pageheader(vars, input); else if(!strncmp(templates[index].format+5, "submit",6)) submit(0, vars); else if(!strncmp(templates[index].format+5, "verify",6)) submit(1, vars); else if(!strncmp(templates[index].format+5, "helpbutton",10)) helpbutton(vars[0]); else if(!strncmp(templates[index].format+5, "helplink",8)) helplink(); else if(!strncmp(templates[index].format+5, "dialogsubmit",12)) dialogsubmit(vars[0]); /* We don't know what this template is. Send it back. */ else return -1; } else { /* I just can't believe there's no easy way to create * a va_list. */ char line[BIG_LINE]; PR_snprintf(line, sizeof(line), templates[index].format, (vars[0] != NULL) ? vars[0]: "", (vars[1] != NULL) ? vars[1]: "", (vars[2] != NULL) ? vars[2]: "", (vars[3] != NULL) ? vars[3]: ""); output(line); } } else { /* We found a directive, but we can't identify it. Send it back.*/ /* Check status first; if we're not supposed to be outputing */ /* because of an "IF" block, don't tell the program to */ /* try and cope with it. */ if(status) return -1; else return 0; } } else /* We found no directive. The line is normal. */ output(line_input); /* If we're here, we either handled it correctly or the line was benign.*/ return 0; } void conditional(char *input, char **vars, int index) { if((!strncmp(templates[index].name, "IF", 2)) && (vars[0] != NULL)) { status = input[atoi(vars[0])] - '0'; } else if((!strncmp(templates[index].name, "ELSE", 4)) && (status != -1)) { status ^= 1; } else if(!strncmp(templates[index].name, "ENDIF", 5)) status = -1; } void booktrack(char *input, char **vars) { char line[BIG_LINE]; if((vars[0] != NULL) && (vars[1] != NULL)) { PR_snprintf(line, sizeof(line), "" "\"\"", (input[0] - '0') ? vars[0] : vars[1], (vars[2] != NULL) ? vars[2] : "none"); output(line); } } void docswitcher(char *input) { char line[BIG_LINE]; char *whichimg, *whatmode; #ifdef USE_ADMSERV char *qs = getenv("QUERY_STRING"); char *sname = getenv("SCRIPT_NAME"); char *mtmp; char *tmp = getenv("SERVER_NAMES"); char *servers = NULL; if(tmp) servers = STRDUP(tmp); #endif if(!(input[0] - '0')) { whichimg = "b-clsd.gif"; whatmode = "Express mode"; } else { whichimg = "b-open.gif"; whatmode = "Full docs"; } mtmp = (char *) MALLOC( (sname? strlen(sname) : 0) + (qs? strlen(qs) : 0) + (strlen(whichimg) + strlen(whatmode)) + 1024); sprintf(mtmp, "
\n" "\n", (qs ? "?0" : sname), whichimg, whatmode); output(mtmp); #ifdef USE_ADMSERV if(!servers) { PR_snprintf(line, sizeof(line), "\n", whatmode); output(line); } else if(servers[0] == '(') { PR_snprintf(line, sizeof(line), "\n"); } else { PR_snprintf(line, sizeof(line), "\n"); } #endif sprintf(mtmp, "\n", (qs? "?0" : sname), whichimg); output(mtmp); #ifdef USE_ADMSERV if(servers) { PR_snprintf(line, sizeof(line), "\n"); output(line); } #endif sprintf(line, "
" "" "%sCurrent servers:
\n"); output(line); output(""); tmp=strtok(++servers, "|)"); while(tmp) { char *tmp2; output(""); tmp2=strchr(tmp, '-'); tmp2++; output(tmp2); tmp=strtok(NULL, "|)"); if(tmp) output(","); output("\n"); } output("
Current server: "); output(line); output(""); tmp = strchr(servers, '-'); *tmp++ = '\0'; output(tmp); output(""); output("" "
" "" "Choose a new server or set of servers
\n"); output(line); output("
\n"); } void makeurl(char **vars) { char line[BIG_LINE]; PR_snprintf(line,sizeof(line),"%s\n", get_serv_url(), vars[0] ? vars[0] : ""); output(line); } void curservname(void) { output("admin-serv"); } NSAPI_PUBLIC void pageheader(char **vars, char **config) { char line[BIG_LINE]; #if 0 /* MLM - put in to have non-working Back button */ char *ref=get_referer(config); char *t; #endif output("
\n"); util_snprintf(line, BIG_LINE, ""); output(line); util_snprintf(line, BIG_LINE, "
"); output(line); util_snprintf(line, BIG_LINE, "
"); output(line); #if 0 /* MLM - put in to have non-working Back button */ t=strrchr(ref, '/'); *t++='\0'; util_snprintf(line, BIG_LINE, "", ref, t); output(line); util_snprintf(line, BIG_LINE, "\n"); output(line); #endif util_snprintf(line, BIG_LINE, "%s" "
" "", vars[2]); output(line); output("
\n"); } char *_get_help_button(char *topic) { char line[BIG_LINE]; util_snprintf( line, BIG_LINE, "", XP_GetAdminStr(DBT_help_), topic ? helpJavaScriptForTopic( topic ) : helpJavaScript() ); return(STRDUP(line)); } NSAPI_PUBLIC char *helpJavaScriptForTopic( char *topic ) { char *tmp; char line[BIG_LINE]; char *server="admin-serv"; char *type; int typeLen; /* Get the server type, without the instance name into type */ tmp = strchr( server, '-' ); typeLen = tmp - server; type = (char *)MALLOC( typeLen + 1 ); type[typeLen] = '\0'; while ( typeLen-- ) { type[typeLen] = server[typeLen]; } /* * URL changed to add new "mapfile" parameter for 5.0 help system - Adam */ util_snprintf( line, sizeof(line), "window.open('%s/manual/help/help?helpdir=admin&token=%s&mapfile=tokens.map', '" INFO_IDX_NAME"_%s', " HELP_WIN_OPTIONS");", getenv("SERVER_URL"), topic, type ); return(STRDUP(line)); } NSAPI_PUBLIC char *helpJavaScript() { char *tmp, *sn; tmp=STRDUP(getenv("SCRIPT_NAME")); if(strlen(tmp) > (unsigned)BIG_LINE) tmp[BIG_LINE-2]='\0'; sn=strrchr(tmp, '/'); if( sn ) *sn++='\0'; return helpJavaScriptForTopic( sn ); } void submit(int verify, char **vars) { char line[BIG_LINE]; char outline[BIG_LINE]; if(verify) { util_snprintf(line, sizeof(line), "\n", vars[0]); output(line); } output("
"); if(!verify) { util_snprintf(outline, sizeof(outline), "%s%s%s%s%s", "\n"); } else { util_snprintf(outline, sizeof(outline), "%s%s%s%s%s%s", "\n"); } output(outline); util_snprintf(outline, sizeof(outline), "%s%s%s%s", "\n"); output(outline); util_snprintf(line, sizeof(line), "\n", _get_help_button( vars[0] )); output(line); output("
", "", "", "", "", "%s
\n"); output("\n"); } void helplink() { char *tmp, *sn; char line[BIG_LINE]; char *server="admin-serv"; char *type; int typeLen; /* Get the server type, without the instance name into type */ tmp = strchr( server, '-' ); typeLen = tmp - server; type = (char *)MALLOC( typeLen + 1 ); type[typeLen] = '\0'; while ( typeLen-- ) { type[typeLen] = server[typeLen]; } tmp=STRDUP(getenv("SCRIPT_NAME")); if(strlen(tmp) > (unsigned)BIG_LINE) tmp[BIG_LINE-2]='\0'; sn=strrchr(tmp, '/'); if( sn ) { *sn++='\0'; /* * URL changed to add new "mapfile" parameter for 5.0 help system - Adam */ util_snprintf( line, sizeof(line), "", getenv("SERVER_URL"), sn, getenv("SERVER_URL"), sn, type ); output(line); } } void helpbutton(char *topic) { output("
" "
"); output(_get_help_button(topic)); output("
\n"); } void dialogsubmit(char *topic) { char line[BIG_LINE]; char outline[BIG_LINE]; output("
"); util_snprintf(outline, BIG_LINE, "%s%s%s%s%s", "\n"); output(outline); util_snprintf(outline, BIG_LINE, "%s%s%s%s%s", "\n"); output(outline); util_snprintf(line, BIG_LINE, "\n", _get_help_button(topic)); output(line); output("
", "", "", "%s
\n"); output("\n"); output("\n"); } void link_referer(char **input, char **vars) { char line[BIG_LINE]; PR_snprintf(line, sizeof(line), "\n", ( vars[0] ? vars[0] : getenv( "SCRIPT_NAME" ) ), cookieValue( "adminReferer", NULL ) ); output( line ); } int get_directive(char *string) { int index = -1; register int x; for(x=0; x < MAXTEMPLATE; x++) { if(!strncmp(string, templates[x].name, strlen(templates[x].name))) { index = x; break; } } return index; } NSAPI_PUBLIC int directive_is(char *target, char *directive) { char *position = (target + strlen(DIRECTIVE_START)); return(!(strncmp(directive, position, strlen(directive)))); } char **get_vars(char *string) { char **vars; register int x; int isvar; char scratch[BIG_LINE]; char lastchar; /* Initialize the vars array. */ vars = (char **) MALLOC((MAXVARS)*(sizeof(char *))); for(x=0; x< MAXVARS; x++) vars[x] = NULL; isvar = -1; x = 0; scratch[0] = '\0'; lastchar = ' '; while(*string != '\0') { if((*string == '\"') && (lastchar != '\\')) if(isvar != -1) { vars[x++] = (char *)STRDUP(scratch); isvar = -1; if(x == MAXVARS) break; } else isvar = 0; else if((isvar != -1) && (isvar < sizeof(scratch))) { scratch[isvar++] = *string; scratch[isvar] = '\0'; } else if(*string == DIRECTIVE_END) break; lastchar = *string; string++; } return vars; } static void output(char *line) { if(status) fputs(line, stdout); } 389-admin-1.1.35/lib/libadmin/template.h000066400000000000000000000116141220472121400175210ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ /* * template.h: Header for HTML page template directives * * All blame to Mike McCool */ #ifndef __template__ #define __template__ /* The maximum number of variables for a given template */ #define MAXVARS 4 /* The structure of a directive is fairly simple. You have: * * *dist returns escaped string; caller needs to free it. * src does not include dn special characters --> *dist == NULL * Failure * return value: -1 */ int escape_for_dn(char *src, char **dist) { char *srcp = NULL; char *distp = NULL; char *dn = NULL; char *end = NULL; int rc = -1; if (NULL == dist) { return rc; } *dist = NULL; if (NULL == src) { return rc; } end = src + strlen(src); for (srcp = src; srcp && *srcp; srcp++) { for (dn = dnspecial; dn && *dn; dn++) { if (*srcp == *dn) { goto out; } } } out: rc = 0; if (*srcp && (*srcp == *dn)) { /* src includes a dn special character */ char *distend = NULL; int maxdistlen = ((srcp - src) + (end - srcp) * 2) + 1; /* max necessary length */ *dist = (char *)PR_Calloc(sizeof(char), maxdistlen); if (NULL == *dist) { rc = -1; goto bail; } distend = *dist + maxdistlen; memcpy(*dist, src, srcp - src); /* copy non escaped part */ distp = *dist + (srcp - src); put_dnescaped_char(&distp, &srcp); while (srcp && *srcp && distp && distp < distend) { for (dn = dnspecial; dn && *dn; dn++) { if (*srcp == *dn) { put_dnescaped_char(&distp, &srcp); break; } } if ('\0' == *dn) { *distp++ = *srcp++; } } if (distp == distend) { PR_Free(*dist); *dist = NULL; rc = -1; } } bail: return rc; } int _admin_dumbsort(const void *s1, const void *s2) { return strcmp(*((char **)s1), *((char **)s2)); } #ifdef XP_UNIX /* WIN32 change */ /* Lists all files in a directory. */ char **list_directory(char *path, int dashA) { char **ar; DIR *ds; struct dirent *d; int n, p; n = NUM_ENTRIES; p = 0; ar = (char **) MALLOC(n * sizeof(char *)); if(!(ds = opendir(path))) { free(ar); return NULL; } while( (d = readdir(ds)) ) { if ( ( d->d_name[0] != '.' ) || ( dashA && d->d_name[1] && ( d->d_name[1] != '.' || d->d_name[2] ) ) ) { if(p == (n-1)) { n += NUM_ENTRIES; ar = (char **) REALLOC(ar, n*sizeof(char *)); } /* 2: Leave space to add a trailing slash later */ ar[p] = (char *) MALLOC(strlen(d->d_name) + 2); strcpy(ar[p++], d->d_name); } } closedir(ds); qsort((void *)ar, p, sizeof(char *), _admin_dumbsort); ar[p] = NULL; return ar; } #else /* WIN32 change */ /* Lists all files in a directory. */ char **list_directory(char *path, int dashA) { char **ar; SYS_DIR ds; SYS_DIRENT *d; int n, p; n = NUM_ENTRIES; p = 0; ar = (char **) MALLOC(n * sizeof(char *)); if(!(ds = dir_open(path))) { return NULL; } while( (d = dir_read(ds)) ) { if ( ( d->d_name[0] != '.' ) || ( dashA && d->d_name[1] && ( d->d_name[1] != '.' || d->d_name[2] ) ) ) { if(p == (n-1)) { n += NUM_ENTRIES; ar = (char **) REALLOC(ar, n*sizeof(char *)); } /* 2: Leave space to add a trailing slash later */ ar[p] = (char *) MALLOC(strlen(d->d_name) + 2); strcpy(ar[p++], d->d_name); } } dir_close(ds); qsort((void *)ar, p, sizeof(char *), _admin_dumbsort); ar[p] = NULL; return ar; } #endif /* WIN32 */ int file_exists(char *fn) { struct stat finfo; if(!stat(fn, &finfo)) return 1; else return 0; } int get_file_size(char *fn) { struct stat finfo; int ans = -1; if(!stat(fn, &finfo)) { ans = finfo.st_size; } else { report_error(FILE_ERROR, fn, "Could not get size of file."); } return ans; } /* return: mtime(f1) < mtime(f2) ? */ int mtime_is_earlier(char *file1, char *file2) { struct stat fi1, fi2; if(stat(file1, &fi1)) { return -1; } if(stat(file2, &fi2)) { return -1; } return( (fi1.st_mtime < fi2.st_mtime) ? 1 : 0); } time_t get_mtime(char *fn) { struct stat fi; if(stat(fn, &fi)) return 0; return fi.st_mtime; } int all_numbers(char *target) { register int x=0; while(target[x]) if(!isdigit(target[x++])) return 0; return 1; } int all_numbers_float(char *target) { register int x; int seenpt; for(x = 0, seenpt = 0; target[x]; ++x) { if((target[x] == '.') && (!seenpt)) seenpt = 1; else if((!isdigit(target[x])) && seenpt) return 0; } return 1; } /* Get the current HTTP server URL. */ char *get_serv_url(void) { return(getenv("SERVER_URL")); } /* This is basically copy_file from the install section, with the error * reporting changed to match the admin stuff. Since some stuff depends * on copy_file being the install version, I'll cheat and call this one * cp_file. */ #ifdef XP_UNIX #define COPY_BUFFER_SIZE 4096 void cp_file(char *sfile, char *dfile, int mode) { int sfd, dfd, len; struct stat fi; char copy_buffer[COPY_BUFFER_SIZE]; unsigned long read_len; /* Make sure we're in the right umask */ umask(022); if( (sfd = open(sfile, O_RDONLY)) == -1) report_error(FILE_ERROR, sfile, "Can't open file for reading."); fstat(sfd, &fi); if(!(S_ISREG(fi.st_mode))) { close(sfd); return; } len = fi.st_size; if( (dfd = open(dfile, O_RDWR | O_CREAT | O_TRUNC, mode)) == -1) report_error(FILE_ERROR, dfile, "Can't write to file."); while(len) { read_len = len>COPY_BUFFER_SIZE?COPY_BUFFER_SIZE:len; if ( (read_len = read(sfd, copy_buffer, read_len)) == -1) { report_error(FILE_ERROR, sfile, "Error reading file for copy."); } if ( write(dfd, copy_buffer, read_len) != read_len) { report_error(FILE_ERROR, dfile, "Error writing file for copy."); } len -= read_len; } close(sfd); close(dfd); } #else /* XP_WIN32 */ void cp_file(char *sfile, char *dfile, int mode) { HANDLE sfd, dfd, MapHandle; PCHAR fp; DWORD BytesWritten = 0; DWORD len; if( (sfd = CreateFile(sfile, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) { report_error(FILE_ERROR, "Cannot open file for reading", sfile); } len = GetFileSize(sfd, NULL); if( (dfd = CreateFile(dfile, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) { report_error(FILE_ERROR, "Cannot open destination file for writing", dfile); } if (len == 0) return; if( (MapHandle = CreateFileMapping(sfd, NULL, PAGE_READONLY, 0, 0, NULL)) == NULL) { report_error(FILE_ERROR, "Cannot create file mapping", sfile); } if (!(fp = MapViewOfFile(MapHandle, FILE_MAP_READ, 0, 0, 0))) { report_error(FILE_ERROR, "Cannot map file %s", sfile); } while ( len) { if(!WriteFile(dfd, fp, len, &BytesWritten, NULL)) { report_error(FILE_ERROR, "Cannot write new file", dfile); } len -= BytesWritten; fp += BytesWritten; } CloseHandle(sfd); UnmapViewOfFile(fp); CloseHandle(MapHandle); FlushFileBuffers(dfd); CloseHandle(dfd); } #endif int delete_file(char *path) { #ifdef XP_UNIX return unlink(path); #else return !(DeleteFile(path)); #endif } void create_dir(char *dir, int mode) { if ((dir == (char *) NULL) || (strlen(dir) == 0)) { report_error(FILE_ERROR, "No directory is specified", "Could not create a necessary directory."); } if(!file_exists(dir)) { #ifdef XP_UNIX if(mkdir(dir, mode) == -1) { #else /* XP_WIN32 */ if(!CreateDirectory(dir, NULL)) { if (GetLastError() != ERROR_ALREADY_EXISTS) #endif /* XP_WIN32 */ report_error(FILE_ERROR, dir, "Could not create a necessary directory."); } } } #ifdef XP_UNIX SYS_FILE lf; #elif defined(XP_WIN32) HANDLE lf; #endif /* Ripped off from the client. (Sorry, Lou.) */ /* */ /* The magic set of 64 chars in the uuencoded data */ unsigned char uuset[] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T', 'U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7', '8','9','+','/' }; int do_uuencode(unsigned char *src, unsigned char *dst, int srclen) { int i, r; unsigned char *p; /* To uuencode, we snip 8 bits from 3 bytes and store them as 6 bits in 4 bytes. 6*4 == 8*3 (get it?) and 6 bits per byte yields nice clean bytes It goes like this: AAAAAAAA BBBBBBBB CCCCCCCC turns into the standard set of uuencode ascii chars indexed by numbers: 00AAAAAA 00AABBBB 00BBBBCC 00CCCCCC Snip-n-shift, snip-n-shift, etc.... */ for (p=dst,i=0; i < srclen; i += 3) { /* Do 3 bytes of src */ register char b0, b1, b2; b0 = src[0]; if (i==srclen-1) b1 = b2 = '\0'; else if (i==srclen-2) { b1 = src[1]; b2 = '\0'; } else { b1 = src[1]; b2 = src[2]; } *p++ = uuset[b0>>2]; *p++ = uuset[(((b0 & 0x03) << 4) | ((b1 & 0xf0) >> 4))]; *p++ = uuset[(((b1 & 0x0f) << 2) | ((b2 & 0xc0) >> 6))]; *p++ = uuset[b2 & 0x3f]; src += 3; } *p = 0; /* terminate the string */ r = (unsigned char *)p - (unsigned char *)dst;/* remember how many we did */ /* Always do 4-for-3, but if not round threesome, have to go clean up the last extra bytes */ for( ; i != srclen; i--) *--p = '='; return r; } char *alert_word_wrap(char *str, int width, char *linefeed) { char *ans = NULL; int counter=0; int lsc=0, lsa=0; register int strc=0, ansc=0; register int x=0; /* assume worst case */ ans = (char *) MALLOC((strlen(str)*strlen(linefeed))+32); for(strc=0, ansc=0; str[strc]; /*none*/) { if(str[strc]=='\n') { counter=0; lsc=0, lsa=0; for(x=0; linefeed[x]; x++) { ans[ansc++]=linefeed[x]; } strc++; } else if(str[strc]=='\r') { strc++; } else if(str[strc]=='\\') { ans[ansc++]='\\'; ans[ansc++]=strc++; } else { if(counter==width) { if(lsc && lsa) { strc=lsc; ansc=lsa; counter=0; lsc=0, lsa=0; for(x=0; linefeed[x]; x++) { ans[ansc++]=linefeed[x]; } strc++; } else { /* else, you're a loser, I'm breaking your big word anyway */ counter=0; lsc=0, lsa=0; for(x=0; linefeed[x]; x++) { ans[ansc++]=linefeed[x]; } strc++; } } else { if(str[strc] == ' ') { lsc=strc; lsa=ansc; } ans[ansc++]=str[strc++]; counter++; } } } ans[ansc]='\0'; return ans; } /* do fgets with a filebuffer *, instead of a File *. Can't use util_getline because it complains if the line is too long. It does throw away s, though. */ NSAPI_PUBLIC char *system_gets( char *line, int size, filebuffer *fb ) { int c; int i = 0; while ( --size ) { switch ( c = filebuf_getc( fb ) ) { case IO_EOF: line[i] = '\0'; return i ? line : NULL; case LF: line[i] = c; line[i+1] = '\0'; return line; /* got a line, and it fit! */ case IO_ERROR: return NULL; case CR: ++size; break; default: line[i++] = c; break; } } /* if we got here, then we overran the buffer size */ line[i] = '\0'; return line; } #ifndef WIN32 /* make a zero length file, no matter how long it was before */ NSAPI_PUBLIC int system_zero( SYS_FILE f ) { ftruncate( PR_FileDesc2NativeHandle( f ), 0 ); return 0; } #endif /*********************************************************************** ** FUNCTION: cookieValue ** DESCRIPTION: ** Get the current value of the cookie variable ** INPUTS: var - the name of the cookie variable ** val - if non-NULL, set the in-memory copy of the var ** OUTPUTS: None ** RETURN: NULL if the var doesn't exist, else the value ** SIDE EFFECTS: ** Eats memory ** RESTRICTIONS: ** Don't screw around with the returned string, if anything else wants ** to use it. ** MEMORY: This is a memory leak, so only use it in CGIs ** ALGORITHM: ** If it's never been called, build a memory structure of the ** cookie variables. ** Look for the passed variable, and return its value, or NULL ***********************************************************************/ NSAPI_PUBLIC char * cookieValue( char *var, char *val ) { static char **vars = NULL; static char **vals = NULL; static int numVars = -1; int i; if ( numVars == -1 ) { /* first time, init the structure */ char *cookie = getenv( "HTTP_COOKIE" ); if ( cookie && *cookie ) { int len = strlen( cookie ); int foundVal = 0; cookie = STRDUP( cookie ); numVars = 0; vars = (char **)MALLOC( sizeof( char * ) ); vals = (char **)MALLOC( sizeof( char * ) ); vars[0] = cookie; for ( i = 0 ; i < len ; ++i ) { if ( ( ! foundVal ) && ( cookie[i] == '=' ) ) { vals[numVars++] = cookie + i + 1; cookie[i] = '\0'; foundVal = 1; } else if ( ( cookie[i] == ';' ) && ( cookie[i+1] == ' ' ) ) { cookie[i] = '\0'; vals = (char **) REALLOC( vals, sizeof( char * ) * ( numVars + 1 ) ); vars = (char **) REALLOC( vars, sizeof( char * ) * ( numVars + 1 ) ); vars[numVars] = cookie + i + 2; i += 2; foundVal = 0; } } } else { /* no cookie, no vars */ numVars = 0; } } for ( i = 0 ; i < numVars ; ++i ) { if ( strcmp( vars[i], var ) == 0 ) { if ( val ) { vals[i] = STRDUP( val ); } else { return vals[i]; } } } return NULL; } /*********************************************************************** ** FUNCTION: jsEscape ** DESCRIPTION: ** Escape the usual suspects, so the parser javascript parser won't eat them ** INPUTS: src - the string ** OUTPUTS: NONE ** RETURN: A malloced string, containing the escaped src ** SIDE EFFECTS: ** None, except for more memory being eaten ** RESTRICTIONS: ** None ** MEMORY: One Malloc, you should free this if you care ***********************************************************************/ NSAPI_PUBLIC char * jsEscape( char *src ) { int needsEscaping = 0; int i; char *dest; for ( i = 0 ; src[i] ; ++i ) { if ( src[i] == '\\' || src[i] == '\'' || src[i] == '"' ) { ++needsEscaping; } } dest = (char *)MALLOC( i + needsEscaping + 1 ); for ( i = 0 ; *src ; ++src ) { if ( ( *src == '\\' ) || ( *src == '\'' ) || ( *src == '"' ) ) { dest[i++] = '\\'; /* escape */ } dest[i++] = *src; } dest[i] = '\0'; return dest; } /*********************************************************************** ** FUNCTION: jsPWDialogSrc ** DESCRIPTION: ** Put the source to the passwordDialog JavaScript function out. ** INPUTS: inScript - if true, don't put \n" ); } } /* this macro was copied from libldap/tmplout.c */ #define HREF_CHAR_ACCEPTABLE( c ) (( c >= '-' && c <= '9' ) || \ ( c >= '@' && c <= 'Z' ) || \ ( c == '_' ) || \ ( c >= 'a' && c <= 'z' )) /* this function is copied from libldap/tmplout.c:strcat_escaped */ NSAPI_PUBLIC void htmladmin_strcat_escaped( char *s1, char *s2 ) { unsigned char *q; char *p, *hexdig = "0123456789ABCDEF"; p = s1 + strlen( s1 ); for ( q = (unsigned char *)s2; *q != '\0'; ++q ) { if ( HREF_CHAR_ACCEPTABLE( *q )) { *p++ = *q; } else { *p++ = '%'; *p++ = hexdig[ *q >> 4 ]; *p++ = hexdig[ *q & 0x0F ]; } } *p = '\0'; } NSAPI_PUBLIC char *htmladmin_strdup_escaped( char *s ) { char *p; p = (char *)malloc( 3 * strlen( s ) + 1 ); *p = '\0'; htmladmin_strcat_escaped( p, s ); return( p ); } /* returns true if the given path is a valid directory, false otherwise */ NSAPI_PUBLIC int util_is_dir_ok(const char *path) { PRFileInfo prinfo; int ret = 0; if (path && *path && (PR_SUCCESS == PR_GetFileInfo(path, &prinfo)) && prinfo.type == PR_FILE_DIRECTORY) { ret = 1; } return ret; } /* returns true if the given path is a valid file, false otherwise */ NSAPI_PUBLIC int util_is_file_ok(const char *path) { PRFileInfo prinfo; int ret = 0; if (path && *path && (PR_SUCCESS == PR_GetFileInfo(path, &prinfo)) && prinfo.type == PR_FILE_FILE) { ret = 1; } return ret; } /* returns true if the file was found somewhere, false otherwise */ NSAPI_PUBLIC int util_find_file_in_paths( char *filebuf, /* this will be filled in with the full path/filename if found, '\0' otherwise */ size_t bufsize, /* size of filebuf e.g. sizeof(filebuf) */ const char *filename, /* the base filename to look for */ const char *path, /* path given by caller */ const char *arpath, /* path relative to ADMSERV_ROOT */ const char *nrpath /* path relative to NETSITE_ROOT */ ) { int retval = 0; const char *admroot = getenv("ADMSERV_CONF_DIR"); /* try given path */ PR_snprintf(filebuf, bufsize, "%s/%s", path, filename); retval = util_is_file_ok(filebuf); if (!retval && admroot) { /* look in ADMSERV_ROOT */ PR_snprintf(filebuf, bufsize, "%s%s%s/%s", admroot, (arpath && *arpath) ? "/" : "", (arpath && *arpath) ? arpath : "", filename); retval = util_is_file_ok(filebuf); } if (!retval) { filebuf[0] = '\0'; } return retval; } NSAPI_PUBLIC char* util_get_conf_dir(void) { const char *admroot = getenv("ADMSERV_CONF_DIR"); static char confdir[PATH_MAX]; if (!confdir[0]) { if (util_is_dir_ok(admroot)) { PR_snprintf(confdir, sizeof(confdir), admroot); } else if (util_is_dir_ok(CONFIGDIR)) { PR_snprintf(confdir, sizeof(confdir), CONFIGDIR); } else { return NULL; } } return confdir; } NSAPI_PUBLIC char* util_get_security_dir(void) { const char *admroot = getenv("ADMSERV_CONF_DIR"); static char secdir[PATH_MAX]; if (!secdir[0]) { if (util_is_dir_ok(admroot)) { PR_snprintf(secdir, sizeof(secdir), admroot); } else if (util_is_dir_ok(SECURITYDIR)) { PR_snprintf(secdir, sizeof(secdir), SECURITYDIR); } else { return util_get_conf_dir(); } } return secdir; } NSAPI_PUBLIC char* util_get_log_dir(void) { const char *admroot = getenv("ADMSERV_LOG_DIR"); static char logdir[PATH_MAX]; if (!logdir[0]) { if (util_is_dir_ok(admroot)) { PR_snprintf(logdir, sizeof(logdir), admroot); } else if (util_is_dir_ok(LOGDIR)) { PR_snprintf(logdir, sizeof(logdir), LOGDIR); } else { return NULL; } } return logdir; } NSAPI_PUBLIC char* util_get_pid_dir(void) { const char *admroot = getenv("ADMSERV_PID_DIR"); static char piddir[PATH_MAX]; if (!piddir[0]) { if (util_is_dir_ok(admroot)) { PR_snprintf(piddir, sizeof(piddir), admroot); } else if (util_is_dir_ok(PIDDIR)) { PR_snprintf(piddir, sizeof(piddir), PIDDIR); } else { return NULL; } } return piddir; } /* old style html dir == progpath/../html */ #define HTML_DIR "../html/" NSAPI_PUBLIC const char* util_get_html_dir(void) { const char *admroot = getenv("ADMSERV_ROOT"); const char *nsroot = getenv("NETSITE_ROOT"); static char htmldir[PATH_MAX]; if (!htmldir[0]) { if (util_is_dir_ok(HTMLDIR)) { PR_snprintf(htmldir, sizeof(htmldir), HTMLDIR); } else if (util_is_dir_ok(admroot)) { PR_snprintf(htmldir, sizeof(htmldir), "%s/../../bin/admin/admin/html", admroot); } else if (util_is_dir_ok(nsroot)) { PR_snprintf(htmldir, sizeof(htmldir), "%s/bin/admin/admin/html", nsroot); } else { PR_snprintf(htmldir, sizeof(htmldir), HTML_DIR); } } return htmldir; } NSAPI_PUBLIC const char* util_get_icon_dir(void) { const char *admroot = getenv("ADMSERV_ROOT"); const char *nsroot = getenv("NETSITE_ROOT"); static char icondir[PATH_MAX]; if (!icondir[0]) { if (util_is_dir_ok(ICONDIR)) { PR_snprintf(icondir, sizeof(icondir), ICONDIR); } else if (util_is_dir_ok(admroot)) { PR_snprintf(icondir, sizeof(icondir), "%s/../../bin/admin/admin/icons", admroot); } else if (util_is_dir_ok(nsroot)) { PR_snprintf(icondir, sizeof(icondir), "%s/bin/admin/admin/icons", nsroot); } else { return NULL; } } return icondir; } /* return true if all of the chars in s are valid chars for use in file and directory names, and false otherwise. This means that the string must begin with a letter or number, and must contain letters, numbers, '.', '-' and '_'. The main purpose of this is to see if a malicious client is sending us bogus path names in an attempt to gain access or DoS. */ NSAPI_PUBLIC int util_is_valid_path_string(const char *s) { int ret = 0; if (s) { if (isalnum(*s)) { ret = 1; for(; ret && *s; ++s) { ret = isalnum(*s) || (*s == '-') || (*s == '_') || (*s == '.'); } } } return ret; } /* try various ways to determine if the given name is a valid file or directory - this value is passed in as a form parameter, and our motto is "Don't trust the user!" If the given filetype is directory, also check to see if the optional given filename (may be NULL) is in the given directory */ NSAPI_PUBLIC int util_verify_file_or_dir( const char *name, /* name of file or directory to check */ PRFileType filetype, /* type of name */ const char *childname, /* optional child file/dir to check inside given parent name */ size_t childlen, /* only compare first childlen chars of childname - use -1 for entire string */ PRFileType childtype /* type of child */ ) { int ret = 0; PRFileInfo fileinfo; /* first, just a simple access check */ PRStatus status = PR_GetFileInfo(name, &fileinfo); ret = ((status == PR_SUCCESS) && (fileinfo.type == filetype)); if (ret) { /* checks out ok - let's split it into the base name and the parent dir, open the parent dir, and see if the base name exists in the parent dir */ char *copy = PL_strdup(name); size_t len = strlen(copy); char *ptr = ©[len-1]; /* get the basename - a really bad name may look like /path/foo/// or even ///////////////// */ for (; (ptr > copy) && (*ptr == '/'); --ptr) { /* do nothing */ } if ((ptr == copy) && (*ptr == '/')) { /* bad - string consists of nothing but '/' */ ptr = NULL; ret = 0; } else { PRDir *pdir; PRDirEntry *pent; ret = 0; if (*ptr == '/') { *ptr = 0; /* terminate the string at the first trailing '/' */ } ptr = strrchr(copy, '/'); if (!ptr) { ptr = copy; copy = PL_strdup("."); } else { *ptr = 0; ++ptr; ptr = PL_strdup(ptr); } /* copy now points at the parent, ptr at the child */ if ((pdir = PR_OpenDir(copy))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { ret = !strcmp(pent->name, ptr); } PR_CloseDir(pdir); } if (ret && childname && (filetype == PR_FILE_DIRECTORY)) { ret = 0; /* we've verified that name is a valid directory - see if the given filename exists in that directory */ if ((pdir = PR_OpenDir(name))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { if (childlen > 0) { ret = !strncmp(pent->name, childname, childlen); } else { ret = !strcmp(pent->name, childname); } } PR_CloseDir(pdir); if (ret) { /* child exists - check type */ char *fullname = PR_smprintf("%s%c%s", name, FILE_PATHSEP, childname); status = PR_GetFileInfo(fullname, &fileinfo); ret = ((status == PR_SUCCESS) && (fileinfo.type == childtype)); PR_smprintf_free(fullname); } } } } PL_strfree(copy); PL_strfree(ptr); } return ret; } NSAPI_PUBLIC int util_psetHasObjectClass(PsetHndl pset, const char *ocname) { int rval = 0; char *val = NULL; ValueType nodeObjectClass = psetGetObjectClass(pset, "" /* use root node */, &rval); ValueType iter = nodeObjectClass; rval = 0; while ((!rval) && ((val = *iter++))) { rval = !PL_strcasecmp(ocname, val); } deleteValue(nodeObjectClass); return rval; } #if defined(USE_OPENLDAP) /* mozldap ldap_init and ldap_url_parse accept a hostname in the form host1[:port1]SPACEhost2[:port2]SPACEhostN[:portN] where SPACE is a single space (0x20) character for openldap, we have to convert this to a string like this: PROTO://host1[:port1]/SPACEPROTO://host2[:port2]/SPACEPROTO://hostN[:portN]/ where PROTO is ldap or ldaps or ldapi if proto is NULL, assume hostname_or_uri is really a valid ldap uri */ static char * convert_to_openldap_uri(const char *hostname_or_uri, int port, const char *proto) { char *retstr = NULL; char *my_copy = NULL; char *start = NULL; char *iter = NULL; char *s = NULL; const char *brkstr = " "; if (!hostname_or_uri) { return NULL; } my_copy = PL_strdup(hostname_or_uri); /* see if hostname_or_uri is an ldap uri */ if (!proto && !PL_strncasecmp(my_copy, "ldap", 4)) { start = my_copy + 4; if ((*start == 's') || (*start == 'i')) { start++; } if (!PL_strncmp(start, "://", 3)) { *start = '\0'; proto = my_copy; start += 3; } else { #ifdef DEBUG fprintf(stderr, "convert_to_openldap_uri: The given LDAP URI [%s] is not valid\n", hostname_or_uri); #endif goto end; } } else if (!proto) { #ifdef DEBUG fprintf(stderr, "convert_to_openldap_uri: The given LDAP URI [%s] is not valid\n", hostname_or_uri); #endif goto end; } else { start = my_copy; /* just assume it's not a uri */ } for (s = strtok_r(my_copy, brkstr, &iter); s != NULL; s = strtok_r(NULL, brkstr, &iter)) { char *ptr; int last = 0; /* strtok will grab the '/' at the end of the uri, if any, so terminate parsing there */ if ((ptr = strchr(s, '/'))) { *ptr = '\0'; last = 1; } if (retstr) { retstr = PR_sprintf_append(retstr, "/ %s://%s", proto, s); } else { retstr = PR_smprintf("%s://%s", proto, s); } if (last) { break; } } /* add the port on the last one */ retstr = PR_sprintf_append(retstr, ":%d/", port); end: PL_strfree(my_copy); return retstr; } #endif /* USE_OPENLDAP */ const char * util_urlparse_err2string(int err) { const char *s="internal error"; switch( err ) { case 0: s = "no error"; break; case LDAP_URL_ERR_BADSCOPE: s = "invalid search scope"; break; case LDAP_URL_ERR_MEM: s = "unable to allocate memory"; break; case LDAP_URL_ERR_PARAM: s = "bad parameter to an LDAP URL function"; break; #if defined(USE_OPENLDAP) case LDAP_URL_ERR_BADSCHEME: s = "does not begin with ldap://, ldaps://, or ldapi://"; break; case LDAP_URL_ERR_BADENCLOSURE: s = "missing trailing '>' in enclosure"; break; case LDAP_URL_ERR_BADURL: s = "not a valid LDAP URL"; break; case LDAP_URL_ERR_BADHOST: s = "hostname part of url is not valid or not given"; break; case LDAP_URL_ERR_BADATTRS: s = "attribute list not formatted correctly or missing"; break; case LDAP_URL_ERR_BADFILTER: s = "search filter not correct"; break; case LDAP_URL_ERR_BADEXTS: s = "extensions not specified correctly"; break; #else /* !USE_OPENLDAP */ case LDAP_URL_ERR_NOTLDAP: s = "missing ldap:// or ldaps:// or ldapi://"; break; case LDAP_URL_ERR_NODN: s = "missing suffix"; break; #endif } return( s ); } /* there are various differences among url parsers - directory server needs the ability to parse partial URLs - those with no dn - and needs to be able to tell if it is a secure url (ldaps) or not */ int util_ldap_url_parse(const char *url, LDAPURLDesc **ludpp, int require_dn, int *secure) { PR_ASSERT(url); PR_ASSERT(ludpp); int rc; const char *url_to_use = url; #if defined(USE_OPENLDAP) char *urlescaped = NULL; #endif if (secure) { *secure = 0; } #if defined(USE_OPENLDAP) /* openldap does not support the non-standard multi host:port URLs supported by mozldap - so we have to fake out openldap - replace all spaces with %20 - replace all but the last colon with %3A Go to the 3rd '/' or to the end of the string (convert only the host:port part) */ if (url) { char *p = strstr(url, "://"); if (p) { int foundspace = 0; int coloncount = 0; char *lastcolon = NULL; p += 3; for (; *p && (*p != '/'); p++) { if (*p == ' ') { foundspace = 1; } if (*p == ':') { coloncount++; lastcolon = p; } } if (foundspace) { char *src = NULL, *dest = NULL; /* have to convert url */ /* len * 3 is way too much, but acceptable */ urlescaped = PR_Calloc(strlen(url) * 3, sizeof(char)); dest = urlescaped; /* copy the scheme */ src = strstr(url, "://"); src += 3; memcpy(dest, url, src-url); dest += (src-url); /* we have to convert all spaces to %20 - we have to convert all colons except the last one to %3A */ for (; *src; ++src) { if (src < p) { if (*src == ' ') { memcpy(dest, "%20", 3); dest += 3; } else if ((coloncount > 1) && (*src == ':') && (src != lastcolon)) { memcpy(dest, "%3A", 3); dest += 3; } else { *dest++ = *src; } } else { *dest++ = *src; } } *dest = '\0'; url_to_use = urlescaped; } } } #endif #if defined(HAVE_LDAP_URL_PARSE_NO_DEFAULTS) rc = ldap_url_parse_no_defaults(url_to_use, ludpp, require_dn); if (!rc && *ludpp && secure) { *secure = (*ludpp)->lud_options & LDAP_URL_OPT_SECURE; } #else /* openldap */ #if defined(HAVE_LDAP_URL_PARSE_EXT) && defined(LDAP_PVT_URL_PARSE_NONE) && defined(LDAP_PVT_URL_PARSE_NOEMPTY_DN) rc = ldap_url_parse_ext(url_to_use, ludpp, require_dn ? LDAP_PVT_URL_PARSE_NONE : LDAP_PVT_URL_PARSE_NOEMPTY_DN); #else rc = ldap_url_parse(url_to_use, ludpp); if ((rc || !*ludpp) && !require_dn) { /* failed - see if failure was due to missing dn */ size_t len = strlen(url_to_use); /* assume the url is just scheme://host:port[/] - add the empty string as the DN (adding a trailing / first if needed) and try to parse again */ char *urlcopy = PR_smprintf("%s%s%s", url_to_use, (url_to_use[len-1] == '/' ? "" : "/"), ""); if (*ludpp) { ldap_free_urldesc(*ludpp); /* free the old one, if any */ } rc = ldap_url_parse(urlcopy, ludpp); PL_strfree(urlcopy); urlcopy = NULL; if (0 == rc) { /* only problem was the DN - free it */ PL_strfree((*ludpp)->lud_dn); (*ludpp)->lud_dn = NULL; } } #endif if (!rc && *ludpp && secure) { *secure = (*ludpp)->lud_scheme && !strcmp((*ludpp)->lud_scheme, "ldaps"); } #endif /* openldap */ #if defined(USE_OPENLDAP) if (urlescaped && (*ludpp) && (*ludpp)->lud_host) { /* have to unescape lud_host - can unescape in place */ char *p = strstr((*ludpp)->lud_host, "://"); if (p) { char *dest = NULL; p += 3; dest = p; /* up to the first '/', unescape the host */ for (; *p && (*p != '/'); p++) { if (!strncmp(p, "%20", 3)) { *dest++ = ' '; p += 2; } else if (!strncmp(p, "%3A", 3)) { *dest++ = ':'; p += 2; } else { *dest++ = *p; } } /* just copy the remainder of the host, if any */ while (*p) { *dest++ = *p++; } *dest = '\0'; } } PL_strfree(urlescaped); #endif return rc; } /* Perform LDAP init and return an LDAP* handle. If ldapurl is given, that is used as the basis for the protocol, host, port, and whether to use starttls (given on the end as ldap://..../?????starttlsOID If hostname is given, LDAP or LDAPS is assumed, and this will override the hostname from the ldapurl, if any. If port is > 0, this is the port number to use. It will override the port in the ldapurl, if any. If no port is given in port or ldapurl, the default will be used based on the secure setting (389 for ldap, 636 for ldaps) secure takes 1 of 2 values - 0 means regular ldap, 1 means ldaps filename is the ldapi file name - if this is given, and no other options are given, ldapi is assumed. */ LDAP * util_ldap_init( const char *certdir, const char *ldapurl, /* full ldap url */ const char *hostname, /* can also use this to override host in url */ int port, /* can also use this to override port in url */ int secure, /* 0 for ldap, 1 for ldaps */ int shared, /* if true, LDAP* will be shared among multiple threads */ const char *filename /* for ldapi */ ) { LDAPURLDesc *ludp = NULL; LDAP *ld = NULL; int rc = 0; int secureurl = 0; int ldap_version3 = LDAP_VERSION3; /* if ldapurl is given, parse it */ if (ldapurl && ((rc = util_ldap_url_parse(ldapurl, &ludp, 0, &secureurl)) || !ludp)) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: Could not parse given LDAP URL [%s] : error [%s]\n", ldapurl, /* ldapurl cannot be NULL here */ util_urlparse_err2string(rc)); #endif goto done; } /* use url host if no host given */ if (!hostname && ludp && ludp->lud_host) { hostname = ludp->lud_host; } /* use url port if no port given */ if (!port && ludp && ludp->lud_port) { port = ludp->lud_port; } /* use secure setting from url if none given */ if (!secure && ludp) { if (secureurl) { secure = 1; } } #if defined(USE_OPENLDAP) if (ldapurl) { rc = ldap_initialize(&ld, ldapurl); if (rc) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: Could not initialize LDAP connection to [%s]: %d:%s\n", ldapurl, rc, ldap_err2string(rc)); #endif goto done; } } else { char *makeurl = NULL; if (filename) { makeurl = PR_smprintf("ldapi://%s/", filename); } else { /* host port */ makeurl = convert_to_openldap_uri(hostname, port, (secure == 1 ? "ldaps" : "ldap")); } rc = ldap_initialize(&ld, makeurl); if (rc) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: Could not initialize LDAP connection to [%s]: %d:%s\n", makeurl, rc, ldap_err2string(rc)); #endif PL_strfree(makeurl); makeurl = NULL; goto done; } PL_strfree(makeurl); makeurl = NULL; } #else /* !USE_OPENLDAP */ if (filename) { /* ldapi in mozldap client is not yet supported */ } else if (secure == 1) { ld = ldapssl_init(hostname, port, secure); } else { /* regular ldap and/or starttls */ /* * Leverage the libprldap layer to take care of all the NSPR * integration. * Note that ldapssl_init() uses libprldap implicitly. */ ld = prldap_init(hostname, port, shared); } #endif /* !USE_OPENLDAP */ /* must explicitly set version to 3 */ ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &ldap_version3); if ((ld != NULL) && !filename) { /* * Set SSL strength (server certificate validity checking). */ if (secure > 0) { #if defined(USE_OPENLDAP) int optval = 0; #else LDAP *myld = NULL; #endif /* !USE_OPENLDAP */ int ssl_strength = 0; #if !defined(USE_OPENLDAP) /* we can only use the set functions below with a real LDAP* if it has already gone through ldapssl_init - so, use NULL if using starttls */ if (secure == 1) { myld = ld; } #endif /* verify certificate only */ #if defined(USE_OPENLDAP) ssl_strength = LDAP_OPT_X_TLS_NEVER; #else /* !USE_OPENLDAP */ ssl_strength = LDAPSSL_AUTH_CERT; #endif /* !USE_OPENLDAP */ #if defined(USE_OPENLDAP) if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &ssl_strength))) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: " "failed: unable to set REQUIRE_CERT option to %d\n", ssl_strength); #endif } /* tell it where our cert db is */ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_CACERTDIR, certdir))) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: " "failed: unable to set CACERTDIR option to %s\n", certdir); #endif } #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN) optval = LDAP_OPT_X_TLS_PROTOCOL_SSL3; if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_PROTOCOL_MIN, &optval))) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: " "failed: unable to set minimum TLS protocol level to SSL3\n"); #endif } #endif /* LDAP_OPT_X_TLS_PROTOCOL_MIN */ if ((rc = ldap_set_option(ld, LDAP_OPT_X_TLS_NEWCTX, &optval))) { #ifdef DEBUG fprintf(stderr, "util_ldap_init: " "failed: unable to create new TLS context\n"); #endif } #else /* !USE_OPENLDAP */ if ((rc = ldapssl_set_strength(myld, ssl_strength)) || (rc = ldapssl_set_option(myld, SSL_ENABLE_SSL2, PR_FALSE)) || (rc = ldapssl_set_option(myld, SSL_ENABLE_SSL3, PR_TRUE)) || (rc = ldapssl_set_option(myld, SSL_ENABLE_TLS, PR_TRUE))) { #ifdef DEBUG int prerr = PR_GetError(); fprintf(stderr, "util_ldap_init: " "failed: unable to set SSL options (" "error %d - %s)\n", prerr, PR_ErrorToString(prerr, PR_LANGUAGE_I_DEFAULT)); #endif } if (secure == 1) { /* tell bind code we are using SSL */ ldap_set_option(ld, LDAP_OPT_SSL, LDAP_OPT_ON); } #endif /* !USE_OPENLDAP */ } } #ifdef DEBUG fprintf(stderr, "util_ldap_init: " "Success: set up conn to [%s:%d]%s\n", hostname, port, secure ? " using TLS/SSL" : ""); #endif done: ldap_free_urldesc(ludp); return( ld ); } int util_ldap_get_lderrno(LDAP *ld, char **m, char **s) { int rc = LDAP_SUCCESS; #if defined(USE_OPENLDAP) ldap_get_option(ld, LDAP_OPT_RESULT_CODE, &rc); if (m) { ldap_get_option(ld, LDAP_OPT_MATCHED_DN, m); } if (s) { #ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE ldap_get_option(ld, LDAP_OPT_DIAGNOSTIC_MESSAGE, s); #else ldap_get_option(ld, LDAP_OPT_ERROR_STRING, s); #endif } #else /* !USE_OPENLDAP */ rc = ldap_get_lderrno( ld, m, s ); #endif return rc; } #ifndef LDAP_SASL_EXTERNAL #define LDAP_SASL_EXTERNAL "EXTERNAL" /* TLS/SSL extension */ #endif /* * Does the correct bind operation simple/sasl/cert depending * on the arguments passed in. */ int util_ldap_bind( LDAP *ld, /* ldap connection */ const char *bindid, /* usually a bind DN for simple bind */ const char *creds, /* usually a password for simple bind */ const char *mech, /* name of mechanism */ LDAPControl **serverctrls, /* additional controls to send */ LDAPControl ***returnedctrls, /* returned controls */ struct timeval *timeout, /* timeout */ int *msgidp /* pass in non-NULL for async handling */ ) { int rc = LDAP_SUCCESS; int err = LDAP_SUCCESS; struct berval bvcreds = {0, NULL}; LDAPMessage *result = NULL; struct berval *servercredp = NULL; bvcreds.bv_val = (char *)creds; bvcreds.bv_len = creds ? strlen(creds) : 0; /* The connection has been set up - now do the actual bind, depending on the mechanism and arguments */ if (!mech || (mech == LDAP_SASL_SIMPLE) || !strcmp(mech, LDAP_SASL_EXTERNAL)) { int mymsgid = 0; #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "attempting %s bind with id [%s] creds [%s]\n", mech ? mech : "SIMPLE", bindid, creds); #endif if ((rc = ldap_sasl_bind(ld, bindid, mech, &bvcreds, serverctrls, NULL /* clientctrls */, &mymsgid))) { #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: could not send bind request for id " "[%s] mech [%s]: error %d (%s) %d (%s) %d (%s)\n", bindid ? bindid : "(anon)", mech ? mech : "SIMPLE", rc, ldap_err2string(rc), PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_I_DEFAULT), errno, strerror(errno)); #endif goto done; } if (msgidp) { /* let caller process result */ *msgidp = mymsgid; } else { /* process results */ rc = ldap_result(ld, mymsgid, LDAP_MSG_ALL, timeout, &result); if (-1 == rc) { /* error */ rc = util_ldap_get_lderrno(ld, NULL, NULL); #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error reading bind response for id " "[%s] mech [%s]: error %d (%s)\n", bindid ? bindid : "(anon)", mech ? mech : "SIMPLE", rc, ldap_err2string(rc)); #endif goto done; } else if (rc == 0) { /* timeout */ rc = LDAP_TIMEOUT; #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: timeout after [%ld.%ld] seconds reading " "bind response for [%s] mech [%s]\n", timeout ? timeout->tv_sec : 0, timeout ? timeout->tv_usec : 0, bindid ? bindid : "(anon)", mech ? mech : "SIMPLE"); #endif goto done; } /* if we got here, we were able to read success result */ /* Get the controls sent by the server if requested */ if ((rc = ldap_parse_result(ld, result, &err, NULL, NULL, NULL, returnedctrls, 0)) != LDAP_SUCCESS) { #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: could not parse bind result " "[%s] mech [%s]: error %d (%s)\n", bindid ? bindid : "(anon)", mech ? mech : "SIMPLE", rc, ldap_err2string(rc)); #endif goto done; } if(err){ rc = err; #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: could not bind id " "[%s] mech [%s]: error %d (%s)\n", bindid ? bindid : "(anon)", mech ? mech : "SIMPLE", rc, ldap_err2string(rc)); #endif goto done; } /* parse the bind result and get the ldap error code */ if ((rc = ldap_parse_sasl_bind_result(ld, result, &servercredp, 0))) { rc = util_ldap_get_lderrno(ld, NULL, NULL); #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: could not read bind results for id " "[%s] mech [%s]: error %d (%s)\n", bindid ? bindid : "(anon)", mech ? mech : "SIMPLE", rc, ldap_err2string(rc)); #endif goto done; } } } else { rc = -1; #ifdef SASL_AUTH_SUPPORTED /* a SASL mech */ rc = slapd_ldap_sasl_interactive_bind(ld, bindid, creds, mech, serverctrls, returnedctrls, msgidp); if (LDAP_SUCCESS != rc) { #ifdef DEBUG fprintf(stderr, "util_ldap_bind: " "Error: could not perform interactive bind for id " "[%s] mech [%s]: error %d (%s)\n", bindid ? bindid : "(anon)", mech, /* mech cannot be SIMPLE here */ rc, ldap_err2string(rc)); #endif } #endif /* SASL_AUTH_SUPPORTED */ } done: ber_bvfree(servercredp); ldap_msgfree(result); return rc; } void util_ldap_perror(LDAP *ld, const char *fmt, ...) { char *matched, *extra; int err = util_ldap_get_lderrno(ld, &matched, &extra); va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, ": error %d (%s)", err, ldap_err2string(err)); if (matched) { fprintf(stderr, ": matched DN (%s)", matched); } if (extra) { fprintf(stderr, ": extra (%s)", extra); } fprintf(stderr, "\n"); } char ** util_ldap_get_values(LDAP *ld, LDAPMessage *entry, const char *attrtype) { #if defined(USE_OPENLDAP) struct berval **bvals = NULL; char **vals = NULL; int ii; bvals = ldap_get_values_len(ld, entry, attrtype); if (!bvals) { return vals; } for (ii = 0; bvals[ii]; ++ii); vals = (char **)PR_Malloc((ii + 1) * sizeof(char *)); for (ii = 0; vals && bvals && bvals[ii]; ++ii) { vals[ii] = PL_strndup(bvals[ii]->bv_val, bvals[ii]->bv_len); } ldap_value_free_len(bvals); if (vals) { vals[ii] = NULL; } return vals; #else return ldap_get_values(ld, entry, attrtype); #endif } void util_ldap_value_free(char **vals) { int ii; for (ii = 0; vals && vals[ii]; ++ii) { PL_strfree(vals[ii]); } PR_Free(vals); } 389-admin-1.1.35/lib/libdsa/000077500000000000000000000000001220472121400152115ustar00rootroot00000000000000389-admin-1.1.35/lib/libdsa/dsalib_conf.c000066400000000000000000000100011220472121400176100ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #include #endif #include #include #include #include #include "dsalib.h" #include #include "nspr.h" #define CONF_SUFFIX "cn=config" DS_EXPORT_SYMBOL char * ds_get_var_name(int varnum) { if ( (varnum >= DS_CFG_MAX) || (varnum < 0) ) return(NULL); /* failure */ return(ds_cfg_info[varnum].dci_varname); } /* * Get config info. */ DS_EXPORT_SYMBOL char ** ds_get_config(int type) { char conffile[PATH_MAX]; char *configdir; #if defined(USE_OPENLDAP) LDIFFP *sf = NULL; #else FILE *sf = NULL; #endif char **conf_list = NULL; if ( (type != DS_REAL_CONFIG) && (type != DS_TMP_CONFIG) ) { ds_send_error("Invalid config file type.", 0); return(NULL); } if ( (configdir = ds_get_config_dir()) == NULL ) { ds_send_error("Cannot find configuration directory.", 0); return(NULL); } PR_snprintf(conffile, PATH_MAX, "%s/%s", configdir, DS_CONFIG_FILE); #if defined(USE_OPENLDAP) sf = ldif_open(conffile, "r"); #else sf = fopen(conffile, "r"); #endif if ( !sf ) { ds_send_error("could not read config file.", 1); return(NULL); } conf_list = ds_get_conf_from_file(sf); #if defined(USE_OPENLDAP) ldif_close(sf); #else fclose(sf); #endif if (!conf_list) { ds_send_error("failed to read the config file successfully.", 0); return(NULL); } return(conf_list); } /* * Frees the config list returned by ds_get_config(). */ DS_EXPORT_SYMBOL void ds_free_config(char **conf_list) { int i; for (i=0; conf_list && conf_list[i]; i++) { PR_smprintf_free(conf_list[i]); } free((void *)conf_list); } /* * NOTE: the ordering of the following array elements must be kept in sync * with the ordering of the #defines in ../include/dsalib.h. */ struct ds_cfg_info ds_cfg_info[] = { {"nsslapd-errorlog-level" }, {"nsslapd-referral" }, {"nsslapd-auditlog" }, {"nsslapd-localhost" }, {"nsslapd-port" }, {"nsslapd-security" }, {"nsslapd-secureport" }, {"nsslapd-ssl3ciphers"}, {"passwordstoragescheme"}, {"nsslapd-accesslog"}, {"nsslapd-errorlog"}, {"nsslapd-rootdn"}, {"nsslapd-rootpwstoragescheme"}, {"nsslapd-suffix"}, {"nsslapd-localuser"}, {"nsslapd-bakdir"}, {"nsslapd-tmpdir"}, {"nsslapd-instancedir"}, {0} }; /* * Open the config file and look for option "option". Return its * value, or NULL if the option was not found. */ DS_EXPORT_SYMBOL char * ds_get_config_value( int option ) { char **all, *value, *retval; int i; char *attr = ds_get_var_name(option); if (attr == NULL) return NULL; all = ds_get_config( DS_REAL_CONFIG ); if ( all == NULL ) { return NULL; } for ( i = 0; all[ i ] != NULL; i++ ) { if (( value = strchr( all[ i ], ':' )) != NULL ) { *value = '\0'; ++value; while (*value && isspace(*value)) ++value; } if ( !strcasecmp( attr, all[ i ] )) { retval = strdup(value); ds_free_config(all); return retval; } } ds_free_config(all); return NULL; } 389-admin-1.1.35/lib/libdsa/dsalib_confs.c000066400000000000000000000135371220472121400200140ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * Some of the simple conf stuff here. Must not call any * libadmin functions! This is needed by ds_config.c */ #if defined( XP_WIN32 ) #include #endif #include "dsalib.h" #include #include #include #include #include #include #include #include "nspr.h" #include "plstr.h" /* ldif_read_record lineno argument type depends on openldap version */ #if defined(USE_OPENLDAP) #include #if LDAP_VENDOR_VERSION >= 20434 /* changed in 2.4.34 */ typedef unsigned long int ldif_record_lineno_t; #else typedef int ldif_record_lineno_t; #endif #else typedef int ldif_record_lineno_t; #endif int dsalib_ldif_parse_line( char *line, struct berval *type, struct berval *value, int *freeval ) { int rc; #if defined(USE_OPENLDAP) rc = ldif_parse_line2(line, type, value, freeval); /* check that type and value are null terminated */ #else int vlen; rc = ldif_parse_line(line, &type->bv_val, &value->bv_val, &vlen); type->bv_len = type->bv_val ? strlen(type->bv_val) : 0; value->bv_len = vlen; #endif *freeval = 0; /* always returns in place */ return rc; } /* * Read the configuration info into a null-terminated list of strings. */ DS_EXPORT_SYMBOL char ** #if defined(USE_OPENLDAP) ds_get_conf_from_file(LDIFFP *conf) #else ds_get_conf_from_file(FILE *conf) #endif { static char config_entry[] = "dn: cn=config"; static int cfg_ent_len = sizeof(config_entry)-1; int listsize = 0; char **conf_list = NULL; char *entry = 0; #if defined(USE_OPENLDAP) int buflen = 0; #endif ldif_record_lineno_t lineno; int i = 0; #if defined(USE_OPENLDAP) while (ldif_read_record(conf, &lineno, &entry, &buflen)) { #else while ((entry = ldif_get_entry(conf, &lineno))) { #endif char *begin = entry; if (!PL_strncasecmp(entry, config_entry, cfg_ent_len)) { char *line = entry; while ((line = ldif_getline(&entry))) { struct berval type, value; int freeval = 0; int rc; if ( *line == '\n' || *line == '\0' ) { break; } /* this call modifies line */ rc = dsalib_ldif_parse_line(line, &type, &value, &freeval); if (rc != 0) { ds_send_error("Unknown error processing config file", 0); free(begin); for (i=0; conf_list && conf_list[i]; i++) { PR_smprintf_free(conf_list[i]); } free((void *)conf_list); return NULL; } listsize++; conf_list = (char **) realloc(conf_list, ((listsize + 1) * sizeof(char *))); /* this is the format expected by ds_get_config_value */ conf_list[listsize - 1] = PR_smprintf("%.*s:%.*s", type.bv_len, type.bv_val, value.bv_len, value.bv_val); conf_list[listsize] = NULL; /* always null terminated */ if (freeval) { PL_strfree(value.bv_val); } } } free(begin); entry = NULL; #if defined(USE_OPENLDAP) buflen = 0; #endif } return(conf_list); } /* * Returns 1 if parm is in confline else 0 */ static int ds_parm_in_line(char *confline, char *parm) { int parm_size; if ( confline == NULL ) return(0); if ( parm == NULL ) return(0); parm_size = strlen(parm); if ( parm_size == 0 ) return(0); if ( PL_strncasecmp(confline, parm, parm_size) == 0 ) if ( ((int) strlen(confline)) > parm_size ) if ( confline[parm_size] == ':' ) return(1); return(0); } /* * Gets the string that corresponds to the parameter supplied from the * list of config lines. Returns a malloc'd string. */ DS_EXPORT_SYMBOL char * ds_get_value(char **ds_config, char *parm, int phase, int occurance) { char *line; int line_num = 0; int cur_phase = 0; int cur_occurance = 0; if ( (parm == NULL) || (ds_config == NULL) ) return(NULL); if ( (phase < 0) || (occurance < 1) ) return(NULL); line = ds_config[line_num]; while ( line != NULL ) { if ( ds_parm_in_line(line, "database") ) cur_phase++; if ( ds_parm_in_line(line, parm) ) { /* found it */ if ( phase == cur_phase ) if ( ++cur_occurance == occurance ) { /* * Use ldif_parse_line() so continuation markers are * handled correctly, etc. */ struct berval type, tmpvalue; char *value = NULL; int freeval = 0; int ldif_rc; char *tmpline = strdup(line); if ( NULL == tmpline ) { ds_send_error( "ds_get_value() failed: strdup() returned NULL\n", 1 /* print errno */ ); return(NULL); } ldif_rc = dsalib_ldif_parse_line( tmpline, &type, &tmpvalue, &freeval ); if (ldif_rc) { ds_send_error("Unknown error processing config file", 0); } else { if (freeval) { value = tmpvalue.bv_val; } else { value = PL_strndup(tmpvalue.bv_val, tmpvalue.bv_len); } } free(tmpline); return value; } } line_num++; line = ds_config[line_num]; } return(NULL); } 389-admin-1.1.35/lib/libdsa/dsalib_db.c000066400000000000000000000043361220472121400172660ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #include #include #endif #include "dsalib.h" #include #include #include #include #include #if !defined( XP_WIN32 ) #include #include #else #define popen _popen #define pclose _pclose #endif #include "nspr.h" /* * Get a listing of backup directories * Return NULL for errors and a NULL list for an empty list. */ DS_EXPORT_SYMBOL char ** ds_get_bak_dirs() { char format_str[PATH_MAX]; int i = 0; char **bak_dirs = NULL; char *bakdir = NULL; if ( (bakdir = ds_get_bak_dir()) == NULL ) { ds_send_error("Cannot find backup directory.", 0); return(bak_dirs); } PR_snprintf( format_str, PATH_MAX, "%s", bakdir ); bak_dirs = ds_get_file_list( format_str ); if( bak_dirs ) { while( bak_dirs[i] != NULL ) { /* Prepend the filename with the backup directory */ char filename[PATH_MAX]; PR_snprintf( filename, PATH_MAX, "%s%c%s", bakdir, FILE_SEP, bak_dirs[i] ); free( bak_dirs[i] ); bak_dirs[i] = strdup( filename ); #if defined( XP_WIN32 ) ds_dostounixpath( bak_dirs[i] ); #endif i++; } } return(bak_dirs); } 389-admin-1.1.35/lib/libdsa/dsalib_debug.c000066400000000000000000000044761220472121400177740ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #endif #include "dsalib.h" #include #include #include #include "nspr.h" #include "plstr.h" #if defined( XP_WIN32 ) int ldap_debug = 0; #endif DS_EXPORT_SYMBOL void ds_log_env(char **envp) { FILE *file; char admin_logfile[PATH_MAX], *tmp_dir; tmp_dir = ds_get_tmp_dir(); PL_strncpyz( admin_logfile, tmp_dir, sizeof(admin_logfile) ); #if defined( XP_WIN32 ) if( tmp_dir ) { free( tmp_dir ); tmp_dir = NULL; } #endif PL_strcatn( admin_logfile, sizeof(admin_logfile), "/admin.log"); file = fopen(admin_logfile, "a+"); if (file != NULL) { int i; for ( i = 0; envp[i] != (char *) 0; i++ ) { char envstr[200]; PR_snprintf(envstr, sizeof(envstr), "%s\n", envp[i]); fwrite(envstr, strlen(envstr), 1, file); } fclose(file); } } DS_EXPORT_SYMBOL void ds_log_debug_message(char *msg) { FILE *file; char admin_logfile[PATH_MAX], *tmp_dir; tmp_dir = ds_get_tmp_dir(); memset( admin_logfile, 0, sizeof( admin_logfile ) ); PL_strncpyz( admin_logfile, tmp_dir, sizeof(admin_logfile) ); #if defined( XP_WIN32 ) if( tmp_dir ) { free( tmp_dir ); tmp_dir = NULL; } #endif PL_strcatn( admin_logfile, sizeof(admin_logfile), "/admin.log"); file = fopen(admin_logfile, "a+"); if (file != NULL) { fwrite(msg, strlen(msg), 1, file); fclose(file); } } 389-admin-1.1.35/lib/libdsa/dsalib_location.c000066400000000000000000000241651220472121400205130ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #endif #include "dsalib.h" #include #include #include #include #include "nspr.h" #include "plstr.h" /* * Returns the instance directory path of the server. * Info is returned in a static area. The caller must * copy it for reuse if needed. */ DS_EXPORT_SYMBOL char * ds_get_instance_dir() { char *ds_name; if ( (ds_name = ds_get_server_name()) == NULL ) { return(NULL); } else { return ds_get_config_value(DS_INSTDIR); } } /* * Returns the config file location of the server. Info is * returned in a static area. The caller must copy it * for reuse if needed. */ DS_EXPORT_SYMBOL char * ds_get_config_dir() { char *ds_name; char *configdir_env; static char configdir[PATH_MAX]; if ((configdir_env = getenv("DS_CONFIG_DIR"))) { return configdir_env; } else { if ( (ds_name = ds_get_server_name()) == NULL ) return(NULL); PR_snprintf(configdir, sizeof(configdir), "%s/%s", INSTCONFIGDIR, ds_name); return (configdir); } } /* * set config_dir to environment variable DS_CONFIG_DIR * to retrieve the value using ds_get_config_dir later. */ DS_EXPORT_SYMBOL void ds_set_config_dir(char *config_dir) { static char env[PATH_MAX]; PR_snprintf(env, sizeof(env), "DS_CONFIG_DIR=%s", config_dir); putenv(env); } /* * Returns the run dir of the server, where pid files are put. * Info is returned in a static area. The caller must copy it * for reuse if needed. */ DS_EXPORT_SYMBOL char * ds_get_run_dir() { char *rundir_env = NULL; static char rundir[PATH_MAX]; char *inst_dir = NULL; char *inst_name = NULL; char *start_script = NULL; char *sysconfig_script = NULL; char *p = NULL; char *start = NULL; char line[BIG_LINE]; FILE *fp = NULL; if ((rundir_env = getenv("DS_RUN_DIR"))) { return (rundir_env); } else { /* Use the instance name to locate the instance sysconfig script */ inst_dir = ds_get_instance_dir(); start_script = PR_smprintf("%s%cstart-slapd", inst_dir, FILE_PATHSEP); fp = fopen(start_script, "r"); if (fp) { while(fgets(line, BIG_LINE, fp)) { /* Find the line with the instance name */ if ((start = strstr(line, "INSTANCE"))) { /* skip any spaces after start-dirsrv */ start += strlen("INSTANCE="); /* find the end of the instance name */ p = start; while (!isspace(*p)) { p++; } *p = '\0'; if (strlen(start) > 0) { inst_name = PR_smprintf("%s", start); } break; } } fclose(fp); } /* We're done if we didn't parse the instance name. */ if ((inst_name == NULL) || (strlen(inst_name) == 0)) { goto free_and_exit; } /* Get the RUN_DIR line from the instance sysconfig script */ sysconfig_script = PR_smprintf("%s%cdirsrv-%s", INITCONFIGDIR, FILE_PATHSEP, inst_name); fp = fopen(sysconfig_script, "r"); if (fp) { while(fgets(line, BIG_LINE, fp)) { /* Find line starting with RUN_DIR */ if (strncmp(line, "RUN_DIR", 7) == 0) { /* Chop off the variable name and export of the variable */ if ((start = strchr(line, '='))) { start++; if ((p = strrchr(start, ';'))) { *p = '\0'; for (--p; isspace(*p); p--) { *p = '\0'; } PR_snprintf(rundir, sizeof(rundir), "%s", start); } } break; } } fclose(fp); } free_and_exit: PR_smprintf_free(start_script); PR_smprintf_free(sysconfig_script); PR_smprintf_free(inst_name); if (rundir[0] != '\0') { return (rundir); } else { return NULL; } } } /* * set run_dir to environment variable DS_RUN_DIR * to retrieve the value using ds_get_run_dir later. */ DS_EXPORT_SYMBOL void ds_set_run_dir(char *run_dir) { static char env[PATH_MAX]; PR_snprintf(env, sizeof(env), "DS_RUN_DIR=%s", run_dir); putenv(env); } /* * Returns the bakup dir of the server, where db backup files are put. * Info is returned in a static area. The caller must copy it * for reuse if needed. */ DS_EXPORT_SYMBOL char * ds_get_bak_dir() { char *bakdir; if ((bakdir = getenv("DS_BAK_DIR"))) { return bakdir; } else { return ds_get_config_value(DS_BAKDIR); } } /* * set bak_dir to environment variable DS_BAK_DIR * to retrieve the value using ds_get_bak_dir later. */ DS_EXPORT_SYMBOL void ds_set_bak_dir(char *bak_dir) { static char env[PATH_MAX]; PR_snprintf(env, sizeof(env), "DS_BAK_DIR=%s", bak_dir); putenv(env); } /* * Returns the tmp dir of the server, where tmp files are put. * Info is returned in a static area. The caller must copy it * for reuse if needed. */ DS_EXPORT_SYMBOL char * ds_get_tmp_dir() { char *tmpdir; if ((tmpdir = getenv("DS_TMP_DIR"))) { return tmpdir; } else { return ds_get_config_value(DS_TMPDIR); } } /* * set bak_dir to environment variable DS_TMP_DIR * to retrieve the value using ds_get_tmp_dir later. */ DS_EXPORT_SYMBOL void ds_set_tmp_dir(char *tmp_dir) { static char env[PATH_MAX]; PR_snprintf(env, sizeof(env), "DS_TMP_DIR=%s", tmp_dir); putenv(env); } /* * Returns the install location of the server under the admserv * directory. */ DS_EXPORT_SYMBOL char * ds_get_admserv_based_root() { char *root; char *ds_name; static char install_root[PATH_MAX]; if ( (root = getenv("ADMSERV_ROOT")) == NULL ) return(NULL); if ( (ds_name = ds_get_server_name()) == NULL ) return(NULL); PR_snprintf(install_root, sizeof(install_root), "%s/%s", root, ds_name); return(install_root); } /* * Returns the Directory Server instance name. */ DS_EXPORT_SYMBOL char * ds_get_server_name() { if( getenv("SERVER_NAMES") ) return( getenv("SERVER_NAMES") ); else { static char logfile[PATH_MAX]; char *buf; char *out = logfile; buf = getenv("SCRIPT_NAME"); if ( buf && (*buf == '/') ) buf++; while ( buf && *buf && (*buf != '/') ) { *out++ = *buf++; } *out = 0; return logfile; } } /* * Returns the Directory Server instance name without the "slapd-" prefix */ DS_EXPORT_SYMBOL char * ds_get_short_name() { static char shortname[PATH_MAX] = {0}; if (shortname[0]) { return shortname; } if( getenv("SERVER_NAMES") ) { char *ptr = strstr(getenv("SERVER_NAMES"), "slapd-"); if (ptr) { PL_strncpyz(shortname, ptr+6, sizeof(shortname)); } else { PL_strncpyz(shortname, getenv("SERVER_NAMES"), sizeof(shortname)); } } else { char *buf; char *out = shortname; buf = getenv("SCRIPT_NAME"); if (buf) { buf = strstr(getenv("SCRIPT_NAME"), "slapd-"); if (buf) { buf += 6; while ( buf && *buf && (*buf != '/') ) { *out++ = *buf++; } *out = 0; } else { PL_strncpyz(shortname, getenv("SCRIPT_NAME"), sizeof(shortname)); } } else { PL_strncpyz(shortname, getenv("SCRIPT_NAME"), sizeof(shortname)); } } return shortname; } DS_EXPORT_SYMBOL char * ds_get_logfile_name(int config_type) { char *filename; char **ds_config = NULL; static char logfile[PATH_MAX+1]; if ( (ds_config = ds_get_config(DS_REAL_CONFIG)) == NULL ) { /* For DS 4.0, no error output if file doesn't exist - that's a normal situation */ /* ds_send_error("ds_get_config(DS_REAL_CONFIG) == NULL", 0); */ return(NULL); } filename = ds_get_value(ds_config, ds_get_var_name(config_type), 0, 1); if ( filename == NULL ) { /* For DS 4.0, no error output if file doesn't exist - that's a normal situation */ /* ds_send_error("ds_get_logfile_name: filename == NULL", 0); */ ds_free_config(ds_config); return(NULL); } if ( ((int) strlen(filename)) >= PATH_MAX ) { ds_send_error("ds_get_logfile_name: filename too long", 0); free(filename); ds_free_config(ds_config); return(NULL); } PL_strncpyz(logfile, filename, sizeof(logfile)); free(filename); ds_free_config(ds_config); return(logfile); } DS_EXPORT_SYMBOL char * ds_get_errors_name() { return( ds_get_logfile_name(DS_ERRORLOG) ); } DS_EXPORT_SYMBOL char * ds_get_access_name() { return( ds_get_logfile_name(DS_ACCESSLOG) ); } DS_EXPORT_SYMBOL char * ds_get_audit_name() { return( ds_get_logfile_name(DS_AUDITFILE) ); } 389-admin-1.1.35/lib/libdsa/dsalib_tailf.c000066400000000000000000000125431220472121400177770ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #endif #include #include #include #include #include #include "dsalib.h" #include "prthread.h" #include "plstr.h" /* * Function: adjustFile * Property: Adjust the file offset to the "tail" of the file * Called by: DisplayTail * Return: -1 for error, else file size */ static int adjustFile(FILE *fp, int curSize) { struct stat statBuf; int fd = fileno(fp); if ( fstat(fd, &statBuf) == -1 ) return(-1); if ( statBuf.st_size < curSize ) /* file has shrunk! */ { if ( fseek(fp, 0L, 0) == -1 ) /* get back to the beginning */ return(-1); } curSize = (int) statBuf.st_size; if ( !curSize ) curSize = 1; return(curSize); } /* * Function: wrapLines * Property: wrap lines at 50 characters. When a wrap point is encountered, * insert the string "\n", since the buffer is going to be placed * inside a JavaScript alert() call. * Called by: ds_display_tail * Return: pointer to wrapped buffer. Caller should free. */ static char * wrapLines( char *buf ) { char *src = buf; char *obuf, *dst; int lwidth = 0; obuf = malloc( strlen( buf ) * 2 ); /* conservative */ if ( obuf == NULL ) { return NULL; } dst = obuf; while ( *src != '\0' ) { if (( ++lwidth > 50 ) && isspace( *src )) { *dst++ = '\\'; *dst++ = 'n'; lwidth = 0; src++; } else { *dst++ = *src++; } } *dst = '\0'; return obuf; } DS_EXPORT_SYMBOL int ds_get_file_size(char *fileName) { struct stat statBuf; if ( fileName == NULL ) return(0); if ( stat(fileName, &statBuf) == -1 ) return(0); return(statBuf.st_size); } /* * Function: ds_display_tail * Property: follow the tail and display it for timeOut secs or until the line * read from the file contains the string doneMsg; the lastLine, if not null, * will be filled in with the last line read from the file; this is useful * for determining why the server failed to start e.g. port in use, ran out * of semaphores, database is corrupted, etc. * Calls: adjustFile */ DS_EXPORT_SYMBOL void ds_display_tail(char *fileName, int timeOut, int startSeek, char *doneMsg, char *lastLine) { FILE *fp = NULL; int fd; char msgBuf[BIG_LINE]; struct stat statBuf; int curSize; int i = timeOut; if (lastLine != NULL) lastLine[0] = 0; if ( fileName == NULL ) return; /* * Open the file. * Try to keep reading it assuming that it may get truncated. */ while (i && !fp) { fp = fopen(fileName, "r"); if (!fp) { PR_Sleep(PR_SecondsToInterval(1)); --i; /* need to print something so http connection doesn't timeout and also to let the user know something is happening . . . */ if (!(i % 10)) { ds_send_status("Attempting to obtain server status . . ."); } } } if (!i || !fp) return; fd = fileno(fp); if ( fstat(fd, &statBuf) == -1 ) { (void) fclose(fp); return; } curSize = (int) statBuf.st_size; if ( startSeek < curSize ) curSize = startSeek; if ( curSize > 0 ) if ( fseek(fp, curSize, SEEK_SET) == -1 ) { (void) fclose(fp); return; } if ( !curSize ) curSize = 1; /* ensure minimum */ while ( i ) { int newCurSize; newCurSize = curSize = adjustFile(fp, curSize); if ( curSize == -1 ) { (void) fclose(fp); return; } while ( fgets(msgBuf, sizeof(msgBuf), fp) ) { char *tmp; if (lastLine != NULL) PL_strncpyz(lastLine, msgBuf, BIG_LINE); if ( (tmp = strchr(msgBuf, ((int) '\n'))) != NULL ) *tmp = '\0'; /* strip out real newlines from here */ ds_send_status(msgBuf); if ( (strstr(msgBuf, "WARNING: ") != NULL) || (strstr(msgBuf, "ERROR: ") != NULL) ) { char *wrapBuf; wrapBuf = wrapLines( msgBuf ); if ( wrapBuf != NULL ) { ds_send_error(wrapBuf, 5); free((void *)wrapBuf); } else { ds_send_error(msgBuf, 5); } } if ( (doneMsg != NULL) && (strstr(msgBuf, doneMsg)) ) { (void) fclose(fp); return; } newCurSize = adjustFile(fp, newCurSize); if ( newCurSize == -1 ) { (void) fclose(fp); return; } } if ( ferror(fp) ) { (void) fclose(fp); return; } clearerr(fp); /* clear eof condition */ PR_Sleep(PR_SecondsToInterval(1)); if ( newCurSize != curSize ) i = timeOut; /* keep going till no more changes */ else i--; } (void) fclose(fp); } 389-admin-1.1.35/lib/libdsa/dsalib_updown.c000066400000000000000000000523711220472121400202170ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #if defined( XP_WIN32 ) #include #include #include "regparms.h" #else #include #include #include #endif #include #include #include #include #include "dsalib.h" #include #include "nspr.h" #if defined( XP_WIN32 ) SC_HANDLE schService; SC_HANDLE schSCManager; int StartServer(); int StopandRestartServer(); int StopServer(); int StopNetscapeProgram(); int StartNetscapeProgram(); int StopNetscapeService(); int StartNetscapeService(); void WaitForServertoStop(); #endif /* * Get status for the Directory Server. * 0 -- down * 1 -- up * -1 -- unknown */ #if !defined( XP_WIN32 ) static pid_t server_pid; DS_EXPORT_SYMBOL int ds_get_updown_status() { char pid_file_name[BIG_LINE]; char *rundir; FILE *pidfile; int ipid = -1; int status = 0; if ( (rundir = ds_get_run_dir()) == NULL ) { fprintf(stderr, "ds_get_updown_status: could not get run directory\n"); return(DS_SERVER_UNKNOWN); } PR_snprintf(pid_file_name, BIG_LINE, "%s/%s.pid", rundir, ds_get_server_name()); pidfile = fopen(pid_file_name, "r"); if ( pidfile == NULL ) { /* fprintf(stderr, "ds_get_updown_status: could not open pid file=%s errno=%d\n", pid_file_name, errno); */ return(DS_SERVER_DOWN); } status = fscanf(pidfile, "%d\n", &ipid); fclose(pidfile); if ( status == -1 ) { fprintf(stderr, "ds_get_updown_status: pidfile=%s server_pid=%d errno=%d\n", pid_file_name, ipid, errno); unlink(pid_file_name); /* junk in file? */ return(DS_SERVER_DOWN); } server_pid = (pid_t) ipid; if ( (status = kill(server_pid, 0)) != 0 && errno != EPERM ) { /* we should get ESRCH if the server is down, anything else may be a real problem */ if (errno != ESRCH) { fprintf(stderr, "ds_get_updown_status: pidfile=%s server_pid=%d status=%d errno=%d\n", pid_file_name, server_pid, status, errno); } unlink(pid_file_name); /* pid does not exist! */ return(DS_SERVER_DOWN); } return(DS_SERVER_UP); } #else DS_EXPORT_SYMBOL int ds_get_updown_status() { char *ds_name = ds_get_server_name(); HANDLE hServerDoneEvent = NULL; /* watchdog.c creates a global event of this same name */ if((hServerDoneEvent = OpenEvent(EVENT_ALL_ACCESS, TRUE, ds_name)) != NULL) { CloseHandle(hServerDoneEvent); return(DS_SERVER_UP); } if(GetLastError() == ERROR_ACCESS_DENIED) /* it exists */ return(DS_SERVER_UP); /* assume it's not running. */ return(DS_SERVER_DOWN); } #endif /* This function does not require calling ds_get_config(), but requires that that information be passed in. This is very useful for starting the server during installation, because we already have all of the configuration information in memory, we don't need to read it in */ DS_EXPORT_SYMBOL int ds_bring_up_server_install(int verbose, char *instdir, char *errorlog) { #if !defined( XP_WIN32 ) char startup_line[BIG_LINE]; char statfile[PATH_MAX]; char *tmp_dir; #endif int error = -1; int status = DS_SERVER_DOWN; int cur_size = 0; FILE *sf = NULL; char msgBuf[BIG_LINE] = {0}; int secondsToWaitForServer = 600; char *serverStartupString = "slapd started."; status = ds_get_updown_status(); if ( status == DS_SERVER_UP ) return(DS_SERVER_ALREADY_UP); if (!instdir || !errorlog) return(DS_SERVER_UNKNOWN); if (verbose) { ds_send_status("starting up server ..."); cur_size = ds_get_file_size(errorlog); } #if !defined( XP_WIN32 ) tmp_dir = ds_get_tmp_dir(); PR_snprintf(statfile, PATH_MAX, "%s%cstartup.%d", tmp_dir, FILE_SEP, (int)getpid()); #if defined( WITH_SYSTEMD ) PR_snprintf(startup_line, BIG_LINE, "/bin/systemctl start %s%s%s > %s 2>&1", DIRSRV_SYSTEMD_PREFIX, ds_get_short_name(), DIRSRV_SYSTEMD_SUFFIX, statfile); #elif defined( ENABLE_SERVICE ) PR_snprintf(startup_line, BIG_LINE, "service %s start %s > %s 2>&1", DIRSRV_SERVICE_NAME, ds_get_short_name(), statfile); #else PR_snprintf(startup_line, BIG_LINE, "%s%c%s > %s 2>&1", instdir, FILE_SEP, START_SCRIPT, statfile); #endif alter_startup_line(startup_line); error = system(startup_line); if (error == -1) error = DS_SERVER_DOWN; /* could not start server */ else error = DS_SERVER_UP; /* started server */ #else error = StartServer(); #endif if (error != DS_SERVER_UP) { #if !defined( XP_WIN32 ) FILE* fp = fopen(statfile, "r"); if (fp) { while(fgets(msgBuf, BIG_LINE, fp)) ds_send_status(msgBuf); fclose(fp); } #endif return DS_SERVER_COULD_NOT_START; } if (verbose) { /* * Stop in N secs or whenever the startup message comes up. * Do whichever happens first. msgBuf will contain the last * line read from the errorlog. */ ds_display_tail(errorlog, secondsToWaitForServer, cur_size, serverStartupString, msgBuf); } if ( error != DS_SERVER_UP ) { int retval = DS_SERVER_UNKNOWN; if (strstr(msgBuf, "semget")) retval = DS_SERVER_MAX_SEMAPHORES; else if (strstr(msgBuf, "Back-End Initialization Failed")) retval = DS_SERVER_CORRUPTED_DB; else if (strstr(msgBuf, "not initialized... exiting")) retval = DS_SERVER_CORRUPTED_DB; else if (strstr(msgBuf, "address is in use")) retval = DS_SERVER_PORT_IN_USE; #if defined( XP_WIN32 ) /* on NT, if we run out of resources, there will not even be an error log */ else if (msgBuf[0] == 0) { retval = DS_SERVER_NO_RESOURCES; } #endif if (verbose) ds_send_error("error in starting server.", 1); return(retval); } else { int tries; for (tries = 0; tries < secondsToWaitForServer; tries++) { if (ds_get_updown_status() == DS_SERVER_UP) { status = DS_SERVER_UP; break; } PR_Sleep(PR_SecondsToInterval(1)); } if (verbose) { char str[100]; PR_snprintf(str, sizeof(str), "Had to retry %d times", tries); ds_send_status(str); } } #if !defined( XP_WIN32 ) if (verbose) { if( !(sf = fopen(statfile, "r")) ) { ds_send_error("could not read status file.", 1); return(DS_SERVER_UNKNOWN); } while ( fgets(startup_line, BIG_LINE, sf) ) ds_send_error(startup_line, 0); fclose(sf); unlink(statfile); } #endif if ( (status == DS_SERVER_DOWN) || (status == DS_SERVER_UNKNOWN) ) status = ds_get_updown_status(); return(status); } /* * Start the Directory Server and return status. * Do not start if the server is already started. * 0 -- down * 1 -- up * -1 -- unknown * -2 -- already up */ DS_EXPORT_SYMBOL int ds_bring_up_server(int verbose) { char *instdir; int status; char *errorlog; status = ds_get_updown_status(); if ( status == DS_SERVER_UP ) return(DS_SERVER_ALREADY_UP); if ( (instdir = ds_get_instance_dir()) == NULL ) return(DS_SERVER_UNKNOWN); errorlog = ds_get_config_value(DS_ERRORLOG); if ( errorlog == NULL ) { errorlog = ds_get_errors_name(); /* fallback */ } return ds_bring_up_server_install(verbose, instdir, errorlog); } DS_EXPORT_SYMBOL int ds_bring_down_server() { int status; int cur_size; char *errorlog; #if defined( WITH_SYSTEMD ) || defined( ENABLE_SERVICE ) char stop_cmd[BIG_LINE]; int error; #endif status = ds_get_updown_status(); /* set server_pid too! */ if ( status != DS_SERVER_UP ) { ds_send_error("The server is not up.", 0); return(DS_SERVER_ALREADY_DOWN); } ds_send_status("shutting down server ..."); if (!(errorlog = ds_get_errors_name())) { ds_send_error("Could not get the error log filename.", 0); return DS_SERVER_UNKNOWN; } cur_size = ds_get_file_size(errorlog); #if !defined( XP_WIN32 ) #if defined( WITH_SYSTEMD ) || defined( ENABLE_SERVICE ) #if defined( WITH_SYSTEMD ) PR_snprintf(stop_cmd, sizeof(stop_cmd), "/bin/systemctl stop %s%s%s", DIRSRV_SYSTEMD_PREFIX, ds_get_short_name(), DIRSRV_SYSTEMD_SUFFIX); #else PR_snprintf(stop_cmd, sizeof(stop_cmd), "service %s stop %s", DIRSRV_SERVICE_NAME, ds_get_short_name()); #endif alter_startup_line(stop_cmd); error = system(stop_cmd); if (error == -1) error = DS_SERVER_UNKNOWN; /* could not stop server */ else error = DS_SERVER_DOWN; /* stopped server */ #else /* not systemd or service */ if ( (kill(server_pid, SIGTERM)) != 0) { if (errno == EPERM) { ds_send_error("Not permitted to kill server.", 0); fprintf (stdout, "[%s]: kill (%li, SIGTERM) failed with errno = EPERM.
\n", ds_get_server_name(), (long)server_pid); } else { ds_send_error("error in killing server.", 1); } return(DS_SERVER_UNKNOWN); } #endif #else if ( StopServer() == DS_SERVER_DOWN ) { ds_send_status("shutdown: server shut down"); } else { ds_send_error("error in killing server.", 1); return(DS_SERVER_UNKNOWN); } #endif /* * Wait up to SERVER_STOP_TIMEOUT seconds for the stopped message to * appear in the error log. */ ds_display_tail(errorlog, SERVER_STOP_TIMEOUT, cur_size, "slapd stopped.", NULL); /* in some cases, the server will tell us it's down when it's really not, so give the OS a chance to remove it from the process table */ PR_Sleep(PR_SecondsToInterval(1)); return(ds_get_updown_status()); } #if defined( XP_WIN32 ) static BOOLEAN IsService() { #if 0 CHAR ServerKey[512], *ValueString; HKEY hServerKey; DWORD dwType, ValueLength, Result; PR_snprintf(ServerKey,sizeof(ServerKey), "%s\\%s", COMPANY_KEY, PRODUCT_KEY); Result = RegOpenKey(HKEY_LOCAL_MACHINE, ServerKey, &hServerKey); if (Result != ERROR_SUCCESS) { return TRUE; } ValueLength = 512; ValueString = (PCHAR)malloc(ValueLength); Result = RegQueryValueEx(hServerKey, IS_SERVICE_KEY, NULL, &dwType, ValueString, &ValueLength); if (Result != ERROR_SUCCESS) { return TRUE; } if (strcmp(ValueString, "yes")) { return FALSE; } else { return TRUE; } #else return TRUE; #endif } #if 0 NSAPI_PUBLIC BOOLEAN IsAdminService() { CHAR AdminKey[512], *ValueString; HKEY hAdminKey; DWORD dwType, ValueLength, Result; PR_snprintf(AdminKey,sizeof(AdminKey), "%s\\%s", COMPANY_KEY, ADMIN_REGISTRY_ROOT_KEY); Result = RegOpenKey(HKEY_LOCAL_MACHINE, AdminKey, &hAdminKey); if (Result != ERROR_SUCCESS) { return TRUE; } ValueLength = 512; ValueString = (PCHAR)malloc(ValueLength); Result = RegQueryValueEx(hAdminKey, IS_SERVICE_KEY, NULL, &dwType, ValueString, &ValueLength); if (Result != ERROR_SUCCESS) { return TRUE; } if (strcmp(ValueString, "yes")) { return FALSE; } else { return TRUE; } } #endif int StartServer() { CHAR ErrorString[512]; BOOLEAN Service; /* Figure out if the server is a service or an exe */ Service = IsService(); if(Service) { if (!(schSCManager = OpenSCManager( NULL, // machine (NULL == local) NULL, // database (NULL == default) SC_MANAGER_ALL_ACCESS // access required ))) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error: Could not open the ServiceControlManager:%d " "Please restart the server %s from the Services Program Item " "in the Control Panel", ds_get_server_name(), GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_UNKNOWN); } return(StartNetscapeService()); } else { return(StartNetscapeProgram()); } } int StopandRestartServer() { CHAR ErrorString[512]; BOOLEAN Service; /* First figure out if the server is a service or an exe */ Service = IsService(); if(Service) { if (!(schSCManager = OpenSCManager( NULL, // machine (NULL == local) NULL, // database (NULL == default) SC_MANAGER_ALL_ACCESS // access required ))) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error: Could not restart server." "Please restart the server %s from the Services Program Item " "in the Control Panel", ds_get_server_name()); ds_send_error(ErrorString, 0); return(DS_SERVER_UNKNOWN); } if (StopNetscapeService() != DS_SERVER_DOWN) return(DS_SERVER_UNKNOWN); return(StartNetscapeService()); } else { if (StopNetscapeProgram() != DS_SERVER_DOWN) return(DS_SERVER_UNKNOWN); return(StartNetscapeProgram()); } } int StopServer() { CHAR ErrorString[512]; BOOLEAN Service; /* First figure out if the server is a service or an exe */ Service = IsService(); if(Service) { if (!(schSCManager = OpenSCManager( NULL, // machine (NULL == local) NULL, // database (NULL == default) SC_MANAGER_ALL_ACCESS // access required ))) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error: Could not open the ServiceControlManager:%d " "Please restart the server %s from the Services Program Item " "in the Control Panel", ds_get_server_name(), GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_UNKNOWN); } return(StopNetscapeService()); } else { return(StopNetscapeProgram()); } } int StartNetscapeProgram() { char line[BIG_LINE], cmd[BIG_LINE]; char *tmp = ds_get_instance_dir(); CHAR ErrorString[512]; STARTUPINFO siStartInfo; PROCESS_INFORMATION piProcInfo; FILE *CmdFile; ZeroMemory(line, sizeof(line)); PR_snprintf(line, BIG_LINE, "%s\\startsrv.bat", tmp); CmdFile = fopen(line, "r"); if (!CmdFile) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error:Tried to start server %s " ": Could not open the startup script %s :Error %d. Please " "run startsrv.bat from the server's root directory.", ds_get_server_name(), line, errno); ds_send_error(ErrorString, 0); return(DS_SERVER_DOWN); } ZeroMemory(cmd, sizeof(cmd)); if (!fread(cmd, 1, BIG_LINE, CmdFile)) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error:Tried to start server %s " ": Could not read the startup script %s :Error %d. Please " "run startsrv.bat from the server's root directory.", ds_get_server_name(), line, errno); ds_send_error(ErrorString, 0); return(DS_SERVER_DOWN); } ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); siStartInfo.cb = sizeof(STARTUPINFO); siStartInfo.lpReserved = siStartInfo.lpReserved2 = NULL; siStartInfo.cbReserved2 = 0; siStartInfo.lpDesktop = NULL; if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &siStartInfo, &piProcInfo)) { PR_snprintf(ErrorString, sizeof(ErrorString), "Error:Tried to start server %s " ": Could not start up the startup script %s :Error %d. Please " "run startsrv.bat from the server's root directory.", ds_get_server_name(), line, GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_DOWN); } CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); return(DS_SERVER_UP); } int StopNetscapeProgram() { HANDLE hEvent; CHAR ErrorString[512]; char *servid = ds_get_server_name(); hEvent = CreateEvent(NULL, TRUE, FALSE, servid); if(!SetEvent(hEvent)) { PR_snprintf(ErrorString, sizeof(ErrorString), "Tried to stop existing server %s" ": Could not signal it to stop :Error %d", servid, GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_UNKNOWN); } return(DS_SERVER_DOWN); } int StopNetscapeService() { BOOL ret; SERVICE_STATUS ServiceStatus; DWORD Error; CHAR ErrorString[512]; char *serviceName = ds_get_server_name(); schService = OpenService(schSCManager, serviceName, SERVICE_ALL_ACCESS); if (schService == NULL) { PR_snprintf(ErrorString, sizeof(ErrorString), "Tried to open service" " %s: Error %d (%s). Please" " stop the server from the Services Item in the Control Panel", serviceName, GetLastError(), ds_system_errmsg()); ds_send_error(ErrorString, 0); return(DS_SERVER_UP); } ret = ControlService(schService, SERVICE_CONTROL_STOP, &ServiceStatus); Error = GetLastError(); /* if ControlService returns with ERROR_SERVICE_CANNOT_ACCEPT_CTRL and the server status indicates that it is either shutdown or in the process of shutting down, then just wait for it to stop as usual */ if (ret || ((Error == ERROR_SERVICE_CANNOT_ACCEPT_CTRL) && ((ServiceStatus.dwCurrentState == SERVICE_STOPPED) || (ServiceStatus.dwCurrentState == SERVICE_STOP_PENDING)))) { CloseServiceHandle(schService); /* We make sure that the service is stopped */ WaitForServertoStop(); return(DS_SERVER_DOWN); } else if (Error != ERROR_SERVICE_NOT_ACTIVE) { PR_snprintf(ErrorString, sizeof(ErrorString), "Tried to stop service" " %s: Error %d (%s)." " Please stop the server from the Services Item in the" " Control Panel", serviceName, Error, ds_system_errmsg()); ds_send_error(ErrorString, 0); return(DS_SERVER_UNKNOWN); } return(DS_SERVER_DOWN); } int StartNetscapeService() { CHAR ErrorString[512]; int retries = 0; char *serviceName = ds_get_server_name(); schService = OpenService( schSCManager, // SCManager database serviceName, // name of service SERVICE_ALL_ACCESS); if (schService == NULL) { CloseServiceHandle(schService); PR_snprintf(ErrorString, sizeof(ErrorString),"Tried to start" " the service %s: Error %d. Please" " start the server from the Services Item in the Control Panel", serviceName, GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_DOWN); } if (!StartService(schService, 0, NULL)) { CloseServiceHandle(schService); PR_snprintf(ErrorString, sizeof(ErrorString), "StartService:Could not start " "the Directory service %s: Error %d. Please restart the server " "from the Services Item in the Control Panel", serviceName, GetLastError()); ds_send_error(ErrorString, 0); return(DS_SERVER_DOWN); } CloseServiceHandle(schService); return(DS_SERVER_UP); } void WaitForServertoStop() { HANDLE hServDoneSemaphore; int result,retries = 0; char *serviceName = ds_get_server_name(); char *newServiceName; RETRY: newServiceName = PR_smprintf("NS_%s", serviceName); hServDoneSemaphore = CreateSemaphore( NULL, // security attributes 0, // initial count for semaphore 1, // maximum count for semaphore newServiceName); PR_smprintf_free(newServiceName); if ( hServDoneSemaphore == NULL) { result = GetLastError(); if (result == ERROR_INVALID_HANDLE) { if (retries < SERVER_STOP_TIMEOUT) { retries++; Sleep(1000); goto RETRY; } } else { /* We aren't too interested in why the creation failed * if it is not because of another instance */ return; } } // hServDoneSemaphore == NULL CloseHandle(hServDoneSemaphore); return; } #endif 389-admin-1.1.35/lib/libdsa/dsalib_util.c000066400000000000000000000262111220472121400176520ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif #include #if defined( XP_WIN32 ) #include #include #else /* XP_WIN32 */ # if defined( AIXV4 ) # include # else /* AIXV4 */ # include # endif /* AIXV4 */ #include #include #include #endif /* XP_WIN3 */ #include "dsalib.h" #include #include #include #include #include #include #include "nspr.h" #include "plstr.h" #define COPY_BUFFER_SIZE 4096 /* This is the separator string to use when outputting key/value pairs to be read by the non-HTML front end (Java console) */ static const char *SEPARATOR = ":"; /* from AdmTask.java */ #define LOGFILEENVVAR "DEBUG_LOGFILE" /* used for logfp */ /* return a FILE * opened in append mode to the log file caller must use fclose to close it */ static FILE * get_logfp(void) { FILE *logfp = NULL; char *logfile = getenv(LOGFILEENVVAR); if (logfile) { logfp = fopen(logfile, "a"); } return logfp; } DS_EXPORT_SYMBOL int ds_file_exists(char *filename) { struct stat finfo; if ( filename == NULL ) return 0; if ( stat(filename, &finfo) == 0 ) /* successful */ return 1; else return 0; } /* * Given the name of a directory, return a NULL-terminated array of * the file names contained in that directory. Returns NULL if the directory * does not exist or an error occurs, and returns an array with a * single NULL string if the directory exists but is empty. The caller * is responsible for freeing the returned array of strings. * File names "." and ".." are not returned. */ #if !defined( XP_WIN32 ) DS_EXPORT_SYMBOL char ** ds_get_file_list( char *dir ) { DIR *dirp; struct dirent *direntp; char **ret = NULL; int nfiles = 0; if (( dirp = opendir( dir )) == NULL ) { return NULL; } if (( ret = malloc( sizeof( char * ))) == NULL ) { closedir(dirp); return NULL; }; while (( direntp = readdir( dirp )) != NULL ) { if ( strcmp( direntp->d_name, "." ) && strcmp( direntp->d_name, ".." )) { if (( ret = (char **) realloc( ret, sizeof( char * ) * ( nfiles + 2 ))) != NULL ) { ret[ nfiles ] = strdup( direntp->d_name ); nfiles++; } } } (void) closedir( dirp ); if (ret) { ret[ nfiles ] = NULL; } return ret; } #else DS_EXPORT_SYMBOL char ** ds_get_file_list( char *dir ) { char szWildcardFileSpec[MAX_PATH]; char **ret = NULL; long hFile; struct _finddata_t fileinfo; int nfiles = 0; if( ( dir == NULL ) || (strlen( dir ) == 0) ) return NULL; if( ( ret = malloc( sizeof( char * ) ) ) == NULL ) return NULL; PL_strncpyz(szWildcardFileSpec, dir, sizeof(szWildcardFileSpec)); PL_strcatn(szWildcardFileSpec, sizeof(szWildcardFileSpec), "/*"); hFile = _findfirst( szWildcardFileSpec, &fileinfo); if( hFile == -1 ) return NULL; if( ( strcmp( fileinfo.name, "." ) != 0 ) && ( strcmp( fileinfo.name, ".." ) != 0 ) ) { ret[ nfiles++ ] = strdup( fileinfo.name ); } while( _findnext( hFile, &fileinfo ) == 0 ) { if( ( strcmp( fileinfo.name, "." ) != 0 ) && ( strcmp( fileinfo.name, ".." ) != 0 ) ) { if( ( ret = (char **) realloc( ret, sizeof( char * ) * ( nfiles + 2 ) ) ) != NULL ) ret[ nfiles++ ] = strdup( fileinfo.name); } } _findclose( hFile ); ret[ nfiles ] = NULL; return ret; } #endif /* ( XP_WIN32 ) */ /* converts '\' chars to '/' */ DS_EXPORT_SYMBOL void ds_dostounixpath(char *szText) { if(szText) { while(*szText) { if( *szText == '\\' ) *szText = '/'; szText++; } } } #if !defined( XP_WIN32 ) #include /* errno */ #include /* getpwnam */ static int saved_uid_valid = 0; static uid_t saved_uid; static int saved_gid_valid = 0; static gid_t saved_gid; #if defined( HPUX ) #define SETEUID(id) setresuid((uid_t) -1, id, (uid_t) -1) #else #define SETEUID(id) seteuid(id) #endif #endif DS_EXPORT_SYMBOL char* ds_become_localuser_name (char *localuser) { #if !defined( XP_WIN32 ) if (localuser != NULL) { struct passwd* pw = getpwnam (localuser); if (pw == NULL) { fprintf (stderr, "getpwnam(%s) == NULL; errno %d", localuser, errno); fprintf (stderr, "\n"); fflush (stderr); } else { if ( ! saved_uid_valid) saved_uid = geteuid(); if ( ! saved_gid_valid) saved_gid = getegid(); if (setgid (pw->pw_gid) == 0) { saved_gid_valid = 1; } else { fprintf (stderr, "setgid(%li) != 0; errno %d", (long)pw->pw_gid, errno); fprintf (stderr, "\n"); fflush (stderr); } if (SETEUID (pw->pw_uid) == 0) { saved_uid_valid = 1; } else { fprintf (stderr, "seteuid(%li) != 0; errno %d", (long)pw->pw_uid, errno); fprintf (stderr, "\n"); fflush (stderr); } } } return NULL; #else return NULL; #endif } DS_EXPORT_SYMBOL char* ds_become_localuser (char **ds_config) { #if !defined( XP_WIN32 ) char* localuser = ds_get_value (ds_config, ds_get_var_name(DS_LOCALUSER), 0, 1); if (localuser != NULL) { char *rv = ds_become_localuser_name(localuser); free(localuser); return rv; } return NULL; #else return NULL; #endif } DS_EXPORT_SYMBOL char* ds_become_original (char **ds_config) { #if !defined( XP_WIN32 ) if (saved_uid_valid) { if (SETEUID (saved_uid) == 0) { saved_uid_valid = 0; } else { fprintf (stderr, "seteuid(%li) != 0; errno %d
n", (long)saved_uid, errno); fflush (stderr); } } if (saved_gid_valid) { if (setgid (saved_gid) == 0) { saved_gid_valid = 0; } else { fprintf (stderr, "setgid(%li) != 0; errno %d
\n", (long)saved_gid, errno); fflush (stderr); } } return NULL; #else return NULL; #endif } /* * on linux when running as root, doing something like * system("date > out.log 2>&1") will fail, because of an * ambigious redirect. This works for /bin/sh, but not /bin/csh or /bin/tcsh * * using this would turn * system("date > out.log 2>&1"); * into * system("/bin/sh/ -c \"date > out.log 2>&1\"") * */ DS_EXPORT_SYMBOL void alter_startup_line(char *startup_line) { #if (defined Linux && !defined LINUX2_4) char temp_startup_line[BIG_LINE+40]; PR_snprintf(temp_startup_line, sizeof(temp_startup_line), "/bin/sh -c \"%s\"", startup_line); PL_strncpyz(startup_line, temp_startup_line, BIG_LINE); #else /* do nothing */ #endif /* Linux */ } DS_EXPORT_SYMBOL void ds_send_error(char *errstr, int print_errno) { FILE *logfp; fprintf(stdout, "error%s%s\n", SEPARATOR, errstr); if (print_errno && errno) fprintf(stdout, "system_errno%s%d\n", SEPARATOR, errno); fflush(stdout); if ((logfp = get_logfp())) { fprintf(logfp, "error%s%s\n", SEPARATOR, errstr); if (print_errno && errno) fprintf(logfp, "system_errno%s%d\n", SEPARATOR, errno); fclose(logfp); } } DS_EXPORT_SYMBOL void ds_send_status(char *str) { FILE *logfp; fprintf(stdout, "[%s]: %s\n", ds_get_server_name(), str); fflush(stdout); if ((logfp = get_logfp())) { fprintf(logfp, "[%s]: %s\n", ds_get_server_name(), str); fclose(logfp); } } /* type and doexit are unused I'm not sure what type is supposed to be used for removed the doexit code because we don't want to exit abruptly anymore, we must exit by returning an exit code from the return in main() */ static void report_error(int type, char *msg, char *details, int doexit) { char error[BIG_LINE*4] = {0}; if (msg) { PL_strcatn(error, BIG_LINE*4, msg); PL_strcatn(error, BIG_LINE*4, SEPARATOR); } if (details) PL_strcatn(error, BIG_LINE*4, details); ds_send_error(error, 1); } DS_EXPORT_SYMBOL void ds_report_error(int type, char *msg, char *details) { /* richm - changed exit flag to 0 - we must not exit abruptly, we should instead exit by returning a code as the return value of main - this ensures that callers are properly notified of the status */ report_error(type, msg, details, 0); } DS_EXPORT_SYMBOL void ds_report_warning(int type, char *msg, char *details) { report_error(type, msg, details, 0); } DS_EXPORT_SYMBOL void ds_show_message(const char *message) { FILE *logfp; printf("%s\n", message); fflush(stdout); if ((logfp = get_logfp())) { fprintf(logfp, "%s\n", message); fclose(logfp); } return; } DS_EXPORT_SYMBOL char * ds_system_errmsg(void) { static char static_error[BUFSIZ]; char *lmsg = 0; /* Local message pointer */ size_t msglen = 0; #ifdef XP_WIN32 LPTSTR sysmsg = 0; #endif #if defined(XP_WIN32) msglen = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, GetLastError(), LOCALE_SYSTEM_DEFAULT, (LPTSTR)&sysmsg, 0, 0); if (msglen > 0) lmsg = sysmsg; SetLastError(0); #else lmsg = strerror(errno); errno = 0; #endif if (!lmsg) static_error[0] = 0; else { /* At this point lmsg points to something. */ int min = 0; msglen = strlen(lmsg); min = msglen > BUFSIZ ? BUFSIZ : msglen; strncpy(static_error, lmsg, min-1); static_error[min-1] = 0; } #ifdef XP_WIN32 /* NT's FormatMessage() dynamically allocated the msg; free it */ if (sysmsg) LocalFree(sysmsg); #endif return static_error; } #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif enum { DB_DIRECTORY = 0, DB_LOGDIRECTORY, DB_CHANGELOGDIRECTORY, DB_HOME_DIRECTORY }; DS_EXPORT_SYMBOL int ds_remove_reg_key(void *base, const char *format, ...) { int rc = 0; #ifdef XP_WIN32 int retries = 3; HKEY hkey = (HKEY)base; char *key; va_list ap; va_start(ap, format); key = PR_vsmprintf(format, ap); va_end(ap); do { if (ERROR_SUCCESS != RegDeleteKey(hkey, key)) { rc = GetLastError(); if (rc == ERROR_BADKEY || rc == ERROR_CANTOPEN || rc == ERROR_CANTREAD || rc == ERROR_CANTWRITE || rc == ERROR_KEY_DELETED || rc == ERROR_ALREADY_EXISTS || rc == ERROR_NO_MORE_FILES) { rc = 0; /* key already deleted - no error */ } else if ((retries > 1) && (rc == ERROR_IO_PENDING)) { /* the key is busy - lets wait and try again */ PR_Sleep(PR_SecondsToInterval(3)); retries--; } else { char *errmsg = PR_smprintf("Could not remove registry key %s - error %d (%s)", key, rc, ds_system_errmsg()); ds_send_error(errmsg, 0); PR_smprintf_free(errmsg); break; /* no retry, just fail */ } } } while (rc && retries); PR_smprintf_free(key); #endif return rc; } 389-admin-1.1.35/lib/libsi18n/000077500000000000000000000000001220472121400154045ustar00rootroot00000000000000389-admin-1.1.35/lib/libsi18n/getstrmem.h000066400000000000000000001370001220472121400175650ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define BUCKET_MASK NUM_BUCKETS-1 typedef struct DATABIN { char* pLibraryName; char** pArrayOfLibraryStrings; unsigned numberOfStringsInLibrary; } DATABIN; /* It is intended that this header file be generated by program dblink */ static char emptyString[] = ""; #define NUM_BUCKETS 32 /* must be a power of 2 */ /* strings in library libadmin */ static char* libadmin[] = { "", " Help ", " OK ", " Reset ", " Done ", " Cancel ", emptyString }; /* libraries in bucket for hashKey==0 */ static struct DATABIN bucket0[] = { {"libadmin",libadmin,5}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==1 */ static struct DATABIN bucket1[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==2 */ static struct DATABIN bucket2[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==3 */ static struct DATABIN bucket3[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==4 */ static struct DATABIN bucket4[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==5 */ static struct DATABIN bucket5[] = { {emptyString,NULL,0} }; /* strings in library userforms */ static char* userforms[] = { "", "Error: could not open servers list file.

\n", "Error: could not open %s server list file.

\n", CAPBRAND " Server Account", "Server Account Management for %s", "Server Account Management", emptyString }; /* libraries in bucket for hashKey==6 */ static struct DATABIN bucket6[] = { {"userforms",userforms,5}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==7 */ static struct DATABIN bucket7[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==8 */ static struct DATABIN bucket8[] = { {emptyString,NULL,0} }; /* strings in library libaccess */ static char* libaccess[] = { "", "basic-ncsa", "cannot open database %s", "basic-ncsa", "user %s password did not match database %s", "basic-ncsa", "cannot open connection to LDAP server on %s:%d", "basic-ncsa", "user %s password did not match LDAP on %s:%d", "acl-state", "missing realm", "Unable to allocate ACL List Hash\n", "ACLEvalBuildContext unable to PERM_MALLOC cache structure\n", "ACLEvalBuildContext unable to create hash table\n", "ACLEvalBuildContext unable to allocate ACE Entry\n", "ACLEvalBuildContext unable to allocate ACE entry\n", "ACLEvalBuildContext unable to allocate Boundary Entry\n", "ACLEvalBuildContext failed.\n", "ACL_EvalTestRights: an interim, absolute non-allow value was encountered. right=%s, value=%d\n", "LASDnsBuild unable to allocate hash table header\n", "LASDnsBuild unable to add key %s\n", "LASDnsBuild unable to add key %s\n", "LASDnsBuild unable to add key %s\n", "LASDnsBuild unable to add key %s\n", "LASDnsBuild unable to add key %s\n", "LAS DNS build received request for attribute %s\n", "LASDnsEval - illegal comparator %s\n", "LASDnsEval unable to allocate Context struct\n\n", "LASDnsEval unable to get session address %d\n", "LASDnsEval unable to get DNS - error=%s\n", "LAS Group Eval received request for attribute %s\n", "LASGroupEval - illegal comparator %s\n", "LASGroupEval - ran out of memory\n", "LASGroupEval unable to get session address %d\n", "LASGroupEval unable to get session address %d\n", "LASGroupEval - couldn't locate getter for auth-user\n", "LASGroupEval - Attribute getter for auth-user failed\n", "LASGroupEval - Attribute getter didn't set auth-user\n", "Check group membership of user \"%s\" for group \"%s\"\n", "LDAPU_SUCCESS for group \"%s\"\n", "LDAPU_FAILED for group \"%s\"\n", "LAS_EVAL_FALSE\n", "LAS_EVAL_TRUE\n", "LASIpTreeAlloc - no memory\n", "IP LAS unable to allocate tree node\n", "IP LAS unable to allocate tree node\n", "LAS IP build received request for attribute %s\n", "LASIpEval - illegal comparator %s\n", "LASIpEval unable to get session address - error=%s\n", "LASIpEval unable to allocate Context struct\n\n", "LASIpEval - reach 32 bits without conclusion value=%s", "LAS Program Eval received request for attribute %s\n", "LASProgramEval - illegal comparator %s\n", "LASProgram unable to get session address %d\n", "bin", "LASProgramEval: request not of type admin or bin, passing.\n", "LASProgramEval: check if program %s matches pattern %s.\n", "LASProgramEval: Invalid wildcard expression %s.\n", "LAS_EVAL_FALSE\n", "LAS_EVAL_TRUE\n", "Unexpected attribute in dayOfWeek - %s\n", "Illegal comparator for dayOfWeek - %s\n", "Unexpected attribute in timeOfDay - %s\n", "LAS User Eval received request for attribute %s\n", "LASUserEval - illegal comparator %s\n", "LASUserEval - ran out of memory\n", "LASUserEval unable to get session address %d\n", "LASUserEval unable to get session address %d\n", "LASGroupEval - couldn't locate getter for auth-user\n", "LASGroupEval - Attribute getter for auth-user failed\n", "LASGroupEval - Attribute getter didn't set auth-user\n", "Check if uid == user (i.e. check \"%s\" == \"%s)\"\n", "SUCCESS for user \"%s\"\n", "FAILED for user \"%s\"\n", "LAS_EVAL_FALSE\n", "LAS_EVAL_TRUE\n", "", "LASProgram unable to get request address - error=%s", "LASProgram rejecting request for program %s from pattern %s", "ACL_CacheFlush: unable to parse file \"%s\"\n", "ACL_CacheFlush: unable to concatenate ACL list \"%s\"\n", "ACL_CacheFlush: unable to open and process the magnus file \"%s\"\n", "Illegal comparator for timeOfDay - %s\n", "ACL_EvalBuildContext unable to create hash table\n", "ACL_EvalBuildContext unable to PERM_CALLOC cache structure\n", "ACL_EvalBuildContext unable to allocate ACE entry\n", "ACL_EvalBuildContext unable to allocate auth pointer array\n", "ACL_EvalBuildContext unable to allocate auth plist\n", "ACL_EvalTestRights: an interim, absolute non-allow value was encountered. right=%s, value=%s\n", "ACL_INTEvalTestRights: call to ACL_EvalBuildContext returned failure status\n", "ACL_ModuleRegister: module name is missing\n", "ACL_ModuleRegister: call to module init function returned a failed status\n", "ACL_GetAttribute: couldn't determine method for %s\n", "ACL_GetAttribute: couldn't locate getter for %s", "ACL_GetAttribute: attr getter failed to get %s", "ACL_GetAttribute: attr getter failed to get %s", "ACL_GetAttribute: All attribute getters declined for attr %s", "ACL_DatabaseRegister: dbtype for database \"%s\" is not defined yet!", "ACL_DatabaseRegister: database name is missing", "Error reading the DB Map File: %s. Reason: %s", "URL is missing for database %s", "Invalid property value pair for database %s", "\"default\" database must be an LDAP database", "Multiple \"default\" databases are being registered", "\"default\" LDAP database must be registered", "LASGroupEval unable to get database name - error= %s", "received invalid program expression %s", "parse_ldap_url: database url is missing", "parse_ldap_url: database name is missing", "parse_ldap_url: error in parsing ldap url. Reason: %s", "ldap password check: unable to get database name - error=%s", "ldap password check: unable to get parsed database %s", "ldap password check: couldn't initialize connection to LDAP. Reason: %s", "ldap password check: LDAP error: \"%s\"", "get_user_ismember_ldap unable to get database name - error=%s", "get_user_ismember_ldap unable to get parsed database %s", "ldap password check: couldn't initialize connection to LDAP. Reason: %s", "get_user_ismember_ldap: group %s does not exist", "get_user_ismember_ldap: LDAP error: \"%s\"", "ACL_LDAPDatabaseHandle: %s is not a registered database", "ACL_LDAPDatabaseHandle: %s is not an LDAP database", "ACL_LDAPDatabaseHandle: out of memory", "ACL_LDAPDatabaseHandle: couldn't initialize connection to LDAP. Reason: %s", "ACL_LDAPDatabaseHandle: couldn't bind to LDAP server. Reason: %s", "insufficient dynamic memory", "error opening file, %s: %s", "duplicate definition of %s", "file %s, line %s: duplicate definition of %s", "file %s, line %s: syntax error", "file %s, line %s: %s is undefined", "in acl %s, %s %s is undefined", "database %s: error accessing %s", "%s", "file %s, line %s: invalid syntax", "file %s, line %s: syntax error at \"%s\"", "realm %s is not defined", "error code = %d", "internal ACL error", "invalid argument", "ACL_DatabaseRegister: dbtype for database \"%s\" is not defined yet!", "couldn't determine dbtype from: %s", "Failed to register database %s", "ACL call returned failed status", "file %s: ACL IO error - %s", "acl_user_exists: out of memory", "acl_user_exists: user doesn't exist anymore", "acl_user_exists: plist error", emptyString }; /* libraries in bucket for hashKey==9 */ static struct DATABIN bucket9[] = { {"libaccess",libaccess,146}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==10 */ static struct DATABIN bucket10[] = { {emptyString,NULL,0} }; /* strings in library frame */ static char* frame[] = { "", "Not Found

Not Found

The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it. ", "Please inform the site administrator of the
referring page.", "Your browser sent a request that this proxy could not understand.", "Proper authorization is required for the administration of this proxy.\nEither your browser does not perform authorization, or your authorization\nhas failed.", "Username authentication is required for using this proxy.\nEither your browser does not perform proxy authorization, or your\nauthorization has failed.", "The proxy's access control configuration denies access to\nthe requested object through this proxy.", "The proxy has encountered an internal error which prevents it from\nfulfilling your request. The most likely cause is a misconfiguration.\nPlease ask the administrator to look for messages in the proxy's error log.", "This proxy server does not implement the requested method.", "An error has occurred on the proxy server.", "Your browser sent a query this server could not understand.", "Proper authorization is required for this area. Either your browser does not perform authorization, or your authorization has failed.", "Your client is not allowed to access the requested object.", "This server has encountered an internal error which prevents it from fulfilling your request. The most likely cause is a misconfiguration. Please ask the administrator to look for messages in the server's error log.", "This server does not implement the requested method.", "An error has occurred.", "Your browser sent a message this server could not understand.", "%s

%s

\nThis document has moved to a new location. Please update your documents and hotlists accordingly.", "%s\n

%s

\n%s\n", "process-uri-objects", "cannot find template %s", "process-uri-objects", "no partial path after object processing", "find-service", "invalid shexp %s", "find-service", "invalid shexp %s", "handle-processed", "no way to service request for %s", "finish-socks-request", "close failed (%s), csd=%d", "This beta software has expired.\n", "mr_accept(%d)", "Error issuing read on accept socket", "acb_accept_connection(%d)", "Error getting accept socket (%d)", "Error in accept! (%d, %s)", "Error creating new accept request", "accepted connection: %d (NSPR %d)", "Error creating new session structure", "accel_read_request()", "Error allocating request read buffer", "Error issuing async read request", "acb_read_request(%d, bytes %d)", "acb_read_req(1 session = %d)", "Error reading request (%d, %s)", "Client aborted connection", "Error reading request", "Error creating new request", "error occurred, closing %d, io was for %d", "accel_async_scan_headers()", "out of memory: accel_async_scan_headers", "out of memory: accel_async_scan_headers", "Error during async read (%d, %s)", "scan-headers reports: line too long", "scan-headers reports: too many headers", "Error reading headers", "scan-headers reports: header missing terminator (an empty line)", "scan-headers reports: header was empty", "name without value: got line \"%s\"", "accel_send_plain_file()", "accel_send_plain_file() - found request %d", "Parse headers lost the URI!", "accel_send_plain_file() - found uri %s", "accel_send_plain_file() - found in cache?", "malloc died!", "Error writing back file\n", "acb_send_plain_file(%d)", "Error writing in acb_send_plain_file (%d, %s)", "acb_close_connection(%d)", "Errored IO in acb_close_connection (%d, %s)", "Unable to close socket %d", "accel-cache-insert: Error allocating entry", "cache-init: server cache disabled", "accel_file_cache: Error initializing file cache", "accel_file_cache: Error creating cache", "accel_file_cache_init: CacheHashSize < %d, using %d", "accel_file_cache_init: CacheHashSize > %d, using %d", "accel_file_cache_init: MaxNumberOfCachedFiles < %d, using %d", "accel_file_cache_init: MaxNumberOfCachedFiles > %d, using %d", "accel_file_cache_init: MaxNumberOfOpenCachedFiles < %d, using %d", "accel_file_cache_init: MaxNumberOfOpenCachedFiles > %d, using %d", "accel_file_cache: Error initializing file cache", "file-cache: enabled = %s ", "on", "off", "file-cache: MaxNumberOfCachedFiles %d (0x%x)", "file-cache: CacheHashSize %d (0x%x)", "file-cache: MaxNumberOfOpenCachedFiles %d (0x%x)", "accel-cache-insert: Error allocating entry", "file-cache-cleanup: munmap failed (%s)", "file-cache-cleanup: found mmapped file \non system without mmap", "file_cache_init: MaxTotalCachedFileSize < %d, using %d", "file_cache_init: MaxTotalCachedFileSize > %d, using %d", "file cache using mmap flags 0x%x", "file cache using mmap prots 0x%x", "file-cache-init: could not create lock", "file-cache: unable to create temporary directory %s.\n", "file-cache: unable to create temporary directory %s.\n", "file-cache: GetTempPath() Cannot find temp directory to store file!", "file-cache-init: set max cached file size to %d", "file-cache-init: could not create lock", "file_cache_destroy()", "file-cache: Unable to get temp file name. Error %s", "file-cache: Unable to get temp file name. Error %s", "file-cache-insert: Error allocating entry", "file-cache-create: Error opening file %s (%s)", "file-cache-create: Error stat()ing file %s (%s)", "file-cache-create: Error mmap()ing file %s (%s)", "file-cache-create: malloc failure", "file-cache-create: error case failed to munmap(%d, %d) (%s)", "file-cache-valid: cannot stat %s", "dir change: invalidating %s (%d)", "file-cache: asynchronous file change notification failed.", "dir change: offset %d, action %d, len %d, name %s", "unable to check async file status", "ReadDirectoryChangesW failure- unable to continue watching %s. Error is %s", "file-cache-add-watch failure- unable to open directory %s. Error %s", "ReadDirectoryChangesW failure- unable to start watching %s. Error %s", "func_exec", "no handler function given for directive", "func_exec", "cannot find function named %s", "handle-request", "method without URI", "http-parse-request", "while scanning HTTP headers, %s", "handle-request", "read from %s failed, error is %s", "handle-request", "request too long", "start-http-response", "write failed (%s)", "start-http-response", "write failed (%s)", "http-status", "%d is not a valid HTTP status code", "finish-request", "close failed (%s)", "Unable to close socket for writing", "os has %d objects", "obj %d has no hash table at %d", "obj %d has no param", "obj %d name %s value %s", ".....directives %d.......", ".....directive %d", ".......instance %d", "...........param name %s value %s", "ClearConfigurationParameters:RegCreateKey %s", "ClearConfigurationParameters:RegEnumKey %s failed", "obj.conf line %d: error in filter file \"%s\" at line %d: %s", "obj.conf line %d: error in filter file \"%s\" at line %d: %s", "Unable to allocate Subject property list.\n", "Unable to set session ptr in Subject property list - error=%d\n", "Unable to set request ptr in Subject property list - error=%d\n", "file-cache-valid: cannot stat %s", "file-cache-create: Error stat()ing file %s (%s)", emptyString }; /* libraries in bucket for hashKey==11 */ static struct DATABIN bucket11[] = { {"frame",frame,156}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==12 */ static struct DATABIN bucket12[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==13 */ static struct DATABIN bucket13[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==14 */ static struct DATABIN bucket14[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==15 */ static struct DATABIN bucket15[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==16 */ static struct DATABIN bucket16[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==17 */ static struct DATABIN bucket17[] = { {emptyString,NULL,0} }; /* strings in library admserv */ static char* admserv[] = { "", "Unauthorized host", "Invalid URL", "no filename extension", "unrecognized type", "Internal Error\n

Internal Error

\nThe administration server was unable to fulfill your request.

\n", "Reason:", emptyString }; /* strings in library libir */ static char* libir[] = { "", "An I/O error occurred before all form data could be read.", emptyString }; /* libraries in bucket for hashKey==18 */ static struct DATABIN bucket18[] = { {"admserv",admserv,6}, {"libir",libir,1}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==19 */ static struct DATABIN bucket19[] = { {emptyString,NULL,0} }; /* strings in library httpdaemon */ static char* httpdaemon[] = { "", "Error in ConvertThreadToFiber", "Error in ConvertThreadToFiber", "Error in md_start_system", "Error in CreateFiber - idlefiber", "Error in GetQueuedCompletionStatus", "Error creating completion port", "Could not SetHandleNonInheritable (%s)", "Error accept/read new conn", "Error in Respond()", "Error in RespondCompleted()", "daemon: unable to fork new process (%s)\n", "daemon: setsid failed (%s)\n", "daemon: can't log pid to %s (%s)\n", "warning: could not set group id to %d (%s)\n", "warning: could not set user id to %d (%s)\n", "warning: daemon is running as super-user\n", "could not determine current user name\n", "error: chroot to %s failed (%s)\n", "WARNING! " CAPBRAND " executable and library have different versions.\n", "startup: listening to %s://%s, port %d as %s\n", "startup: listening to %s://%s, port %d as %s\n", "seminit failed (%s)\n", "Using single threaded accepts.", "Using multi threaded accepts.", "Using partial single threaded accepts.", "This machine has %d processors.", "Error calling thr_seconcurrency(%d)- (%s)", "Set conncurrency to %d.", "can't fork new process (%s)", "This beta software has expired.\n", "can't create IPC pipe (%s)", "write to wakeup pipe failed (%s)", "select thread miss", "startup failure: could not bind to port %d (%s)\n", "startup failure: could not bind to port %d, IP address %s (%s)\n", emptyString }; /* libraries in bucket for hashKey==20 */ static struct DATABIN bucket20[] = { {"httpdaemon",httpdaemon,35}, {emptyString,NULL,0} }; /* strings in library dsgw */ static char* dsgw[] = { "", "Unknown HTTP request method", "Invalid or incomplete HTML form data", "Out of memory", "Required query/form input is missing", "Illegal character in file path", "Bad or missing configuration file", "Unable to initialize LDAP", "An error occurred while contacting the LDAP server", "Unknown search object type", "Unknown attribute label", "Unknown match prompt", "No search filters for object type", "Unable to open HTML template file", "Unknown search mode - use \"smart\", \"complex\", \"pattern\", or \"auth\"", "Distinguished Name missing in URL", "Unknown scope in URL (should be base, sub, or one)", "Unrecognized URL or unknown error", "Bad URL format", "Internal error", "Unable to write template index file", "Unable to open template index file", "Unable to read directory", "LDAP SSL initialization failed (check the security path)", "For the Users and Groups forms to work over SSL with the Administration Server, you must at least temporarily activate SSL through the Admin Preferences|Encryption On/Off form", "Authentication credentials not found in authentication database", "Error retrieving data from the authentication database", "Your authentication credentials have expired", "Unable to create authentication credentials", "No distinguished name was provided when retrieving credentials", "Cannot open authentication database", "Could not append data to the authentication database", "No Directory Manager is defined", "No search string was provided. Please try again", "Too many arguments on one line in the config. file", "Failed to initialize Windows Sockets", "Authentication credentials could not be obtained from the Administration Server", "Distinguished Name missing in ldapdb:// URL", "Unrecognized URL or unknown error", "Bad URL format", "An error occurred while initializing the local LDAP database", "Unknown directory service type - use \"local\" or \"remote\"", "An error occurred while reading the db configuration file", "NSHOME/userdb path was NULL", "The directory service configuration could not be updated.", "The entry could not be read from the directory.", "The LDAP database could not be erased.", "You may not change entries besides your own.", "Problem", "Authentication Problem", ".\n

You must re-authenticate before continuing.\n", ".\n

You must re-authenticate before continuing.\n", "unknown error", "The operation was successful.", "An internal error occurred in the server. This usually\nindicates a serious malfunction in the server and should be\nbrought to the attention of your server administrator.", "The server could not understand the request which was sent to\nit by the gateway.", "A time limit was exceeded in responding to your request. If\nyou are searching for entries, you may achieve better results\nif you are more specific in your search.", "A size limit was exceeded in responding to your request. If\nyou are searching for entries, you may achieve better results\nif you are more specific in your search, because too many entries\nmatched your search criteria.", "The gateway attempted to authenticate to the server using\na method the server does not understand.", "The gateway attempted to authenticate to the server using an\nauthentication method which the server does not support. ", "Your request could not be fulfilled, probably because the server\nthat was contacted does not contain the data you are looking\nfor. It is possible that a referral to another server was\nreturned but could not be followed. If you were trying to make\nchanges to the directory, it may be that the server that holds\nthe master copy of the data is not available.", "Your request exceeded an administrative limit in the server.", "A critical extension that the gateway requested is not available in this server.", "The server was unable to process the request, because the\nrequest referred to an attribute which does not exist in the\nentry.", "The server was unable to fulfill your request, because the\nrequest violates a database constraint.", "The server could not add a value to the entry, because that\nvalue is already contained in the entry.", "The server could not locate the entry. If adding a new entry,\nbe sure that the parent of the entry you are trying to add exists.\nIf you received this error while searching or viewing an entry, it indicates that the\nentry which was being searched for does not exist.", "A distinguished name was not in the proper format. ", "The entry you attempted to authenticate as does not have a\npassword set, or is missing other required authentication\ncredentials. You cannot authenticate as that entry until the\nappropriate attributes have been added by the directory manager. ", "The password (or other authentication credentials) you supplied\nis incorrect. If you just changed your password, you might try exiting your browser and connecting again.", "You do not have sufficient privileges to perform the operation. ", "The server is too busy to service your request. Try again\nin a few minutes.", "The LDAP server could not be contacted.", "The server was unwilliing to process your request. Usually,\nthis indicates that serving your request would put a heavy load\non the server. It may also indicate that the server is not\nconfigured to process your request. If searching, you may wish\nto limit the scope of your search.", "The directory server could not honor your request because it\nviolates the schema requirements. Typically, this means that you\nhave not provided a value for a required field. It could also mean\nthat the schema in the directory server needs to be updated.", "The directory server will not allow you to delete or rename\nan entry if that entry has children. If you wish to do this, you\nmust first delete all the child entries.", "The server was unable to add a new entry, or rename an existing\nentry, because an entry by that name already exists.", "Your request would affect several directory servers.", "The directory server could not be contacted. Contact your\ndirectory server administrator for assistance.", "An error occured while sending data to the server.", "An error occured while reading data from the server.", "The server did not respond to the request. \nThe request timed out.", "The server does not support the authentication method used\nby the gateway.", "The search filter constructed by the gateway was in error.", "The operation was cancelled at your request.", "An internal error occurred in the library - a parameter was\nincorrect.", "A connection to the directory server could not be opened. Contact your\ndirectory server administrator for assistance.", "An unknown error was encountered.", "Entry Already Exists", "An entry named ", "onMouseOver=\"window.status='Click here to view this entry'; return true\"", " already exists.

Please choose another name and/or location.\n

\n", "Parent entry does not exist", "You cannot add an entry by the name:

%s,

\nbecause the parent of that entry does not exist.

\nBefore you can add this entry, you must first add\n", "its parent.\n", "an entry named:

%s.\n", "Warning: no authentication (continuing)...\n", "%s Directory Entry", "

Entry DN: %s

\n", "Changes to %s have been saved.", "%s has been added.", "%s has been deleted.", "Renamed %s to %s.", "

Note: because you %s the entry you were \nauthenticated as, it was necessary to discard your \nauthentication credentials. You will need to authenticate \nagain to make additional changes.\n", "deleted", "renamed", "changed the password of", "Attribute %s was changed
\n", " NOT ASCII (%ld bytes)\n", "No values were entered. Please try again.\n", "No changes were made.\n", "

Sending %s to the directory server...\n", "information", "changes", "

Successfully added entry.\n", "

Successfully edited entry. Your changes have been saved.\n", "

Successfully deleted entry.\n", "

The new name for the entry is: %s\n

\n", "

Successfully renamed entry.\n", "You must provide the old password.", "You must provide a new password. Please try again", "The new and confirming passwords do not match. Please try again", "
The %s %s is already in use. Please choose a different one.
\n", "missing form data element \"%.100s\"", "Initializing config info", "Cannot open file.", "Malformed dbconf file.", "Missing property name in dbconf file.", "Out of memory.", "Missing directive in dbconf file.", "Cannot open config file \"%s\"", "Missing argument for \"authlifetime\" directive\n", "Missing argument for \"dirmgr\" directive\n", "Missing argument for \"baseurl\" directive\n", "Bad URL provided for \"baseurl\" directive - the base DN is missing\n", "parsing baseurl directive", "Bad URL provided for \"baseurl\" directive - not an \"ldap://\" URL\n", "\"ldaps://\" URLs are not yet supported\n", "Missing arguments for \"template\" directive\n", "Missing argument for \"sslrequired\" directive\n", "Unknown argument to \"sslrequired\" directive (should be \"never\", \"whenauthenticated\", \"always\")\n", "Missing argument for \"securitypath\" directive\n", "Missing argument for \"location-suffix\" directive\n", "Three arguments are required for the \"location\" directive\n", "At least two arguments are required for the \"newtype\" directive\n", "Unknown location in \"newtype\" directive\n", "Three or four arguments are required for the \"tmplset\" directive\n", "Four arguments are required for the \"attrvset\" directive\n", "Missing argument for \"charset\" directive\n", "Missing argument for \"ClientLanguage\" directive\n", "Missing argument for \"AdminLanguage\" directive\n", "Missing argument for \"DefaultLanguage\" directive\n", "Missing filename for \"include\" directive\n", "Unknown directive in config file\n", "<= erase_db could not open lcache.conf file \"%s\"\n", "\n

The database has been deleted. Creating new database... \n\n ", "\n

The database could not be deleted \n\n ", "<= app_suffix could not open ldif file \"%s\"\n", "<= app_suffix could not open tmp file \"%s\"\n", "Unable to rename %s to %s", "null pointer returned by dbconf_read_default_dbinfo().", "Bad \"ldapdb\" URL - the base DN is missing\n", "Bad \"ldapdb\" URL\n", "Bad URL provided for \"baseurl\" directive - the base DN is missing\n", "parsing baseurl directive", "Bad URL provided for \"baseurl\" directive - not an \"ldap:// or ldapdb://\" URL\n", "\"ldaps://\" URLs are not yet supported\n", "No value given for binddn", "No value given for bindpw", "There is no default directory service defined in the dbswitch.conf file", "Cannot open config file \"%s\" for writing", "Unable to rename %s to %s", "config file %s: ", "config file %s: line %d: ", "max %d", " OK ", "Close Window", "Go Back", "{crypt}LOCKED [%s GMT]", "Return to Main", "Return to Main", " Help ", "Help", " Help ", "Help is not yet available.", "Help", "Close Window", "Close Window", "missing ?template", "Authenticate...", "Discard authentication credentials (log out)?", "You did not supply a search string", "The first step in authenticating to the directory is identifying\nyourself.
Please type your name:", "Continue", "Continue", "Cancel", "Authenticate as directory manager\">  (only available to Directory Administrators)\n", "Authenticate...", "Discard authentication credentials?", "Password for %s: ", "Continue", "Continue", "Cancel", "Authenticate (log in) to the directory", "You are about to authenticate to the directory as \n", "To complete the authentication process, you should\ntype your password.\n", "Before you can edit or add entries, you must authenticate\n(log in) to the directory. This window will guide\nyou through the steps of the authentication\nprocess.\n", "From this screen you may authenticate, or log in, \nto the directory. You will need to authenticate\nbefore you can modify directory entries. If you\nattempt to modify an entry without authenticating,\nyou will be asked to log in.\n", "Authentication Status", "

\nYou are currently authenticated to the directory as ", ".\nIf you wish to discard your authentication credentials and log out of the directory, click on the button below.", "Discard Authentication Credentials (log out)", "Your authentication credentials for ", "have expired.\n
\n", "Currently, you are not authenticated to the directory.
\n", "missing \"%s=\"", "unknown \"%s=%s\"", "unknown option %s", "unknown syntax=%s\n", "** HTML type \"%s\" not supported **
\n", "no entries", "1 entry", "%d entries", "where the ", "Edit", "Save Changes", "modify", "add", "Delete", "Delete this entry?", "Rename", "Enter a new name for this entry:", "Edit As", "missing %s=", "Close Window", "Edit...", "missing \"%s=\"\n", "unknown set \"%s\"\n", "unknown syntax \"%s\"\n", "Re-Authenticate", "Close Window", "Do you really want to ", "?", " OK ", " OK ", " Reset ", " Done ", " Cancel ", "found another IF (nested IFs are not supported)", "found ELSE but didn't see an IF", "found ELSE after ELSE (expecting ENDIF)", "found ELIF but didn't see an IF", "found ELIF after ELSE (expecting ENDIF)", "found ENDIF but didn't see an IF", "
template error: %s
\n", "ldap_init/lcache_init attempted before config file read", "not running under the administration server", "Could not initialize permissions", "Could not map username to a DN (error from admin server)", "Could not get current username", "Could not get current user password", "Error: %s", "Note: there is no display template for this type of entry available, so it is\ndisplayed below using a default method.", "Invalid user id or NULL LDAP handle", "no match for user id", "more than one match for user id", "the entire directory", "Two arguments are required for the \"includeset\" directive\n", "An error occurred while trying to access the database", "All references to entry could not be changed", "

Successfully removed all references to deleted entry.", "

Successfully updated all references to renamed entry.", "

Removing references to %s...", "

Updating references to %s...", "

removing %s from %s \n", "The directory server could not be contacted. One common configuration error when using LDAP over SSL is that the certificate used by the directory server must be marked as trusted. Contact your directory server administrator for further assistance.", "A connection to the directory server could not be opened. One common configuration error when using LDAP over SSL is that the certificate used by the directory server must be marked as trusted. Contact your directory server administrator for further assistance.", "Editing", "Adding", "Deleting", "Renaming", "Servers are not configured for CAL", "Cannot update config file \"%s\"\n", "Missing argument for \"locationurl\" directive\n", "Invalid location url\n", "<= app_suffix could not parse LDIF \"%s\"\n", emptyString }; /* libraries in bucket for hashKey==21 */ static struct DATABIN bucket21[] = { {"dsgw",dsgw,285}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==22 */ static struct DATABIN bucket22[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==23 */ static struct DATABIN bucket23[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==24 */ static struct DATABIN bucket24[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==25 */ static struct DATABIN bucket25[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==26 */ static struct DATABIN bucket26[] = { {emptyString,NULL,0} }; /* strings in library base */ static char* base[] = { "", "insufficient memory to create hash table", "insufficient memory to create hash table", "cache_destroy: cache tables appear corrupt.", "unable to allocate hash entry", "cache_insert: unable to create cache entry", "HTTP/1.0 200 OK\nContent-type: text/html\n\n", "

" CAPBRAND " cache status report

\n", "No caches on system

", "

%s cache

\n", "Cache hit ratio: %d/%d (%f)

\n

\n", "Cache size: %d/%d

\n

\n", "Hash table size: %d

\n

\n", "mru : %d

\nlru : %d

\n", "
    \n", "munmap failed (%s)", "munmap failed (%s)", "close failed (%s)", "daemon: unable to fork new process (%s)\n", "daemon: setsid failed (%s)\n", "daemon: can't log pid to %s (%s)\n", "warning: could not set group id to %d (%s)\n", "warning: could not set user id to %d (%s)\n", "warning: daemon is running as super-user\n", "could not determine current user name\n", "error: chroot to %s failed (%s)\n", "", ", address %s", "warning: statistics disabled (%s)\n", "security handshake timed out for pid %d", "warning: statistics disabled (%s)\n", "secure handshake failed (code %d)\n", "accept failed (%s)", "warning: statistics disabled (%s)\n", "select thread miss", "keepalive worker awoken with no work to do", "could not create new thread: %d (%s)", "wait for sema succeeded, but nothing to dequeue", "queue-sema creation failure", "error getting processor info for processor %d", "Error binding to processor %d", "bound process %d to processor %d", CAPBRAND " server is not explicitly binding to any processors.", "cache monitor exited", "cache batch update daemon exited", "Using single threaded accepts.", "Using multi threaded accepts.", "Using partial single threaded accepts.", "This machine has %d processors.", "Error calling thr_seconcurrency(%d)- (%s)", "Set conncurrency to %d.", "WARNING! " CAPBRAND " executable and library have different versions.\n", "", "", "seminit failed (%s)\n", "This beta software has expired.\n", "Cache monitor respawned", "Cache batch update daemon respawned", "can't find empty statistics slot", "can't fork new process (%s)", "assert failed! %s\n", "mr_table_init()", "malloc failed", "malloc failed!", "mr_add_io(%d, type %d, file %d)", "mr_add_io - stage 1", "mr_add_io - stage 2", "mr_add_io found invalid IO type %d", "mr_add_io - adding timeout", "Out of memory!\n", "done with mr_add_io", "mr_del_io(%d, type %d, file %d)", "mr_del_io found invalid IO type %d", "mr_lookup_io(%d)", "mr_async_io(%d, %d bytes, file %d)", "malloc failure adding async IO", "Error adding async io!", "Cannot seek for read!", "read failure! (%d, %s)", "do_read read %d bytes for file %d", "Cannot seek for write!", "writev failure! (%d, %s)", "write failure! (%d, %s)", "do_write wrote %d bytes for file %d", "do_timeout(mrp %d)", "do_timeout: found IO (timer=%d, time=%d)", "error deleting io", "timeout callback failure for %d\n", "mr_get_event(%d) - outstanding io %d", "mr_get_event: Waiting for reads on FD:", "mr_get_event: Waiting for writes on FD:", " %d", " %d", "mr_get_event set no timeout", "mr_get_event set timeout to: %d.%d sec", "error in select (%d, %s)", "mr_get_event() - select found %d", "error looking up IO fd %d", "read failed for fd %d", "error deleting io", "callback failure for %d\n", "error looking up IO fd %d", "writing: header len %d, writelen %d, total %d", "write failed for fd %d", "error deleting io", "callback failure for %d\n", "Error creating dns cache", "dns_cache_init: hash_size <= 0, using %d", "dns_cache_init: cache-size <= %d, using %d", "dns_cache_init: cache-size is %d is too large, using %d.", "dns_cache_init: expire_time <= 0, using %d", "dns_cache_init: expire is %d is too large, using %d seconds.", "Error creating dns cache", "dns-cache-insert: Error allocating entry", "dns-cache-insert: malloc failure", "successful server startup", "%s B%s", CAPBRAND " executable and shared library have different versions", " executable version is %s", " shared library version is %s", "error reporting shutting down", "warning", "config", "security", "failure", "catastrophe", "info", "verbose", "event_handler:Failed to wait on events %s", "could not wait on resume event event (%s)", "dlopen of %s failed (%s)", "dlopen of %s failed (%s)", "The server is terminating due to an error. Check the event viewer for the error message. SERVER EXITING!", "Terminating the server %s", "kill_server:cannot open server event %s", "kill_server:cannot set server event %s", "error: could not get socket (%s)\n", "error: could not set socket option (%s)\n", "Terminating Service:error: could not bind to address %s port %d (%s)\n", "Terminating Service:error: could not bind to port %d (%s)\n", "SetHandleNonInheritable: could not duplicate socket (%s)", "SetHandleNonInheritable: closing the original socket failed (%s)", "Could not SetHandleInformation (%s)", "Terminating Service:Failure: Could not open statistics file (%s)\n", "Could not set Thread Local Storage Value for thread at slot %d", "secure handshake failed (code %d)\n", "accept failed %d (%s)", "Failed to pulse Event %d %s", "Failed to send MobGrowth Event to parent %s", "Pulsing MobRespawn Event %d", "respawn thread pool to %d (%d)", "Could not open event to signal rotate application. Could not create the MoveLog event:%s", "Failed to send MoveLog Event to rotate app %s", "growing thread pool from %d to %d", "Could not open the ServiceControlManager, Error %d", "StartNetsiteService:Could not open the service %s: Error %d", "StartNetsiteService:Could not start the service %s", "Service Startup: Could not allocate security descriptor", "Service Startup: Could not init security descriptor", "Service Startup: Could not set the security Dacl", "Terminating Service:WinSock init failed: %s", "Httpd Server Startup failed: %s", "can't find empty statistics slot", "NT daemon: could not create new thread %d", "Service Startup Failure. Terminating Service:Could not create event %d:%s", "Service Startup Error. Could not create the MoveLog event:%s", "Failed to wait on Event objects %s", "Failed to wait on Event objects %s", "pipebuf_buf2sd: pipebuf_grab IO_ERROR %d", "pool-init: memory pools disabled", "pool-init: free_size <= 0, using %d", "pool-create-block: out of memory", "pool-create: out of memory", "pool-create: out of memory", "pool-malloc: out of memory", "FREE() used where PERM_FREE() should have been used- problem corrected and supressing further warnings.", "regex error: %s (regex: '%s')", "can't create IPC pipe (%s)", "write to wakeup pipe failed (%s)", "flushing %d connections; current %d; tot %d", "accept failed (%s)", "Error creating time cache", "time-cache: cache disabled", "time_cache_init: hash_size < %d, using default, %d", "time_cache_init: hash_size > %d, using default, %d", "time_cache_init: cache_size < %d, using default, %d", "time_cache_init: cache_size > %d, using default, %d", "Error allocating memory for time_cache", "Error allocating memory for time_cache entry", "Error allocating memory for time_cache entry", "Error inserting new time_cache entry", "Error allocating memory for time_cache", "cs-terminate failure (%s)", "cs-init failure (%s)", "cs-wait failure (%s)", "cs-post failure (%s)", "Unable to create nonblocking socket (%s)", "error: could not set keepalive (%s)\n", "error: could not set recv timeout (%s)\n", "error: could not set send timeout (%s)\n", "Unable to create nonblocking socket (%s)", "sem_grab failed (%s)", "sem_release failed (%s)", "sem_release failed (%s)", "Could not remove temporary directory %s, Error %d", "Could not remove temporary directory %s, Error %d", emptyString }; /* libraries in bucket for hashKey==27 */ static struct DATABIN bucket27[] = { {"base",base,205}, {emptyString,NULL,0} }; /* strings in library cgiadmin */ static char* cgiadmin[] = { "", "Missing REQUEST_METHOD", "This should only be invoked as CGI program", "Missing ADMSERV_ROOT", "This should only be invoked as CGI program", "Unrecognized request type.", "Startup", "Failed to initialize WinSock", "Bad file", "Expected servers.lst", "Cluster: merge product.lst from %s", "Obtaining product information from %s://%s:%d
    \n", "Updated %s
    \n", "Bad file", "Expected servers-instance.lst", "Warning: %s already exists, information not added
    \n", "Error: failed to create file %s
    \n", "Warning: directory %s will be removed because of above error
    \n", "", "Error: %s %s (errno = %d)
    \n", "Error: %s %s, %s
    \n", "ALLOW ALL OPERATIONS", "ALLOW GET OPERATIONS", "ALLOW SET OPERATIONS", "You accessed this form with an invalid query string.", "community has been removed.", "Community Strings", "Edit a Community", "Add Another Community", "", "Edit", "Remove", "Do you really want to remove this entry?", "Community: %s\n", "
    Operation: %s\n", "No communities exist.", "You should enter a community string.", "You should enter operation you want for this community.", "the community entry has been changed", "%s has been added", "fails to start up master agent", "Please refer to documents to start it", "master agent start up", "can't open config file", "open temp file fails", "open CONFIG fails", "open CONFIG fails", "No permission to start master agent", "You must be running as super user. Please refer to documents", "can't get tcp protocol entry\n", "can't create a sockect", "Please refer to documents for its configuration", "a smux master agent is running or the smux port is not free yet", "Please refer to documents for its configuration", "can't get udp protocol entry\n", "can't create a socket", "Please refer to documents for its configuration", "a snmpd is running or snmp port is not free yet", "Please refer to documents for its configuration", "can't get udp protocol entry\n", "can't create a socket", "Please refer to documents for its configuration", "Fail to start", "Please refer to documents for its configuration", emptyString }; /* libraries in bucket for hashKey==28 */ static struct DATABIN bucket28[] = { {"cgiadmin",cgiadmin,63}, {emptyString,NULL,0} }; /* libraries in bucket for hashKey==29 */ static struct DATABIN bucket29[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==30 */ static struct DATABIN bucket30[] = { {emptyString,NULL,0} }; /* libraries in bucket for hashKey==31 */ static struct DATABIN bucket31[] = { {emptyString,NULL,0} }; /* array of bucket pointers */ static struct DATABIN* buckets[32] = { bucket0, bucket1, bucket2, bucket3, bucket4, bucket5, bucket6, bucket7, bucket8, bucket9, bucket10, bucket11, bucket12, bucket13, bucket14, bucket15, bucket16, bucket17, bucket18, bucket19, bucket20, bucket21, bucket22, bucket23, bucket24, bucket25, bucket26, bucket27, bucket28, bucket29, bucket30, bucket31 }; 389-admin-1.1.35/lib/libsi18n/getstrprop.c000066400000000000000000000046671220472121400177760ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #include #include #include #include "i18n.h" #include "getstrmem.h" char* XP_GetStringFromMemory(char* strLibraryName,int iToken); char* XP_GetStringFromDatabase(char* strLibraryName, char* strLanguage, int key) { char *result = NULL; /* we should eventually port this to use proper adminutil resources, but for now, only the in-memory resource model is supported */ if (result == NULL) result = XP_GetStringFromMemory(strLibraryName,key); return result; } char* XP_GetStringFromMemory(char* strLibraryName,int iToken) { /* * In memory model called by XP_GetStringFromDatabase * does not use database (nsres, et al.). * * This function uses hash table for library lookup * and direct lookup for string. * * This function is thread safe. */ unsigned hashKey; int found = 0; unsigned uToken = iToken; char* cPtr; DATABIN* pBucket; /* calculate hash key */ hashKey = 0; cPtr = strLibraryName; while (*cPtr) { hashKey += *(cPtr++); } hashKey &= BUCKET_MASK; /* get bucket for this hash key */ pBucket = buckets[hashKey]; /* search overflow buckets */ while (*(pBucket->pLibraryName)!='\0') { if (strcmp(pBucket->pLibraryName,strLibraryName)==0) { found = 1; break; } pBucket++; } if (!found) { return emptyString; } if (uToken<=pBucket->numberOfStringsInLibrary) { return pBucket->pArrayOfLibraryStrings[uToken]; } else { /* string token out of range */ return emptyString; } } 389-admin-1.1.35/lib/libsi18n/gsadmserv.h000066400000000000000000000021501220472121400175460ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * END COPYRIGHT BLOCK **/ #define DATABASE_NAME "ns-admin" #ifdef RESOURCE_STR #undef LIBRARY_NAME #include "../admserv/cgi-src40/dbtcgiadmin.h" #undef LIBRARY_NAME #include "libadmin/dbtlibadmin.h" static res_RESOURCE_GLOBAL allxpstr[] = { admserv, 0 }; #endif /* ifdef RESOURCE_STR */ 389-admin-1.1.35/ltmain.sh000066400000000000000000010515221220472121400150330ustar00rootroot00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 389-admin-1.1.35/m4/000077500000000000000000000000001220472121400135255ustar00rootroot00000000000000389-admin-1.1.35/m4/adminutil.m4000066400000000000000000000044031220472121400157560ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for ADMINUTIL) # check for --with-adminutil AC_MSG_CHECKING(for --with-adminutil) AC_ARG_WITH(adminutil, [ --with-adminutil=PATH Adminutil directory], [ if test -d "$withval"/include -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) ADMINUTILDIR=$withval adminutil_lib="-L$ADMINUTILDIR/lib" adminutil_libdir="$ADMINUTILDIR/lib" adminutil_incdir=$ADMINUTILDIR/include if ! test -e "$adminutil_incdir/libadminutil/admutil.h" ; then AC_MSG_ERROR([$withval include dir not found]) fi adminutil_inc="-I$adminutil_incdir" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if ADMINUTIL is not found yet, try pkg-config # last resort if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then AC_MSG_CHECKING(for adminutil with pkg-config) AC_PATH_PROG(PKG_CONFIG, pkg-config) if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists 389-adminutil; then adminutil_inc=`$PKG_CONFIG --cflags-only-I 389-adminutil` adminutil_lib=`$PKG_CONFIG --libs-only-L 389-adminutil` adminutil_libdir=`$PKG_CONFIG --libs-only-L 389-adminutil | sed -e s/-L// | sed -e s/\ .*$//` elif $PKG_CONFIG --exists adminutil; then adminutil_inc=`$PKG_CONFIG --cflags-only-I adminutil` adminutil_lib=`$PKG_CONFIG --libs-only-L adminutil` adminutil_libdir=`$PKG_CONFIG --libs-only-L adminutil | sed -e s/-L// | sed -e s/\ .*$//` else AC_MSG_ERROR([ADMINUTIL not found, specify with --with-adminutil.]) fi fi fi 389-admin-1.1.35/m4/fhs.m4000066400000000000000000000027361220472121400145570ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for FHS) # check for --with-fhs AC_MSG_CHECKING(for --with-fhs) AC_ARG_WITH(fhs, [ --with-fhs Use FHS layout], [ with_fhs=yes AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) if test "$with_fhs" = "yes"; then AC_DEFINE([IS_FHS], [1], [Use FHS layout]) fi # check for --with-fhs-opt AC_MSG_CHECKING(for --with-fhs-opt) AC_ARG_WITH(fhs-opt, [ --with-fhs-opt Use FHS optional layout], [ with_fhs_opt=yes AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) if test "$with_fhs_opt" = "yes"; then AC_DEFINE([IS_FHS_OPT], [1], [Use FHS optional layout]) fi if test "$with_fhs" = "yes" -a "$with_fhs_opt" = "yes"; then AC_MSG_ERROR([Can't set both --with-fhs and --with-fhs-opt. Please only use one of these options.]) fi 389-admin-1.1.35/m4/fortitude.m4000066400000000000000000000044271220472121400160030ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # check for --with-fortitude default_fortitudedir=/opt/fortitude AC_MSG_CHECKING(for --with-fortitude) AC_ARG_WITH(fortitude, AS_HELP_STRING([--with-fortitude=PATH], [Fortitude root directory (default: $default_fortitudedir)]), [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) fortitudedir="$withval" elif test "$withval" = "yes" -a -d $default_fortitudedir ; then AC_MSG_RESULT([using $default_fortitudedir]) fortitudedir="$default_fortitudedir" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) if test -n "$fortitudedir" ; then # see if there is a mod_nss in fortitude modnsslist=`ls $fortitudedir/modules.local/libmodnss.* 2> /dev/null` if test -n "$modnsslist" ; then nssmoddir="$fortitudedir/modules.local" fi # see if there is a nss_pcache if test -x "$fortitudedir/bin/nss_pcache" ; then modnssbindir="$fortitudedir/bin" fi # see if fortitude supplies apache if test -x "$fortitudedir/sbin/httpd.worker" ; then HTTPD="$fortitudedir/sbin/httpd.worker" fi # see if fortitude supplies apache modules if test -d "$fortitudedir/modules" ; then moddir="$fortitudedir/modules" fi # see if fortitude supplies apxs if test -x "$fortitudedir/sbin/apxs" ; then APXS="$fortitudedir/sbin/apxs" fi # see if fortitude supplies apr-config if test -x "$fortitudedir/bin/apr-config" ; then APR_CONFIG="$fortitudedir/bin/apr-config" fi fi 389-admin-1.1.35/m4/httpd.m4000066400000000000000000000151311220472121400151130ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_MSG_CHECKING(for --with-httpd) AC_ARG_WITH(httpd, AS_HELP_STRING([--with-httpd=PATH], [Full path of Apache binary. Configure will usually find the right one, but if it does not, use this to specify the correct binary.]), [ if test -x "$withval" then AC_MSG_RESULT([using $withval]) HTTPD="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) if test -z "$HTTPD" ; then AC_PATH_PROG([HTTPD], [httpd.worker], [], [$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin]) if test -z "$HTTPD" -o ! -x "$HTTPD" ; then AC_PATH_PROG([HTTPD], [httpd], [], [$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin]) fi if test -z "$HTTPD" -o ! -x "$HTTPD" ; then AC_MSG_ERROR([Apache2 httpd server not found]) fi fi httpd_root=`$HTTPD -V | grep HTTPD_ROOT | cut -f2 -d=` httpd_root=`eval echo $httpd_root` httpd_conf_rel=`$HTTPD -V | grep SERVER_CONFIG_FILE | cut -f2 -d=` httpd_conf_rel=`eval echo $httpd_conf_rel` # Server version: Apache/2.2.2 verstr='Server version: Apache/' httpd_ver=`$HTTPD -v | grep "Server version:" | sed -e "s,$verstr,,"` case $httpd_ver in 2.4*) APACHE24=1 ;; 2.2*) APACHE22=1 ;; *) APACHE22= ;; esac httpdconf=${httpd_root}/${httpd_conf_rel} mimemagic=`awk '"MIMEMagicFile" == $1" {print $2}' $httpdconf` if test ! -f "$mimemagic" ; then # assume relative to root mimemagic=${httpd_root}/${mimemagic} fi # check for mime.types file httpdconfdir=`dirname $httpdconf` if test ! -f $httpdconfdir/mime.types ; then httpdconfdir="/etc" if test ! -f $httpdconfdir/mime.types ; then AC_MSG_ERROR([mime.types file not found]) fi fi if test -z "$enable_threading" ; then enable_threading=yes # if not set on cmdline, set default fi AC_MSG_CHECKING(for --enable-threading) AC_ARG_ENABLE(threading, AS_HELP_STRING([--enable-threading], [Admin Server works best if Apache has threading support. Use --disable-threading to force the use of an Apache without threading support.])) AC_MSG_RESULT($enable_threading) # check for worker model AC_MSG_CHECKING(for $HTTPD with threading support) httpd_model=`$HTTPD -V | grep "Server MPM:" | awk '{print $3}'` if test "$httpd_model" = Worker ; then AC_MSG_RESULT([good - threading model is supported]) else httpd_model=`$HTTPD -V | grep "threaded:" | awk '{print $2}'` if test "$httpd_model" = yes ; then AC_MSG_RESULT([good - threading model is supported]) else httpd_model=`$HTTPD -V | grep "APACHE_MPM_DIR" | grep "worker"` if test -n "httpd_model" ; then AC_MSG_RESULT([good - threading model is supported]) elif test "$enable_threading" = yes ; then AC_MSG_ERROR([threading model not supported - use --disable-threading to force use of unthreaded model]) else AC_MSG_RESULT([NOTICE - threading support explicitly disabled - Admin Server authorization cache will not work correctly]) fi fi fi # check for --with-apxs AC_MSG_CHECKING(for --with-apxs) AC_ARG_WITH(apxs, AS_HELP_STRING([--with-apxs=PATH], [Path to apxs]), [ if test -x "$withval" then AC_MSG_RESULT([using $withval]) APXS=$withval else echo AC_MSG_ERROR([$withval not found or not executable]) fi ], AC_MSG_RESULT(no)) if test -z "$APXS" ; then # first look for APXS in same dir as HTTPD apachedir=`dirname $HTTPD` if test -x "$apachedir/apxs" ; then APXS="$apachedir/apxs" else AC_PATH_PROG([APXS], [apxs], [], [$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin]) fi if test -z "$APXS" ; then AC_MSG_ERROR([Apache2 apxs program not found]) fi fi AC_CHECKING(for apr-config) # check for --with-apr-config AC_MSG_CHECKING(for --with-apr-config) AC_ARG_WITH(apr-config, AS_HELP_STRING([--with-apr-config=PATH], [Use apr-config to determine the APR directory. Supply optional path to locate apr-config]), [ if test -x "$withval" then AC_MSG_RESULT([using $withval]) APR_CONFIG=$withval fi ], AC_MSG_RESULT(no)) if test -z "$APR_CONFIG" ; then # first look for APR_CONFIG in the bin dir if HTTPD is in the sbin dir apachedir=`dirname $HTTPD` parentdir=`dirname $apachedir` if test -x "$parentdir/bin/apr-1-config" ; then APR_CONFIG="$parentdir/bin/apr-1-config" elif test -x "$parentdir/bin/apr-config" ; then APR_CONFIG="$parentdir/bin/apr-config" else AC_PATH_PROGS(APR_CONFIG, apr-1-config apr-config, NO_APR_CONFIG, [$PATH:/opt/hpws/apache/bin:/usr/local/apache/bin:/usr/bin]) fi if test -z "$APR_CONFIG" ; then AC_MSG_ERROR([Apache2 apr-config program not found - please specify with --with-apr-config=/path/to/apr-config]) fi fi if test -z "$moddir" ; then if test -n "$APXS" -a -x "$APXS" ; then moddir=`$APXS -q LIBEXECDIR` fi if test -z "$moddir" ; then moddir='$(libdir)/httpd/modules' fi fi dnl set the variables we need to build modules apr_inc=`$APR_CONFIG --includes` apache_inc=`$APXS -q INCLUDEDIR` apache_conf=`$APXS -q SYSCONFDIR` apache_prefix=`$APXS -q PREFIX` apache_bin=`$APXS -q SBINDIR` extra_cppflags=`$APXS -q EXTRA_CPPFLAGS` if ! test -f "$apache_inc/apr.h"; then if test -z "$apr_inc"; then AC_MSG_ERROR([apr.h is not in your Apache include dir as reported by apxs. Use --with-apxs to have apxs tell us where to find it.]) fi fi dnl figure out the apr API version apr_version=`$APR_CONFIG --version` case $apr_version in 1.*) ap_ver_suf="-2.2" ;; 0.9*) ap_ver_suf= ;; *) AC_MSG_ERROR(APR version $apr_version is not supported by this module) ;; esac 389-admin-1.1.35/m4/icu.m4000066400000000000000000000054141220472121400145530ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for LIBICU) # check for --with-icu AC_MSG_CHECKING(for --with-icu) AC_ARG_WITH(icu, [ --with-icu=PATH ICU directory], [ if test -d "$withval"/lib then AC_MSG_RESULT([using $withval]) ICUDIR="$withval" icu_lib="-L$ICUDIR/lib" icu_libdir="$ICUDIR/lib" else echo AC_MSG_ERROR([$withval not found]) fi icu_inc="-I$withval/include" icu_bin="$withval/bin" ], AC_MSG_RESULT(no)) # check for --with-icu-inc AC_MSG_CHECKING(for --with-icu-inc) AC_ARG_WITH(icu-inc, [ --with-icu-inc=PATH ICU include directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) icu_inc="-I$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-icu-lib AC_MSG_CHECKING(for --with-icu-lib) AC_ARG_WITH(icu-lib, [ --with-icu-lib=PATH ICU library directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) icu_lib="-L$withval" icu_libdir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-icu-bin AC_MSG_CHECKING(for --with-icu-bin) AC_ARG_WITH(icu-bin, [ --with-icu-bin=PATH ICU binary directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) icu_bin="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if ICU is not found yet, try pkg-config # last resort if test -z "$icu_lib"; then AC_MSG_CHECKING(for icu with icu-config) AC_PATH_PROG(ICU_CONFIG, icu-config) if test -n "$ICU_CONFIG"; then icu_lib=`$ICU_CONFIG --ldflags-searchpath` icu_libdir=`$ICU_CONFIG --libdir` icu_inc=`$ICU_CONFIG --cppflags-searchpath` icu_bin=`$ICU_CONFIG --bindir` AC_MSG_RESULT([using system ICU]) else AC_MSG_ERROR([ICU not found, specify with --with-icu.]) fi fi AC_CHECK_PROG([GENRB], [genrb], [1], [], [$icu_bin:$PATH]) if test -z "$GENRB" ; then AC_MSG_ERROR([genrb not found in icu_bin $icu_bin or PATH $PATH - please specify ICU bin directory]) fi 389-admin-1.1.35/m4/mod_nss.m4000066400000000000000000000052331220472121400154340ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for MOD_NSS) # check for --with-modnss-lib AC_MSG_CHECKING(for --with-modnss-lib) AC_ARG_WITH(modnss-lib, [ --with-modnss-lib=PATH MOD_NSS Apache module directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) nssmoddir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-modnss-bin AC_MSG_CHECKING(for --with-modnss-bin) AC_ARG_WITH(modnss-bin, [ --with-modnss-bin=PATH MOD_NSS binary directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) modnssbindir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # else, parse httpd.conf or httpconfdir/nss.conf if test -z "$modnssbindir" ; then nsspcache=`grep NSSPassPhraseHelper $httpdconf|awk '{print $2}'` if test -z "$nsspcache" ; then nsspcache=`grep NSSPassPhraseHelper $httpd_root/conf.d/* | awk '{print $2}'` fi if test -z "$nsspcache" ; then # same directory as Apache? modnssbindir=`dirname $HTTPD` nsspcache="$modnssbindir/nss_pcache" fi if test -z "$nsspcache" -o ! -f "$nsspcache" ; then AC_PATH_PROG([nsspcache], [nss_pcache], [], [$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin]) fi if test -n "$nsspcache" -a -f "$nsspcache" ; then modnssbindir=`dirname $nsspcache` else modnssbindir= fi fi if test -z "$nssmoddir" ; then nssmoddir="$moddir" fi if test ! -f "$modnssbindir/nss_pcache" ; then AC_MSG_ERROR([Could not find the mod_nss pass phrase helper $modnssbindir/nss_pcache]) else AC_MSG_RESULT([Using mod_nss pass phrase helper $modnssbindir/nss_pcache]) fi if test ! -d "$nssmoddir" ; then AC_MSG_ERROR([Could not find the mod_nss module directory $nssmoddir]) else AC_MSG_RESULT([Using mod_nss module directory $nssmoddir]) fi 389-admin-1.1.35/m4/mozldap.m4000066400000000000000000000107431220472121400154420ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for Mozilla LDAPSDK) # check for --with-ldapsdk AC_MSG_CHECKING(for --with-ldapsdk) AC_ARG_WITH(ldapsdk, AS_HELP_STRING([--with-ldapsdk@<:@=PATH@:>@],[Mozilla LDAP SDK directory]), [ if test "$withval" = yes then AC_MSG_RESULT(yes) elif test "$withval" = no then AC_MSG_RESULT(no) elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) LDAPSDKDIR=$withval ldapsdk_inc="-I$LDAPSDKDIR/include" ldapsdk_lib="-L$LDAPSDKDIR/lib" ldapsdk_libdir="$LDAPSDKDIR/lib" with_ldapsdk=yes else echo AC_MSG_ERROR([$withval not found]) fi if test "$with_ldapsdk" = yes -a "$with_openldap" = yes then AC_MSG_ERROR([Cannot use both LDAPSDK and OpenLDAP.]) fi if test "$with_ldapsdk" != yes -a "$with_openldap" != yes then AC_MSG_ERROR([Either LDAPSDK or OpenLDAP must be used.]) fi ], [ if test "$with_openldap" = yes then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) with_ldapsdk=yes fi ]) # check for --with-ldapsdk-inc AC_MSG_CHECKING(for --with-ldapsdk-inc) AC_ARG_WITH(ldapsdk-inc, AS_HELP_STRING([--with-ldapsdk-inc=PATH],[Mozilla LDAP SDK include directory]), [ if test -e "$withval"/ldap.h then AC_MSG_RESULT([using $withval]) ldapsdk_inc="-I$withval" with_ldapsdk=yes else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-ldapsdk-lib AC_MSG_CHECKING(for --with-ldapsdk-lib) AC_ARG_WITH(ldapsdk-lib, AS_HELP_STRING([--with-ldapsdk-lib=PATH],[Mozilla LDAP SDK library directory]), [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) ldapsdk_lib="-L$withval" ldapsdk_libdir="$withval" with_ldapsdk=yes else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if LDAPSDK is not found yet, try pkg-config # last resort if test "$with_ldapsdk" = yes ; then if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib" -o -z "$ldapsdk_libdir"; then AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_MSG_CHECKING(for mozldap with pkg-config) if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists mozldap6; then mozldappkg=mozldap6 elif $PKG_CONFIG --exists mozldap; then mozldappkg=mozldap else AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].]) fi ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldappkg` ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldappkg` ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ .*$//` if test -z "$ldapsdk_libdir" ; then ldapsdk_libdir=`$PKG_CONFIG --variable=libdir $mozldappkg` fi if test -z "$ldapsdk_libdir" ; then ldapsdk_libdir="$libdir" fi AC_MSG_RESULT([using system $mozldappkg]) fi fi fi if test "$with_ldapsdk" = yes ; then if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].]) fi dnl make sure the ldap sdk version is 6 or greater - we do not support dnl the old 5.x or prior versions - the ldap server code expects the new dnl ber types and other code used with version 6 save_cppflags="$CPPFLAGS" CPPFLAGS="$ldapsdk_inc $nss_inc $nspr_inc" AC_CHECK_HEADER([ldap.h], [isversion6=1], [isversion6=], [#include #if LDAP_VENDOR_VERSION < 600 #error The LDAP C SDK version is not supported #endif ]) CPPFLAGS="$save_cppflags" if test -z "$isversion6" ; then AC_MSG_ERROR([The LDAPSDK version in $ldapsdk_inc/ldap-standard.h is not supported]) fi AC_DEFINE([USE_MOZLDAP], [1], [If defined, using MozLDAP for LDAP SDK]) AC_DEFINE([HAVE_LDAP_URL_PARSE_NO_DEFAULTS], [1], [have the function ldap_url_parse_no_defaults]) fi 389-admin-1.1.35/m4/nspr.m4000066400000000000000000000054731220472121400147620ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for NSPR) # check for --with-nspr AC_MSG_CHECKING(for --with-nspr) AC_ARG_WITH(nspr, [ --with-nspr=PATH Netscape Portable Runtime (NSPR) directory], [ if test -e "$withval"/include/nspr.h -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) NSPRDIR=$withval nspr_inc="-I$NSPRDIR/include" nspr_lib="-L$NSPRDIR/lib" nspr_libdir="$NSPRDIR/lib" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-nspr-inc AC_MSG_CHECKING(for --with-nspr-inc) AC_ARG_WITH(nspr-inc, [ --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory], [ if test -e "$withval"/nspr.h then AC_MSG_RESULT([using $withval]) nspr_inc="-I$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-nspr-lib AC_MSG_CHECKING(for --with-nspr-lib) AC_ARG_WITH(nspr-lib, [ --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) nspr_lib="-L$withval" nspr_libdir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if NSPR is not found yet, try pkg-config # last resort if test -z "$nspr_inc" -o -z "$nspr_lib" -o -z "$nspr_libdir"; then AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_MSG_CHECKING(for nspr with pkg-config) if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I nspr` nspr_lib=`$PKG_CONFIG --libs-only-L nspr` nspr_libdir=`$PKG_CONFIG --libs-only-L nspr | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system NSPR]) elif $PKG_CONFIG --exists dirsec-nspr; then nspr_inc=`$PKG_CONFIG --cflags-only-I dirsec-nspr` nspr_lib=`$PKG_CONFIG --libs-only-L dirsec-nspr` nspr_libdir=`$PKG_CONFIG --libs-only-L dirsec-nspr | sed -e s/-L// | sed -e s/\ .*$//` AC_MSG_RESULT([using system dirsec NSPR]) else AC_MSG_ERROR([NSPR not found, specify with --with-nspr.]) fi fi fi 389-admin-1.1.35/m4/nss.m4000066400000000000000000000053101220472121400145710ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for NSS) # check for --with-nss AC_MSG_CHECKING(for --with-nss) AC_ARG_WITH(nss, [ --with-nss=PATH Network Security Services (NSS) directory], [ if test -e "$withval"/include/nss.h -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) NSSDIR=$withval nss_inc="-I$NSSDIR/include" nss_lib="-L$NSSDIR/lib" nss_libdir="$NSSDIR/lib" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-nss-inc AC_MSG_CHECKING(for --with-nss-inc) AC_ARG_WITH(nss-inc, [ --with-nss-inc=PATH Network Security Services (NSS) include directory], [ if test -e "$withval"/nss.h then AC_MSG_RESULT([using $withval]) nss_inc="-I$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-nss-lib AC_MSG_CHECKING(for --with-nss-lib) AC_ARG_WITH(nss-lib, [ --with-nss-lib=PATH Network Security Services (NSS) library directory], [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) nss_lib="-L$withval" nss_libdir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if NSS is not found yet, try pkg-config # last resort if test -z "$nss_inc" -o -z "$nss_lib" -o -z "$nss_libdir"; then AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_MSG_CHECKING(for nss with pkg-config) if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists nss; then nss_inc=`$PKG_CONFIG --cflags-only-I nss` nss_lib=`$PKG_CONFIG --libs-only-L nss` nss_libdir=`$PKG_CONFIG --variable=libdir nss` AC_MSG_RESULT([using system NSS]) elif $PKG_CONFIG --exists dirsec-nss; then nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss` nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss` nss_libdir=`$PKG_CONFIG --variable=libdir dirsec-nss` AC_MSG_RESULT([using system dirsec NSS]) else AC_MSG_ERROR([NSS not found, specify with --with-nss.]) fi fi fi 389-admin-1.1.35/m4/openldap.m4000066400000000000000000000114721220472121400155760ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2009 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for OpenLDAP) # check for --with-openldap AC_MSG_CHECKING(for --with-openldap) AC_ARG_WITH(openldap, AS_HELP_STRING([--with-openldap@<:@=PATH@:>@],[Use OpenLDAP - optional PATH is path to OpenLDAP SDK]), [ if test "$withval" = yes then AC_MSG_RESULT([using system OpenLDAP]) elif test "$withval" = no then AC_MSG_RESULT(no) elif test -e "$withval"/include/ldap.h -a -d "$withval"/lib then AC_MSG_RESULT([using $withval]) OPENLDAPDIR=$withval openldap_incdir="$OPENLDAPDIR/include" openldap_inc="-I$openldap_incdir" openldap_lib="-L$OPENLDAPDIR/lib" openldap_libdir="$OPENLDAPDIR/lib" with_openldap=yes else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-openldap-inc AC_MSG_CHECKING(for --with-openldap-inc) AC_ARG_WITH(openldap-inc, AS_HELP_STRING([--with-openldap-inc=PATH],[OpenLDAP SDK include directory]), [ if test -e "$withval"/ldap.h then AC_MSG_RESULT([using $withval]) openldap_incdir="$withval" openldap_inc="-I$withval" with_openldap=yes else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # check for --with-openldap-lib AC_MSG_CHECKING(for --with-openldap-lib) AC_ARG_WITH(openldap-lib, AS_HELP_STRING([--with-openldap-lib=PATH],[OpenLDAP SDK library directory]), [ if test -d "$withval" then AC_MSG_RESULT([using $withval]) openldap_lib="-L$withval" openldap_libdir="$withval" with_openldap=yes else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) # if OPENLDAP is not found yet, try pkg-config if test "$with_openldap" = yes ; then # user wants to use openldap, but didn't specify paths if test -z "$openldap_inc" -o -z "$openldap_lib" -o -z "$openldap_libdir"; then AC_PATH_PROG(PKG_CONFIG, pkg-config) AC_MSG_CHECKING(for OpenLDAP with pkg-config) if test -n "$PKG_CONFIG" && $PKG_CONFIG --exists openldap; then openldap_inc=`$PKG_CONFIG --cflags-only-I openldap` openldap_lib=`$PKG_CONFIG --libs-only-L openldap` openldap_libdir=`$PKG_CONFIG --libs-only-L openldap | sed -e s/-L// | sed -e s/\ .*$//` openldap_incdir=`$PKG_CONFIG --variable=includedir openldap` AC_MSG_RESULT([using system OpenLDAP from pkg-config]) else openldap_incdir="/usr/include" openldap_inc="-I$openldap_incdir" AC_MSG_RESULT([no OpenLDAP pkg-config files]) fi fi fi dnl lets see if we can find the headers and libs if test "$with_openldap" = yes ; then save_cppflags="$CPPFLAGS" CPPFLAGS="$openldap_inc $nss_inc $nspr_inc" AC_CHECK_HEADER([ldap_features.h], [], [AC_MSG_ERROR([specified with-openldap but ldap_features.h not found])]) dnl figure out which version we're using from the header file ol_ver_maj=`grep LDAP_VENDOR_VERSION_MAJOR $openldap_incdir/ldap_features.h | awk '{print $3}'` ol_ver_min=`grep LDAP_VENDOR_VERSION_MINOR $openldap_incdir/ldap_features.h | awk '{print $3}'` ol_ver_pat=`grep LDAP_VENDOR_VERSION_PATCH $openldap_incdir/ldap_features.h | awk '{print $3}'` dnl full libname is libname-$maj.$min ol_libver="-${ol_ver_maj}.${ol_ver_min}" dnl look for ldap lib save_ldflags="$LDFLAGS" LDFLAGS="$openldap_lib $LDFLAGS" AC_CHECK_LIB([ldap$ol_libver], [ldap_initialize], [have_ldap_lib=1]) if test -z "$have_ldap_lib" ; then AC_CHECK_LIB([ldap], [ldap_initialize], [unset ol_libver], [AC_MSG_ERROR([specified with-openldap but libldap not found])]) fi dnl look for ldap_url_parse_ext AC_CHECK_LIB([ldap$ol_libver], [ldap_url_parse_ext], [AC_DEFINE([HAVE_LDAP_URL_PARSE_EXT], [1], [have the function ldap_url_parse_ext])]) dnl look for separate libldif - newer versions of openldap have moved the dnl ldif functionality into libldap ldap_lib_ldif="" LDFLAGS="$LDFLAGS" AC_CHECK_LIB([ldap$ol_libver], [ldif_open], [ldap_lib_ldif=], [ldap_lib_ldif=-lldif$ol_libver]) AC_SUBST([ldap_lib_ldif]) LDFLAGS="$save_ldflags" CPPFLAGS="$save_cppflags" AC_DEFINE([USE_OPENLDAP], [1], [If defined, using OpenLDAP for LDAP SDK]) fi 389-admin-1.1.35/m4/sasl.m4000066400000000000000000000067771220472121400147520ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 # of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK # -*- tab-width: 4; -*- # Configure paths for SASL dnl ======================================================== dnl = sasl is used to support various authentication mechanisms dnl = such as DIGEST-MD5 and GSSAPI. dnl ======================================================== dnl ======================================================== dnl = Use the sasl libraries on the system (assuming it exists) dnl ======================================================== AC_CHECKING(for sasl) AC_MSG_CHECKING(for --with-sasl) AC_ARG_WITH(sasl, [[ --with-sasl=PATH Use sasl from supplied path]], dnl = Look in the standard system locations [ if test "$withval" = "yes"; then AC_MSG_RESULT(yes) dnl = Check for sasl.h in the normal locations if test -f /usr/include/sasl/sasl.h; then sasl_inc="-I/usr/include/sasl" elif test -f /usr/include/sasl.h; then sasl_inc="-I/usr/include" else AC_MSG_ERROR(sasl.h not found) fi dnl = Check the user provided location elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then AC_MSG_RESULT([using $withval]) if test -f "$withval/include/sasl/sasl.h"; then sasl_inc="-I$withval/include/sasl" elif test -f "$withval/include/sasl.h"; then sasl_inc="-I$withval/include" else AC_MSG_ERROR(sasl.h not found) fi sasl_lib="-L$withval/lib" sasl_libdir="$withval/lib" else AC_MSG_RESULT(yes) AC_MSG_ERROR([sasl not found in $withval]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-sasl-inc) AC_ARG_WITH(sasl-inc, [[ --with-sasl-inc=PATH SASL include file directory]], [ if test -f "$withval"/sasl.h; then AC_MSG_RESULT([using $withval]) sasl_inc="-I$withval" else echo AC_MSG_ERROR([$withval/sasl.h not found]) fi ], AC_MSG_RESULT(no)) AC_MSG_CHECKING(for --with-sasl-lib) AC_ARG_WITH(sasl-lib, [[ --with-sasl-lib=PATH SASL library directory]], [ if test -d "$withval"; then AC_MSG_RESULT([using $withval]) sasl_lib="-L$withval" sasl_libdir="$withval" else echo AC_MSG_ERROR([$withval not found]) fi ], AC_MSG_RESULT(no)) if test -z "$sasl_inc"; then AC_MSG_CHECKING(for sasl.h) dnl - Check for sasl in standard system locations if test -f /usr/include/sasl/sasl.h; then AC_MSG_RESULT([using /usr/include/sasl/sasl.h]) sasl_inc="-I/usr/include/sasl" elif test -f /usr/include/sasl.h; then AC_MSG_RESULT([using /usr/include/sasl.h]) sasl_inc="-I/usr/include" else AC_MSG_RESULT(no) AC_MSG_ERROR([sasl not found, specify with --with-sasl.]) fi fi 389-admin-1.1.35/m4/selinux.m4000066400000000000000000000020411220472121400154530ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # Copyright (C) 2009 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK AC_CHECKING(for SELinux) # check for --with-selinux AC_MSG_CHECKING(for --with-selinux) AC_ARG_WITH(selinux, [ --with-selinux Build SELinux policy], [ with_selinux=yes AC_MSG_RESULT(yes) AC_SUBST(with_selinux) ], AC_MSG_RESULT(no)) 389-admin-1.1.35/man/000077500000000000000000000000001220472121400137605ustar00rootroot00000000000000389-admin-1.1.35/man/man8/000077500000000000000000000000001220472121400146235ustar00rootroot00000000000000389-admin-1.1.35/man/man8/ds_removal.8000066400000000000000000000040501220472121400170460ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DS_REMOVAL 8 "Aug 9, 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ds_removal \- Remove a directory server instance and un-register it from the console .SH SYNOPSIS .B ds_removal [-f] -s \fIserver_id\fR -w \fIadmin_password\fR .SH DESCRIPTION Removes the specified Directory Server instance and un-registers it from the console. This will remove all files and directories associated with the directory server instance, so if you want to save any data or config, back it up first before running this command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-f\fR Optional \- Force removal \- ignore errors and remove everything .TP .B \fB\-s server_id\fR Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR .TP .B \fB\-w password\fR Required \- password \- the password for the console admin user .br .SH AUTHOR ds_removal was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2011 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/ds_unregister.8000066400000000000000000000034141220472121400175730ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DS_UNREGISTER 8 "Aug 9, 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ds_unregister \- Un-register a directory server instance from the console .SH SYNOPSIS .B ds_unregister -s \fIserver_id\fR -w \fIadmin_password\fR .SH DESCRIPTION Un-registers the specified directory server instance from the console. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-s server_id\fR Required \- server_id \- the directory server identifier \- slapd\-\fIserver_id\fR .TP .B \fB\-w password\fR Required \- password \- the password for the console admin user .br .SH AUTHOR ds_unregister was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2011 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/migrate-ds-admin.pl.8000066400000000000000000000140511220472121400204510ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH MIGRATE-DS-ADMIN.PL 8 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME migrate\-ds\-admin.pl \- Admin Server and Directory Server Migration script .SH SYNOPSIS .B migrate\-ds\-admin.pl [\-\-options] \fB\-\-\fR [args] .SH DESCRIPTION Admin Server and Directory Server migration script - migrates Admin Server and all Directory Server instances from older releases to the current release. .PP This script will copy instances (data and configuration) from the old server root directory to their new FHS locations. This script does a copy only \- the data in the old instances will be left untouched. The old instances must be shutdown first to ensure that the databases are copied safely. During migration your migrated instances will be started. .PP .SH OPTIONS A summary of options is included below: .TP .B \fB\-\-help\fR This message .TP .B \fB\-\-version\fR Print the version and exit .TP .B \fB\-\-debug\fR Turn on debugging .TP .B \fB\-\-oldsroot\fR The old server root directory to migrate from .TP .B \fB\-\-actualsroot\fR This is the old location of the old server root. .TP .B \fB\-\-silent\fR Use silent setup \- no user input .TP .B \fB\-\-file\fR=\fIname\fR Use the file 'name' in .inf format to supply the default answers .TP .B \fB\-\-keepcache\fR Do not delete the temporary .inf file generated by this program .TP .B \fB\-\-logfile\fR Log migration messages to this file \- otherwise, a temp file will be used .TP .B \fB\-\-instance\fR By default, all directory server instances will be migrated. You can use this argument to specify one or more (e.g. \fB\-i\fR slapd\-foo \fB\-i\fR slapd\-bar) if you do not want to migrate all of them. .TP .B \fB\-\-cross\fR See below. .PP For all options, you can also use the short name e.g. \fB\-h\fR, \fB\-d\fR, etc. For the \fB\-d\fR argument, specifying it more than once will increase the debug level e.g. \fB\-ddddd\fR .PP args: You can supply default .inf data in this format: .IP section.param=value .PP e.g. .IP General.FullMachineName=foo.example.com .PP or .IP "slapd.Suffix=dc=example, dc=com" .PP Values passed in this manner will override values in an .inf file given with the \fB\-f\fR argument. The only required argument is the password of the Configuration Directory Administrator, which can be specified on the command line like this: .IP migrate-ds-admin.pl General.ConfigDirectoryAdminPwd=thepassword .PP All other paramters needed for migration will be read from the old Admin Server configuration. .PP actualsroot: This is used when you must migrate from one machine to another. The usual case is that you have mounted the old server root on a different root directory, either via a network mount, or by copying a tarball made using a relative directory on the source machine to the destination machine and untarring it. .PP For example: machineA is a 32bit machine, and you want to migrate your servers to a new 64bit machine. Lets assume your old server root on machineA was /opt/myds, and your new machine also wants to use a server root of /opt/myds. There are a couple of different ways to proceed. Either make a tarball of opt/myds from machineA using a relative path (i.e. NOT /opt/myds) or use NFS to mount machineA:/opt/myds on a different mount point (e.g. machineB:/migration/opt/myds). .PP If you do this, you should give the old "real" server root (/opt/myds) as the \fB\-\-actualsroot\fR argument, and use /migration/opt/myds for the \fB\-\-oldsroot\fR argument. That is, the oldsroot is the physical location of the files on disk. The actualsroot is the old value of the server root on the source machine. .PP cross: Also known as crossplatform, or 'c', or 'x'. This is when the source machine is a different architecture than the destination machine. In this case, only certain data will be available for migration. Changelog information will not be migrated, and replicas will need to be reinitialized (if migrating masters or hubs). This type of migration requires that all of your old databases have been dumped to LDIF format, and the LDIF file must be in the default database directory (usually /opt/fedora\-ds/slapd\-instance/db), and the LDIF file must have the same name as the database instance directory, with a ".ldif". For example, if you have .IP .ad l .nf /opt/fedora\-ds/slapd\-instance/db/userRoot/ and /opt/fedora\-ds/slapd\-instance/db/NetscapeRoot/ .na .fi .PP you must first use db2ldif to export these databases to LDIF e.g. .IP .ad l .nf cd /opt/fedora\-ds/slapd\-instance \&./db2ldif \fB\-n\fR userRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/userRoot.ldif and \&./db2ldif \fB\-n\fR NetscapeRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/NetscapeRoot.ldif .fi .na .PP Then you must somehow make your old server root directory available on the destination machine, either by creating a tar archive on the source and copying it to the destination, or by network mounting the source directory on the destination machine. .br .SH AUTHOR migrate-ds-admin.pl was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/register-ds-admin.pl.8000066400000000000000000000061601220472121400206470ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH REGISTER-DS-ADMIN.PL 8 "Jun 8, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME register\-ds\-admin.pl \- Registers Directory Server instances with an Admin Server .SH SYNOPSIS .B register-ds-admin.pl [\fI--options\fR] \fI-- \fR[\fIargs\fR] .SH DESCRIPTION Registers existing Directory Server instances with an existing Admin Server. This command does the set up necessary for the use of the Console to manage the Directory Server instances you are registering. Use this command with the \fB--update\fR option after an upgrade to refresh the server information (version, build number, etc.) in the Console. Can be run in interactive mode with different levels of verbosity, or in silent mode with parameters supplied in a .inf format file or on the command line. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-\-help\fR This message .TP .B \fB\-\-version\fR Print the version and exit .TP .B \fB\-\-debug\fR Turn on debugging .TP .B \fB\-\-silent\fR Use silent setup \- no user input .TP .B \fB\-\-file\fR=\fIname\fR Use the file 'name' in .inf format to supply the default answers .TP .B \fB\-\-keepcache\fR Do not delete the temporary .inf file generated by this program .TP .B \fB\-\-logfile\fR Log setup messages to this file \- otherwise, a temp file will be used .TP .B \fB\-\-update\fR Update an existing installation (e.g. after upgrading packages) .TP .B \fB\-\-continue (update only) keep going despite errors (also --force) .PP For all options, you can also use the short name e.g. \fB\-h\fR, \fB\-d\fR, etc. For the \fB\-d\fR argument, specifying it more than once will increase the debug level e.g. \fB\-ddddd\fR .PP args: You can supply default .inf data in this format: .IP section.param=value .PP e.g. .IP General.FullMachineName=foo.example.com .PP or .IP "slapd.Suffix=dc=example, dc=com" .PP Values passed in this manner will override values in an .inf file given with the \fB\-f\fR argument. .br .SH AUTHOR register-ds-admin.pl was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2010 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/remove-ds-admin.pl.8000066400000000000000000000046771220472121400203330ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH REMOVE-DS-ADMIN.PL 8 "Feb 24, 2009" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME remove\-ds\-admin.pl \- Remove all Directory Servers and Admin Server .SH SYNOPSIS .B remove-ds-admin.pl [\-f] [\-d \-d ... \-d] [\-y] .SH DESCRIPTION Shuts down and removes all Directory Server instances and the Admin Server from the system. The directory server instance configuration directories will have a .removed extension appended to them, which will contain the retained certificate database files. \fBWARNING: This command is extremely destructive!\fR It will remove all of the data and configuration of all directory servers and admin servers, with no chance of recovery. Therefore, in order to actually do this, you must give the -y option. \fBPlease use caution and backup your data if you want to keep it!\fR .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-f\fR Force removal - continue on error - otherwise, the command will abort at the first error encountered .TP .B \fB\-d\fR Enable debugging - adding more -d will make output more verbose .TP .B \fB\-y\fR Do the actual processing. Since the command is very destructive, you must provide the -y argument in order for the operation to proceed. \fBUse with extreme caution!\fR .br .SH AUTHOR remove-ds-admin.pl was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2009 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/restart-ds-admin.8000066400000000000000000000034211220472121400200720ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH RESTART-DS-ADMIN 8 "Jul 1, 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME restart-ds-admin \- restart script for Admin Server .SH SYNOPSIS .B restart-ds-admin .SH DESCRIPTION restart-ds-admin restarts the Admin Server instance .sp 2 NOTE: On systems that provide the \fIservice\fP command or \fIsystemctl\fP or other similar command, that command should be used instead of this script. This script is only for those installations that do not support such mechanisms. e.g. .sp 2 service dirsrv-admin restart .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH USAGE Sample usage: .TP .B restart-ds-admin .br .SH AUTHOR restart\-ds\-admin was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2010 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/setup-ds-admin.pl.8000066400000000000000000000071551220472121400201700ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH SETUP-DS-ADMIN.PL 8 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME setup\-ds\-admin.pl \- Set up an instance of Directory Server and Admin Server .SH SYNOPSIS .B setup-ds-admin.pl [\fI--options\fR] \fI-- \fR[\fIargs\fR] .SH DESCRIPTION Set up a Directory Server and Admin Server. Creates the configuration files for an instance of Directory Server based on a few parameters like the hostname, port number, and directory manager information. Creates the configuration files for the Admin Server. Starts up the servers. This command does the set up necessary for the use of the Console and the Admin Express web interface. If the Admin Server has already been set up, this command will create a new instance of Directory Server and register it with the Admin Server so that it can be managed with the Console. Use this command with the \fB--update\fR option after an upgrade to refresh the server information (version, build number, etc.) in the Console. Can be run in interactive mode with different levels of verbosity, or in silent mode with parameters supplied in a .inf format file or on the command line. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-\-help\fR This message .TP .B \fB\-\-version\fR Print the version and exit .TP .B \fB\-\-debug\fR Turn on debugging .TP .B \fB\-\-silent\fR Use silent setup \- no user input .TP .B \fB\-\-file\fR=\fIname\fR Use the file 'name' in .inf format to supply the default answers .TP .B \fB\-\-keepcache\fR Do not delete the temporary .inf file generated by this program .TP .B \fB\-\-logfile\fR Log setup messages to this file \- otherwise, a temp file will be used .TP .B \fB\-\-update\fR Refresh the information used by the Console for all servers on this machine. Use this after an upgrade to make sure the Console reports the correct information. .PP For all options, you can also use the short name e.g. \fB\-h\fR, \fB\-d\fR, etc. For the \fB\-d\fR argument, specifying it more than once will increase the debug level e.g. \fB\-ddddd\fR .PP args: You can supply default .inf data in this format: .IP section.param=value .PP e.g. .IP General.FullMachineName=foo.example.com .PP or .IP "slapd.Suffix=dc=example, dc=com" .PP Values passed in this manner will override values in an .inf file given with the \fB\-f\fR argument. .br .SH AUTHOR setup-ds-admin.pl was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/start-ds-admin.8000066400000000000000000000033771220472121400175550ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH START-DS-ADMIN 8 "Jul 1, 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME start-ds-admin \- start script for Admin Server .SH SYNOPSIS .B start-ds-admin .SH DESCRIPTION start-ds-admin starts the Admin Server instance .sp 2 NOTE: On systems that provide the \fIservice\fP command or \fIsystemctl\fP or other similar command, that command should be used instead of this script. This script is only for those installations that do not support such mechanisms. e.g. .sp 2 service dirsrv-admin start .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH USAGE Sample usage: .TP .B start-ds-admin .br .SH AUTHOR start\-ds\-admin was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2010 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/man/man8/stop-ds-admin.8000066400000000000000000000033651220472121400174020ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH STOP-DS-ADMIN 8 "Jul 1 2011" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME stop-ds-admin \- stop script for Admin Server .SH SYNOPSIS .B stop-ds-admin .SH DESCRIPTION stop-ds-admin stops the Admin Server instance .sp 2 NOTE: On systems that provide the \fIservice\fP command or \fIsystemctl\fP or other similar command, that command should be used instead of this script. This script is only for those installations that do not support such mechanisms. e.g. .sp 2 service dirsrv-admin stop .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH USAGE Sample usage: .TP .B stop-ds-admin .br .SH AUTHOR stop\-ds\-admin was written by the 389 Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2010 Red Hat, Inc. .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. 389-admin-1.1.35/missing000077500000000000000000000237031220472121400146110ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.18; # UTC # Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file 'aclocal.m4' autoconf touch file 'configure' autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one automake touch all 'Makefile.in' files bison create 'y.tab.[ch]', if possible, from existing .[ch] flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create 'y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'acconfig.h' or '${configure_ac}'. You might want to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: '$1' $msg. You should only need it if you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the Help2man package in order for those modifications to take effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: '$1' is $msg. You should only need it if you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy 'make' (AIX, DU, IRIX). You might want to install the Texinfo package or the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: '$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing '$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: 389-admin-1.1.35/mod_admserv/000077500000000000000000000000001220472121400155055ustar00rootroot00000000000000389-admin-1.1.35/mod_admserv/LICENSE000066400000000000000000000261361220472121400165220ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 389-admin-1.1.35/mod_admserv/README000066400000000000000000000004451220472121400163700ustar00rootroot00000000000000mod_admserv - http://port389.org/wiki/mod_admserv mod_admserv provides the HTTP functionality associated with the 389 Administration Server http://port389.org/wiki/AdminServer. It is a standard Apache module and uses standard Apache build tools and configure, built as part of Admin Server. 389-admin-1.1.35/mod_admserv/mod_admserv.c000066400000000000000000003141601220472121400201560ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * END COPYRIGHT BLOCK **/ /* * mod_admserv.c: Provides communication link between Console and Directory. * * Authors (in alphabetical order) * Rob Crittenden * Miodrag Kekic * Rich Megginson * Adam Prishtina * */ #include /* httpd.h defines all of these unconditionally - so we undefine them here to make the compiler warnings shut up hopefully we don't need the real versions of these, but then with no warnings the compiler will just silently redefine them to the wrong ones anyway Then undefine them after the include so that our own local defines will take effect */ #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION #include "httpd.h" #define CORE_PRIVATE 1 /* to pick up ap_die */ #include "http_request.h" #undef CORE_PRIVATE #include "apr_strings.h" #include "apr_lib.h" #include "apr_optional.h" #include "apr_fnmatch.h" #define APR_WANT_STRFUNC #include "apr_want.h" #include "ap_config.h" #include "ap_mpm.h" #include "apr_sha1.h" #include "mod_log_config.h" #include "httpd.h" #include "http_core.h" #include "http_config.h" #include "http_connection.h" #include "http_protocol.h" #include "http_log.h" #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_VERSION /* need uid and gid of apache process after setuid */ #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) #include "unixd.h" #define CHANGE_EUID 1 #endif #include "libadminutil/distadm.h" #include "libadminutil/admutil.h" #include "libadminutil/resource.h" #include "libadminutil/psetc.h" #include "libadmsslutil/admsslutil.h" #include "libadmsslutil/psetcssl.h" #include "libadmsslutil/srvutilssl.h" #include "nss.h" #include "ssl.h" #include "secerr.h" #include "mod_admserv.h" #if defined(HPUX) || defined(HPUX10) || defined(HPUX11) #define SETEUID(id) setresuid((uid_t) -1, id, (uid_t) -1) #else #define SETEUID(id) seteuid(id) #endif /* * These are keys for items we store in r->notes to pass data from one stage * in the request to another. They must be unique. If necessary, prefix * them with admserv_ or something like that if there are namespace conflicts. */ #define RQ_NOTES_USERDN "userdn" #define RQ_NOTES_USERPW "userpw" #define RQ_NOTES_EXECREF "execRef" #define RQ_NOTES_EXECREFARGS "execRefArgs" #define RQ_NOTES_LOGSUPPRESS "logSuppress" #define RQ_NOTES_SIEPWD "siepwd" #define RQ_NOTES_COMMAND_NAME "command-name" #define RQ_NOTES_AUTHZ_REQUIRED "authz-required" #define RUNTIME_COMMAND_BASE (char*)"commands/" #define AUTH_URI "/admin-serv/authenticate" #define MOD_ADMSERV_CONFIG_KEY "mod_admserv" #define NETSCAPE_ROOT_BASEDN (char*)"o=NetscapeRoot" /* Globals...hack. */ static char *configdir = NULL; /* set by ADMConfigDir in admserv.conf */ static long cacheLifetime = 0; /* Defaults to 0 (entries immediately expire) */ /* This holds the ldap connection information for the configuration DS e.g. * the server with o=NetscapeRoot */ static LdapServerData registryServer; /* This holds the ldap connection information for the user&group server e.g. * the server with dc=mydomain,dc=tld */ static LdapServerData userGroupServer; /* memory pool for the memory for statics in this module */ static apr_pool_t *module_pool = NULL; /* List of hosts to allow access from - by default, only localhost */ static char *accessHosts = NULL; /* List of IP addresses to allow access from - by default, only localhost */ static char *accessAddresses = NULL; /* This is our Apache module structure */ module AP_MODULE_DECLARE_DATA admserv_module; static int sync_task_sie_data(const char *name, char *query, void *arg, request_rec *r); static int change_sie_password(const char *name, char *query, void* arg, request_rec *r); static int create_auth_users_cache_entry(char *user, char *userDN, const char *userPW, char *ldapURL); static int admserv_check_user_id(request_rec *r); /* per-process config structure */ typedef struct { int nInitCount; } admserv_global_config; /* Per-directory configuration structure */ typedef struct { int nescompat; int adminsdk; char *cgibindir; /* ADMCgiBinDir - the cgi bin directory for this location */ } admserv_config; /* Per-server config structure */ typedef struct { char *configdir; /* directory containing our config files such as adm.conf, local.conf, etc. */ long cacheLifeTime; /* in seconds - how long to cache auth cred, task access */ char *versionString; /* returned to client in the Admin-Server header */ admserv_global_config *gconfig; /* pointer to per-process config */ } admserv_serv_config; /* * Locate our server configuration record for the specified server. */ static admserv_serv_config *our_sconfig(const server_rec *s) { return (admserv_serv_config *) ap_get_module_config(s->module_config, &admserv_module); } #define NS_ADMIN_ACCESS_HOSTS (char*)"configuration.nsAdminAccessHosts" #define NS_ADMIN_ACCESS_ADDRESSES (char*)"configuration.nsAdminAccessAddresses" static HashTable* HashTableCreate() { HashTable *ht = (HashTable *)apr_palloc(module_pool, sizeof(HashTable)); if (!ht) return NULL; ht->table = apr_hash_make(module_pool); return ht; } static int HashTableInsert(HashTable *ht, char *name, void *value) { apr_hash_set(ht->table, name, APR_HASH_KEY_STRING, value); return TRUE; } static void * HashTableFind(HashTable *ht, const char *name) { return apr_hash_get(ht->table, name, APR_HASH_KEY_STRING); } typedef void (HashEnumFunc)(char *, const void *, void *); static void HashTableEnumerate(HashTable *ht, HashEnumFunc *fn, void *data) { apr_hash_index_t *hi; const void *key; void *val; for (hi = apr_hash_first(NULL, ht->table); hi; hi = apr_hash_next(hi)) { apr_hash_this(hi, &key, NULL, &val); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "HashTableEnumerate: Key=%s Val=%s", (char *)key, (char *)val); (*fn)((char *)key, val, data); } } /* Caches for [I]SIE DNs, authenticated users, and available tasks */ static HashTable *servers = NULL; static HashTable *auth_users = NULL; static HashTable *auth_tasks = NULL; /* Runtime command lookup hashtable */ static HashTable *commands = NULL; #define NS_EXEC_REF (char*)"nsExecRef" #define NS_EXEC_REF_QUERY (char*)"(nsExecRef=*)" #define SERVLET_QUERY (char*)"(nsExecRef=java:*)" #define NS_LOG_SUPPRESS (char*)"nsLogSuppress" #define LOG_SUPPRESS_ON_VALUE (char*)"true" static char *searchAttributes[] = { NS_EXEC_REF, NS_LOG_SUPPRESS, NULL }; /* ------------------------------ _uudecode ------------------------------- */ const unsigned char pr2six[256]={ 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,62,64,64,64,63, 52,53,54,55,56,57,58,59,60,61,64,64,64,64,64,64,64,0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,64,64,64,64,64,64,26,27, 28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64, 64,64,64,64,64,64,64,64,64,64,64,64,64 }; /* returned memory is allocated from given pool */ char *_uudecode(char *bufcoded, apr_pool_t *p) { register char *bufin = bufcoded; register unsigned char *bufout; register int nprbytes; unsigned char *bufplain; int nbytesdecoded; /* Find the length */ while(pr2six[(int)*(bufin++)] <= 63); nprbytes = bufin - bufcoded - 1; nbytesdecoded = ((nprbytes+3)/4) * 3; bufout = (unsigned char *) apr_palloc(p, nbytesdecoded + 1); bufplain = bufout; bufin = bufcoded; while (nprbytes > 0) { *(bufout++) = (unsigned char) (pr2six[(int)(*bufin)] << 2 | pr2six[(int)bufin[1]] >> 4); *(bufout++) = (unsigned char) (pr2six[(int)bufin[1]] << 4 | pr2six[(int)bufin[2]] >> 2); *(bufout++) = (unsigned char) (pr2six[(int)bufin[2]] << 6 | pr2six[(int)bufin[3]]); bufin += 4; nprbytes -= 4; } if(nprbytes & 03) { if(pr2six[(int)bufin[-2]] > 63) nbytesdecoded -= 2; else nbytesdecoded -= 1; } bufplain[nbytesdecoded] = '\0'; return (char *)bufplain; } enum { LDAPU_STR_FILTER_DEFAULT, LDAPU_STR_FILTER_USER, LDAPU_STR_FILTER_GROUP, LDAPU_STR_FILTER_MEMBER, LDAPU_STR_FILTER_MEMBER_RECURSE, LDAPU_STR_ATTR_USER, LDAPU_STR_ATTR_CERT, LDAPU_STR_MAX_INDEX }; static char *ldapu_strings[] = { (char*)"objectclass=*", /* LDAPU_STR_DEFAULT */ (char*)"uid=%s", /* LDAPU_STR_FILTER_USER */ (char*)"(& (cn=%s) (| (objectclass=groupofuniquenames) (objectclass=groupofnames)))", /* LDAPU_STR_FILTER_GROUP */ (char*)"(| (uniquemember=%s) (member=%s))", /* LDAPU_STR_FILTER_MEMBER */ (char*)"(& %s (| (objectclass=groupofuniquenames) (objectclass=groupofnames))", /* LDAPU_STR_FILTER_MEMBER_RECURSE */ (char*)"uid", /* LDAPU_STR_ATTR_USER */ (char*)"userCertificate;binary" /* LDAPU_STR_ATTR_CERT */ }; /* If we are not interested in the returned attributes, just ask for one * attribute in the call to ldap_search. Also don't ask for the attribute * value -- just the attr. */ static const char *default_search_attrs[] = { "c" , 0 }; static int default_search_attrsonly = 1; /* * ldapu_find * Description: * Caller should free res if it is not NULL. * Arguments: * ld Pointer to LDAP (assumes connection has been * established and the client has called the * appropriate bind routine) * base basedn (where to start the search) * scope scope for the search. One of * LDAP_SCOPE_SUBTREE, LDAP_SCOPE_ONELEVEL, and * LDAP_SCOPE_BASE * filter LDAP filter * attrs A NULL-terminated array of strings indicating which * attributes to return for each matching entry. Passing * NULL for this parameter causes all available * attributes to be retrieved. * attrsonly A boolean value that should be zero if both attribute * types and values are to be returned, non-zero if only * types are wanted. * res A result parameter which will contain the results of * the search upon completion of the call. * Return Values: * LDAPU_SUCCESS if entry is found * LDAPU_FAILED if entry is not found * if error, where can be passed to * ldap_err2string to get an error string. */ int ldapu_find (LDAP *ld, const char *base, int scope, const char *filter, const char **attrs, int attrsonly, LDAPMessage **res) { int retval; #ifdef USE_THIS_CODE /* ASYNCHRONOUS */ int msgid; #endif int numEntries; *res = 0; /* If base is NULL set it to null string */ if (!base) { base = ""; } if (!filter || !*filter) { filter = ldapu_strings[LDAPU_STR_FILTER_DEFAULT]; } retval = ldap_search_ext_s(ld, base, scope, filter, (char **)attrs, attrsonly, NULL, NULL, NULL, -1, res); if (retval != LDAP_SUCCESS) { /* retval = ldap_result2error(ld, *res, 0); */ return(retval); } numEntries = ldap_count_entries(ld, *res); if (numEntries == 1) { /* success */ return LDAPU_SUCCESS; } else if (numEntries == 0) { /* not found -- but not an error */ return LDAPU_FAILED; } else if (numEntries > 0) { /* Found more than one entry! */ return LDAPU_ERR_MULTIPLE_MATCHES; } else { /* should never get here */ ldap_msgfree(*res); return LDAP_OPERATIONS_ERROR; } } /* * ldapu_find_uid_attrs * Description: * Maps the given uid to a user dn. Caller should free res if it is not * NULL. Accepts the attrs & attrsonly args. * Arguments: * ld Pointer to LDAP (assumes connection has been * established and the client has called the * appropriate bind routine) * uid User's name * base basedn (where to start the search) * attrs list of attributes to retrieve * attrsonly flag indicating if attr values are to be retrieved * res A result parameter which will contain the results of * the search upon completion of the call. * Return Values: * LDAPU_SUCCESS if entry is found * LDAPU_FAILED if entry is not found * if error, where can be passed to * ldap_err2string to get an error string. */ int ldapu_find_uid_attrs (LDAP *ld, const char *uid, const char *base, const char **attrs, int attrsonly, LDAPMessage **res) { int scope = LDAP_SCOPE_SUBTREE; char filter[ BUFSIZ ]; int retval; int size; size = sizeof(ldapu_strings[LDAPU_STR_FILTER_USER]) + strlen(uid); if (size < sizeof(filter)) { /* setup filter as (uid=) */ sprintf(filter, ldapu_strings[LDAPU_STR_FILTER_USER], uid); retval = ldapu_find(ld, base, scope, filter, attrs, attrsonly, res); } else { char * scratch = (char *) malloc(size); if (scratch) { sprintf(scratch, ldapu_strings[LDAPU_STR_FILTER_USER], uid); retval = ldapu_find(ld, base, scope, scratch, attrs, attrsonly, res); free(scratch); } else { retval = LDAPU_ERR_OUT_OF_MEMORY; } } return retval; } /* * ldapu_find_userdn * Description: * Maps the given uid to a user dn. Caller should free dn if it is not * NULL. * Arguments: * ld Pointer to LDAP (assumes connection has been * established and the client has called the * appropriate bind routine) * uid User's name * base basedn (where to start the search) * dn user dn * Return Values: * LDAPU_SUCCESS if entry is found * LDAPU_FAILED if entry is not found * if error, where can be passed to * ldap_err2string to get an error string. */ int ldapu_find_userdn (LDAP *ld, const char *uid, const char *base, char **dn) { LDAPMessage *res = 0; int retval; retval = ldapu_find_uid_attrs(ld, uid, base, default_search_attrs, default_search_attrsonly, &res); if (retval == LDAPU_SUCCESS) { LDAPMessage *entry; entry = ldap_first_entry(ld, res); *dn = ldap_get_dn(ld, entry); } else { *dn = 0; } if (res) ldap_msgfree(res); return retval; } static void closeLDAPConnection(LDAP *server) { ldap_unbind_ext(server, NULL, NULL); } static LDAP * openLDAPConnection(LdapServerData *data) { LDAP *server; if (!(server = util_ldap_init(data->securitydir, NULL, data->host, data->port, data->secure, 1, NULL))) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "openLDAPConnection(): util_ldap_init failed for ldap%s://%s:%d", data->secure ? "s" : "", data->host, data->port); return NULL; } return (server); } #if defined(USE_OPENLDAP) static int admserv_ldap_rebind_proc( LDAP *ld, LDAP_CONST char *url, ber_tag_t request, ber_int_t msgid, void *arg) { RebindData *data = (RebindData*)arg; return util_ldap_bind(ld, data->user, data->pw, LDAP_SASL_SIMPLE, NULL, NULL, NULL, NULL); } #else /* NOT USE_OPENLDAP */ static int admserv_ldap_rebind_proc(LDAP *ld, char **who, char **pw, int *auth, int freeit, void *arg) { RebindData *data = (RebindData*)arg; if (!freeit) { *who = data->user; *pw = data->pw; *auth = LDAP_AUTH_SIMPLE; } return LDAP_SUCCESS; } #endif static void setLDAPRebindProc(LDAP *server, const char *user, const char *pw) { RebindData *data = (RebindData*)apr_palloc(module_pool, sizeof(RebindData)); if (user) data->user = apr_pstrdup(module_pool, user); if (pw) data->pw = apr_pstrdup(module_pool, pw); ldap_set_rebind_proc(server, admserv_ldap_rebind_proc, (void *)data); } static apr_status_t close_pipe(void *thefd) { int fd = (int)((intptr_t)thefd); int rc; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "close_pipe(): closing pipe %d errno %d", fd, errno); errno = 0; rc = close(fd); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "close_pipe(): closed pipe rc = %d errno = %d", rc, errno); return rc; } static int password_pipe(request_rec *r) { apr_table_t *e = r->subprocess_env; int fd, wfd; apr_size_t nbytes; apr_file_t *readp = NULL; apr_file_t *writep = NULL; const char *user, *pass, *auth, *userDN, *siepwd; char *ans; apr_status_t rv; user = r->user; pass = apr_table_get(r->notes, RQ_NOTES_USERPW); userDN = apr_table_get(r->notes, RQ_NOTES_USERDN); auth = apr_table_get(r->headers_in, "authorization"); siepwd = ADM_NO_VALUE_STRING; if (!user) user = ADM_NO_VALUE_STRING; if (!pass) pass = ADM_NO_VALUE_STRING; if (!auth) auth = ADM_NO_VALUE_STRING; if (!userDN) userDN = ADM_NO_VALUE_STRING; ans = (char*)apr_palloc(r->pool, strlen(user) + strlen(ADM_USER_STRING) + strlen(pass) + strlen(ADM_PASS_STRING) + strlen(auth) + strlen(ADM_AUTH_STRING) + strlen(userDN) + strlen(ADM_USERDN_STRING) + strlen(ADM_SIEPWD_STRING) + strlen(siepwd) + 16); sprintf(ans, "%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n", ADM_USER_STRING, user, ADM_PASS_STRING, pass, ADM_AUTH_STRING, auth, ADM_USERDN_STRING, userDN, ADM_SIEPWD_STRING, siepwd); rv = apr_file_pipe_create(&readp, &writep, r->pool); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "mod_admserv: Unable to create pipe"); return HTTP_INTERNAL_SERVER_ERROR; } /* Get the low-level file descriptor */ apr_os_file_get(&fd, readp); apr_os_file_get(&wfd, writep); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "password_pipe(): created pipe read %d write %d", fd, wfd); /* Register a cleanup callback so this gets closed at the end of the request. */ apr_pool_cleanup_register(r->pool, (void *)((intptr_t)fd), close_pipe, apr_pool_cleanup_null); /* Send this to the client so they know what fd to read from */ apr_table_setn(e, "PASSWORD_PIPE", apr_itoa(r->pool, fd)); nbytes = strlen(ans); apr_file_write(writep, ans, &nbytes); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "password_pipe(): wrote %d bytes", (int)nbytes); /* Close the writing side, we don't need this any more */ apr_file_close(writep); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "password_pipe(): closed write descriptor"); return 0; } static int admserv_ldap_auth_userdn_password(LDAP *server, const char *userdn, const char *pw, int *pw_expiring) { LDAPControl **ctrls = NULL; int ldapError = LDAP_SUCCESS; *pw_expiring = -1; setLDAPRebindProc(server, userdn, pw); /* DT 9/18/98 - Fix for bind problem. Previously, if pw == null, * then the bind does not occur (connection is still anonymous), * but ldap_simple_bind() returns LDAP_SUCCESS. We want the * bind to fail if pw == null, or the pw does not match. */ if (pw == NULL) pw = (char*)""; /* bind user asynchronously */ ldapError = util_ldap_bind(server, userdn, pw, LDAP_SASL_SIMPLE, NULL, &ctrls, NULL, NULL); if (ldapError) { ap_log_error(APLOG_MARK, APLOG_ERR, 0 /* status */, NULL, "Could not bind as [%s]: ldap error %d: %s", userdn, ldapError, ldap_err2string(ldapError)); return ldapError; } if (ctrls) { int i; for (i = 0; ctrls[i] != NULL; ++i) { if(!(strcmp(ctrls[i]->ldctl_oid, LDAP_CONTROL_PWEXPIRED))) { *pw_expiring = 0; ap_log_error(APLOG_MARK, APLOG_WARNING, 0 /* status */, NULL, "The password for user DN [%s] has expired - please reset it", userdn); } else if(!(strcmp(ctrls[i]->ldctl_oid, LDAP_CONTROL_PWEXPIRING))) { /* "The password is expiring in n seconds" */ if ((ctrls[i]->ldctl_value.bv_val != NULL ) && (ctrls[i]->ldctl_value.bv_len > 0)) { *pw_expiring = atoi(ctrls[i]->ldctl_value.bv_val); ap_log_error(APLOG_MARK, APLOG_WARNING, 0 /* status */, NULL, "The password for user DN [%s] will expire in %d seconds", userdn, *pw_expiring); } } } ldap_controls_free(ctrls); } return ldapError; } static int admserv_ldap_auth_server(LDAP *server, LdapServerData *data) { int ignored; if (!(data->bindDN) && !(data->bindPW)) return LDAPU_SUCCESS; return admserv_ldap_auth_userdn_password(server, data->bindDN, data->bindPW, &ignored); } /* The returned string is allocated from a pool in APR. Attempting to free this string * will result in a crash. APR will deal with the cleanup itself when it cleans up the * entire pool. */ static char * formLdapURL(LdapServerData *data, apr_pool_t *p) { return apr_psprintf(p, "%s%s:%d/%s", (data->secure?LDAPS_BASE_PREFIX:LDAP_BASE_PREFIX), data->host, data->port, data->baseDN); } static int extractLdapError(const server_rec *s, const char *url) { ap_log_error(APLOG_MARK, APLOG_ERR, 0 /* status */, s, "extractLdapServerData(): the LDAP url [%s] is invalid", url ? url : "(null)"); return FALSE; } static int extractLdapServerData(LdapServerData *data, char *ldapURL, const server_rec *s) { LDAPURLDesc *ldapInfo = NULL; int secure; if (!ldapURL) return extractLdapError(s, NULL); if (util_ldap_url_parse(ldapURL, &ldapInfo, 0, &secure)) { return extractLdapError(s, NULL); } data->secure = secure; data->port = ldapInfo->lud_port; if (!data->port) { if (data->secure) { data->port = LDAPS_PORT; } else { data->port = LDAP_PORT; } } data->host = apr_pstrdup(module_pool, ldapInfo->lud_host); data->baseDN = apr_pstrdup(module_pool, ldapInfo->lud_dn); /* Currently unused */ data->bindDN = NULL; data->bindPW = NULL; ldap_free_urldesc(ldapInfo); return TRUE; } static int sslinit(AdmldapInfo info, const char *configdir) { if (!NSS_IsInitialized()) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "sslinit: doing NSS initialization"); /* mod_nss is used when we are a TLS/SSL server - mod_nss starts up before we do and will set up all of the TLS/SSL stuff */ /* if we are acting as simply a TLS/SSL client to the directory server, we still have to perform our own TLS/SSL client init */ if (ADMSSL_Init(info, (char *)configdir, 0)) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "sslinit: NSS is required to use LDAPS, but security initialization failed [%d:%s]. Cannot start server", PR_GetError(), SSL_Strerror(PR_GetError())); exit(1); } } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "sslinit: mod_nss has been started and initialized"); } return 1; } static int buildUGInfo(char** errorInfo, const request_rec *r) { AdmldapInfo info = NULL; server_rec *s = r->server; int error = 0; char *userGroupLdapURL = NULL; char *userGroupBindDN = NULL; char *userGroupBindPW = NULL; char *dirInfoRef = NULL; int retval = FALSE; char *siedn = NULL; *errorInfo = (char*)""; /* Check whether data is available already */ if (userGroupServer.host) return TRUE; if (!configdir) { *errorInfo = (char*)"NULL config dir"; goto done; } if (!(info = admldapBuildInfoOnly(configdir, &error))) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, s, "buildUGInfo(): unable to create AdmldapInfo (error code = %d)", error); goto done; } /* Temporarily override the siedn. This needs to be * done to get a valid LDAP handle. */ siedn = admldapGetSIEDN(info); admldapSetSIEDN(info, apr_table_get(r->notes, RQ_NOTES_USERDN)); admSetCachedSIEPWD(apr_table_get(r->notes, RQ_NOTES_USERPW)); if (admldapGetSecurity(info)) { sslinit(info, configdir); } if (!admldapBuildInfoSSL(info, &error)) { char *host = admldapGetHost(info); ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, s, "buildUGInfo(): unable to initialize TLS connection to LDAP host %s port %d: %d", host, admldapGetPort(info), error); PL_strfree(host); goto done; } /* We need to reset the siedn before we call * admldapGetLocalUserDirectory below. */ admldapSetSIEDN(info, siedn); userGroupServer.host = NULL; userGroupServer.port = 0; userGroupServer.secure = 0; userGroupServer.baseDN = NULL; userGroupServer.admservSieDN = NULL; userGroupServer.securitydir = admldapGetSecurityDir(info); if (NULL == admldapGetLDAPHndl(info)) { /* LDAP is not available; gather info from the cache */ userGroupLdapURL = admldapGetDirectoryURL(info); userGroupBindDN = admldapGetSIEDN(info); userGroupBindPW = admldapGetSIEPWD(info); if (NULL == userGroupBindPW) { ADM_GetCurrentPassword(&error, &userGroupBindPW); } } else { admldapGetLocalUserDirectory(info, &userGroupLdapURL, &userGroupBindDN, &userGroupBindPW, &dirInfoRef, &error); if (error != UG_OP_OK) { *errorInfo = (char*)"unable to set User/Group baseDN"; goto done; } } if (!extractLdapServerData(&userGroupServer, userGroupLdapURL, s)) { *errorInfo = (char*)"unable to extract User/Group LDAP info"; goto done; } userGroupServer.bindDN = userGroupBindDN ? apr_pstrdup(module_pool, userGroupBindDN) : NULL; userGroupServer.bindPW = userGroupBindPW ? apr_pstrdup(module_pool, userGroupBindPW) : NULL; retval = TRUE; /* made it here, so success */ done: PL_strfree(siedn); PL_strfree(userGroupLdapURL); PL_strfree(userGroupBindDN); if (userGroupBindPW) { memset(userGroupBindPW, 0, strlen(userGroupBindPW)); PL_strfree(userGroupBindPW); } PL_strfree(dirInfoRef); destroyAdmldap(info); return retval; } static int task_register_server(char *serverid, char *sieDN) { HashTableInsert(servers, apr_pstrdup(module_pool, serverid), apr_pstrdup(module_pool, sieDN)); return TRUE; } static int admserv_runtime_command_init() { commands = HashTableCreate(); return (TRUE); } static int admserv_register_runtime_command(char *name, RuntimeCommandFn fn, void *arg) { RuntimeCommandRecord *rcr; if (HashTableFind(commands, name)) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "admserv_register_runtime_command(): attempt to register duplicate command (%s)", name); return FALSE; } rcr = (RuntimeCommandRecord*)apr_palloc(module_pool, sizeof(RuntimeCommandRecord)); rcr->fn = fn; rcr->arg = arg; HashTableInsert(commands, apr_pstrdup(module_pool, name), rcr); return TRUE; } static int admserv_runtime_command_exec(const char *name, char *query, request_rec *r) { RuntimeCommandRecord *rcr = (RuntimeCommandRecord *)HashTableFind(commands, name); return (rcr && rcr->fn(name, query, rcr->arg, r)); } /* * Ugh - recursion */ static int reverse_uri(char **storage, char *limit, char *taskuri) { char *p = strchr(taskuri, '/'); if (p) { *(p++) = '\0'; if (!reverse_uri(storage, limit, p)) return FALSE; } /* magic number 4 = "cn=" and "," */ if ((*storage + strlen(taskuri)+4) > limit) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "reverse_uri():taskDN exceeds LINE_LENGTH, taskDN truncated for uri [%s]", taskuri); return FALSE; } sprintf(*storage, "cn=%s, ", taskuri); *storage += strlen(*storage); return TRUE; } static int build_full_DN(char **storage, char *limit, char *taskuri, char *sieDN) { if (!reverse_uri(storage, limit, taskuri)) return FALSE; if ((*storage + strlen(sieDN)) > limit) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "build_full_DN():taskDN exceeds LINE_LENGTH, taskDN truncated for uri [%s]", taskuri); return FALSE; } sprintf(*storage, "%s", sieDN); return TRUE; } static char* adm_normalize_dn(char* origDN, char* newDN) { char *orig = origDN, *dest = newDN; if (!newDN) return NULL; while (*orig != '\0') { if (*orig == ',') { *dest++ = *orig++; while (*orig == ' ') orig++; } else *dest++ = *orig++; } *dest = '\0'; return newDN; } static void convert_to_lower_case(char *s) { register char *p = s; while (*p) { if ((((unsigned char)*p)<0x80)&&(isupper(*p))) *p = _tolower(*p); p++; } } static int admserv_error(request_rec *r, int code, char *reason) { apr_table_setn(r->notes, "error-notes", reason); ap_die(code, r); return DONE; } static int admserv_error_std(request_rec *r, char *reason) { return admserv_error(r, HTTP_INTERNAL_SERVER_ERROR, reason); } static int check_auth_tasks_cache(char *dn, const char *userdn, request_rec *r, long now, int send_response) { TaskCacheEntry *cache_entry; char normEntryDN[1024]; long createTime; char *msg; adm_normalize_dn(dn, normEntryDN); /* Server is down. Attempt to resolve task entry from auth_tasks cache. */ cache_entry = (TaskCacheEntry*)HashTableFind(auth_tasks, normEntryDN); if (!cache_entry) { msg = apr_psprintf(r->pool, "check_auth_tasks_cache: task entry [%s] not cached", normEntryDN); goto bad; } if (!(createTime = (long)HashTableFind(cache_entry->auth_userDNs, userdn))) { msg = apr_psprintf(r->pool, "check_auth_tasks_cache: found task [%s] but user [%s] is not authorized", dn, userdn); goto bad; } if ((now - createTime) > cacheLifetime) { msg = apr_psprintf(r->pool, "check_auth_tasks_cache: task [%s] user [%s] entry has expired %ld", dn, userdn, (now - createTime)); goto bad; } apr_table_set(r->notes, RQ_NOTES_EXECREF, cache_entry->execRef); /* apr_table_set makes copy of args */ if (cache_entry->execRefArgs) apr_table_set(r->notes, RQ_NOTES_EXECREFARGS, cache_entry->execRefArgs); /* apr_table_set makes copy of args */ if (cache_entry->logSuppress) apr_table_setn(r->notes, RQ_NOTES_LOGSUPPRESS, "true"); /* apr_table_setn does not copy */ return OK; bad: ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "%s", msg); if (send_response) { return admserv_error_std(r, msg); } return DONE; } static int sync_task_sie_data(const char *name, char *query, void *arg, request_rec *r) { AttrNameList serverlist = NULL; AttributeList installlist = NULL; AdmldapInfo ldapInfo = NULL; int errorCode; PsetHndl tmp; int servercnt, i; UserCacheEntry *cache_entry = NULL; char *siedn = NULL; const char *userdn = apr_table_get(r->notes, RQ_NOTES_USERDN); const char *passwd = apr_table_get(r->notes, RQ_NOTES_USERPW); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: getting ldap info for [%s]", configdir); ldapInfo = admldapBuildInfo(configdir, &errorCode); if (!ldapInfo) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "sync_task_sie_data: Could not build ldap info for config in [%s]: %d", configdir, errorCode); return FALSE; } siedn = admldapGetSIEDN(ldapInfo); task_register_server(ADMIN_SERVER_ID, siedn); /* HACK HACK HACK */ /* getServerDNListSSL uses the siedn as the binddn - so we temporarily replace the siedn with the userdn - fortunately it doesn't use the siedn as the SIE DN */ admldapSetSIEDN(ldapInfo, userdn); if (NULL == passwd) { /* use the passwd in cache if possible */ cache_entry = (UserCacheEntry*)HashTableFind(auth_users, userdn); if (cache_entry) { passwd = cache_entry->userPW; } } admSetCachedSIEPWD(passwd); serverlist = getServerDNListSSL(ldapInfo); /* HACK HACK HACK - reset after getServerDNListSSL */ admldapSetSIEDN(ldapInfo, siedn); servercnt=0; if (serverlist) { while (serverlist[servercnt]) servercnt++; } if (servercnt) { for (i=0; i < servercnt; i++) { /* Create Pset for each individual server */ char *host = admldapGetHost(ldapInfo); tmp = psetRealCreateSSL(ldapInfo, host, admldapGetPort(ldapInfo), admldapGetSecurity(ldapInfo), serverlist[i], (char *)userdn, (char *)passwd, NULL, &errorCode); PL_strfree(host); if (tmp) { # define SERVER_ID_ATTRIBUTE (char*)"nsServerID" int errorcode; char* serverid = psetGetAttrSingleValue(tmp, SERVER_ID_ATTRIBUTE, &errorcode); psetDelete(tmp); tmp = NULL; if (!serverid) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "sync_task_sie_data: Unable to find serverid for dn=\"%s\" (error code = %d)", serverlist[i], errorcode); continue; } task_register_server(serverid, serverlist[i]); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: registered server [%s] dn [%s]", serverid, serverlist[i]); PL_strfree(serverid); } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "AdmInit: Failed to create psetHandle for %s (error code = %d)", serverlist[i], errorCode); } } deleteAttrNameList(serverlist); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: no servers found"); } /* DT 02/02/98 * Register installed product tasks */ /* HACK HACK HACK */ /* getInstalledServerDNListSSL uses the siedn as the binddn - so we temporarily replace the siedn with the userdn - fortunately it doesn't use the siedn as the SIE DN */ admldapSetSIEDN(ldapInfo, userdn); if ((installlist = getInstalledServerDNListSSL(ldapInfo))) { int ii = 0; while (installlist[ii]) { char *productID = installlist[ii]->attrName; char *productDN = installlist[ii]->attrVal[0]; task_register_server(productID, productDN); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "sync_task_sie_data: registered product [%s] dn [%s]", productID, productDN); ii++; } deleteAttributeList(installlist); } /* HACK HACK HACK - reset after getInstalledServerDNListSSL */ admldapSetSIEDN(ldapInfo, siedn); PL_strfree(siedn); destroyAdmldap(ldapInfo); return TRUE; } static int update_admpwd(char *admroot, char *newuid, char *newpw); /* * Miodrag (06-15-98) * The following metthod is called from the runtime command * "change_sie_password" after the sie password is changed * * Return value: if successful, 1; otherwise, 0 is returned. */ static int task_update_registry_server_bindpw(char *uid, char *password, const char* bindpw, request_rec *r) { LDAP *ld = NULL; AdmldapInfo ldapInfo; int ldapError; char *ldapURL = NULL; const char *userDN = NULL; char *adminDN = NULL; LDAPMod mod, *mods[2]; char *vals[2]; int rval = 0; int error; /* We need ldapInfo to fetch the adminDN */ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "task_update_registry_server_bindpw: getting ldap info for [%s]", configdir); ldapInfo = admldapBuildInfo(configdir, &error); if (!ldapInfo) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw: Could not build ldap info for config in [%s]: %d", configdir, error); goto bailout; } /* get the admin user DN */ adminDN = admldapGetUserDN(ldapInfo, NULL); if (!adminDN) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "failed to retreive admin user DN"); goto bailout; } /* update password for adminDN */ if (!(ld = openLDAPConnection(®istryServer))) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw(): cannot connect to the Configuration Directory Server"); goto bailout; } userDN = apr_table_get(r->notes, RQ_NOTES_USERDN); /* authenticate to LDAP server */ if (LDAP_SUCCESS != (ldapError = util_ldap_bind(ld, userDN, bindpw, LDAP_SASL_SIMPLE, NULL, NULL, NULL, NULL))) { switch (ldapError) { case LDAP_INAPPROPRIATE_AUTH: case LDAP_INVALID_CREDENTIALS: case LDAP_INSUFFICIENT_ACCESS: /* authenticate failed: Should not continue */ ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw(): failed to authenticate as %s: %s", userDN, ldap_err2string(ldapError)); goto bailout; case LDAP_NO_SUCH_OBJECT: case LDAP_ALIAS_PROBLEM: case LDAP_INVALID_DN_SYNTAX: ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw(): bad userdn %s: %s", userDN, ldap_err2string(ldapError)); goto bailout; default: ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw(): ldap error %s", ldap_err2string(ldapError)); goto bailout; } } mod.mod_op = LDAP_MOD_REPLACE; mod.mod_type = "userPassword"; vals[0] = password; vals[1] = NULL; mod.mod_values = vals; mods[0] = &mod; mods[1] = NULL; if (LDAP_SUCCESS != (ldapError = ldap_modify_ext_s(ld, adminDN, mods, NULL, NULL))) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "task_update_registry_server_bindpw(): ldap_modify for %s failed: %s", adminDN, ldap_err2string(ldapError)); goto bailout; } /* we don't want to free this since APR allocates it from a pool. APR will take care of it */ ldapURL = formLdapURL(®istryServer, r->pool); /* update the auth_users cache */ create_auth_users_cache_entry(uid, adminDN, password, ldapURL); /* We only want to reset the pwd in the request if RQ_NOTES_USERDN is the admin user */ if(strcasecmp(adminDN, userDN) == 0) { apr_table_set(r->notes, RQ_NOTES_USERPW, password); } rval = 1; bailout: if (ld) { closeLDAPConnection(ld); } if (ldapInfo) { destroyAdmldap(ldapInfo); } return rval; } /* * Modify SIE password * query points to new password */ static int change_sie_password(const char *name, char *query, void* arg, request_rec *r) { FILE *f; char *uid=NULL , *col=NULL, *origpw_hash=NULL; char *newpw = NULL; char filename[BIG_LINE]; char inbuf[BIG_LINE]; char outbuf[64]; /* needs at least 36 bytes */ char *bindpw = (char *)apr_table_get(r->notes, RQ_NOTES_USERPW); int admpwd_done = 0; apr_snprintf(filename, sizeof(filename), "%s/admpw", configdir); if (query==NULL) { ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "Wrong usage, password param missing"); return 0; } if ((f=fopen(filename, "r"))==NULL) { ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "Can not open admpw file [%s]", filename); return 0; } if (fgets(inbuf, sizeof(inbuf), f) == NULL) { fclose(f); ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "Can not read admpw file [%s]", filename); return 0; } fclose(f); col = strchr(inbuf, ':'); if (col == NULL) { ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "admpw file [%s] is corrupted", filename); return 0; } uid = inbuf; *col=0; origpw_hash=col+1; /* newpw is escaped; it needs to be unescaped. */ newpw = strdup(query); if (NULL == newpw) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "failed to allocate memory for password"); goto recover; } ap_unescape_url(newpw); apr_sha1_base64(newpw, strlen(newpw), outbuf); if (!update_admpwd(configdir, uid, outbuf)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "failed to update admpw"); goto recover; } admpwd_done = 1; if (!task_update_registry_server_bindpw(uid, newpw, bindpw, r)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "failed to update server bindpw"); goto recover; } return 1; recover: if (newpw) { free(newpw); } if (admpwd_done) { update_admpwd(configdir, uid, origpw_hash); } return 0; } /* * Modify admpw. */ static int update_admpwd(char *admroot, char *newuid, char *newpw) { FILE *f; int cnt; char filename[BIG_LINE]; char outbuf[BIG_LINE]; apr_snprintf(filename, sizeof(filename), "%s/admpw", admroot); f = fopen(filename, "w"); if (f==NULL) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "Can not open admpw file [%s] for writing", filename); return 0; } apr_snprintf(outbuf, sizeof(outbuf), "%s:%s", newuid, newpw); cnt = fprintf(f,"%s", outbuf); if (cnt != (int)strlen(outbuf)) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "Failed to write to admpw file [%s]", filename); fclose(f); return 0; } fclose(f); return 1; } static void populate_tasks_from_server(char *serverid, const void *sieDN, void *userdata) { PopulateTasksData *data = (PopulateTasksData *)userdata; LDAP *server = data->server; LDAPMessage *result, *e; int ldapError; char normDN[1024]; int tries = 0; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "populate_tasks_from_server(): getting tasks for server [%s] siedn [%s]", serverid, (char *)sieDN); if(data->server == NULL) { if(!(server = openLDAPConnection(®istryServer))) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "populate_tasks_from_server(): Unable to open LDAPConnection to [%s:%d]", registryServer.host, registryServer.port); return; } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "populate_tasks_from_server(): Opened new LDAPConnection to [%s:%d]", registryServer.host, registryServer.port); data->server = server; } tries = 0; do { ldapError = ldap_search_ext_s(server, (char *)sieDN, LDAP_SCOPE_SUBTREE, NS_EXEC_REF_QUERY, searchAttributes, 0, NULL, NULL, NULL, -1, &result); if(ldapError != LDAP_SERVER_DOWN && ldapError != LDAP_CONNECT_ERROR) break; closeLDAPConnection(server); if(!(server = openLDAPConnection(®istryServer))) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "populate_tasks_from_server(): Unable to open LDAPConnection to [%s:%d]", registryServer.host, registryServer.port); return; } data->server = server; } while (server != NULL && ++tries < 2); if (ldapError != LDAPU_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "populate_tasks_from_server(): Unable to search [%s] for LDAPConnection [%s:%d]", (char *)sieDN, registryServer.host, registryServer.port); return; } for (e = ldap_first_entry(server, result) ; e != NULL ; e = ldap_next_entry(data->server, e)) { char *dn = NULL; char *execRefArgs = NULL; struct berval **vals, **vals2; TaskCacheEntry *cache_entry; dn = ldap_get_dn(server, e); if (!dn) continue; vals = ldap_get_values_len(server, e, NS_EXEC_REF); if (!vals) { ldap_memfree(dn); continue; } vals2 = ldap_get_values_len(server, e, NS_LOG_SUPPRESS); if (vals && vals[0] && ((execRefArgs = PL_strnchr(vals[0]->bv_val, '?', vals[0]->bv_len)) != NULL)) *(execRefArgs++) = '\0'; adm_normalize_dn(dn, normDN); convert_to_lower_case(normDN); if (!(cache_entry = (TaskCacheEntry *)HashTableFind(auth_tasks, normDN))) { cache_entry = (TaskCacheEntry*)apr_pcalloc(module_pool, sizeof(TaskCacheEntry)); cache_entry->auth_userDNs = HashTableCreate(); HashTableInsert(auth_tasks, apr_pstrdup(module_pool, normDN), cache_entry); } else { /* these are pool allocated now - no freeing - I don't expect this will be a problem since the tasks probably won't change at all free(cache_entry->execRef); if (cache_entry->execRefArgs) free(cache_entry->execRefArgs); */ } if (vals && vals[0]) { cache_entry->execRef = apr_pstrndup(module_pool, vals[0]->bv_val, vals[0]->bv_len); } else { cache_entry->execRef = NULL; } cache_entry->execRefArgs = execRefArgs ? apr_pstrdup(module_pool, execRefArgs) : NULL; cache_entry->logSuppress = (vals2 && vals[0] && !strncasecmp(vals2[0]->bv_val, LOG_SUPPRESS_ON_VALUE, vals2[0]->bv_len)); HashTableInsert(cache_entry->auth_userDNs, apr_pstrdup(module_pool, data->userDN), (char*)(data->now)); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "populate_tasks_from_server(): Added task entry [%s:%s:%s] for user [%s]", normDN, cache_entry->execRef, cache_entry->execRefArgs ? cache_entry->execRefArgs : "", data->userDN); ldap_value_free_len(vals); if (vals2) ldap_value_free_len(vals2); ldap_memfree(dn); } ldap_msgfree(result); } static void populate_task_cache_entries(const char *userDN, LDAP *server) { PopulateTasksData data; data.server = server; data.userDN = (char*)userDN; data.now = time(0); HashTableEnumerate(servers, populate_tasks_from_server, &data); } static int admserv_check_authz(request_rec *r) { int ldapError; char entryDN[LINE_LENGTH]; char *p; char *siedn; /* this is looked up from the serverid, which is extracted from the uri */ LDAP *server; const char *userdn; const char *pw; char *serverid; char *storage = entryDN; char *uri; char *saveduri; long now; int tries = 0; admserv_config *cf = ap_get_module_config(r->per_dir_config, &admserv_module); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: request for uri [%s]", r->uri); /* for some reason, we get sub requests for our tasks which we can ignore */ if (r->main) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: skipping sub request [%s] - filename [%s] user [%s]", r->uri, r->main->filename ? r->main->filename : "(null)", r->main->user ? r->main->user : "(null)"); return DECLINED; } uri = apr_pstrdup(r->pool, r->uri); /* might need unparsed_uri here? */ if (!(p = strchr(uri+1, '/'))) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz(): Skipping invalid URI [%s]", uri); return DECLINED; } serverid = uri+1; uri = p+1; /* need a copy because build_full_DN modifies the uri argument */ saveduri = apr_pstrdup(r->pool, uri); *p = '\0'; if (!(siedn = (char*)HashTableFind(servers, serverid))) { /* DT 4/6/98 -- If we're seeing a serverid for the first time, then we try to do * a resync to pull in new data for the serverid. If it still fails, * then the client is out of luck. */ admserv_runtime_command_exec(RUNTIME_RESYNC_COMMAND, r->args, r); if (!(siedn = (char*)HashTableFind(servers, serverid))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): unable to find registered server (%s)", serverid); return admserv_error(r, HTTP_BAD_REQUEST, "server not registered"); /*i18n*/ } } if (!STRNCASECMP(r->uri, AUTH_URI, strlen(AUTH_URI))) { /* already authenticated - no remapping required - no task authz required */ ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_check_authz(): passing [%s] to the userauth handler", r->uri); return OK; } if (!build_full_DN(&storage, entryDN+LINE_LENGTH, uri, siedn)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): unable to build DN from URL - bad URL [%s]", uri); return admserv_error_std(r, "server not registered"); /*i18n*/ } convert_to_lower_case(entryDN); userdn = apr_table_get(r->notes, RQ_NOTES_USERDN); pw = apr_table_get(r->notes, RQ_NOTES_USERPW); /* * if we got here, we either have a userdn - user was authenticated via LDAP * or r->user is set and was therefore authenticated via mod_auth - if both * LDAP and mod_auth auth fail, we should not be here - not an authenticated user */ if (!userdn && r->user) { int retval = check_auth_tasks_cache(entryDN, LOCAL_SUPER_NAME, r, 0, 1 /* send_response */); if (retval != OK) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: task [%s] not cached for local superuser", entryDN); return retval; } goto found; } if (!userdn || !pw) { ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "admserv_check_authz(): invalid userdn/pw"); return admserv_error_std(r, "invalid user/password"); /*i18n*/ } /* DT 3/10/98 * Turn on the task cache for evals, and not just for DS failover. */ now = time(0); if (check_auth_tasks_cache(entryDN, userdn, r, now, 0 /* no response */) == OK) { goto found; } /* Cache lookup failed or the entry expired. Try the DS. */ if (!(server = openLDAPConnection(®istryServer))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): unable to open LDAP connection to %s:%d", registryServer.host, registryServer.port); return admserv_error_std(r, "unable to open LDAPConnection"); /*i18n*/ } tries = 0; do { /* * Bug fix #340829 - do NOT bind as the local admin here, bind as user DN. */ int ignored; ldapError = admserv_ldap_auth_userdn_password(server, userdn, pw, &ignored); if(ldapError != LDAP_SERVER_DOWN && ldapError != LDAP_CONNECT_ERROR) break; closeLDAPConnection(server); if(!(server = openLDAPConnection(®istryServer))) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): unable to LDAP BIND as [%s] to %s:%d", userdn, registryServer.host, registryServer.port); return admserv_error_std(r, "unable to open LDAPConnection"); /*i18n*/ } } while (server != NULL && ++tries < 2); if(ldapError != LDAPU_SUCCESS) { closeLDAPConnection(server); if ((ldapError == LDAP_CONNECT_ERROR) || (ldapError == LDAP_SERVER_DOWN)) { int retval = check_auth_tasks_cache(entryDN, userdn, r, 0, 1 /* send response */); /* Try the cache, ignoring expiration */ if (retval != OK) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: could not find cached task [%s] for [%s]", entryDN, userdn); return retval; } goto found; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): got LDAP error %d talking to %s:%d - possible user [%s] not authorized", ldapError, registryServer.host, registryServer.port, userdn); return admserv_error(r, HTTP_UNAUTHORIZED, "invalid user credentials"); /*i18n*/ } /* Attempt to read the entry data -- involves DS eval of entry ACI for userDN. * If we are able to read it, then access is granted. */ populate_task_cache_entries(userdn, server); closeLDAPConnection(server); if (check_auth_tasks_cache(entryDN, userdn, r, now, 0 /* no response */) == OK) { goto found; } ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "admserv_check_authz(): Task [%s] not found for user [%s] - either" " the task was not registered or the user was not authorized", entryDN, userdn); return admserv_error(r, HTTP_UNAUTHORIZED, "task not found or unauthorized"); /*i18n*/ /* This is remapping - converting the requested URI to the actual CGI filename We can't do this in a translate_name hook because that happens _before_ authenticating the user, and we can't get the task information from the ds until after the user has been authenticated. So, we do the remapping here */ found: /* MK 8/1/00 * Treat StartConfigDS as a special task. This will be the case if the user was * authenticated as the local superuser (admpw) and the server-id is "admin-serv" */ # define STARTDS_IDENTIFIER "tasks/operation/StartConfigDS" # define STARTDS_CGI "start_config_ds" if (!STRNCASECMP(saveduri, STARTDS_IDENTIFIER, strlen(STARTDS_IDENTIFIER)) && !STRCMP(serverid, "admin-serv") && /* is local superuser */ !userdn && r->user) { apr_status_t status; if (!cf->cgibindir) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): No ADMCgiBinDir was specified for location [%s]", r->filename); return admserv_error_std(r, apr_psprintf(r->pool, "No ADMCgiBinDir specified for location [%s]", r->filename)); } r->filename = apr_psprintf(r->pool, "%s%c%s", cf->cgibindir, FILE_PATHSEP, STARTDS_CGI); ap_set_content_type(r, CGI_MAGIC_TYPE); /* Make sure it's not a directory, Mike's way. This is also required * for when we end up in the CGI. mod_cgi assumes that the stat has * already been done. */ status = apr_stat(&r->finfo, r->filename, APR_FINFO_NORM, r->pool); if (status == APR_SUCCESS) { if (r->finfo.filetype == APR_DIR) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): start config ds CGI is a directory [%s]", r->filename); return admserv_error_std(r, apr_psprintf(r->pool, "Invalid URL [%s] is a directory", r->filename)); } } /* Show this in the error log*/ ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_check_authz(): StartConfigDS requested by the local superuser"); return OK; } /* DT 3/15/98 Runtime command support. */ if (!STRNCASECMP(saveduri, RUNTIME_COMMAND_BASE, strlen(RUNTIME_COMMAND_BASE))) { /* subdir is allocated from r->pool */ char *name = saveduri + strlen(RUNTIME_COMMAND_BASE); apr_table_set(r->notes, RQ_NOTES_COMMAND_NAME, name); ap_set_content_type(r, RUNTIME_COMMAND_CONTENT_TYPE); r->filename = apr_pstrdup(r->pool, "/commands"); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: mapped uri [%s] to command [%s]", r->uri, name); return OK; } else { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: uri [%s] did not begin with [%s] - not a command", saveduri, RUNTIME_COMMAND_BASE); } { apr_status_t status; /* these are set in check_auth_tasks_cache if the task was cached */ const char *execRef = apr_table_get(r->notes, RQ_NOTES_EXECREF); const char *execRefArgs = apr_table_get(r->notes, RQ_NOTES_EXECREFARGS); if (!cf->cgibindir) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): No ADMCgiBinDir was specified for location [%s]", r->filename); return admserv_error_std(r, apr_psprintf(r->pool, "No ADMCgiBinDir specified for location [%s]", r->filename)); } /* set cgibindir in the Directory/Location section for this server */ r->filename = apr_psprintf(r->pool, "%s%c%s", cf->cgibindir, FILE_PATHSEP, execRef); /* This is so it will get evaulated as a CGI */ ap_set_content_type(r, CGI_MAGIC_TYPE); /* Make sure it's not a directory, Mike's way. This is also required * for when we end up in the CGI. mod_cgi assumes that the stat has * already been done. */ status = apr_stat(&r->finfo, r->filename, APR_FINFO_NORM, r->pool); if (status == APR_SUCCESS) { if (r->finfo.filetype == APR_DIR) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "admserv_check_authz(): CGI is a directory [%s]", r->filename); return admserv_error_std(r, apr_psprintf(r->pool, "Invalid URL [%s] is a directory", r->filename)); } } /* Append execRefArgs to query, if applicable. */ if (execRefArgs != NULL) { if (r->args != NULL) { char *new_query = apr_psprintf(r->pool, "%s&%s", execRefArgs, r->args); r->args = new_query; } else { r->args = apr_pstrdup(r->pool, execRefArgs); } } } ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "admserv_check_authz: execute CGI [%s] args [%s]", r->filename, r->args); return OK; /* FIXME, does this matter? */ } static int check_auth_users_cache(char *user, const char *pw, request_rec *r, long now) { /* Attempt to authenticate using auth_users cache */ UserCacheEntry *cache_entry = NULL; if (!auth_users) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0 /* status */, NULL, "[%d] auth_users doesn't exist", getpid()); return DECLINED; /* Failed. */ } cache_entry = (UserCacheEntry*)HashTableFind(auth_users, user); if (cache_entry) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "[%d] Found cache entry for user [%s][%s] pw is %s, cached is %s, now is %ld, cached is %ld", getpid(), user, cache_entry->userDN, pw, cache_entry->userPW, now, cache_entry->createTime); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "[%d] cache entry not found for user [%s]", getpid(), user); } if (!cache_entry || STRCMP(cache_entry->userPW, pw) || ((now - cache_entry->createTime) > cacheLifetime)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "[%d] user [%s] not cached - reason %s", getpid(), user, !cache_entry ? "user not in cache" : (STRCMP(cache_entry->userPW, pw) ? "password changed" : "cache entry expired")); return DECLINED; /* Failed. */ } apr_table_set(r->notes, RQ_NOTES_USERDN, cache_entry->userDN); apr_table_set(r->notes, RQ_NOTES_USERPW, pw); /* FIXME if (!strchr(user, '=')) pblock_nvinsert("auth-user", user, rq->vars); pblock_nvinsert(AUTHENTICATION_LDAP_URL, cache_entry->ldapURL, rq->vars); */ return OK; } static int create_auth_users_cache_entry(char *user, char *userDN, const char *userPW, char *ldapURL) { UserCacheEntry *cache_entry; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] Looking for entry %s", getpid(), user); if (!(cache_entry = (UserCacheEntry *)HashTableFind(auth_users, user))) { cache_entry = (UserCacheEntry*)apr_palloc(module_pool, sizeof(UserCacheEntry)); HashTableInsert(auth_users, apr_pstrdup(module_pool, user), cache_entry); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Added new entry [%s][%s] to auth_users cache", user, userDN); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "freeing existing entry"); /* free(cache_entry->userDN); free(cache_entry->userPW); free(cache_entry->ldapURL); */ } cache_entry->userDN = apr_pstrdup(module_pool, userDN); cache_entry->userPW = apr_pstrdup(module_pool, userPW); cache_entry->ldapURL = apr_pstrdup(module_pool, ldapURL); cache_entry->createTime = time(0); return 1; } /* pattern is (pat1|pat2|...|patN) where patN is a simple apr_fnmatch pattern if we get a match, just return immediately with success, otherwise, loop through all the patterns and return a failure code if no match */ static apr_status_t admserv_match_list(char *patterns, const char *string, int flags) { apr_status_t rc = APR_SUCCESS; char *last = NULL; char *pattern = apr_strtok(patterns, "()|", &last); while (pattern) { rc = apr_fnmatch(pattern, string, flags); if (rc == APR_SUCCESS) { return rc; } pattern = apr_strtok(NULL, "()|", &last); } return rc; } /* Check if the caller hostname or ip address is disallowed */ static int admserv_host_ip_check(request_rec *r) { #ifdef WITH_APACHE24 char * clientIP = r->connection->client_ip; #else char * clientIP = r->connection->remote_ip; #endif char *msg; if (clientIP) { } else { ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_host_ip_check: Unauthorized and unknown host, connection rejected"); return admserv_error(r, HTTP_UNAUTHORIZED, "Unauthorized Host!"); } if (accessHosts && *accessHosts) { /* flags for accessHosts matching - want . to match . (not "any char") and do case insensitive matching */ int matchflags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND; const char *maxdns = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_HOST, NULL); if (maxdns) { apr_status_t rc = admserv_match_list(apr_pstrdup(r->pool, accessHosts), maxdns, matchflags); if (rc != APR_SUCCESS) { } else { return DECLINED; } } else { PRNetAddr addr; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_host_ip_check: ap_get_remote_host could not resolve %s", clientIP); if (PR_SUCCESS == PR_StringToNetAddr(clientIP, &addr)) { char buf[PR_NETDB_BUF_SIZE]; PRHostEnt hEntry; if (PR_SUCCESS == PR_GetHostByAddr(&addr, buf, sizeof(buf), &hEntry)) { if (APR_SUCCESS != admserv_match_list(apr_pstrdup(r->pool, accessHosts), hEntry.h_name, matchflags)) { char ** x; ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_host_ip_check: host [%s] did not match pattern [%s] -" "will scan aliases", hEntry.h_name, accessHosts); for (x = hEntry.h_aliases; x && *x; x++) { if (APR_SUCCESS != admserv_match_list(apr_pstrdup(r->pool, accessHosts), *x, matchflags)) { ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "admserv_host_ip_check: host alias [%s] did not match pattern [%s]", *x, accessHosts); } else { return DECLINED; } } } else { return DECLINED; } } else { ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "admserv_host_ip_check: failed to get host by ip addr [%s] - " "check your host and DNS configuration", clientIP); } } else { ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "admserv_host_ip_check: failed to convert addr [%s] to netaddr", clientIP); } } } if (accessAddresses && *accessAddresses) { int matchflags = APR_FNM_PERIOD; apr_status_t rc = admserv_match_list(apr_pstrdup(r->pool, accessAddresses), clientIP, matchflags); if (rc != APR_SUCCESS) { } else { return DECLINED; } } msg = apr_psprintf(r->pool, "admserv_host_ip_check: Unauthorized host ip=%s, connection rejected", clientIP); ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "%s", msg); return admserv_error(r, HTTP_UNAUTHORIZED, msg); } static int host_ip_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *base_server) { int error; #ifdef CHANGE_EUID int reseteuid = 0; #endif /* CHANGE_EUID */ AdmldapInfo info; PsetHndl pset; char *val; char msgbuf[BUFSIZ]; info = admldapBuildInfo(configdir, &error); if (info) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): unable to create AdmldapInfo (error code = %d)", error); return DONE; } if (admldapGetSecurity(info)) { sslinit(info, configdir); if (admldapBuildInfoSSL(info, &error)) { if (error != ADMUTIL_OP_OK) { ap_log_error(APLOG_MARK, APLOG_INFO, 0, base_server, "host_ip_init(): problem creating secure AdmldapInfo (error code = %d)", error); } } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): unable to create secure AdmldapInfo (error code = %d)", error); destroyAdmldap(info); return DONE; } } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "host_ip_init(): secure connection not enabled, skipping sslinit"); } destroyAdmldap(info); #ifdef CHANGE_EUID /* make sure pset creates the cache file owned by the server uid, not root */ if (geteuid() == 0) { #ifdef WITH_APACHE24 SETEUID(ap_unixd_config.user_id); #else SETEUID(unixd_config.user_id); #endif reseteuid = 1; } #endif /* CHANGE_EUID */ pset = psetCreateSSL((char*)"admin-serv", configdir, NULL, NULL, &error); #ifdef CHANGE_EUID if (reseteuid) { SETEUID(0); } #endif /* CHANGE_EUID */ if (pset) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): PSET failure: Failed to create PSET handle (pset error = %s)", psetErrorString(error, NULL, msgbuf, sizeof(msgbuf), NULL)); return DONE; } val = psetGetAttrSingleValue(pset, NS_ADMIN_ACCESS_HOSTS, &error); if (val) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): PSET failure: Could not retrieve access hosts attribute (pset error = %s)", psetErrorString(error, NULL, msgbuf, sizeof(msgbuf), NULL)); psetDelete(pset); return DONE; } accessHosts = apr_pstrdup(module_pool, val); PL_strfree(val); val = psetGetAttrSingleValue(pset, NS_ADMIN_ACCESS_ADDRESSES, &error); psetDelete(pset); pset = NULL; if(val) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): PSET failure: Could not retrieve access addresses attribute (pset error = %s)", psetErrorString(error, NULL, msgbuf, sizeof(msgbuf), NULL)); return DONE; } accessAddresses = apr_pstrdup(module_pool, val); PL_strfree(val); if (accessHosts[0] || accessAddresses[0]) { } else { /* the configuration hasn't specified if anyone can connect. * That is a contradiction as an Admin Server that can't * let anyone connect is pointless! Consequently, I have * added code here to scan through the local.conf file * and extract the serverHostName and add it to the allowed * hosts file. rwagner */ char const myAttr[] = "serverHostName"; char line[BIG_LINE]; char filename[BIG_LINE]; FILE *f; apr_snprintf(filename, sizeof(filename), "%s%clocal.conf", configdir, FILE_PATHSEP); if((f = fopen(filename, "r" )) != NULL) { while(!feof(f)) { fgets(line, sizeof(line), f); if (STRNCASECMP(line, myAttr, sizeof(myAttr) - 1) == 0) { char * c; for (c = &line[sizeof(myAttr) - 1]; *c && *c != ':'; c++); if (*c == ':') { for (c++; *c && *c == ' '; c++); if (*c) { char * x; for (x = c; *x; x++) { if (*x < ' ') { *x = '\0'; break; } } accessHosts = apr_pstrdup(module_pool, c); } } } } fclose(f); if (accessHosts[0]) { char buf[PR_NETDB_BUF_SIZE]; PRHostEnt hEntry; ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, base_server, "host_ip_init(): no hosts allowed or ip addresses allowed " "specified. Allowing %s nonetheless.", accessHosts); if (PR_SUCCESS == PR_GetHostByName(accessHosts, buf, sizeof(buf), &hEntry)) { PRNetAddr addr; if (PR_EnumerateHostEnt(0, &hEntry, 0, &addr) > 0) { if (PR_SUCCESS == PR_NetAddrToString(&addr, buf, sizeof(buf))) { accessAddresses = apr_pstrdup(module_pool, buf); } } } } else { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, "host_ip_init(): could not locate %s in file %s", myAttr, filename); } } } if (accessHosts[0] || accessAddresses[0]) { if (accessHosts[0]) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, base_server, "Access Host filter is: %s", accessHosts); } if (accessAddresses[0]) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, base_server, "Access Address filter is: %s", accessAddresses); } } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "host_ip_init(): the given configuration denies all hosts, thus nothing can connect!"); return DONE; } return OK; } /* * NSS caches SSL client session information - this cache must be cleared, otherwise * NSS_Shutdown will give an error. mod_nss also does this (along with the NSS_Shutdown) * It is ok to call SSL_ClearSessionCache multiple times. * The actual NSS_Shutdown is done in mod_nss. Note that we cannot call NSS_Shutdown * here - if NSS_Shutdown fails because mod_nss still has server caches referenced, * NSS will be left in a bad state - it won't really be shutdown because of the outstanding * references, but NSS_IsInitialized will return false, and NSS_Initialize will fail. * So we must be careful here to just release any references we have. * The assumption here is that mod_nss is loaded before mod_admserv (which will usually * happen since it is listed first in the httpd.conf) - but note that module unload * happens in _reverse_ order - so mod_admserv_unload will be called _before_ the * mod_nss unload function. If this ever changes, we will need to figure out some other * way to ensure that NSS_Shutdown is only ever called once, and only after all caches * and other resources have been released. */ static apr_status_t mod_admserv_unload(void *data) { if (NSS_IsInitialized()) { SSL_ClearSessionCache(); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "mod_admserv_unload: cleared SSL session cache"); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "mod_admserv_unload: cannot clear cache - NSS not initialized"); } return OK; } static int do_admserv_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *base_server) { AdmldapInfo info; int error; LDAP *server; int tries = 0; admserv_serv_config *srv_cfg = NULL; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "Entering do_admserv_post_config - pid is [%d]", getpid()); /* if configdir was not set in the config, get from the environment */ srv_cfg = our_sconfig(base_server); srv_cfg->gconfig->nInitCount++; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "Entering do_admserv_post_config - init count is [%d]", srv_cfg->gconfig->nInitCount); servers = HashTableCreate(); auth_users = HashTableCreate(); auth_tasks = HashTableCreate(); /* * Let us cleanup on restarts and exists */ apr_pool_cleanup_register(p, base_server, mod_admserv_unload, apr_pool_cleanup_null); /* if configdir was not set in the config, get from the environment */ srv_cfg = our_sconfig(base_server); configdir = srv_cfg->configdir; if (!configdir) { configdir = getenv("ADMSERV_CONF_DIR"); /* set in admserv.conf to override */ } /* cache entry expiration */ cacheLifetime = srv_cfg->cacheLifeTime; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "[%d] Cache expiration set to %ld seconds", getpid(), cacheLifetime); if (configdir) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "do_admserv_post_config(): NULL ADMConfigDir"); return DONE; } admserv_runtime_command_init(); admserv_register_runtime_command(RUNTIME_RESYNC_COMMAND, sync_task_sie_data, NULL); admserv_register_runtime_command(CHANGE_SIEPWD_COMMAND, change_sie_password, NULL); info = admldapBuildInfo(configdir, &error); if (info) { } else { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, base_server, "do_admserv_post_config(): unable to create AdmldapInfo"); return DONE; } /* Registry DS setup */ registryServer.host = admldapGetHost(info); registryServer.port = (admldapGetPort(info) < 0) ? 389 : admldapGetPort(info); registryServer.secure = (admldapGetSecurity(info)) ? 1 : 0; registryServer.baseDN = admldapGetBaseDN(info); registryServer.bindDN = ""; /* deprecated - use user credentials */ registryServer.bindPW = ""; /* deprecated - use user credentials */ registryServer.admservSieDN = admldapGetSIEDN(info); registryServer.securitydir = admldapGetSecurityDir(info); destroyAdmldap(info); info = NULL; /* Initialize the UG host to NULL. This will cause the * UG info to be loaded the first time a user authenticates. */ userGroupServer.host = NULL; /* Register the admin server tasks */ task_register_server(ADMIN_SERVER_ID, registryServer.admservSieDN); /* Populate the auth_tasks cache for the Local Admin */ server = openLDAPConnection(®istryServer); if (server) { } else { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, "Unable to open initial LDAPConnection to populate LocalAdmin tasks into cache."); return OK; } tries = 0; do { error = admserv_ldap_auth_server(server, ®istryServer); if(error != LDAP_SERVER_DOWN && error != LDAP_CONNECT_ERROR) break; closeLDAPConnection(server); if(!(server = openLDAPConnection(®istryServer))) { ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, "Unable to open LDAPConnection to populate LocalAdmin tasks into cache."); return OK; } } while (server != NULL && ++tries < 2); { /* Always treat StartConfigDS specially. * Regardless of the result of opening LDAPConnection, * put StartConfigDs into the cache for bootstrap. * This code allows the Console to launch the Config DS via Admin Server * even if * 1) the Config DS is not up when the Admin Server is started, or * 2) the Config DS is shutdown after the Admin Server is started. */ char startds[LINE_LENGTH]; char normStartds[LINE_LENGTH]; char *storage = startds; char *uri = apr_pstrdup(module_pool, STARTDS_IDENTIFIER); TaskCacheEntry *cache_entry; if (!build_full_DN(&storage, startds+LINE_LENGTH, uri, registryServer.admservSieDN)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, base_server, "do_admserv_post_config: unable to build DN from URL - bad URL [%s]", uri?uri:"none"); return OK; } convert_to_lower_case(startds); adm_normalize_dn(startds, normStartds); if (!(cache_entry = (TaskCacheEntry *)HashTableFind(auth_tasks, normStartds))) { cache_entry = (TaskCacheEntry*)apr_pcalloc(module_pool, sizeof(TaskCacheEntry)); cache_entry->auth_userDNs = HashTableCreate(); HashTableInsert(auth_tasks, apr_pstrdup(module_pool, normStartds), cache_entry); } cache_entry->execRef = apr_pstrdup(module_pool, STARTDS_CGI); cache_entry->execRefArgs = NULL; cache_entry->logSuppress = 0; HashTableInsert(cache_entry->auth_userDNs, apr_pstrdup(module_pool, LOCAL_SUPER_NAME), (char*)time(0)); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "Added StartConfigDs task entry [%s:%s:%s] for user [%s]", normStartds, cache_entry->execRef ? cache_entry->execRef : "", cache_entry->execRefArgs ? cache_entry->execRefArgs : "", LOCAL_SUPER_NAME); } if (error != LDAPU_SUCCESS) { closeLDAPConnection(server); ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, "Unable to bind as LocalAdmin to populate LocalAdmin tasks into cache."); return host_ip_init(p, plog, ptemp, base_server); } populate_task_cache_entries(LOCAL_SUPER_NAME, server); closeLDAPConnection(server); return host_ip_init(p, plog, ptemp, base_server); } /* * This is where we do the rest of our initialization, that depends * on configuration settings */ static int mod_admserv_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *base_server) { int status = OK; admserv_serv_config *srv_cfg = NULL; srv_cfg = our_sconfig(base_server); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "Entering mod_admserv_post_config - pid is [%d] init count is [%d]", getpid(), srv_cfg->gconfig->nInitCount); /* if configdir was not set in the config, get from the environment */ if (srv_cfg->gconfig->nInitCount < 1) { status = do_admserv_post_config(p, plog, ptemp, base_server); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "mod_admserv_post_config - pid is [%d] - post config already done once -" " additional config will be done in init_child", getpid()); } return status; } admserv_global_config *admserv_config_global_create(server_rec *s) { apr_pool_t *pool = s->process->pool; admserv_global_config *globalc = NULL; void *vglobalc = NULL; apr_pool_userdata_get(&vglobalc, MOD_ADMSERV_CONFIG_KEY, pool); if (vglobalc) { return vglobalc; /* reused for lifetime of the server */ } /* * allocate an own subpool which survives server restarts */ globalc = (admserv_global_config *)apr_palloc(pool, sizeof(*globalc)); /* * initialize per-module configuration */ globalc->nInitCount = 0; apr_pool_userdata_set(globalc, MOD_ADMSERV_CONFIG_KEY, apr_pool_cleanup_null, pool); return globalc; } /* * Create the per-directory structure. */ static void * create_config(apr_pool_t *p, char *path) { admserv_config * cf = (admserv_config *) apr_palloc(p, sizeof(admserv_config)); cf->nescompat = 0; cf->adminsdk = 0; cf->cgibindir = 0; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] create_config [0x%p] for %s", getpid(), cf, path ? path : "(null)"); return (void *) cf; } /* * Create the per-server structure. */ static void * create_server_config(apr_pool_t *p, server_rec *s) { admserv_serv_config * cf = (admserv_serv_config *) apr_pcalloc(p, sizeof(admserv_serv_config)); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] create_server_config [0x%p] for %s", getpid(), cf, s->server_hostname ? s->server_hostname : "(null)"); cf->gconfig = admserv_config_global_create(s); return (void *) cf; } static const char * adminsdk(cmd_parms *cmd, void *dconf, int flag) { admserv_config *cf = (admserv_config *)dconf; cf->adminsdk = flag; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] adminsdk [0x%p] flag %d", getpid(), cf, flag); return NULL; } static const char * nescompat(cmd_parms *cmd, void *dconf, int flag) { admserv_config *cf = (admserv_config *)dconf; cf->nescompat = 1; return NULL; } static const char * set_config_dir(cmd_parms *cmd, void *dconf, const char *confdir) { if (cmd->path) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "The %s config param cannot be specified in a Directory section", cmd->directive->directive); } else { void *sconf = cmd->server->module_config; admserv_serv_config *cf = (admserv_serv_config *)ap_get_module_config(sconf, &admserv_module); cf->configdir = apr_pstrdup(cmd->pool, confdir); } return NULL; } static const char * set_cgi_bin_dir(cmd_parms *cmd, void *dconf, const char *cgibindir) { admserv_config *cf = (admserv_config *)dconf; cf->cgibindir = apr_pstrdup(cmd->pool, cgibindir); return NULL; } static const char * set_cache_life_time(cmd_parms *cmd, void *dconf, const char *value) { if (cmd->path) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "The %s config param cannot be specified in a Directory section", cmd->directive->directive); } else { void *sconf = cmd->server->module_config; admserv_serv_config *cf = (admserv_serv_config *)ap_get_module_config(sconf, &admserv_module); cf->cacheLifeTime = atol(value); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] Set [0x%p] [%s] to %ld", getpid(), cf, cmd->directive->directive, cf->cacheLifeTime); } return NULL; } static const char * set_version_string(cmd_parms *cmd, void *dconf, const char *value) { if (cmd->path) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "The %s config param cannot be specified in a Directory section", cmd->directive->directive); } else { void *sconf = cmd->server->module_config; admserv_serv_config *cf = (admserv_serv_config *)ap_get_module_config(sconf, &admserv_module); cf->versionString = apr_pstrdup(cmd->pool, value); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "[%d] Set [0x%p] [%s] to %s", getpid(), cf, cmd->directive->directive, cf->versionString); } return NULL; } static int userauth(request_rec *r) { char *dummy = NULL; if (strcmp(r->handler, "user-auth")) return DECLINED; r->allowed |= (AP_METHOD_BIT << M_GET); if (r->method_number != M_GET) return DECLINED; /* If U/G Info is not available, try to get it */ if (!(userGroupServer.host)) { buildUGInfo(&dummy, r); } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "userauth, bind %s", apr_table_get(r->notes, RQ_NOTES_USERDN)); ap_set_content_type(r, "text/html"); ap_rprintf(r, "UserDN: %s\n", apr_table_get(r->notes, RQ_NOTES_USERDN)); ap_rprintf(r, "UserDirectory: ldap%s://%s:%d/%s\n", userGroupServer.secure ? "s" : "", userGroupServer.host, userGroupServer.port, userGroupServer.baseDN); ap_rprintf(r, "ldapHost: %s\n", registryServer.host); ap_rprintf(r, "ldapPort: %d\n", registryServer.port); ap_rprintf(r, "ldapSecurity: %s\n", (registryServer.secure == 1) ? "on" : "off"); ap_rprintf(r, "ldapBaseDN: %s\n", registryServer.baseDN); ap_rprintf(r, "SIE: %s\n", registryServer.admservSieDN); ap_rputs("NMC_Status: 0\n", r); return OK; } static int authenticate_user(LdapServerData *data, char *baseDN, char *user, const char *pw, request_rec *r) { LDAP *server; char *userdn, *ldapURL; int ldapError = LDAP_SUCCESS; int pw_expiring = 0; int tries = 0; ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, "authenticate_user: begin auth user [%s] pw [%s] in [%s] for [%s:%d]", user, pw, baseDN, data->host, data->port); if (!(server = openLDAPConnection(data))){ ap_log_rerror(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0, r, "unable to open LDAPConnection to server [%s:%d]", data->host, data->port); return DECLINED; } /* The basic auth data may be either uid:pw or userDN:pw. The test for '=' * is hopefully adequate to detect a DN... */ if (!strchr(user, '=')) { /* not a DN, so resolve the DN from the uid */ tries = 0; do { /* first try the basedn in the ldap server data, then the basedn param as a fallback */ ldapError = ldapu_find_userdn(server, user, data->baseDN ? data->baseDN : baseDN, &userdn); if(ldapError != LDAP_SERVER_DOWN && ldapError != LDAP_CONNECT_ERROR) break; closeLDAPConnection(server); if(!(server = openLDAPConnection(data))) { ap_log_rerror(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0, r, "unable to find user [%s] in server [%s:%d] under base DN [%s]", user, data->host, data->port, data->baseDN ? data->baseDN : baseDN); return DECLINED; } } while (server != NULL && ++tries < 2); if (ldapError != LDAPU_SUCCESS) { closeLDAPConnection(server); if ((ldapError == LDAP_CONNECT_ERROR) || (ldapError == LDAP_SERVER_DOWN)) return check_auth_users_cache(user, pw, r, 0); /* DS down. Use the cache, ignoring entry expiration. */ return DECLINED; /* fall back to final check against admpw */ } } else { /* it's a DN */ userdn = user; /* strip the leading "ldap:", if present */ if (!STRNCASECMP(userdn, LDAP_PREFIX, LDAP_PREFIX_LENGTH)) { if (strlen(userdn) > LDAP_PREFIX_LENGTH) userdn += LDAP_PREFIX_LENGTH; } } tries = 0; do { ldapError = admserv_ldap_auth_userdn_password(server, userdn, pw, &pw_expiring); if(ldapError != LDAP_SERVER_DOWN && ldapError != LDAP_CONNECT_ERROR) break; closeLDAPConnection(server); if(!(server = openLDAPConnection(data))) { ap_log_rerror(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0, r, "unable to bind as [%s] to server [%s:%d]", userdn, data->host, data->port); /*i18n*/ return DECLINED; } } while (server != NULL && ++tries < 2); if (ldapError != LDAP_SUCCESS) { closeLDAPConnection(server); if ((ldapError == LDAP_CONNECT_ERROR) || (ldapError == LDAP_SERVER_DOWN)) return check_auth_users_cache(user, pw, r, 0); /* DS down. Look in the cache, ignoring entry expiration. */ return DECLINED; /* fall back to final check against admpw */ } closeLDAPConnection(server); apr_table_set(r->notes, RQ_NOTES_USERDN, userdn); apr_table_set(r->notes, AUTHENTICATION_LDAP_URL, ldapURL = formLdapURL(data, r->pool)); apr_table_set(r->notes, RQ_NOTES_USERPW, pw); create_auth_users_cache_entry(user, userdn, pw, ldapURL); return OK; } static int admserv_check_user_id(request_rec *r) { const char *sent_pw; int result = 0; long now; int ret; char *dummy = NULL; ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "admserv_check_user_id"); /* Get the password that the client sent */ if ((result = ap_get_basic_auth_pw(r, &sent_pw))) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, "[%d] auth_ldap authenticate: " "ap_get_basic_auth_pw() returns %d", getpid(), result); return result; } if (r->user == NULL) { ap_log_rerror(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0, r, "[%d] auth_ldap authenticate: no user specified", getpid()); return HTTP_UNAUTHORIZED; } now = time(0); ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, "checking user cache for: %s", r->user); if (check_auth_users_cache(r->user, sent_pw, r, now) == OK) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, "user found in cache %s", r->user); return OK; } ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r, "not in cache, trying DS"); /* Cache lookup failed, or cache entry is expired. Try DS. */ /* First try o=NetscapeRoot in the registry server */ ret = authenticate_user(®istryServer, NETSCAPE_ROOT_BASEDN, r->user, sent_pw, r); if (ret != DECLINED) { return OK; } /* Then, try the user/group server */ /* If U/G Info is not available, try to get it */ if (!(userGroupServer.host)) { buildUGInfo(&dummy, r); } if (userGroupServer.host) { ret = authenticate_user(&userGroupServer, NULL, r->user, sent_pw, r); if (ret != DECLINED) { return OK; } } /* That failed too. The last resort is to fall back to the standard * Apache basic-auth using admpw. */ return DECLINED; } /* * DT 3/15/98 * * We need a way to send commands to a running admin server without simply * restarting the server (e.g. to resync to pick up new SIEs). The * \admin-serv\commands\* url namespace is to be used for this purpose. */ static int admserv_command_handler(request_rec *r) { const char *name = apr_table_get(r->notes, RQ_NOTES_COMMAND_NAME); char *query = r->args; if (!r->content_type || strcmp(r->content_type, RUNTIME_COMMAND_CONTENT_TYPE)) { return DECLINED; } if (name == NULL || query == NULL) { return DONE; } if (admserv_runtime_command_exec(name, query, r)) { ap_set_content_length(r, 0); r->status = HTTP_OK; ap_finalize_request_protocol(r); return OK; } return DONE; } static int fixup_adminsdk(request_rec *r) { admserv_config *cf = ap_get_module_config(r->per_dir_config, &admserv_module); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "fixup_adminsdk flag is %d", cf->adminsdk); if (!cf->adminsdk) return DECLINED; r->path_info = '\0'; password_pipe(r); return OK; } static int fixup_nescompat(request_rec *r) { apr_table_t *e = r->subprocess_env; admserv_config *cf = ap_get_module_config(r->per_dir_config, &admserv_module); if (!cf->nescompat) return DECLINED; apr_table_setn(e, "SERVER_URL", ap_construct_url(r->pool, "", r)); return OK; } static int fixup_admin_server_header(request_rec *r) { admserv_serv_config *srv_cfg = our_sconfig(r->server); const char *string = srv_cfg->versionString; /* * Insert special "Admin-Server" name/value pair in the server header * so Console knows what type of Admin Server this is. * The define is only used for fallback purposes. The real value should * be set in admserv.conf (or httpd.conf) */ if (!string) { #define ADMSERV_VERSION_STRING "389-Administrator/1.0" string = ADMSERV_VERSION_STRING; } apr_table_setn(r->headers_out, "Admin-Server", string); return OK; } /* * This routine is called before the server processes the configuration * files. There is no return value. All we do here is set up our * static module memory pool and initialize adminsdk. */ static int mod_admserv_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { int threaded; if (module_pool == NULL) { apr_pool_create(&module_pool, NULL); } (void)ADMUTIL_Init(); ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded); if (threaded != 1) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0 /* status */, NULL, "Not using a threaded server. The Admin Server authorization cache " "will not work correctly. Console and Admin Server tasks will " "be disabled if the configuration directory server is not available."); } return OK; } static void admserv_init_child(apr_pool_t *p, server_rec *base_server) { admserv_serv_config *srv_cfg = NULL; srv_cfg = our_sconfig(base_server); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "Entering admserv_init_child pid [%d] init count is [%d]", getpid(), srv_cfg->gconfig->nInitCount); /* if configdir was not set in the config, get from the environment */ srv_cfg = our_sconfig(base_server); if (srv_cfg->gconfig->nInitCount > 0) { do_admserv_post_config(p, NULL, NULL, base_server); } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server, "admserv_init_child - pid is [%d] - config should be done in regular post config", getpid()); } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0 /* status */, NULL, "Leaving admserv_init_child"); return; } /* The order in which hooks are called is: pre_config - command_rec commands, if any post_config pre_connection post_connection post_read_request translate_name access_checker - until this point, we don't know the user's identity check_user_id - only called if Requires was specified auth_checker - only called if Requires was specified fixups type_checker - various handlers, if any */ static void register_hooks(apr_pool_t *p) { /* Do basic auth after our own auth */ #ifdef AP_SERVER_MAJORVERSION_NUMBER /* Apache 2.2+ */ static const char * const aszPost[] = { "mod_auth_basic.c", NULL }; #else /* Apache 2.0 and earlier uses a different module name than 2.2+ */ static const char * const aszPost[] = { "mod_auth.c", NULL }; #endif /* Make sure mod_nss has been configured before us */ static const char * const aszPre[] = { "mod_nss.c", NULL }; /* handler for /admin-serv/authenticate requests */ ap_hook_handler(userauth, NULL, NULL, APR_HOOK_MIDDLE); /* handler for /admin-serv/commands */ ap_hook_handler(admserv_command_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_pre_config(mod_admserv_pre_config, aszPre, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(mod_admserv_post_config, aszPre, NULL, APR_HOOK_MIDDLE); /* called at read_request phase to block clients from disallowed hosts */ ap_hook_post_read_request(admserv_host_ip_check, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(admserv_check_user_id, NULL, aszPost, APR_HOOK_MIDDLE); ap_hook_auth_checker(admserv_check_authz, NULL, NULL, APR_HOOK_FIRST); ap_hook_fixups(fixup_nescompat, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_fixups(fixup_adminsdk, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_fixups(fixup_admin_server_header, NULL, NULL, APR_HOOK_MIDDLE); /* do per forked child init */ ap_hook_child_init(admserv_init_child, NULL,NULL, APR_HOOK_MIDDLE); } static const command_rec mod_adm_cmds[] = { AP_INIT_FLAG("NESCompatEnv", nescompat, NULL, OR_AUTHCFG, "On or Off to enable or disable (default) NES-compatible environment variables."), AP_INIT_FLAG("AdminSDK", adminsdk, NULL, OR_AUTHCFG, "On to interoperate with the AdminSDK properly."), AP_INIT_TAKE1("ADMConfigDir", set_config_dir, NULL, RSRC_CONF, "The absolute path of the directory containing our config files."), AP_INIT_TAKE1("ADMCgiBinDir", set_cgi_bin_dir, NULL, ACCESS_CONF, "The absolute path of the directory containing the CGI binaries for this location."), AP_INIT_TAKE1("ADMCacheLifeTime", set_cache_life_time, NULL, RSRC_CONF, "Number of seconds to cache auth credentials."), AP_INIT_TAKE1("ADMServerVersionString", set_version_string, NULL, RSRC_CONF, "The server and version string to be returned to the client in the Admin-Server HTTP header value."), { NULL } }; module AP_MODULE_DECLARE_DATA admserv_module = { STANDARD20_MODULE_STUFF, create_config, /* create per-dir config */ NULL, /* merge per-dir config */ create_server_config, /* server config */ NULL, /* merge server config */ mod_adm_cmds, /* command apr_table_t */ register_hooks /* register hooks */ }; 389-admin-1.1.35/mod_admserv/mod_admserv.h000066400000000000000000000107171220472121400201640ustar00rootroot00000000000000/** BEGIN COPYRIGHT BLOCK * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * END COPYRIGHT BLOCK **/ /************************************************************/ /* */ /* mod_admserv.h : defines for the admin server module */ /* */ /* Adam Prishtina 1/13/00 */ /* */ /************************************************************/ #ifndef _ADMSERV_PLUGIN_H #define _ADMSERV_PLUGIN_H #include #include "libadmin/libadmin.h" #include "apr_hash.h" #define LDAPU_SUCCESS 0 #define LDAPU_FAILED -1 #define LDAPU_ERR_OUT_OF_MEMORY -110 #define LDAPU_ERR_MULTIPLE_MATCHES -194 #ifdef XP_UNIX # define STRNCASECMP strncasecmp # define STRCASECMP strcasecmp # define STRCMP strcmp #else /* XP_WIN32 */ # define STRNCASECMP _strnicmp # define STRCASECMP _stricmp # define STRCMP _stricmp #endif #ifndef FILE_PATHSEP #define FILE_PATHSEP '/' #endif #ifndef PATH_MAX #define PATH_MAX 256 #endif #ifndef LINE_LENGTH #define LINE_LENGTH 1024 #endif #ifndef ACCESS_DENIED #define ACCESS_DENIED 0 #endif #ifndef ACCESS_GRANTED #define ACCESS_GRANTED 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #define ADMIN_HASH_SIZE 2 #define LDAP_BASE_PREFIX (char*)"ldap://" #define LDAPS_BASE_PREFIX (char*)"ldaps://" #define LDAP_BASE_PREFIX_LENGTH (strlen(LDAP_BASE_PREFIX)) #define LDAPS_BASE_PREFIX_LENGTH (strlen(LDAPS_BASE_PREFIX)) #define LDAP_PREFIX (char*)"ldap:///" #define LDAP_PREFIX_LENGTH (strlen(LDAP_PREFIX)) #define ADMIN_SERVER_ID (char*)"admin-serv" #define TASK_IDENTIFIER (char*)"tasks/" #define LOCAL_SUPER_NAME (char*)"LocalSuper" #define AUTHENTICATION_LDAP_URL (char*)"AuthenticationLdapURL" #define RUNTIME_RESYNC_COMMAND (char*)"sync-task-sie-data" #define CHANGE_SIEPWD_COMMAND (char*)"change-sie-password" #define RUNTIME_COMMAND_CONTENT_TYPE (char*)"admin-internal/command" #define DOWNLOAD_CONTENT_TYPE (char*)"application/octet-stream" #define SERVLET_CONTENT_TYPE (char*)"magnus-internal/servlet" typedef struct { apr_hash_t *table; } HashTable; typedef struct RebindData { char *user; char *pw; } RebindData; typedef struct UserCacheEntry { char *userDN; char *userPW; char *ldapURL; long createTime; } UserCacheEntry; typedef struct TaskCacheEntry { char *execRef; char *execRefArgs; int logSuppress; HashTable *auth_userDNs; } TaskCacheEntry; typedef struct PopulateTasksData { LDAP *server; char *userDN; long now; } PopulateTasksData; typedef struct LdapServerData { DWORD dPad; char *host; int port; int secure; /* track whether the server is running in secure mode */ char *baseDN; /* for the config ds, usually o=NetscapeRoot for the user/group ds, this is the default suffix e.g. dc=example,dc=com */ char *bindDN; /* deprecated since the SIE cannot bind anymore */ char *bindPW; /* deprecated since the SIE cannot bind anymore */ char *admservSieDN; /* SIE DN of this admin server */ char *securitydir; /* path to key/cert databases */ } LdapServerData; typedef struct ServletLookupData { char *nsExecRef; char *taskcn; char *serverDN; char *serverID; } ServletLookupData; typedef int (*RuntimeCommandFn)(const char *, char *, void *, request_rec*); typedef struct RuntimeCommandRecord { RuntimeCommandFn fn; void *arg; } RuntimeCommandRecord; #ifndef LDAP_CONTROL_PWEXPIRED #define LDAP_CONTROL_PWEXPIRED "2.16.840.1.113730.3.4.4" #endif #ifndef LDAP_CONTROL_PWEXPIRING #define LDAP_CONTROL_PWEXPIRING "2.16.840.1.113730.3.4.5" #endif #endif 389-admin-1.1.35/mod_restartd/000077500000000000000000000000001220472121400156745ustar00rootroot00000000000000389-admin-1.1.35/mod_restartd/LICENSE000066400000000000000000000053721220472121400167100ustar00rootroot00000000000000# BEGIN COPYRIGHT BLOCK # # The Apache Software License, Version 1.1 # # Copyright (c) 2000-2003 The Apache Software Foundation. All rights # reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # 3. The end-user documentation included with the redistribution, # if any, must include the following acknowledgment: # "This product includes software developed by the # Apache Software Foundation (http://www.apache.org/)." # Alternately, this acknowledgment may appear in the software itself, # if and wherever such third-party acknowledgments normally appear. # # 4. The names "Apache" and "Apache Software Foundation" must # not be used to endorse or promote products derived from this # software without prior written permission. For written # permission, please contact apache@apache.org. # # 5. Products derived from this software may not be called "Apache", # nor may "Apache" appear in their name, without prior written # permission of the Apache Software Foundation. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ==================================================================== # # This software consists of voluntary contributions made by many # individuals on behalf of the Apache Software Foundation. For more # information on the Apache Software Foundation, please see # . # # Portions of this software are based upon public domain software # originally written at the National Center for Supercomputing Applications, # University of Illinois, Urbana-Champaign. # # Copyright (C) 2005 Red Hat, Inc. # All rights reserved. # # END COPYRIGHT BLOCK 389-admin-1.1.35/mod_restartd/README000066400000000000000000000017671220472121400165670ustar00rootroot0000000000000008/15/2005 This is a modified mod_cgid.c from httpd-2.0.46. The changes have purposely been kept at a minimum to hopefully reduce patch merge issues in the future. This version was chosen to be compatible with the Apache shipped on RHEL 3. PURPOSE This is needed so we can retain root priviledges when running some specific CGIs in the admin server. Caution should be taken when configuring your server. RetainPerms must be "on" in order for the CGI to be executed by mod_restartd, otherwise this dumps out. It is registered to run before mod_cgi so anything not handled here will be executed by mod_cgi. You definitely don't want any random CGIs executed by mod_restartd. In order to compile standalone, local copies of mod_suexec.h and mod_include.h are needed. They are also from 2.0.46. BUILDING This is built as part of the Admin Server build. It is not intended to be built standalone. INSTALLING This is installed as part of the Admin Server install. It is not intended to be installed standalone. 389-admin-1.1.35/mod_restartd/mod_include-2.2.h000066400000000000000000000135771220472121400206430ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ /** * @file mod_include.h * @brief Server Side Include Filter Extension Module for Apache * * @defgroup MOD_INCLUDE mod_include * @ingroup APACHE_MODS * @{ */ #ifndef _MOD_INCLUDE_H #define _MOD_INCLUDE_H 1 #include "apr_pools.h" #include "apr_optional.h" /* * Constants used for ap_ssi_get_tag_and_value's decode parameter */ #define SSI_VALUE_DECODED 1 #define SSI_VALUE_RAW 0 /* * Constants used for ap_ssi_parse_string's leave_name parameter */ #define SSI_EXPAND_LEAVE_NAME 1 #define SSI_EXPAND_DROP_NAME 0 /* * This macro creates a bucket which contains an error message and appends it * to the current pass brigade */ #define SSI_CREATE_ERROR_BUCKET(ctx, f, bb) APR_BRIGADE_INSERT_TAIL((bb), \ apr_bucket_pool_create(apr_pstrdup((ctx)->pool, (ctx)->error_str), \ strlen((ctx)->error_str), (ctx)->pool, \ (f)->c->bucket_alloc)) /* * These constants are used to set or clear flag bits. */ #define SSI_FLAG_PRINTING (1<<0) /* Printing conditional lines. */ #define SSI_FLAG_COND_TRUE (1<<1) /* Conditional eval'd to true. */ #define SSI_FLAG_SIZE_IN_BYTES (1<<2) /* Sizes displayed in bytes. */ #define SSI_FLAG_NO_EXEC (1<<3) /* No Exec in current context. */ #define SSI_FLAG_SIZE_ABBREV (~(SSI_FLAG_SIZE_IN_BYTES)) #define SSI_FLAG_CLEAR_PRINT_COND (~((SSI_FLAG_PRINTING) | \ (SSI_FLAG_COND_TRUE))) #define SSI_FLAG_CLEAR_PRINTING (~(SSI_FLAG_PRINTING)) /* * The public SSI context structure */ typedef struct { /* permanent pool, use this for creating bucket data */ apr_pool_t *pool; /* temp pool; will be cleared after the execution of every directive */ apr_pool_t *dpool; /* See the SSI_FLAG_XXXXX definitions. */ int flags; /* nesting of *invisible* ifs */ int if_nesting_level; /* if true, the current buffer will be passed down the filter chain before * continuing with next input bucket and the variable will be reset to * false. */ int flush_now; /* argument counter (of the current directive) */ unsigned argc; /* currently configured error string */ const char *error_str; /* currently configured time format */ const char *time_str; /* pointer to internal (non-public) data, don't touch */ struct ssi_internal_ctx *intern; } include_ctx_t; typedef apr_status_t (include_handler_fn_t)(include_ctx_t *, ap_filter_t *, apr_bucket_brigade *); APR_DECLARE_OPTIONAL_FN(void, ap_ssi_get_tag_and_value, (include_ctx_t *ctx, char **tag, char **tag_val, int dodecode)); APR_DECLARE_OPTIONAL_FN(char*, ap_ssi_parse_string, (include_ctx_t *ctx, const char *in, char *out, apr_size_t length, int leave_name)); APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, (char *tag, include_handler_fn_t *func)); #endif /* MOD_INCLUDE */ /** @} */ 389-admin-1.1.35/mod_restartd/mod_include.h000066400000000000000000000270571220472121400203420ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ #ifndef _MOD_INCLUDE_H #define _MOD_INCLUDE_H 1 #include "apr_pools.h" #include "apr_optional.h" #define STARTING_SEQUENCE "" #define DEFAULT_ERROR_MSG "[an error occurred while processing this directive]" #define DEFAULT_TIME_FORMAT "%A, %d-%b-%Y %H:%M:%S %Z" #define SIZEFMT_BYTES 0 #define SIZEFMT_KMG 1 #define TMP_BUF_SIZE 1024 #if APR_CHARSET_EBCDIC #define RAW_ASCII_CHAR(ch) apr_xlate_conv_byte(ap_hdrs_from_ascii, (unsigned char)ch) #else /*APR_CHARSET_EBCDIC*/ #define RAW_ASCII_CHAR(ch) (ch) #endif /*APR_CHARSET_EBCDIC*/ /**************************************************************************** * Used to keep context information during parsing of a request for SSI tags. * This is especially useful if the tag stretches across multiple buckets or * brigades. This keeps track of which buckets need to be replaced with the * content generated by the SSI tag. * * state: PRE_HEAD - State prior to finding the first character of the * STARTING_SEQUENCE. Next state is PARSE_HEAD. * PARSE_HEAD - State entered once the first character of the * STARTING_SEQUENCE is found and exited when the * the full STARTING_SEQUENCE has been matched or * a match failure occurs. Next state is PRE_HEAD * or PARSE_TAG. * PARSE_TAG - State entered once the STARTING sequence has been * matched. It is exited when the first character in * ENDING_SEQUENCE is found. Next state is PARSE_TAIL. * PARSE_TAIL - State entered from PARSE_TAG state when the first * character in ENDING_SEQUENCE is encountered. This * state is exited when the ENDING_SEQUENCE has been * completely matched, or when a match failure occurs. * Next state is PARSE_TAG or PARSED. * PARSED - State entered from PARSE_TAIL once the complete * ENDING_SEQUENCE has been matched. The SSI tag is * processed and the SSI buckets are replaced with the * SSI content during this state. * parse_pos: Current matched position within the STARTING_SEQUENCE or * ENDING_SEQUENCE during the PARSE_HEAD and PARSE_TAIL states. * This is especially useful when the sequence spans brigades. * X_start_bucket: These point to the buckets containing the first character * of the STARTING_SEQUENCE, the first non-whitespace * character of the tag, and the first character in the * ENDING_SEQUENCE (head_, tag_, and tail_ respectively). * The buckets are kept intact until the PARSED state is * reached, at which time the tag is consolidated and the * buckets are released. The buckets that these point to * have all been set aside in the ssi_tag_brigade (along * with all of the intervening buckets). * X_start_index: The index points within the specified bucket contents * where the first character of the STARTING_SEQUENCE, * the first non-whitespace character of the tag, and the * first character in the ENDING_SEQUENCE can be found * (head_, tag_, and tail_ respectively). * combined_tag: Once the PARSED state is reached the tag is collected from * the bucket(s) in the ssi_tag_brigade into this contiguous * buffer. The buckets in the ssi_tag_brigade are released * and the tag is processed. * curr_tag_pos: Ptr to the combined_tag buffer indicating the current * parse position. * tag_length: The number of bytes in the actual tag (excluding the * STARTING_SEQUENCE, leading and trailing whitespace, * and ENDING_SEQUENCE). This length is computed as the * buckets are parsed and set aside during the PARSE_TAG state. * ssi_tag_brigade: The temporary brigade used by this filter to set aside * the buckets containing parts of the ssi tag and headers. */ typedef enum {PRE_HEAD, PARSE_HEAD, PARSE_DIRECTIVE, PARSE_TAG, PARSE_TAIL, PARSED} states; /** forward referenced as it needs to be held on the context */ typedef struct bndm_t bndm_t; typedef struct include_filter_ctx { states state; long flags; /* See the FLAG_XXXXX definitions. */ int if_nesting_level; apr_size_t parse_pos; int bytes_parsed; apr_status_t status; int output_now; int output_flush; apr_bucket *head_start_bucket; apr_size_t head_start_index; apr_bucket *tag_start_bucket; apr_size_t tag_start_index; apr_bucket *tail_start_bucket; apr_size_t tail_start_index; char *combined_tag; char *curr_tag_pos; apr_size_t directive_length; apr_size_t tag_length; char *error_str; char *error_str_override; char *time_str; char *time_str_override; apr_pool_t *pool; apr_bucket_brigade *ssi_tag_brigade; bndm_t *start_seq_pat; char *start_seq; int start_seq_len; char *end_seq; char *re_string; regmatch_t (*re_result)[10]; } include_ctx_t; /* These flags are used to set flag bits. */ #define FLAG_PRINTING 0x00000001 /* Printing conditional lines. */ #define FLAG_COND_TRUE 0x00000002 /* Conditional eval'd to true. */ #define FLAG_SIZE_IN_BYTES 0x00000004 /* Sizes displayed in bytes. */ #define FLAG_NO_EXEC 0x00000008 /* No Exec in current context. */ /* These flags are used to clear flag bits. */ #define FLAG_SIZE_ABBREV 0xFFFFFFFB /* Reset SIZE_IN_BYTES bit. */ #define FLAG_CLEAR_PRINT_COND 0xFFFFFFFC /* Reset PRINTING and COND_TRUE*/ #define FLAG_CLEAR_PRINTING 0xFFFFFFFE /* Reset just PRINTING bit. */ #define CREATE_ERROR_BUCKET(cntx, t_buck, h_ptr, ins_head) \ { \ /* XXX: it'd probably be nice to use a pool bucket here */ \ t_buck = apr_bucket_heap_create(cntx->error_str, \ strlen(cntx->error_str), \ NULL, h_ptr->list); \ APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck); \ \ if (ins_head == NULL) { \ ins_head = t_buck; \ } \ } /* Make sure to check the return code rc. If it is anything other * than APR_SUCCESS, then you should return this value up the * call chain. */ #define SPLIT_AND_PASS_PRETAG_BUCKETS(brgd, cntxt, next, rc) \ if ((APR_BRIGADE_EMPTY((cntxt)->ssi_tag_brigade)) && \ ((cntxt)->head_start_bucket != NULL)) { \ apr_bucket_brigade *tag_plus; \ \ tag_plus = apr_brigade_split((brgd), (cntxt)->head_start_bucket); \ if ((cntxt)->output_flush) { \ APR_BRIGADE_INSERT_TAIL((brgd), apr_bucket_flush_create((brgd)->bucket_alloc)); \ } \ (rc) = ap_pass_brigade((next), (brgd)); \ (cntxt)->bytes_parsed = 0; \ (brgd) = tag_plus; \ } typedef int (include_handler_fn_t)(include_ctx_t *ctx, apr_bucket_brigade **bb, request_rec *r, ap_filter_t *f, apr_bucket *head_ptr, apr_bucket **inserted_head); APR_DECLARE_OPTIONAL_FN(void, ap_ssi_get_tag_and_value, (include_ctx_t *ctx, char **tag, char **tag_val, int dodecode)); APR_DECLARE_OPTIONAL_FN(char*, ap_ssi_parse_string, (request_rec *r, include_ctx_t *ctx, const char *in, char *out, apr_size_t length, int leave_name)); APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, (char *tag, include_handler_fn_t *func)); #endif /* MOD_INCLUDE */ 389-admin-1.1.35/mod_restartd/mod_restartd-2.2.c000066400000000000000000001714231220472121400210360ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ /* * http_script: keeps all script-related ramblings together. * * Compliant to cgi/1.1 spec * * Adapted by rst from original NCSA code by Rob McCool * * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for * custom error responses, and DOCUMENT_ROOT because we found it useful. * It also adds SERVER_ADMIN - useful for scripts to know who to mail when * they fail. */ /* See the mod_restartd README for important information about this file */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "apr_lib.h" #include "apr_strings.h" #include "apr_general.h" #include "apr_file_io.h" #include "apr_portable.h" #include "apr_buckets.h" #include "apr_optional.h" #include "apr_signal.h" #define APR_WANT_STRFUNC #include "apr_want.h" #if APR_HAVE_SYS_SOCKET_H #include #endif #if APR_HAVE_UNISTD_H #include #endif #if APR_HAVE_SYS_TYPES_H #include #endif #define CORE_PRIVATE #include "util_filter.h" #include "httpd.h" #include "http_config.h" #include "http_request.h" #include "http_core.h" #include "http_protocol.h" #include "http_main.h" #include "http_log.h" #include "util_script.h" #include "ap_mpm.h" #include "unixd.h" #include "mod_suexec-2.2.h" #include "mod_include-2.2.h" #include "mod_core.h" #include "ap_regex.h" /* ### should be tossed in favor of APR */ #include #include /* for sockaddr_un */ module AP_MODULE_DECLARE_DATA restartd_module; static int cgid_start(apr_pool_t *p, server_rec *main_server, apr_proc_t *procnew); static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server); static int handle_exec(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb); static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgid_pfn_reg_with_ssi; static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *cgid_pfn_gtv; static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *cgid_pfn_ps; static apr_pool_t *pcgi = NULL; static int total_modules = 0; static pid_t daemon_pid; static int daemon_should_exit = 0; static ap_regex_t uriPat; static server_rec *root_server = NULL; static apr_pool_t *root_pool = NULL; static const char *sockname; static pid_t parent_pid; static ap_unix_identity_t empty_ugid = { (uid_t)-1, (gid_t)-1, -1 }; /* Read and discard the data in the brigade produced by a CGI script */ static void discard_script_output(apr_bucket_brigade *bb); /* This doer will only ever be called when we are sure that we have * a valid ugid. */ static ap_unix_identity_t *cgid_suexec_id_doer(const request_rec *r) { return (ap_unix_identity_t *) ap_get_module_config(r->request_config, &restartd_module); } /* KLUDGE --- for back-combatibility, we don't have to check ExecCGI * in ScriptAliased directories, which means we need to know if this * request came through ScriptAlias or not... so the Alias module * leaves a note for us. */ static int is_scriptaliased(request_rec *r) { const char *t = apr_table_get(r->notes, "alias-forced-type"); return t && (!strcasecmp(t, "cgi-script")); } /* Configuration stuff */ #define DEFAULT_LOGBYTES 10385760 #define DEFAULT_BUFBYTES 1024 #define DEFAULT_SOCKET DEFAULT_REL_RUNTIMEDIR "/cgisock" #define CGI_REQ 1 #define SSI_REQ 2 #define GETPID_REQ 3 /* get the pid of script created for prior request */ #define ERRFN_USERDATA_KEY "CGIDCHILDERRFN" /* DEFAULT_CGID_LISTENBACKLOG controls the max depth on the unix socket's * pending connection queue. If a bunch of cgi requests arrive at about * the same time, connections from httpd threads/processes will back up * in the queue while the cgid process slowly forks off a child to process * each connection on the unix socket. If the queue is too short, the * httpd process will get ECONNREFUSED when trying to connect. */ #ifndef DEFAULT_CGID_LISTENBACKLOG #define DEFAULT_CGID_LISTENBACKLOG 100 #endif /* DEFAULT_CONNECT_ATTEMPTS controls how many times we'll try to connect * to the cgi daemon from the thread/process handling the cgi request. * Generally we want to retry when we get ECONNREFUSED since it is * probably because the listen queue is full. We need to try harder so * the client doesn't see it as a 503 error. * * Set this to 0 to continually retry until the connect works or Apache * terminates. */ #ifndef DEFAULT_CONNECT_ATTEMPTS #define DEFAULT_CONNECT_ATTEMPTS 15 #endif typedef struct { const char *logname; long logbytes; int bufbytes; } cgid_server_conf; typedef struct { int retainperms; } cgid_dir_conf; typedef struct { int req_type; /* request type (CGI_REQ, SSI_REQ, etc.) */ unsigned long conn_id; /* connection id; daemon uses this as a hash value * to find the script pid when it is time for that * process to be cleaned up */ pid_t ppid; /* sanity check for config problems leading to * wrong cgid socket use */ int core_module_index; int env_count; ap_unix_identity_t ugid; apr_size_t filename_len; apr_size_t argv0_len; apr_size_t uri_len; apr_size_t args_len; int loglevel; /* to stuff in server_rec */ } cgid_req_t; /* This routine is called to create the argument list to be passed * to the CGI script. When suexec is enabled, the suexec path, user, and * group are the first three arguments to be passed; if not, all three * must be NULL. The query info is split into separate arguments, where * "+" is the separator between keyword arguments. * * Do not process the args if they containing an '=' assignment. */ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; char **av; char *w; int idx = 0; if (ap_strchr_c(args, '=')) { numwords = 0; } else { /* count the number of keywords */ for (x = 0, numwords = 1; args[x]; x++) { if (args[x] == '+') { ++numwords; } } } if (numwords > APACHE_ARG_MAX - 5) { numwords = APACHE_ARG_MAX - 5; /* Truncate args to prevent overrun */ } av = (char **) apr_pcalloc(p, (numwords + 5) * sizeof(char *)); if (path) { av[idx++] = path; } if (user) { av[idx++] = user; } if (group) { av[idx++] = group; } av[idx++] = apr_pstrdup(p, av0); for (x = 1; x <= numwords; x++) { w = ap_getword_nulls(p, &args, '+'); if (strcmp(w, "")) { ap_unescape_url(w); av[idx++] = ap_escape_shell_cmd(p, w); } } av[idx] = NULL; return av; } #if APR_HAS_OTHER_CHILD static void cgid_maint(int reason, void *data, apr_wait_t status) { apr_proc_t *proc = data; int mpm_state; int stopping; switch (reason) { case APR_OC_REASON_DEATH: apr_proc_other_child_unregister(data); /* If apache is not terminating or restarting, * restart the cgid daemon */ stopping = 1; /* if MPM doesn't support query, * assume we shouldn't restart daemon */ if (ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state) == APR_SUCCESS && mpm_state != AP_MPMQ_STOPPING) { stopping = 0; } if (!stopping) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "restartd daemon process died, restarting"); cgid_start(root_pool, root_server, proc); } break; case APR_OC_REASON_RESTART: /* don't do anything; server is stopping or restarting */ apr_proc_other_child_unregister(data); break; case APR_OC_REASON_LOST: /* Restart the child cgid daemon process */ apr_proc_other_child_unregister(data); cgid_start(root_pool, root_server, proc); break; case APR_OC_REASON_UNREGISTER: /* we get here when pcgi is cleaned up; pcgi gets cleaned * up when pconf gets cleaned up */ kill(proc->pid, SIGHUP); /* send signal to daemon telling it to die */ /* Remove the cgi socket, we must do it here in order to try and * guarantee the same permissions as when the socket was created. */ if (unlink(sockname) < 0 && errno != ENOENT) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, NULL, "Couldn't unlink unix domain socket %s", sockname); } break; } } #endif /* deal with incomplete reads and signals * assume you really have to read buf_size bytes */ static apr_status_t sock_read(int fd, void *vbuf, size_t buf_size) { char *buf = vbuf; int rc; size_t bytes_read = 0; do { do { rc = read(fd, buf + bytes_read, buf_size - bytes_read); } while (rc < 0 && errno == EINTR); switch(rc) { case -1: return errno; case 0: /* unexpected */ return ECONNRESET; default: bytes_read += rc; } } while (bytes_read < buf_size); return APR_SUCCESS; } /* deal with signals */ static apr_status_t sock_write(int fd, const void *buf, size_t buf_size) { int rc; do { rc = write(fd, buf, buf_size); } while (rc < 0 && errno == EINTR); if (rc < 0) { return errno; } return APR_SUCCESS; } static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env, cgid_req_t *req) { int i; char **environ; core_request_config *temp_core; void **rconf; apr_status_t stat; r->server = apr_pcalloc(r->pool, sizeof(server_rec)); /* read the request header */ stat = sock_read(fd, req, sizeof(*req)); if (stat != APR_SUCCESS) { return stat; } #ifdef WITH_APACHE24 r->server->log.level = req->loglevel; #else r->server->loglevel = req->loglevel; #endif if (req->req_type == GETPID_REQ) { /* no more data sent for this request */ return APR_SUCCESS; } /* handle module indexes and such */ rconf = (void **) apr_pcalloc(r->pool, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); temp_core = (core_request_config *)apr_palloc(r->pool, sizeof(core_module)); rconf[req->core_module_index] = (void *)temp_core; r->request_config = (ap_conf_vector_t *)rconf; ap_set_module_config(r->request_config, &restartd_module, (void *)&req->ugid); /* Read the filename, argv0, uri, and args */ r->filename = apr_pcalloc(r->pool, req->filename_len + 1); *argv0 = apr_pcalloc(r->pool, req->argv0_len + 1); r->uri = apr_pcalloc(r->pool, req->uri_len + 1); if ((stat = sock_read(fd, r->filename, req->filename_len)) != APR_SUCCESS || (stat = sock_read(fd, *argv0, req->argv0_len)) != APR_SUCCESS || (stat = sock_read(fd, r->uri, req->uri_len)) != APR_SUCCESS) { return stat; } r->args = apr_pcalloc(r->pool, req->args_len + 1); /* empty string if no args */ if (req->args_len) { if ((stat = sock_read(fd, r->args, req->args_len)) != APR_SUCCESS) { return stat; } } /* read the environment variables */ environ = apr_pcalloc(r->pool, (req->env_count + 2) *sizeof(char *)); for (i = 0; i < req->env_count; i++) { apr_size_t curlen; if ((stat = sock_read(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } environ[i] = apr_pcalloc(r->pool, curlen + 1); if ((stat = sock_read(fd, environ[i], curlen)) != APR_SUCCESS) { return stat; } } *env = environ; #if 0 #ifdef RLIMIT_CPU sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_cpu = (struct rlimit *)apr_palloc (sizeof(struct rlimit)); sock_read(fd, temp_core->limit_cpu, sizeof(struct rlimit)); } else { temp_core->limit_cpu = NULL; } #endif #if defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_mem = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_mem, sizeof(struct rlimit)); } else { temp_core->limit_mem = NULL; } #endif #ifdef RLIMIT_NPROC sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_nproc = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_nproc, sizeof(struct rlimit)); } else { temp_core->limit_nproc = NULL; } #endif #endif return APR_SUCCESS; } static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, int req_type) { int i; cgid_req_t req = {0}; apr_status_t stat; ap_unix_identity_t * ugid = ap_run_get_suexec_identity(r); if (ugid == NULL) { req.ugid = empty_ugid; } else { memcpy(&req.ugid, ugid, sizeof(ap_unix_identity_t)); } req.req_type = req_type; req.ppid = parent_pid; req.conn_id = r->connection->id; req.core_module_index = core_module.module_index; for (req.env_count = 0; env[req.env_count]; req.env_count++) { continue; } req.filename_len = strlen(r->filename); req.argv0_len = strlen(argv0); req.uri_len = strlen(r->uri); req.args_len = r->args ? strlen(r->args) : 0; #ifdef WITH_APACHE24 req.loglevel = r->server->log.level; #else req.loglevel = r->server->loglevel; #endif /* Write the request header */ if ((stat = sock_write(fd, &req, sizeof(req))) != APR_SUCCESS) { return stat; } /* Write filename, argv0, uri, and args */ if ((stat = sock_write(fd, r->filename, req.filename_len)) != APR_SUCCESS || (stat = sock_write(fd, argv0, req.argv0_len)) != APR_SUCCESS || (stat = sock_write(fd, r->uri, req.uri_len)) != APR_SUCCESS) { return stat; } if (req.args_len) { if ((stat = sock_write(fd, r->args, req.args_len)) != APR_SUCCESS) { return stat; } } /* write the environment variables */ for (i = 0; i < req.env_count; i++) { apr_size_t curlen = strlen(env[i]); if ((stat = sock_write(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } if ((stat = sock_write(fd, env[i], curlen)) != APR_SUCCESS) { return stat; } } #if 0 #ifdef RLIMIT_CPU if (conf->limit_cpu) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_cpu, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) if (conf->limit_mem) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_mem, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #ifdef RLIMIT_NPROC if (conf->limit_nproc) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_nproc, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #endif return APR_SUCCESS; } static void daemon_signal_handler(int sig) { if (sig == SIGHUP) { ++daemon_should_exit; } } static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err, const char *description) { request_rec *r; void *vr; apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool); r = vr; /* sure we got r, but don't call ap_log_rerror() because we don't * have r->headers_in and possibly other storage referenced by * ap_log_rerror() */ ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description); } static int cgid_server(void *data) { struct sockaddr_un unix_addr; int sd, sd2, rc; mode_t omask; apr_socklen_t len; apr_pool_t *ptrans; server_rec *main_server = data; apr_hash_t *script_hash = apr_hash_make(pcgi); apr_pool_create(&ptrans, pcgi); apr_signal(SIGCHLD, SIG_IGN); apr_signal(SIGHUP, daemon_signal_handler); /* Close our copy of the listening sockets */ ap_close_listeners(); /* cgid should use its own suexec doer */ ap_hook_get_suexec_identity(cgid_suexec_id_doer, NULL, NULL, APR_HOOK_REALLY_FIRST); apr_hook_sort_all(); if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't create unix domain socket"); return errno; } memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path); omask = umask(0077); /* so that only Apache can use socket */ rc = bind(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)); umask(omask); /* can't fail, so can't clobber errno */ if (rc < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't bind unix domain socket %s", sockname); close(sd); return errno; } if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't listen on unix domain socket"); close(sd); return errno; } if (!geteuid()) { #ifdef WITH_APACHE24 if (chown(sockname, ap_unixd_config.user_id, -1) < 0) { #else if (chown(sockname, unixd_config.user_id, -1) < 0) { #endif ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't change owner of unix domain socket %s", sockname); close(sd); return errno; } } #if 0 unixd_setup_child(); /* if running as root, switch to configured user/group */ #endif while (!daemon_should_exit) { int errfileno = STDERR_FILENO; char *argv0; char **env; const char * const *argv; apr_int32_t in_pipe; apr_int32_t out_pipe; apr_int32_t err_pipe; apr_cmdtype_e cmd_type; request_rec *r; apr_procattr_t *procattr = NULL; apr_proc_t *procnew = NULL; apr_file_t *inout; cgid_req_t cgid_req; apr_status_t stat; apr_pool_clear(ptrans); len = sizeof(unix_addr); sd2 = accept(sd, (struct sockaddr *)&unix_addr, &len); if (sd2 < 0) { #if defined(ENETDOWN) if (errno == ENETDOWN) { /* The network has been shut down, no need to continue. Die gracefully */ ++daemon_should_exit; } #endif if (errno != EINTR) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, (server_rec *)data, "Error accepting on restartd socket"); } continue; } r = apr_pcalloc(ptrans, sizeof(request_rec)); procnew = apr_pcalloc(ptrans, sizeof(*procnew)); r->pool = ptrans; stat = get_req(sd2, r, &argv0, &env, &cgid_req); if (stat != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, stat, main_server, "Error reading request on cgid socket"); close(sd2); continue; } if (cgid_req.ppid != parent_pid) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, main_server, "CGI request received from wrong server instance; " "see ScriptSock directive"); close(sd2); continue; } if (cgid_req.req_type == GETPID_REQ) { pid_t pid; pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id))); if (write(sd2, &pid, sizeof(pid)) != sizeof(pid)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, "Error writing pid %" APR_PID_T_FMT " to handler", pid); } close(sd2); continue; } apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool); apr_os_file_put(&inout, &sd2, 0, r->pool); if (cgid_req.req_type == SSI_REQ) { in_pipe = APR_NO_PIPE; out_pipe = APR_FULL_BLOCK; err_pipe = APR_NO_PIPE; cmd_type = APR_SHELLCMD; } else { in_pipe = APR_CHILD_BLOCK; out_pipe = APR_CHILD_BLOCK; err_pipe = APR_CHILD_BLOCK; cmd_type = APR_PROGRAM; } if (((rc = apr_procattr_create(&procattr, ptrans)) != APR_SUCCESS) || ((cgid_req.req_type == CGI_REQ) && (((rc = apr_procattr_io_set(procattr, in_pipe, out_pipe, err_pipe)) != APR_SUCCESS) || /* XXX apr_procattr_child_*_set() is creating an unnecessary * pipe between this process and the child being created... * It is cleaned up with the temporary pool for this request. */ ((rc = apr_procattr_child_err_set(procattr, r->server->error_log, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_child_in_set(procattr, inout, NULL)) != APR_SUCCESS))) || ((rc = apr_procattr_child_out_set(procattr, inout, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { /* Something bad happened, tell the world. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't set child process attributes: %s", r->filename); } else { apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans); argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args); /* We want to close sd2 for the new CGI process too. * If it is left open it'll make ap_pass_brigade() block * waiting for EOF if CGI forked something running long. * close(sd2) here should be okay, as CGI channel * is already dup()ed by apr_procattr_child_{in,out}_set() * above. */ close(sd2); if (memcmp(&empty_ugid, &cgid_req.ugid, sizeof(empty_ugid))) { /* We have a valid identity, and can be sure that * cgid_suexec_id_doer will return a valid ugid */ rc = ap_os_create_privileged_process(r, procnew, argv0, argv, (const char * const *)env, procattr, ptrans); } else { rc = apr_proc_create(procnew, argv0, argv, (const char * const *)env, procattr, ptrans); } if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't create child process: %d: %s", rc, apr_filepath_name_get(r->filename)); } else { /* We don't want to leak storage for the key, so only allocate * a key if the key doesn't exist yet in the hash; there are * only a limited number of possible keys (one for each * possible thread in the server), so we can allocate a copy * of the key the first time a thread has a cgid request. * Note that apr_hash_set() only uses the storage passed in * for the key if it is adding the key to the hash for the * first time; new key storage isn't needed for replacing the * existing value of a key. */ void *key; if (apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id))) { key = &cgid_req.conn_id; } else { key = apr_pcalloc(pcgi, sizeof(cgid_req.conn_id)); memcpy(key, &cgid_req.conn_id, sizeof(cgid_req.conn_id)); } apr_hash_set(script_hash, key, sizeof(cgid_req.conn_id), (void *)((long)procnew->pid)); } } } close(sd); return -1; } static int cgid_start(apr_pool_t *p, server_rec *main_server, apr_proc_t *procnew) { daemon_should_exit = 0; /* clear setting from previous generation */ if ((daemon_pid = fork()) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "mod_restartd: Couldn't spawn restartd daemon process"); return DECLINED; } else if (daemon_pid == 0) { if (pcgi == NULL) { apr_pool_create(&pcgi, p); } cgid_server(main_server); exit(-1); } procnew->pid = daemon_pid; procnew->err = procnew->in = procnew->out = NULL; apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT); #if APR_HAS_OTHER_CHILD apr_proc_other_child_register(procnew, cgid_maint, procnew, NULL, p); #endif return OK; } static int cgid_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { sockname = ap_append_pid(pconf, DEFAULT_SOCKET, "."); return OK; } static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server) { apr_proc_t *procnew = NULL; int first_time = 0; const char *userdata_key = "restartd_init"; module **m; int ret = OK; void *data; root_server = main_server; root_pool = p; apr_pool_userdata_get(&data, userdata_key, main_server->process->pool); if (!data) { first_time = 1; procnew = apr_pcalloc(main_server->process->pool, sizeof(*procnew)); procnew->pid = -1; procnew->err = procnew->in = procnew->out = NULL; apr_pool_userdata_set((const void *)procnew, userdata_key, apr_pool_cleanup_null, main_server->process->pool); } else { procnew = data; } if (!first_time) { total_modules = 0; for (m = ap_preloaded_modules; *m != NULL; m++) total_modules++; parent_pid = getpid(); sockname = ap_server_root_relative(p, sockname); ret = cgid_start(p, main_server, procnew); if (ret != OK ) { return ret; } cgid_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler); cgid_pfn_gtv = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_get_tag_and_value); cgid_pfn_ps = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_parse_string); if ((cgid_pfn_reg_with_ssi) && (cgid_pfn_gtv) && (cgid_pfn_ps)) { /* Required by mod_include filter. This is how mod_cgid registers * with mod_include to provide processing of the exec directive. */ cgid_pfn_reg_with_ssi("exec", handle_exec); } } ap_regcomp(&uriPat, "/.*/tasks/operation/(start|restart|stop|startconfigds|create|remove)$", AP_REG_ICASE); return ret; } static void *create_cgid_config(apr_pool_t *p, server_rec *s) { cgid_server_conf *c = (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf)); c->logname = NULL; c->logbytes = DEFAULT_LOGBYTES; c->bufbytes = DEFAULT_BUFBYTES; return c; } static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv) { cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv; return overrides->logname ? overrides : base; } static void *create_cgid_dir_config(apr_pool_t *p, char *d) { cgid_dir_conf * c = (cgid_dir_conf *)apr_pcalloc(p, sizeof(cgid_dir_conf)); c->retainperms = 0; return (void *) c; } static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logname = ap_server_root_relative(cmd->pool, arg); if (!conf->logname) { return apr_pstrcat(cmd->pool, "Invalid ScriptLog path ", arg, NULL); } return NULL; } static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logbytes = atol(arg); return NULL; } static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->bufbytes = atoi(arg); return NULL; } static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg) { const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); if (err != NULL) { return err; } /* Make sure the pid is appended to the sockname */ sockname = ap_append_pid(cmd->pool, arg, "."); sockname = ap_server_root_relative(cmd->pool, sockname); if (!sockname) { return apr_pstrcat(cmd->pool, "Invalid ScriptSock path", arg, NULL); } return NULL; } static const char *set_retainperms(cmd_parms *cmd, void *dconf, int arg) { cgid_dir_conf *c = (cgid_dir_conf *) dconf; c->retainperms = arg; return NULL; } static const command_rec cgid_cmds[] = { AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF, "the name of a log for script debugging info"), AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, "the maximum length (in bytes) of the script debug log"), AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, "the maximum size (in bytes) to record of a POST request"), AP_INIT_TAKE1("ScriptSock", set_script_socket, NULL, RSRC_CONF, "the name of the socket to use for communication with " "the cgi daemon."), AP_INIT_FLAG("RetainPerms", set_retainperms, NULL, OR_AUTHCFG, "Don't drop permissions when running the CGI."), {NULL} }; static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret, apr_status_t rv, char *error) { apr_file_t *f = NULL; struct stat finfo; char time_str[APR_CTIME_LEN]; int log_flags = rv ? APLOG_ERR : APLOG_ERR; ap_log_rerror(APLOG_MARK, log_flags, rv, r, "%s: %s", error, r->filename); /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_printf(f, "%%error\n%s\n", error); apr_file_close(f); return ret; } static int log_script(request_rec *r, cgid_server_conf * conf, int ret, char *dbuf, const char *sbuf, apr_bucket_brigade *bb, apr_file_t *script_err) { const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in); const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts; char argsbuffer[HUGE_STRING_LEN]; apr_file_t *f = NULL; apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; int first; int i; struct stat finfo; char time_str[APR_CTIME_LEN]; /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { /* Soak up script output */ discard_script_output(bb); if (script_err) { while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) continue; } return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin" */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_puts("%request\n", f); for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if ((r->method_number == M_POST || r->method_number == M_PUT) && *dbuf) { apr_file_printf(f, "\n%s\n", dbuf); } apr_file_puts("%response\n", f); hdrs_arr = apr_table_elts(r->err_headers_out); hdrs = (const apr_table_entry_t *) hdrs_arr->elts; for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if (sbuf && *sbuf) apr_file_printf(f, "%s\n", sbuf); first = 1; for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS || (len == 0)) { break; } if (first) { apr_file_puts("%stdout\n", f); first = 0; } apr_file_write(f, buf, &len); apr_file_puts("\n", f); } if (script_err) { if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) { apr_file_puts("%stderr\n", f); apr_file_puts(argsbuffer, f); while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) apr_file_puts(argsbuffer, f); apr_file_puts("\n", f); } } if (script_err) { apr_file_close(script_err); } apr_file_close(f); return ret; } static apr_status_t close_unix_socket(void *thefd) { int fd = (int)((long)thefd); return close(fd); } static int connect_to_daemon(int *sdptr, request_rec *r, cgid_server_conf *conf) { struct sockaddr_un unix_addr; int sd; int connect_tries; apr_interval_time_t sliding_timer; memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; apr_cpystrn(unix_addr.sun_path, sockname, sizeof unix_addr.sun_path); connect_tries = 0; sliding_timer = 100000; /* 100 milliseconds */ while (1) { ++connect_tries; if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno, "unable to create socket to cgi daemon"); } if (connect(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) { if (errno == ECONNREFUSED && connect_tries < DEFAULT_CONNECT_ATTEMPTS) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r, "connect #%d to cgi daemon failed, sleeping before retry", connect_tries); close(sd); apr_sleep(sliding_timer); if (sliding_timer < apr_time_from_sec(2)) { sliding_timer *= 2; } } else { close(sd); return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "unable to connect to cgi daemon after multiple tries"); } } else { apr_pool_cleanup_register(r->pool, (void *)((long)sd), close_unix_socket, apr_pool_cleanup_null); break; /* we got connected! */ } /* gotta try again, but make sure the cgid daemon is still around */ if (kill(daemon_pid, 0) != 0) { return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "restartd daemon is gone; is Apache terminating?"); } } *sdptr = sd; return OK; } static void discard_script_output(apr_bucket_brigade *bb) { apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (rv != APR_SUCCESS) { break; } } } /**************************************************************** * * Actual cgid handling... */ struct cleanup_script_info { request_rec *r; unsigned long conn_id; cgid_server_conf *conf; }; static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait) { apr_interval_time_t interval = 10000; /* 10 ms */ apr_interval_time_t total = 0; do { #ifdef _AIX /* On AIX, for processes like mod_cgid's script children where * SIGCHLD is ignored, kill(pid,0) returns success for up to * one second after the script child exits, based on when a * daemon runs to clean up unnecessary process table entries. * getpgid() can report the proper info (-1/ESRCH) immediately. */ if (getpgid(pid) < 0) { #else if (kill(pid, 0) < 0) { #endif return APR_SUCCESS; } apr_sleep(interval); total = total + interval; if (interval < 500000) { interval *= 2; } } while (total < max_wait); return APR_EGENERAL; } static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid) { kill(pid, SIGTERM); /* in case it isn't dead yet */ if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL", pid); kill(pid, SIGKILL); if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL again", pid); kill(pid, SIGKILL); return APR_EGENERAL; } static apr_status_t cleanup_script(void *vptr) { struct cleanup_script_info *info = vptr; int sd; int rc; cgid_req_t req = {0}; pid_t pid; apr_status_t stat; rc = connect_to_daemon(&sd, info->r, info->conf); if (rc != OK) { return APR_EGENERAL; } /* we got a socket, and there is already a cleanup registered for it */ req.req_type = GETPID_REQ; req.ppid = parent_pid; req.conn_id = info->r->connection->id; stat = sock_write(sd, &req, sizeof(req)); if (stat != APR_SUCCESS) { return stat; } /* wait for pid of script */ stat = sock_read(sd, &pid, sizeof(pid)); if (stat != APR_SUCCESS) { return stat; } if (pid == 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r, "daemon couldn't find CGI process for connection %lu", info->conn_id); return APR_EGENERAL; } return cleanup_nonchild_process(info->r, pid); } static int cgid_handler(request_rec *r) { conn_rec *c = r->connection; int retval, nph, dbpos = 0; char *argv0, *dbuf = NULL; apr_bucket_brigade *bb; apr_bucket *b; cgid_server_conf *conf; int is_included; int seen_eos, child_stopped_reading; int sd; char **env; apr_file_t *tempsock; struct cleanup_script_info *info; apr_status_t rv; cgid_dir_conf *mc = (cgid_dir_conf *)ap_get_module_config(r->per_dir_config, &restartd_module); if (strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script")) return DECLINED; /* It is a CGI but we shouldn't handle it, let mod_cgi do it */ if (!mc->retainperms) return DECLINED; /* One final check. We only want to run Start/Stop/Restart */ if ((rv = ap_regexec(&uriPat, r->uri, 0, NULL,0)) != 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_restartd: attempt to run unknown program at %s. Bailing out.", r->uri); return DECLINED; } conf = ap_get_module_config(r->server->module_config, &restartd_module); is_included = !strcmp(r->protocol, "INCLUDED"); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; nph = !(strncmp(argv0, "nph-", 4)); argv0 = r->filename; if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "Options ExecCGI is off in this directory"); if (nph && is_included) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to include NPH CGI script"); #if defined(OS2) || defined(WIN32) #error mod_restartd does not work on this platform. If you teach it to, look #error at mod_cgid.c for required code in this path. #else if (r->finfo.filetype == 0) return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "script not found or unable to stat"); #endif if (r->finfo.filetype == APR_DIR) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to invoke directory as script"); if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) && r->path_info && *r->path_info) { /* default to accept */ return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "AcceptPathInfo off disallows user's path"); } /* if (!ap_suexec_enabled) { if (!ap_can_exec(&r->finfo)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "file permissions deny server execution"); } */ ap_add_common_vars(r); ap_add_cgi_vars(r); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } rv = send_req(sd, r, argv0, env, CGI_REQ); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "write to cgi daemon process"); } info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. APR will create * a cleanup for the apr_file_t which will close the socket, so we'll * get rid of the cleanup we registered when we created the socket. */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; /* Transfer any put/post args, CERN style... * Note that we already ignore SIGPIPE in the core server. */ bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); seen_eos = 0; child_stopped_reading = 0; if (conf->logname) { dbuf = apr_palloc(r->pool, conf->bufbytes + 1); dbpos = 0; } do { apr_bucket *bucket; rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, HUGE_STRING_LEN); if (rv != APR_SUCCESS) { return rv; } for (bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) { const char *data; apr_size_t len; if (APR_BUCKET_IS_EOS(bucket)) { seen_eos = 1; break; } /* We can't do much with this. */ if (APR_BUCKET_IS_FLUSH(bucket)) { continue; } /* If the child stopped, we still must read to EOS. */ if (child_stopped_reading) { continue; } /* read */ apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ); if (conf->logname && dbpos < conf->bufbytes) { int cursize; if ((dbpos + len) > conf->bufbytes) { cursize = conf->bufbytes - dbpos; } else { cursize = len; } memcpy(dbuf + dbpos, data, cursize); dbpos += cursize; } /* Keep writing data to the child until done or too much time * elapses with no progress or an error occurs. */ rv = apr_file_write_full(tempsock, data, len, NULL); if (rv != APR_SUCCESS) { /* silly script stopped reading, soak up remaining message */ child_stopped_reading = 1; } } apr_brigade_cleanup(bb); } while (!seen_eos); if (conf->logname) { dbuf[dbpos] = '\0'; } /* we're done writing, or maybe we didn't write at all; * force EOF on child's stdin so that the cgi detects end (or * absence) of data */ shutdown(sd, 1); /* Handle script return... */ if (!nph) { const char *location; char sbuf[MAX_STRING_LEN]; int ret; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { return log_script(r, conf, ret, dbuf, sbuf, bb, NULL); } location = apr_table_get(r->headers_out, "Location"); if (location && location[0] == '/' && r->status == 200) { /* Soak up all the script output */ discard_script_output(bb); apr_brigade_destroy(bb); /* This redirect needs to be a GET no matter what the original * method was. */ r->method = apr_pstrdup(r->pool, "GET"); r->method_number = M_GET; /* We already read the message body (if any), so don't allow * the redirected request to think it has one. We can ignore * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR. */ apr_table_unset(r->headers_in, "Content-Length"); ap_internal_redirect_handler(location, r); return OK; } else if (location && r->status == 200) { /* XX Note that if a script wants to produce its own Redirect * body, it now has to explicitly *say* "Status: 302" */ discard_script_output(bb); apr_brigade_destroy(bb); return HTTP_MOVED_TEMPORARILY; } ap_pass_brigade(r->output_filters, bb); } if (nph) { struct ap_filter_t *cur; /* get rid of all filters up through protocol... since we * haven't parsed off the headers, there is no way they can * work */ cur = r->proto_output_filters; while (cur && cur->frec->ftype < AP_FTYPE_CONNECTION) { cur = cur->next; } r->output_filters = r->proto_output_filters = cur; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); ap_pass_brigade(r->output_filters, bb); } return OK; /* NOT r->status, even if it has changed. */ } /*============================================================================ *============================================================================ * This is the beginning of the cgi filter code moved from mod_include. This * is the code required to handle the "exec" SSI directive. *============================================================================ *============================================================================*/ static apr_status_t include_cgi(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb, char *s) { request_rec *r = f->r; request_rec *rr = ap_sub_req_lookup_uri(s, r, f->next); int rr_status; if (rr->status != HTTP_OK) { ap_destroy_sub_req(rr); return APR_EGENERAL; } /* No hardwired path info or query allowed */ if ((rr->path_info && rr->path_info[0]) || rr->args) { ap_destroy_sub_req(rr); return APR_EGENERAL; } if (rr->finfo.filetype != APR_REG) { ap_destroy_sub_req(rr); return APR_EGENERAL; } /* Script gets parameters of the *document*, for back compatibility */ rr->path_info = r->path_info; /* hard to get right; see mod_cgi.c */ rr->args = r->args; /* Force sub_req to be treated as a CGI request, even if ordinary * typing rules would have called it something else. */ ap_set_content_type(rr, CGI_MAGIC_TYPE); /* Run it. */ rr_status = ap_run_sub_req(rr); if (ap_is_HTTP_REDIRECT(rr_status)) { const char *location = apr_table_get(rr->headers_out, "Location"); if (location) { char *buffer; location = ap_escape_html(rr->pool, location); buffer = apr_pstrcat(ctx->pool, "", location, "", NULL); APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pool_create(buffer, strlen(buffer), ctx->pool, f->c->bucket_alloc)); } } ap_destroy_sub_req(rr); return APR_SUCCESS; } /* This is the special environment used for running the "exec cmd=" * variety of SSI directives. */ static void add_ssi_vars(request_rec *r) { apr_table_t *e = r->subprocess_env; if (r->path_info && r->path_info[0] != '\0') { request_rec *pa_req; apr_table_setn(e, "PATH_INFO", ap_escape_shell_cmd(r->pool, r->path_info)); pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r, NULL); if (pa_req->filename) { apr_table_setn(e, "PATH_TRANSLATED", apr_pstrcat(r->pool, pa_req->filename, pa_req->path_info, NULL)); } ap_destroy_sub_req(pa_req); } if (r->args) { char *arg_copy = apr_pstrdup(r->pool, r->args); apr_table_setn(e, "QUERY_STRING", r->args); ap_unescape_url(arg_copy); apr_table_setn(e, "QUERY_STRING_UNESCAPED", ap_escape_shell_cmd(r->pool, arg_copy)); } } static int include_cmd(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb, char *command) { char **env; int sd; int retval; apr_file_t *tempsock = NULL; request_rec *r = f->r; cgid_server_conf *conf = ap_get_module_config(r->server->module_config, &restartd_module); struct cleanup_script_info *info; add_ssi_vars(r); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } send_req(sd, r, command, env, SSI_REQ); info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; /* for this type of request, the script is invoked through an * intermediate shell process... cleanup_script is only able * to knock out the shell process, not the actual script */ apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. APR will create * a cleanup for the apr_file_t which will close the socket, so we'll * get rid of the cleanup we registered when we created the socket. */ apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool); apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket); APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pipe_create(tempsock, f->c->bucket_alloc)); ctx->flush_now = 1; return APR_SUCCESS; } static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f, apr_bucket_brigade *bb) { char *tag = NULL; char *tag_val = NULL; request_rec *r = f->r; char *file = r->filename; char parsed_string[MAX_STRING_LEN]; if (!ctx->argc) { ap_log_rerror(APLOG_MARK, (ctx->flags & SSI_FLAG_PRINTING) ? APLOG_ERR : APLOG_WARNING, 0, r, "missing argument for exec element in %s", r->filename); } if (!(ctx->flags & SSI_FLAG_PRINTING)) { return APR_SUCCESS; } if (!ctx->argc) { SSI_CREATE_ERROR_BUCKET(ctx, f, bb); return APR_SUCCESS; } if (ctx->flags & SSI_FLAG_NO_EXEC) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "exec used but not allowed " "in %s", r->filename); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); return APR_SUCCESS; } while (1) { cgid_pfn_gtv(ctx, &tag, &tag_val, SSI_VALUE_DECODED); if (!tag || !tag_val) { break; } if (!strcmp(tag, "cmd")) { apr_status_t rv; cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string), SSI_EXPAND_LEAVE_NAME); rv = include_cmd(ctx, f, bb, parsed_string); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "execution failure for parameter \"%s\" " "to tag exec in file %s", tag, r->filename); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } else if (!strcmp(tag, "cgi")) { apr_status_t rv; cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string), SSI_EXPAND_DROP_NAME); rv = include_cgi(ctx, f, bb, parsed_string); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "invalid CGI ref " "\"%s\" in %s", tag_val, file); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } else { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter " "\"%s\" to tag exec in %s", tag, file); SSI_CREATE_ERROR_BUCKET(ctx, f, bb); break; } } return APR_SUCCESS; } /*============================================================================ *============================================================================ * This is the end of the cgi filter code moved from mod_include. *============================================================================ *============================================================================*/ static void register_hook(apr_pool_t *p) { static const char * const aszPre[] = { "mod_include.c", NULL }; static const char * const aszPostHandler[] = { "mod_cgi.c", NULL }; ap_hook_pre_config(cgid_pre_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(cgid_init, aszPre, NULL, APR_HOOK_MIDDLE); ap_hook_handler(cgid_handler, NULL, aszPostHandler, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA restartd_module = { STANDARD20_MODULE_STUFF, create_cgid_dir_config, /* dir config creater */ NULL, /* dir merger --- default is to override */ create_cgid_config, /* server config */ merge_cgid_config, /* merge server config */ cgid_cmds, /* command table */ register_hook /* register_handlers */ }; 389-admin-1.1.35/mod_restartd/mod_restartd.c000066400000000000000000001706351220472121400205430ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ /* * http_script: keeps all script-related ramblings together. * * Compliant to cgi/1.1 spec * * Adapted by rst from original NCSA code by Rob McCool * * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for * custom error responses, and DOCUMENT_ROOT because we found it useful. * It also adds SERVER_ADMIN - useful for scripts to know who to mail when * they fail. */ /* See the mod_restartd README for important information about this file */ #include "apr_lib.h" #include "apr_strings.h" #include "apr_general.h" #include "apr_file_io.h" #include "apr_portable.h" #include "apr_buckets.h" #include "apr_optional.h" #include "apr_signal.h" #define APR_WANT_STRFUNC #include "apr_want.h" #if APR_HAVE_SYS_SOCKET_H #include #endif #if APR_HAVE_UNISTD_H #include #endif #if APR_HAVE_SYS_TYPES_H #include #endif #define CORE_PRIVATE #include "util_filter.h" #include "httpd.h" #include "http_config.h" #include "http_request.h" #include "http_core.h" #include "http_protocol.h" #include "http_main.h" #include "http_log.h" #include "util_script.h" #include "ap_mpm.h" #include "unixd.h" #include "mod_suexec.h" #include "mod_include.h" #include "mod_core.h" /* ### should be tossed in favor of APR */ #include #include /* for sockaddr_un */ module AP_MODULE_DECLARE_DATA restartd_module; static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server); static int handle_exec(include_ctx_t *ctx, apr_bucket_brigade **bb, request_rec *r, ap_filter_t *f, apr_bucket *head_ptr, apr_bucket **inserted_head); static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgid_pfn_reg_with_ssi; static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *cgid_pfn_gtv; static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *cgid_pfn_ps; static apr_pool_t *pcgi; static int total_modules = 0; static pid_t daemon_pid; static int daemon_should_exit = 0; regex_t uriPat; /* Read and discard the data in the brigade produced by a CGI script */ static void discard_script_output(apr_bucket_brigade *bb); /* KLUDGE --- for back-combatibility, we don't have to check ExecCGI * in ScriptAliased directories, which means we need to know if this * request came through ScriptAlias or not... so the Alias module * leaves a note for us. */ static int is_scriptaliased(request_rec *r) { const char *t = apr_table_get(r->notes, "alias-forced-type"); return t && (!strcasecmp(t, "cgi-script")); } /* Configuration stuff */ #define DEFAULT_LOGBYTES 10385760 #define DEFAULT_BUFBYTES 1024 #define DEFAULT_SOCKET DEFAULT_REL_RUNTIMEDIR "/cgisock" #define CGI_REQ 1 #define SSI_REQ 2 #define GETPID_REQ 3 /* get the pid of script created for prior request */ #define ERRFN_USERDATA_KEY "CGIDCHILDERRFN" /* DEFAULT_CGID_LISTENBACKLOG controls the max depth on the unix socket's * pending connection queue. If a bunch of cgi requests arrive at about * the same time, connections from httpd threads/processes will back up * in the queue while the cgid process slowly forks off a child to process * each connection on the unix socket. If the queue is too short, the * httpd process will get ECONNREFUSED when trying to connect. */ #ifndef DEFAULT_CGID_LISTENBACKLOG #define DEFAULT_CGID_LISTENBACKLOG 100 #endif /* DEFAULT_CONNECT_ATTEMPTS controls how many times we'll try to connect * to the cgi daemon from the thread/process handling the cgi request. * Generally we want to retry when we get ECONNREFUSED since it is * probably because the listen queue is full. We need to try harder so * the client doesn't see it as a 503 error. * * Set this to 0 to continually retry until the connect works or Apache * terminates. */ #ifndef DEFAULT_CONNECT_ATTEMPTS #define DEFAULT_CONNECT_ATTEMPTS 15 #endif typedef struct { const char *sockname; const char *logname; long logbytes; int bufbytes; } cgid_server_conf; typedef struct { int retainperms; } cgid_dir_conf; typedef struct { int req_type; /* request type (CGI_REQ, SSI_REQ, etc.) */ unsigned long conn_id; /* connection id; daemon uses this as a hash value * to find the script pid when it is time for that * process to be cleaned up */ int core_module_index; int have_suexec; int suexec_module_index; suexec_config_t suexec_cfg; int env_count; apr_size_t filename_len; apr_size_t argv0_len; apr_size_t uri_len; apr_size_t args_len; apr_size_t mod_userdir_user_len; int loglevel; /* to stuff in server_rec */ } cgid_req_t; /* This routine is called to create the argument list to be passed * to the CGI script. When suexec is enabled, the suexec path, user, and * group are the first three arguments to be passed; if not, all three * must be NULL. The query info is split into separate arguments, where * "+" is the separator between keyword arguments. * * Do not process the args if they containing an '=' assignment. */ static char **create_argv(apr_pool_t *p, char *path, char *user, char *group, char *av0, const char *args) { int x, numwords; char **av; char *w; int idx = 0; if (ap_strchr_c(args, '=')) { numwords = 0; } else { /* count the number of keywords */ for (x = 0, numwords = 1; args[x]; x++) { if (args[x] == '+') { ++numwords; } } } if (numwords > APACHE_ARG_MAX - 5) { numwords = APACHE_ARG_MAX - 5; /* Truncate args to prevent overrun */ } av = (char **) apr_pcalloc(p, (numwords + 5) * sizeof(char *)); if (path) { av[idx++] = path; } if (user) { av[idx++] = user; } if (group) { av[idx++] = group; } av[idx++] = apr_pstrdup(p, av0); for (x = 1; x <= numwords; x++) { w = ap_getword_nulls(p, &args, '+'); if (strcmp(w, "")) { ap_unescape_url(w); av[idx++] = ap_escape_shell_cmd(p, w); } } av[idx] = NULL; return av; } #if APR_HAS_OTHER_CHILD static void cgid_maint(int reason, void *data, apr_wait_t status) { pid_t *sd = data; switch (reason) { case APR_OC_REASON_DEATH: case APR_OC_REASON_RESTART: /* don't do anything; server is stopping or restarting */ apr_proc_other_child_unregister(data); break; case APR_OC_REASON_LOST: /* it would be better to restart just the cgid child * process but for now we'll gracefully restart the entire * server by sending AP_SIG_GRACEFUL to ourself, the httpd * parent process */ kill(getpid(), AP_SIG_GRACEFUL); break; case APR_OC_REASON_UNREGISTER: /* we get here when pcgi is cleaned up; pcgi gets cleaned * up when pconf gets cleaned up */ kill(*sd, SIGHUP); /* send signal to daemon telling it to die */ break; } } #endif /* deal with incomplete reads and signals * assume you really have to read buf_size bytes */ static apr_status_t sock_read(int fd, void *vbuf, size_t buf_size) { char *buf = vbuf; int rc; size_t bytes_read = 0; do { do { rc = read(fd, buf + bytes_read, buf_size - bytes_read); } while (rc < 0 && errno == EINTR); switch(rc) { case -1: return errno; case 0: /* unexpected */ return ECONNRESET; default: bytes_read += rc; } } while (bytes_read < buf_size); return APR_SUCCESS; } /* deal with signals */ static apr_status_t sock_write(int fd, const void *buf, size_t buf_size) { int rc; do { rc = write(fd, buf, buf_size); } while (rc < 0 && errno == EINTR); if (rc < 0) { return errno; } return APR_SUCCESS; } static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env, cgid_req_t *req) { int i; char *user; char **environ; core_dir_config *temp_core; void **dconf; apr_status_t stat; r->server = apr_pcalloc(r->pool, sizeof(server_rec)); /* read the request header */ stat = sock_read(fd, req, sizeof(*req)); if (stat != APR_SUCCESS) { return stat; } r->server->loglevel = req->loglevel; if (req->req_type == GETPID_REQ) { /* no more data sent for this request */ return APR_SUCCESS; } /* handle module indexes and such */ dconf = (void **) apr_pcalloc(r->pool, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT)); temp_core = (core_dir_config *)apr_palloc(r->pool, sizeof(core_module)); dconf[req->core_module_index] = (void *)temp_core; if (req->have_suexec) { dconf[req->suexec_module_index] = &req->suexec_cfg; } r->per_dir_config = (ap_conf_vector_t *)dconf; /* Read the filename, argv0, uri, and args */ r->filename = apr_pcalloc(r->pool, req->filename_len + 1); *argv0 = apr_pcalloc(r->pool, req->argv0_len + 1); r->uri = apr_pcalloc(r->pool, req->uri_len + 1); if ((stat = sock_read(fd, r->filename, req->filename_len)) != APR_SUCCESS || (stat = sock_read(fd, *argv0, req->argv0_len)) != APR_SUCCESS || (stat = sock_read(fd, r->uri, req->uri_len)) != APR_SUCCESS) { return stat; } r->args = apr_pcalloc(r->pool, req->args_len + 1); /* empty string if no args */ if (req->args_len) { if ((stat = sock_read(fd, r->args, req->args_len)) != APR_SUCCESS) { return stat; } } /* read the environment variables */ environ = apr_pcalloc(r->pool, (req->env_count + 2) *sizeof(char *)); for (i = 0; i < req->env_count; i++) { apr_size_t curlen; if ((stat = sock_read(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } environ[i] = apr_pcalloc(r->pool, curlen + 1); if ((stat = sock_read(fd, environ[i], curlen)) != APR_SUCCESS) { return stat; } } *env = environ; /* basic notes table to avoid segfaults */ r->notes = apr_table_make(r->pool, 1); /* mod_userdir requires the mod_userdir_user note */ if (req->mod_userdir_user_len) { user = apr_pcalloc(r->pool, req->mod_userdir_user_len + 1); /* last byte is '\0' */ stat = sock_read(fd, user, req->mod_userdir_user_len); if (stat != APR_SUCCESS) { return stat; } apr_table_set(r->notes, "mod_userdir_user", (const char *)user); } #if 0 #ifdef RLIMIT_CPU sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_cpu = (struct rlimit *)apr_palloc (sizeof(struct rlimit)); sock_read(fd, temp_core->limit_cpu, sizeof(struct rlimit)); } else { temp_core->limit_cpu = NULL; } #endif #if defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_mem = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_mem, sizeof(struct rlimit)); } else { temp_core->limit_mem = NULL; } #endif #ifdef RLIMIT_NPROC sock_read(fd, &j, sizeof(int)); if (j) { temp_core->limit_nproc = (struct rlimit *)apr_palloc(r->pool, sizeof(struct rlimit)); sock_read(fd, temp_core->limit_nproc, sizeof(struct rlimit)); } else { temp_core->limit_nproc = NULL; } #endif #endif return APR_SUCCESS; } static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, int req_type) { int i; const char *user; module *suexec_mod = ap_find_linked_module("mod_suexec.c"); cgid_req_t req = {0}; suexec_config_t *suexec_cfg; apr_status_t stat; req.req_type = req_type; req.conn_id = r->connection->id; req.core_module_index = core_module.module_index; if (suexec_mod) { req.have_suexec = 1; req.suexec_module_index = suexec_mod->module_index; suexec_cfg = ap_get_module_config(r->per_dir_config, suexec_mod); req.suexec_cfg = *suexec_cfg; } for (req.env_count = 0; env[req.env_count]; req.env_count++) { continue; } req.filename_len = strlen(r->filename); req.argv0_len = strlen(argv0); req.uri_len = strlen(r->uri); req.args_len = r->args ? strlen(r->args) : 0; user = (const char *)apr_table_get(r->notes, "mod_userdir_user"); if (user != NULL) { req.mod_userdir_user_len = strlen(user); } req.loglevel = r->server->loglevel; /* Write the request header */ if ((stat = sock_write(fd, &req, sizeof(req))) != APR_SUCCESS) { return stat; } /* Write filename, argv0, uri, and args */ if ((stat = sock_write(fd, r->filename, req.filename_len)) != APR_SUCCESS || (stat = sock_write(fd, argv0, req.argv0_len)) != APR_SUCCESS || (stat = sock_write(fd, r->uri, req.uri_len)) != APR_SUCCESS) { return stat; } if (req.args_len) { if ((stat = sock_write(fd, r->args, req.args_len)) != APR_SUCCESS) { return stat; } } /* write the environment variables */ for (i = 0; i < req.env_count; i++) { apr_size_t curlen = strlen(env[i]); if ((stat = sock_write(fd, &curlen, sizeof(curlen))) != APR_SUCCESS) { return stat; } if ((stat = sock_write(fd, env[i], curlen)) != APR_SUCCESS) { return stat; } } /* send a minimal notes table */ if (user) { if ((stat = sock_write(fd, user, req.mod_userdir_user_len)) != APR_SUCCESS) { return stat; } } #if 0 #ifdef RLIMIT_CPU if (conf->limit_cpu) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_cpu, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) if (conf->limit_mem) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_mem, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #ifdef RLIMIT_NPROC if (conf->limit_nproc) { len = 1; stat = sock_write(fd, &len, sizeof(int)); stat = sock_write(fd, conf->limit_nproc, sizeof(struct rlimit)); } else { len = 0; stat = sock_write(fd, &len, sizeof(int)); } #endif #endif return APR_SUCCESS; } static void daemon_signal_handler(int sig) { if (sig == SIGHUP) { ++daemon_should_exit; } } static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err, const char *description) { request_rec *r; void *vr; apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool); r = vr; /* sure we got r, but don't call ap_log_rerror() because we don't * have r->headers_in and possibly other storage referenced by * ap_log_rerror() */ ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description); } static int cgid_server(void *data) { struct sockaddr_un unix_addr; int sd, sd2, rc; mode_t omask; apr_socklen_t len; apr_pool_t *ptrans; server_rec *main_server = data; cgid_server_conf *sconf = ap_get_module_config(main_server->module_config, &restartd_module); apr_hash_t *script_hash = apr_hash_make(pcgi); apr_pool_create(&ptrans, pcgi); apr_signal(SIGCHLD, SIG_IGN); apr_signal(SIGHUP, daemon_signal_handler); if (unlink(sconf->sockname) < 0 && errno != ENOENT) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't unlink unix domain socket %s", sconf->sockname); /* just a warning; don't bail out */ } if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't create unix domain socket"); return errno; } memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; strcpy(unix_addr.sun_path, sconf->sockname); omask = umask(0077); /* so that only Apache can use socket */ rc = bind(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)); umask(omask); /* can't fail, so can't clobber errno */ if (rc < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't bind unix domain socket %s", sconf->sockname); return errno; } if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't listen on unix domain socket"); return errno; } if (!geteuid()) { if (chown(sconf->sockname, unixd_config.user_id, -1) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "Couldn't change owner of unix domain socket %s", sconf->sockname); return errno; } } #if 0 unixd_setup_child(); /* if running as root, switch to configured user/group */ #endif while (!daemon_should_exit) { int errfileno = STDERR_FILENO; char *argv0; char **env; const char * const *argv; apr_int32_t in_pipe; apr_int32_t out_pipe; apr_int32_t err_pipe; apr_cmdtype_e cmd_type; request_rec *r; apr_procattr_t *procattr = NULL; apr_proc_t *procnew = NULL; apr_file_t *inout; cgid_req_t cgid_req; apr_status_t stat; apr_pool_clear(ptrans); len = sizeof(unix_addr); sd2 = accept(sd, (struct sockaddr *)&unix_addr, &len); if (sd2 < 0) { if (errno != EINTR) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, (server_rec *)data, "Error accepting on cgid socket"); } continue; } r = apr_pcalloc(ptrans, sizeof(request_rec)); procnew = apr_pcalloc(ptrans, sizeof(*procnew)); r->pool = ptrans; stat = get_req(sd2, r, &argv0, &env, &cgid_req); if (stat != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, stat, main_server, "Error reading request on cgid socket"); close(sd2); continue; } if (cgid_req.req_type == GETPID_REQ) { pid_t pid; pid = (pid_t)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id)); if (write(sd2, &pid, sizeof(pid)) != sizeof(pid)) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, "Error writing pid %" APR_PID_T_FMT " to handler", pid); } close(sd2); continue; } apr_os_file_put(&r->server->error_log, &errfileno, 0, r->pool); apr_os_file_put(&inout, &sd2, 0, r->pool); if (cgid_req.req_type == SSI_REQ) { in_pipe = APR_NO_PIPE; out_pipe = APR_FULL_BLOCK; err_pipe = APR_NO_PIPE; cmd_type = APR_SHELLCMD; } else { in_pipe = APR_CHILD_BLOCK; out_pipe = APR_CHILD_BLOCK; err_pipe = APR_CHILD_BLOCK; cmd_type = APR_PROGRAM; } if (((rc = apr_procattr_create(&procattr, ptrans)) != APR_SUCCESS) || ((cgid_req.req_type == CGI_REQ) && (((rc = apr_procattr_io_set(procattr, in_pipe, out_pipe, err_pipe)) != APR_SUCCESS) || /* XXX apr_procattr_child_*_set() is creating an unnecessary * pipe between this process and the child being created... * It is cleaned up with the temporary pool for this request. */ ((rc = apr_procattr_child_err_set(procattr, r->server->error_log, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_child_in_set(procattr, inout, NULL)) != APR_SUCCESS))) || ((rc = apr_procattr_child_out_set(procattr, inout, NULL)) != APR_SUCCESS) || ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { /* Something bad happened, tell the world. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't set child process attributes: %s", r->filename); } else { apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans); argv = (const char * const *)create_argv(r->pool, NULL, NULL, NULL, argv0, r->args); /* We want to close sd2 for the new CGI process too. * If it is left open it'll make ap_pass_brigade() block * waiting for EOF if CGI forked something running long. * close(sd2) here should be okay, as CGI channel * is already dup()ed by apr_procattr_child_{in,out}_set() * above. */ close(sd2); rc = ap_os_create_privileged_process(r, procnew, argv0, argv, (const char * const *)env, procattr, ptrans); if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. * ap_log_rerror() won't work because the header table used by * ap_log_rerror() hasn't been replicated in the phony r */ ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, "couldn't create child process: %d: %s", rc, apr_filename_of_pathname(r->filename)); } else { apr_hash_set(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id), (void *)procnew->pid); } } } return -1; } static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *main_server) { apr_proc_t *procnew; void *data; int first_time = 0; const char *userdata_key = "cgid_init"; module **m; apr_pool_userdata_get(&data, userdata_key, main_server->process->pool); if (!data) { first_time = 1; apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, main_server->process->pool); } if (!first_time) { total_modules = 0; for (m = ap_preloaded_modules; *m != NULL; m++) total_modules++; daemon_should_exit = 0; /* clear setting from previous generation */ if ((daemon_pid = fork()) < 0) { ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, "mod_cgid: Couldn't spawn cgid daemon process"); return DECLINED; } else if (daemon_pid == 0) { apr_pool_create(&pcgi, p); cgid_server(main_server); exit(-1); } procnew = apr_pcalloc(p, sizeof(*procnew)); procnew->pid = daemon_pid; procnew->err = procnew->in = procnew->out = NULL; apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT); #if APR_HAS_OTHER_CHILD apr_proc_other_child_register(procnew, cgid_maint, &procnew->pid, NULL, p); #endif cgid_pfn_reg_with_ssi = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler); cgid_pfn_gtv = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_get_tag_and_value); cgid_pfn_ps = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_parse_string); if ((cgid_pfn_reg_with_ssi) && (cgid_pfn_gtv) && (cgid_pfn_ps)) { /* Required by mod_include filter. This is how mod_cgid registers * with mod_include to provide processing of the exec directive. */ cgid_pfn_reg_with_ssi("exec", handle_exec); } } regcomp(&uriPat, "/.*/tasks/operation/(start|restart|stop|startconfigds|create|remove)$", REG_EXTENDED|REG_NOSUB|REG_ICASE); return OK; } static void *create_cgid_config(apr_pool_t *p, server_rec *s) { cgid_server_conf *c = (cgid_server_conf *) apr_pcalloc(p, sizeof(cgid_server_conf)); c->logname = NULL; c->logbytes = DEFAULT_LOGBYTES; c->bufbytes = DEFAULT_BUFBYTES; c->sockname = ap_server_root_relative(p, DEFAULT_SOCKET); return c; } static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv) { cgid_server_conf *base = (cgid_server_conf *) basev, *overrides = (cgid_server_conf *) overridesv; return overrides->logname ? overrides : base; } static void *create_cgid_dir_config(apr_pool_t *p, char *d) { cgid_dir_conf * c = (cgid_dir_conf *)apr_pcalloc(p, sizeof(cgid_dir_conf)); c->retainperms = 0; return (void *) c; } static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logname = ap_server_root_relative(cmd->pool, arg); if (!conf->logname) { return apr_pstrcat(cmd->pool, "Invalid ScriptLog path ", arg, NULL); } return NULL; } static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->logbytes = atol(arg); return NULL; } static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->bufbytes = atoi(arg); return NULL; } static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = ap_get_module_config(s->module_config, &restartd_module); conf->sockname = ap_server_root_relative(cmd->pool, arg); if (!conf->sockname) { return apr_pstrcat(cmd->pool, "Invalid Scriptsock path ", arg, NULL); } return NULL; } static const char *set_retainperms(cmd_parms *cmd, void *dconf, int arg) { cgid_dir_conf *c = (cgid_dir_conf *) dconf; c->retainperms = arg; return NULL; } static const command_rec cgid_cmds[] = { AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF, "the name of a log for script debugging info"), AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, "the maximum length (in bytes) of the script debug log"), AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, "the maximum size (in bytes) to record of a POST request"), AP_INIT_TAKE1("Scriptsock", set_script_socket, NULL, RSRC_CONF, "the name of the socket to use for communication with " "the cgi daemon."), AP_INIT_FLAG("RetainPerms", set_retainperms, NULL, OR_AUTHCFG, "Don't drop permissions when running the CGI."), {NULL} }; static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret, apr_status_t rv, char *error) { apr_file_t *f = NULL; struct stat finfo; char time_str[APR_CTIME_LEN]; int log_flags = rv ? APLOG_ERR : APLOG_ERR; ap_log_rerror(APLOG_MARK, log_flags, rv, r, "%s: %s", error, r->filename); /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_printf(f, "%%error\n%s\n", error); apr_file_close(f); return ret; } static int log_script(request_rec *r, cgid_server_conf * conf, int ret, char *dbuf, const char *sbuf, apr_bucket_brigade *bb, apr_file_t *script_err) { const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in); const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts; char argsbuffer[HUGE_STRING_LEN]; apr_file_t *f = NULL; apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; int first; int i; struct stat finfo; char time_str[APR_CTIME_LEN]; /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || ((stat(conf->logname, &finfo) == 0) && (finfo.st_size > conf->logbytes)) || (apr_file_open(&f, conf->logname, APR_APPEND|APR_WRITE|APR_CREATE, APR_OS_DEFAULT, r->pool) != APR_SUCCESS)) { /* Soak up script output */ discard_script_output(bb); if (script_err) { while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) continue; } return ret; } /* "%% [Wed Jun 19 10:53:21 1996] GET /cgid-bin/printenv HTTP/1.0" */ apr_ctime(time_str, apr_time_now()); apr_file_printf(f, "%%%% [%s] %s %s%s%s %s\n", time_str, r->method, r->uri, r->args ? "?" : "", r->args ? r->args : "", r->protocol); /* "%% 500 /usr/local/apache/cgid-bin" */ apr_file_printf(f, "%%%% %d %s\n", ret, r->filename); apr_file_puts("%request\n", f); for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if ((r->method_number == M_POST || r->method_number == M_PUT) && *dbuf) { apr_file_printf(f, "\n%s\n", dbuf); } apr_file_puts("%response\n", f); hdrs_arr = apr_table_elts(r->err_headers_out); hdrs = (const apr_table_entry_t *) hdrs_arr->elts; for (i = 0; i < hdrs_arr->nelts; ++i) { if (!hdrs[i].key) continue; apr_file_printf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val); } if (sbuf && *sbuf) apr_file_printf(f, "%s\n", sbuf); first = 1; APR_BRIGADE_FOREACH(e, bb) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (!APR_STATUS_IS_SUCCESS(rv) || (len == 0)) { break; } if (first) { apr_file_puts("%stdout\n", f); first = 0; } apr_file_write(f, buf, &len); apr_file_puts("\n", f); } if (script_err) { if (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) { apr_file_puts("%stderr\n", f); apr_file_puts(argsbuffer, f); while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err) == APR_SUCCESS) apr_file_puts(argsbuffer, f); apr_file_puts("\n", f); } } if (script_err) { apr_file_close(script_err); } apr_file_close(f); return ret; } static apr_status_t close_unix_socket(void *thefd) { int fd = (int)thefd; return close(fd); } static int connect_to_daemon(int *sdptr, request_rec *r, cgid_server_conf *conf) { struct sockaddr_un unix_addr; int sd; int connect_tries; apr_interval_time_t sliding_timer; memset(&unix_addr, 0, sizeof(unix_addr)); unix_addr.sun_family = AF_UNIX; strcpy(unix_addr.sun_path, conf->sockname); connect_tries = 0; sliding_timer = 100000; /* 100 milliseconds */ while (1) { ++connect_tries; if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno, "unable to create socket to cgi daemon"); } if (connect(sd, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) { if (errno == ECONNREFUSED && connect_tries < DEFAULT_CONNECT_ATTEMPTS) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r, "connect #%d to cgi daemon failed, sleeping before retry", connect_tries); close(sd); apr_sleep(sliding_timer); if (sliding_timer < apr_time_from_sec(2)) { sliding_timer *= 2; } } else { close(sd); return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "unable to connect to cgi daemon after multiple tries"); } } else { apr_pool_cleanup_register(r->pool, (void *)sd, close_unix_socket, apr_pool_cleanup_null); break; /* we got connected! */ } /* gotta try again, but make sure the cgid daemon is still around */ if (kill(daemon_pid, 0) != 0) { return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, "cgid daemon is gone; is Apache terminating?"); } } *sdptr = sd; return OK; } static void discard_script_output(apr_bucket_brigade *bb) { apr_bucket *e; const char *buf; apr_size_t len; apr_status_t rv; APR_BRIGADE_FOREACH(e, bb) { if (APR_BUCKET_IS_EOS(e)) { break; } rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ); if (!APR_STATUS_IS_SUCCESS(rv)) { break; } } } /**************************************************************** * * Actual cgid handling... */ struct cleanup_script_info { request_rec *r; unsigned long conn_id; cgid_server_conf *conf; }; static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait) { apr_interval_time_t interval = 10000; /* 10 ms */ apr_interval_time_t total = 0; do { if (kill(pid, 0) < 0) { return APR_SUCCESS; } apr_sleep(interval); total = total + interval; if (interval < 500000) { interval *= 2; } } while (total < max_wait); return APR_EGENERAL; } static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid) { kill(pid, SIGTERM); /* in case it isn't dead yet */ if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL", pid); kill(pid, SIGKILL); if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) { return APR_SUCCESS; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL again", pid); kill(pid, SIGKILL); return APR_EGENERAL; } static apr_status_t cleanup_script(void *vptr) { struct cleanup_script_info *info = vptr; int sd; int rc; cgid_req_t req = {0}; pid_t pid; apr_status_t stat; rc = connect_to_daemon(&sd, info->r, info->conf); if (rc != OK) { return APR_EGENERAL; } req.req_type = GETPID_REQ; req.conn_id = info->r->connection->id; stat = sock_write(sd, &req, sizeof(req)); if (stat != APR_SUCCESS) { close(sd); return stat; } /* wait for pid of script */ stat = sock_read(sd, &pid, sizeof(pid)); if (stat != APR_SUCCESS) { close(sd); return stat; } close(sd); if (pid == 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r, "daemon couldn't find CGI process for connection %lu", info->conn_id); return APR_EGENERAL; } return cleanup_nonchild_process(info->r, pid); } static int cgid_handler(request_rec *r) { conn_rec *c = r->connection; int retval, nph, dbpos = 0; char *argv0, *dbuf = NULL; apr_bucket_brigade *bb; apr_bucket *b; cgid_server_conf *conf; int is_included; int seen_eos, child_stopped_reading; int sd; char **env; apr_file_t *tempsock; struct cleanup_script_info *info; apr_status_t rv; cgid_dir_conf *mc = (cgid_dir_conf *)ap_get_module_config(r->per_dir_config, &restartd_module); if (strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script")) return DECLINED; if (r->method_number == M_OPTIONS) { /* 99 out of 100 cgid scripts, this is all they support */ r->allowed |= (AP_METHOD_BIT << M_GET); r->allowed |= (AP_METHOD_BIT << M_POST); return DECLINED; } /* It is a CGI but we shouldn't handle it, let mod_cgi do it */ if (!mc->retainperms) return DECLINED; /* One final check. We only want to run Start/Stop/Restart */ if ((regexec(&uriPat, r->uri, 0, NULL,0) != 0)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_restartd: attempt to run unknown program at %s. Bailing out.", r->uri); return DECLINED; } conf = ap_get_module_config(r->server->module_config, &restartd_module); is_included = !strcmp(r->protocol, "INCLUDED"); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; nph = !(strncmp(argv0, "nph-", 4)); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "Options ExecCGI is off in this directory"); if (nph && is_included) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to include NPH CGI script"); #if defined(OS2) || defined(WIN32) #error mod_cgid does not work on this platform. If you teach it to, look #error at mod_cgi.c for required code in this path. #else if (r->finfo.filetype == 0) return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "script not found or unable to stat"); #endif if (r->finfo.filetype == APR_DIR) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "attempt to invoke directory as script"); if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) && r->path_info && *r->path_info) { /* default to accept */ return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, "AcceptPathInfo off disallows user's path"); } /* if (!ap_suexec_enabled) { if (!ap_can_exec(&r->finfo)) return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, "file permissions deny server execution"); } */ ap_add_common_vars(r); ap_add_cgi_vars(r); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } rv = send_req(sd, r, argv0, env, CGI_REQ); if (rv != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "write to cgi daemon process"); } info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. * Note that this does not register a cleanup for the socket. We did * that explicitly right after we created the socket. */ apr_os_pipe_put(&tempsock, &sd, r->pool); if ((argv0 = strrchr(r->filename, '/')) != NULL) argv0++; else argv0 = r->filename; /* Transfer any put/post args, CERN style... * Note that we already ignore SIGPIPE in the core server. */ bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); seen_eos = 0; child_stopped_reading = 0; if (conf->logname) { dbuf = apr_palloc(r->pool, conf->bufbytes + 1); dbpos = 0; } do { apr_bucket *bucket; rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, HUGE_STRING_LEN); if (rv != APR_SUCCESS) { return rv; } APR_BRIGADE_FOREACH(bucket, bb) { const char *data; apr_size_t len; if (APR_BUCKET_IS_EOS(bucket)) { seen_eos = 1; break; } /* We can't do much with this. */ if (APR_BUCKET_IS_FLUSH(bucket)) { continue; } /* If the child stopped, we still must read to EOS. */ if (child_stopped_reading) { continue; } /* read */ apr_bucket_read(bucket, &data, &len, APR_BLOCK_READ); if (conf->logname && dbpos < conf->bufbytes) { int cursize; if ((dbpos + len) > conf->bufbytes) { cursize = conf->bufbytes - dbpos; } else { cursize = len; } memcpy(dbuf + dbpos, data, cursize); dbpos += cursize; } /* Keep writing data to the child until done or too much time * elapses with no progress or an error occurs. */ rv = apr_file_write_full(tempsock, data, len, NULL); if (rv != APR_SUCCESS) { /* silly script stopped reading, soak up remaining message */ child_stopped_reading = 1; } } apr_brigade_cleanup(bb); } while (!seen_eos); if (conf->logname) { dbuf[dbpos] = '\0'; } /* we're done writing, or maybe we didn't write at all; * force EOF on child's stdin so that the cgi detects end (or * absence) of data */ shutdown(sd, 1); /* Handle script return... */ if (!nph) { const char *location; char sbuf[MAX_STRING_LEN]; int ret; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); if ((ret = ap_scan_script_header_err_brigade(r, bb, sbuf))) { return log_script(r, conf, ret, dbuf, sbuf, bb, NULL); } location = apr_table_get(r->headers_out, "Location"); if (location && location[0] == '/' && r->status == 200) { /* Soak up all the script output */ discard_script_output(bb); apr_brigade_destroy(bb); /* This redirect needs to be a GET no matter what the original * method was. */ r->method = apr_pstrdup(r->pool, "GET"); r->method_number = M_GET; /* We already read the message body (if any), so don't allow * the redirected request to think it has one. We can ignore * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR. */ apr_table_unset(r->headers_in, "Content-Length"); ap_internal_redirect_handler(location, r); return OK; } else if (location && r->status == 200) { /* XX Note that if a script wants to produce its own Redirect * body, it now has to explicitly *say* "Status: 302" */ discard_script_output(bb); apr_brigade_destroy(bb); return HTTP_MOVED_TEMPORARILY; } /* Passing our socket down the filter chain in a pipe bucket * gives up the responsibility of closing the socket, so * get rid of the cleanup. */ apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket); ap_pass_brigade(r->output_filters, bb); } if (nph) { struct ap_filter_t *cur; /* Passing our socket down the filter chain in a pipe bucket * gives up the responsibility of closing the socket, so * get rid of the cleanup. */ apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket); /* get rid of all filters up through protocol... since we * haven't parsed off the headers, there is no way they can * work */ cur = r->proto_output_filters; while (cur && cur->frec->ftype < AP_FTYPE_CONNECTION) { cur = cur->next; } r->output_filters = r->proto_output_filters = cur; bb = apr_brigade_create(r->pool, c->bucket_alloc); b = apr_bucket_pipe_create(tempsock, c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(c->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); ap_pass_brigade(r->output_filters, bb); } return OK; /* NOT r->status, even if it has changed. */ } /*============================================================================ *============================================================================ * This is the beginning of the cgi filter code moved from mod_include. This * is the code required to handle the "exec" SSI directive. *============================================================================ *============================================================================*/ static int include_cgi(char *s, request_rec *r, ap_filter_t *next, apr_bucket *head_ptr, apr_bucket **inserted_head) { request_rec *rr = ap_sub_req_lookup_uri(s, r, next); int rr_status; apr_bucket *tmp_buck, *tmp2_buck; if (rr->status != HTTP_OK) { ap_destroy_sub_req(rr); return -1; } /* No hardwired path info or query allowed */ if ((rr->path_info && rr->path_info[0]) || rr->args) { ap_destroy_sub_req(rr); return -1; } if (rr->finfo.filetype != APR_REG) { ap_destroy_sub_req(rr); return -1; } /* Script gets parameters of the *document*, for back compatibility */ rr->path_info = r->path_info; /* hard to get right; see mod_cgi.c */ rr->args = r->args; /* Force sub_req to be treated as a CGI request, even if ordinary * typing rules would have called it something else. */ ap_set_content_type(rr, CGI_MAGIC_TYPE); /* Run it. */ rr_status = ap_run_sub_req(rr); if (ap_is_HTTP_REDIRECT(rr_status)) { apr_size_t len_loc; const char *location = apr_table_get(rr->headers_out, "Location"); conn_rec *c = r->connection; location = ap_escape_html(rr->pool, location); len_loc = strlen(location); /* XXX: if most of this stuff is going to get copied anyway, * it'd be more efficient to pstrcat it into a single pool buffer * and a single pool bucket */ tmp_buck = apr_bucket_immortal_create("bucket_alloc); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, NULL, c->bucket_alloc); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); tmp2_buck = apr_bucket_immortal_create("\">", sizeof("\">") - 1, c->bucket_alloc); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); tmp2_buck = apr_bucket_heap_create(location, len_loc, NULL, c->bucket_alloc); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); tmp2_buck = apr_bucket_immortal_create("", sizeof("") - 1, c->bucket_alloc); APR_BUCKET_INSERT_BEFORE(head_ptr, tmp2_buck); if (*inserted_head == NULL) { *inserted_head = tmp_buck; } } ap_destroy_sub_req(rr); return 0; } /* This is the special environment used for running the "exec cmd=" * variety of SSI directives. */ static void add_ssi_vars(request_rec *r, ap_filter_t *next) { apr_table_t *e = r->subprocess_env; if (r->path_info && r->path_info[0] != '\0') { request_rec *pa_req; apr_table_setn(e, "PATH_INFO", ap_escape_shell_cmd(r->pool, r->path_info)); pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r, NULL); if (pa_req->filename) { apr_table_setn(e, "PATH_TRANSLATED", apr_pstrcat(r->pool, pa_req->filename, pa_req->path_info, NULL)); } ap_destroy_sub_req(pa_req); } if (r->args) { char *arg_copy = apr_pstrdup(r->pool, r->args); apr_table_setn(e, "QUERY_STRING", r->args); ap_unescape_url(arg_copy); apr_table_setn(e, "QUERY_STRING_UNESCAPED", ap_escape_shell_cmd(r->pool, arg_copy)); } } static int include_cmd(include_ctx_t *ctx, apr_bucket_brigade **bb, char *command, request_rec *r, ap_filter_t *f) { char **env; const char *location; int sd; apr_status_t rc = APR_SUCCESS; int retval; apr_bucket_brigade *bcgi; apr_bucket *b; apr_file_t *tempsock = NULL; cgid_server_conf *conf = ap_get_module_config(r->server->module_config, &restartd_module); struct cleanup_script_info *info; add_ssi_vars(r, f->next); env = ap_create_environment(r->pool, r->subprocess_env); if ((retval = connect_to_daemon(&sd, r, conf)) != OK) { return retval; } SPLIT_AND_PASS_PRETAG_BUCKETS(*bb, ctx, f->next, rc); if (rc != APR_SUCCESS) { return rc; } send_req(sd, r, command, env, SSI_REQ); info = apr_palloc(r->pool, sizeof(struct cleanup_script_info)); info->r = r; info->conn_id = r->connection->id; info->conf = conf; /* for this type of request, the script is invoked through an * intermediate shell process... cleanup_script is only able * to knock out the shell process, not the actual script */ apr_pool_cleanup_register(r->pool, info, cleanup_script, apr_pool_cleanup_null); /* We are putting the socket discriptor into an apr_file_t so that we can * use a pipe bucket to send the data to the client. * Note that this does not register a cleanup for the socket. We did * that explicitly right after we created the socket. */ apr_os_pipe_put(&tempsock, &sd, r->pool); if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) return retval; location = apr_table_get(r->headers_out, "Location"); if (location && location[0] == '/' && r->status == 200) { char argsbuffer[HUGE_STRING_LEN]; /* Soak up all the script output */ while (apr_file_gets(argsbuffer, HUGE_STRING_LEN, tempsock) == APR_SUCCESS) { continue; } /* This redirect needs to be a GET no matter what the original * method was. */ r->method = apr_pstrdup(r->pool, "GET"); r->method_number = M_GET; /* We already read the message body (if any), so don't allow * the redirected request to think it has one. We can ignore * Transfer-Encoding, since we used REQUEST_CHUNKED_ERROR. */ apr_table_unset(r->headers_in, "Content-Length"); ap_internal_redirect_handler(location, r); return OK; } else if (location && r->status == 200) { /* XX Note that if a script wants to produce its own Redirect * body, it now has to explicitly *say* "Status: 302" */ return HTTP_MOVED_TEMPORARILY; } if (!r->header_only) { /* Passing our socket down the filter chain in a pipe bucket * gives up the responsibility of closing the socket, so * get rid of the cleanup. */ apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket); bcgi = apr_brigade_create(r->pool, r->connection->bucket_alloc); b = apr_bucket_pipe_create(tempsock, r->connection->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bcgi, b); ap_pass_brigade(f->next, bcgi); } return 0; } static int handle_exec(include_ctx_t *ctx, apr_bucket_brigade **bb, request_rec *r, ap_filter_t *f, apr_bucket *head_ptr, apr_bucket **inserted_head) { char *tag = NULL; char *tag_val = NULL; char *file = r->filename; apr_bucket *tmp_buck; char parsed_string[MAX_STRING_LEN]; *inserted_head = NULL; if (ctx->flags & FLAG_PRINTING) { if (ctx->flags & FLAG_NO_EXEC) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "exec used but not allowed in %s", r->filename); CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); } else { while (1) { cgid_pfn_gtv(ctx, &tag, &tag_val, 1); if (tag_val == NULL) { if (tag == NULL) { return (0); } else { return 1; } } if (!strcmp(tag, "cmd")) { cgid_pfn_ps(r, ctx, tag_val, parsed_string, sizeof(parsed_string), 1); if (include_cmd(ctx, bb, parsed_string, r, f) == -1) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "execution failure for parameter \"%s\" " "to tag exec in file %s", tag, r->filename); CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); } /* just in case some stooge changed directories */ } else if (!strcmp(tag, "cgi")) { apr_status_t retval = APR_SUCCESS; cgid_pfn_ps(r, ctx, tag_val, parsed_string, sizeof(parsed_string), 0); SPLIT_AND_PASS_PRETAG_BUCKETS(*bb, ctx, f->next, retval); if (retval != APR_SUCCESS) { return retval; } if (include_cgi(parsed_string, r, f->next, head_ptr, inserted_head) == -1) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "invalid CGI ref \"%s\" in %s", tag_val, file); CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); } } else { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter \"%s\" to tag exec in %s", tag, file); CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); } } } } return 0; } /*============================================================================ *============================================================================ * This is the end of the cgi filter code moved from mod_include. *============================================================================ *============================================================================*/ static void register_hook(apr_pool_t *p) { static const char * const aszPre[] = { "mod_include.c", NULL }; static const char * const aszPostHandler[] = { "mod_cgi.c", NULL }; ap_hook_post_config(cgid_init, aszPre, NULL, APR_HOOK_MIDDLE); ap_hook_handler(cgid_handler, NULL, aszPostHandler, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA restartd_module = { STANDARD20_MODULE_STUFF, create_cgid_dir_config, /* dir config creater */ NULL, /* dir merger --- default is to override */ create_cgid_config, /* server config */ merge_cgid_config, /* merge server config */ cgid_cmds, /* command table */ register_hook /* register_handlers */ }; 389-admin-1.1.35/mod_restartd/mod_suexec-2.2.h000066400000000000000000000061031220472121400204770ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ /** * @file mod_suexec.h * @brief SuExec Extension Module for Apache * * @defgroup MOD_SUEXEC mod_suexec * @ingroup APACHE_MODS * @{ */ #include "unixd.h" typedef struct { ap_unix_identity_t ugid; int active; } suexec_config_t; /** @}*/ 389-admin-1.1.35/mod_restartd/mod_suexec.h000066400000000000000000000056471220472121400202140ustar00rootroot00000000000000/* BEGIN COPYRIGHT BLOCK * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * * END COPYRIGHT BLOCK */ #include "unixd.h" typedef struct { ap_unix_identity_t ugid; int active; } suexec_config_t; 389-admin-1.1.35/pkg/000077500000000000000000000000001220472121400137665ustar00rootroot00000000000000389-admin-1.1.35/pkg/389-admin.spec000066400000000000000000000220141220472121400162520ustar00rootroot00000000000000%define pkgname dirsrv Summary: 389 Administration Server (admin) Name: 389-admin Version: 1.1.8 Release: 2%{?dist} License: GPLv2 and ASL 2.0 URL: http://port389.org/ Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: fedora-ds-admin = %{version}-%{release} Obsoletes: fedora-ds-admin < 1.1.8-1 BuildRequires: nspr-devel BuildRequires: nss-devel BuildRequires: svrcore-devel BuildRequires: mozldap-devel BuildRequires: cyrus-sasl-devel BuildRequires: icu BuildRequires: libicu-devel BuildRequires: httpd-devel BuildRequires: apr-devel BuildRequires: mod_nss BuildRequires: 389-adminutil-devel Requires: 389-ds-base Requires: mod_nss # the following are needed for some of our scripts Requires: perl-Mozilla-LDAP Requires: nss-tools # for the init script Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service Source0: http://port389.org/sources/%{name}-%{version}.tar.bz2 # 389-admin-git.sh should be used to generate the source tarball from git Source1: %{name}-git.sh %description 389 Administration Server is an HTTP agent that provides management features for 389 Directory Server. It provides some management web apps that can be used through a web browser. It provides the authentication, access control, and CGI utilities used by the console. %prep %setup -q -n %{name}-%{version} %build %configure --disable-rpath # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS %ifarch x86_64 ppc64 ia64 s390x sparc64 export USE_64=1 %endif make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR="$RPM_BUILD_ROOT" install # make console jars directory mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/html/java #remove libtool and static libs rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.so rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/modules/*.la %clean rm -rf $RPM_BUILD_ROOT %pre # save permission info in temp file # if upgrading if [ "$1" -gt 1 ] ; then set -x mydt=`date +%Y%m%d` mytmpfile=${TMPDIR:-/tmp}/$mydt.$PPID perm1=`stat --format=%%a %{_sysconfdir}/%{pkgname}/admin-serv 2> /dev/null` if [ -z "$perm1" ] ; then perm1=0 fi own1=`stat --format=%%U:%%G %{_sysconfdir}/%{pkgname}/admin-serv 2> /dev/null` if [ -z "$own1" ] ; then own1=0 fi perm2=`stat --format=%%a %{_sysconfdir}/%{pkgname}/admin-serv/console.conf 2> /dev/null` if [ -z "$perm2" ] ; then perm2=0 fi own2=`stat --format=%%U:%%G %{_sysconfdir}/%{pkgname}/admin-serv/console.conf 2> /dev/null` if [ -z "$own2" ] ; then own2=0 fi echo $perm1 $own1 $perm2 $own2 > $mytmpfile fi %post /sbin/chkconfig --add %{pkgname}-admin /sbin/ldconfig # if installing for the first time, make sure the config # directory and file have the correct permissions # the setup script is used to "fix" these if [ "$1" -gt 1 ]; then set -x mydt=`date +%Y%m%d` mytmpfile=${TMPDIR:-/tmp}/$mydt.$PPID if [ ! -f $mytmpfile ] ; then echo Error: upgrade temp file $mytmpfile not found exit 1 fi cat $mytmpfile | while read perm1 own1 perm2 own2 ; do chmod $perm1 %{_sysconfdir}/%{pkgname}/admin-serv chown $own1 %{_sysconfdir}/%{pkgname}/admin-serv chmod $perm2 %{_sysconfdir}/%{pkgname}/admin-serv/console.conf chown $own2 %{_sysconfdir}/%{pkgname}/admin-serv/console.conf done rm -f $mytmpfile fi %preun if [ $1 = 0 ]; then /sbin/service %{pkgname}-admin stop >/dev/null 2>&1 || : /sbin/chkconfig --del %{pkgname}-admin fi %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc LICENSE %dir %{_sysconfdir}/%{pkgname}/admin-serv %config(noreplace)%{_sysconfdir}/%{pkgname}/admin-serv/*.conf %{_datadir}/%{pkgname} %{_sysconfdir}/rc.d/init.d/%{pkgname}-admin %config(noreplace)%{_sysconfdir}/sysconfig/%{pkgname}-admin %{_sbindir}/* %{_libdir}/*.so.* %{_libdir}/%{pkgname} %{_mandir}/man8/* %changelog * Tue Jul 21 2009 Rich Megginson - 1.1.8-2 - use 389-adminutil instead of adminutil * Thu Jun 18 2009 Rich Megginson - 1.1.8-1 - bump version to 1.1.8 - change license to GPLv2 + ASL 2.0 - changed files that were incorrectly licensed as GPLv2+ to plain GPLv2 * Wed Apr 8 2009 Rich Megginson - 1.1.7-3 - Resolves: bug 494980 - Description: setup-ds-admin.pl -u and silent setup complain about ServerIpAddress - CVS tag FedoraDirSrvAdmin_1_1_7_RC3 FedoraDirSrvAdmin_1_1_7_RC3_20090408 * Fri Apr 3 2009 Rich Megginson - 1.1.7-2 - Resolves: bug 493989 - Description: Admin Server: valgrind invalid read in security.c when installing CRL * Tue Mar 31 2009 Rich Megginson - 1.1.7-1 - this is the 1.1.7 release - added man pages for setup, migration, remove commands - better error handling for command line utilities - fixed remove from console - added remove-ds-admin.pl - added pre and post sections in order to preserve the permissions and ownerships - CVS tag FedoraDirSrvAdmin_1_1_7_RC1 FedoraDirSrvAdmin_1_1_7_RC1_20090331 * Mon Jul 14 2008 Rich Megginson - 1.1.6-1 - This is for the fedora ds 1.1.2 release * Wed Jan 9 2008 Rich Megginson - 1.1.2-1 - Fix issues associated with Fedora pkg review bug 249548 * Tue Dec 11 2007 Rich Megginson - 1.1.1-1 - this is the final GA candidate * Tue Nov 6 2007 Rich Megginson - 1.1.0-1.16 - fix several beta blocker issues * Mon Oct 15 2007 Rich Megginson - 1.1.0-1.15 - fix bogus dist macro - change mozldap6 to mozldap * Thu Oct 11 2007 Rich Megginson - 1.1.0-1.14 - make admin server work with SELinux enabled - fix wording errors in setup * Mon Oct 8 2007 Rich Megginson - 1.1.0-1.13 - added /etc/sysconfig/dirsrv-admin the file that allows you to set - the environment used to start up the admin server (e.g. keytab, ulimit, etc.) - the initscript and admin start script use this file now - This version also has a fix to print the correct error message if the admin - server cannot be contacted during setup or migration. * Thu Sep 27 2007 Rich Megginson - 1.1.0-1.12 - fix a couple of migration issues, including the rpath $libdir problem - allow ds_remove from console to remove instances * Wed Sep 19 2007 Rich Megginson - 1.1.0-1.11 - one line fix to fix of 295001 - console.conf clobbered * Tue Sep 18 2007 Rich Megginson - 1.1.0-1.10 - fixed migration issue bugzilla 295001 - console.conf clobbered * Fri Sep 14 2007 Rich Megginson - 1.1.0-1.9 - fix several more migration problems * Fri Sep 14 2007 Rich Megginson - 1.1.0-1.8 - fix migration - servers are started as they are migrated now * Tue Aug 21 2007 Rich Megginson - 1.1.0-1.7 - Fix the with-fhs-opt configure flag * Fri Aug 17 2007 Rich Megginson - 1.1.0-1.6 - remove curses - make mod_admserv link against sasl - add the usual .m4 files to mod_admserv instead of having all of - the component logic in configure.in * Thu Aug 16 2007 Rich Megginson - 1.1.0-1.5 - incorporate Noriko's migration fix * Wed Aug 15 2007 Rich Megginson - 1.1.0-1.4 - address several migration issues * Mon Aug 13 2007 Rich Megginson - 1.1.0-1.3 - there is no devel package, so remove unused .so files * Mon Aug 13 2007 Rich Megginson - 1.1.0-1.2 - forgot to tag the modules * Fri Aug 10 2007 Rich Megginson - 1.1.0-1.1 - get rid of cvsdate - use pkgname of dirsrv for filesystem path naming - get rid of devel package - simplify files section * Fri Aug 10 2007 Noriko Hosoi - 1.1.0-0.3.20070810 - updated to latest sources - upgraded the mozldap6 version to 6.0.4 * Wed Aug 8 2007 Noriko Hosoi - 1.1.0-0.2.20070808 - updated to latest sources -- bug fixes in the setup scripts * Mon Aug 6 2007 Rich Megginson - 1.1.0-0.1.20070806 - updated to latest sources * Thu Aug 2 2007 Rich Megginson - 1.1.0-0.4.20070802 - There are no files in bindir anymore * Thu Aug 2 2007 Rich Megginson - 1.1.0-0.3.20070802 - forgot to prepend build root to java dir creation * Thu Aug 2 2007 Rich Megginson - 1.1.0-0.2.20070802 - forgot to add mod_admserv and mod_restartd to source * Thu Aug 2 2007 Rich Megginson - 1.1.0-0.1.20070802 - updated to latest sources - fix build breakage - add console jars dir under html * Mon Jul 23 2007 Rich Megginson - 1.1.0-0.1.20070725 - Initial version based on fedora-ds-base.spec 389-admin-1.1.35/selinux/000077500000000000000000000000001220472121400146745ustar00rootroot00000000000000389-admin-1.1.35/selinux/dirsrv-admin.fc.in000066400000000000000000000016301220472121400202120ustar00rootroot00000000000000# Start/stop/restart scripts for daemon (domain entry point) @sbindir@/start-ds-admin -- gen_context(system_u:object_r:dirsrvadmin_exec_t,s0) @sbindir@/stop-ds-admin -- gen_context(system_u:object_r:dirsrvadmin_exec_t,s0) @sbindir@/restart-ds-admin -- gen_context(system_u:object_r:dirsrvadmin_exec_t,s0) # Configuration @configdir@(/.*)? gen_context(system_u:object_r:dirsrvadmin_config_t,s0) @dsgwconfigdir@(/.*)? gen_context(system_u:object_r:dirsrvadmin_config_t,s0) # Log dir @logdir@(/.*)? gen_context(system_u:object_r:httpd_log_t,s0) # Pidfile @piddir@/@instancename@.* gen_context(system_u:object_r:httpd_var_run_t,s0) # CGIs @cgibindir@(/.*)? gen_context(system_u:object_r:httpd_dirsrvadmin_script_exec_t,s0) @dsgwcgibindir@(/.*)? gen_context(system_u:object_r:httpd_dirsrvadmin_script_exec_t,s0) # DSGW cookies @dsgwcookiedir@(/.*)? gen_context(system_u:object_r:httpd_var_run_t,s0) 389-admin-1.1.35/selinux/dirsrv-admin.if000066400000000000000000000104661220472121400176220ustar00rootroot00000000000000## Administration Server for Directory Server, dirsrv-admin. ######################################## ## ## Extend httpd domain for dirsrv-admin. ## # interface(`dirsrvadmin_extend_httpd',` gen_require(` type httpd_t; type httpd_tmp_t; type dirsrv_t; ') # Allow httpd domain to interact with dirsrv dirsrv_manage_config(httpd_t) dirsrv_manage_log(httpd_t) dirsrv_manage_var_run(httpd_t) dirsrv_read_share(httpd_t) dirsrv_signal(httpd_t) dirsrv_signull(httpd_t) dirsrvadmin_manage_config(httpd_t) dirsrvadmin_manage_tmp(httpd_t) files_exec_usr_files(httpd_t) files_manage_generic_tmp_files(httpd_t) userdom_rw_user_tmp_files(httpd_t) corenet_tcp_connect_generic_port(httpd_t) # Strict policy ifdef(`strict_policy',` userdom_dontaudit_search_sysadm_home_dirs(httpd_t) ') ') ######################################## ## ## Extend httpd domain for dirsrv-admin cgi. ## ## ## ## Domain allowed access. ## ## # interface(`dirsrvadmin_script_extend_httpd',` gen_require(` type httpd_t, httpd_exec_t, httpd_suexec_exec_t, httpd_tmp_t, httpd_var_run_t; ') allow $1 httpd_exec_t:file { read getattr execute_no_trans }; allow $1 httpd_suexec_exec_t:file getattr; allow $1 httpd_tmp_t:file { read write }; allow $1 httpd_t:udp_socket { read write }; allow $1 httpd_t:unix_stream_socket { ioctl getattr read write }; allow $1 httpd_t:netlink_route_socket { read write }; allow $1 httpd_t:fifo_file { write read }; allow $1 httpd_t:process signal; allow $1 httpd_var_run_t:file read_file_perms; apache_list_modules($1) apache_exec_modules($1) apache_use_fds($1) apache_read_log($1) apache_read_config($1) apache_domtrans($1) dirsrvadmin_run_httpd_script_exec(httpd_t) ') ######################################## ## ## Extend dirsrv domain for dirsrv-admin. ## # interface(`dirsrvadmin_extend_dirsrv',` gen_require(` type dirsrv_t; type httpd_t; type httpd_tmp_t; ') # Allow dirsrv to interact with CGIs allow dirsrv_t httpd_dirsrvadmin_script_t:unix_stream_socket { read write }; allow dirsrv_t dirsrvadmin_tmp_t:file write; # Allow dirsrv domain to interact with httpd allow dirsrv_t httpd_t:fifo_file { write read }; allow dirsrv_t httpd_t:unix_stream_socket { ioctl getattr read write }; allow dirsrv_t httpd_tmp_t:file { read write }; apache_use_fds(dirsrv_t) ') ######################################## ## ## Extend init domain for dirsrv-admin. ## The initscript searches in a config file. ## # interface(`dirsrvadmin_extend_init',` gen_require(` type initrc_t; ') allow initrc_t dirsrvadmin_config_t:file read; ') ######################################## ## ## Exec dirsrv-admin programs. ## ## ## ## Domain allowed access. ## ## # interface(`dirsrvadmin_run_exec',` gen_require(` type dirsrvadmin_exec_t; ') allow $1 dirsrvadmin_exec_t:dir search_dir_perms; can_exec($1,dirsrvadmin_exec_t) ') ######################################## ## ## Exec cgi programs. ## ## ## ## Domain allowed access. ## ## # interface(`dirsrvadmin_run_httpd_script_exec',` gen_require(` type httpd_dirsrvadmin_script_exec_t; ') allow $1 httpd_dirsrvadmin_script_exec_t:dir search_dir_perms; can_exec($1, httpd_dirsrvadmin_script_exec_t) ') ######################################## ## ## Manage dirsrv-adminserver configuration files. ## ## ## ## Domain allowed access. ## ## # interface(`dirsrvadmin_manage_config',` gen_require(` type dirsrvadmin_config_t; ') allow $1 dirsrvadmin_config_t:dir manage_dir_perms; allow $1 dirsrvadmin_config_t:file manage_file_perms; ') ######################################## ## ## Manage dirsrv-adminserver tmp files. ## ## ## ## Domain allowed access. ## ## # interface(`dirsrvadmin_manage_tmp',` gen_require(` type dirsrvadmin_tmp_t; ') manage_files_pattern(dirsrvadmin_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) manage_dirs_pattern(dirsrvadmin_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) ') 389-admin-1.1.35/selinux/dirsrv-admin.te000066400000000000000000000110551220472121400176270ustar00rootroot00000000000000policy_module(dirsrv-admin,1.0.0) ######################################## # # Declarations for the daemon # require { type httpd_t; type httpd_var_run_t; } type dirsrvadmin_t; domain_type(dirsrvadmin_t) ## Create a dirsrvadmin_exec_t domain to transition to httpd_t. type dirsrvadmin_exec_t; files_type(dirsrvadmin_exec_t) # Start from initrc init_daemon_domain(dirsrvadmin_t, dirsrvadmin_exec_t) role system_r types dirsrvadmin_t; # Keep configuration files in a private domain type dirsrvadmin_config_t; files_type(dirsrvadmin_config_t) # tmp files type dirsrvadmin_tmp_t; files_tmp_file(dirsrvadmin_tmp_t) ######################################## # # Local policy for the daemon # # Transition to httpd domain apache_domtrans(dirsrvadmin_t) # Extend the dirsrv and httpd policy dirsrvadmin_extend_httpd() dirsrvadmin_extend_dirsrv() # The initscript for dirsrv-admin searches in a private conf file. # Extend the init domain to allow the search. dirsrvadmin_extend_init() # tmp files manage_files_pattern(dirsrvadmin_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) manage_dirs_pattern(dirsrvadmin_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) files_tmp_filetrans(dirsrvadmin_t, dirsrvadmin_tmp_t, { file dir }) files_manage_generic_tmp_files(dirsrvadmin_t) # Things needed by the start script (before transition to httpd domain) allow dirsrvadmin_t self:fifo_file { write read getattr ioctl }; allow dirsrvadmin_t self:capability { dac_read_search dac_override sys_tty_config }; logging_search_logs(dirsrvadmin_t) corecmd_exec_bin(dirsrvadmin_t) corecmd_read_bin_symlinks(dirsrvadmin_t) corecmd_search_bin(dirsrvadmin_t) corecmd_shell_entry_type(dirsrvadmin_t) files_exec_etc_files(dirsrvadmin_t) libs_exec_ld_so(dirsrvadmin_t) libs_use_ld_so(dirsrvadmin_t) libs_use_shared_libs(dirsrvadmin_t) miscfiles_read_localization(dirsrvadmin_t) kernel_read_system_state(dirsrvadmin_t) # In strict policy ifdef(`strict_policy',` # Read cwd (/root) userdom_dontaudit_search_sysadm_home_dirs(dirsrvadmin_t) ') # In targeted policy ifdef(`targeted_policy',` # Read cwd (/root) userdom_dontaudit_search_generic_user_home_dirs(dirsrvadmin_t) ') # Needed for stop and restart scripts dirsrv_read_var_run(dirsrvadmin_t) allow dirsrvadmin_t httpd_t:process { signal siginh rlimitinh noatsecure }; allow dirsrvadmin_t httpd_var_run_t:file read_file_perms; ######################################## # # Local policy for the CGIs # # # # Create a domain for the CGI scripts apache_content_template(dirsrvadmin) # Process and networking stuff allow httpd_dirsrvadmin_script_t self:process { getsched getpgid }; allow httpd_dirsrvadmin_script_t self:capability { setuid net_bind_service setgid chown sys_nice kill dac_read_search dac_override }; allow httpd_dirsrvadmin_script_t self:tcp_socket { write getopt create read connect bind getattr setopt accept listen shutdown }; allow httpd_dirsrvadmin_script_t self:udp_socket { write read create connect getattr ioctl }; allow httpd_dirsrvadmin_script_t self:unix_dgram_socket { write create connect }; allow httpd_dirsrvadmin_script_t self:netlink_route_socket { write getattr read bind create nlmsg_read }; allow httpd_dirsrvadmin_script_t self:sem { write destroy create unix_write setattr }; kernel_read_kernel_sysctls(httpd_dirsrvadmin_script_t) corenet_sendrecv_unlabeled_packets(httpd_dirsrvadmin_script_t) corenet_tcp_connect_generic_port(httpd_dirsrvadmin_script_t) corenet_tcp_connect_ldap_port(httpd_dirsrvadmin_script_t) corenet_tcp_connect_http_port(httpd_dirsrvadmin_script_t) sysnet_read_config(httpd_dirsrvadmin_script_t) files_search_var_lib(httpd_dirsrvadmin_script_t) # The CGI scripts require some interfaces that doesn't exist in httpd_t dirsrvadmin_script_extend_httpd(httpd_dirsrvadmin_script_t) # The CGI scripts must be able to manage dirsrv-admin dirsrvadmin_run_exec(httpd_dirsrvadmin_script_t) dirsrvadmin_manage_config(httpd_dirsrvadmin_script_t) manage_files_pattern(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) manage_dirs_pattern(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, dirsrvadmin_tmp_t) files_tmp_filetrans(httpd_dirsrvadmin_script_t, dirsrvadmin_tmp_t, { file dir }) # The CGI scripts must be able to manage the dirsrv dirsrv_domtrans(httpd_dirsrvadmin_script_t) dirsrv_signal(httpd_dirsrvadmin_script_t) dirsrv_signull(httpd_dirsrvadmin_script_t) dirsrv_manage_log(httpd_dirsrvadmin_script_t) dirsrv_manage_var_lib(httpd_dirsrvadmin_script_t) dirsrv_pid_filetrans(httpd_dirsrvadmin_script_t) dirsrv_manage_var_run(httpd_dirsrvadmin_script_t) dirsrv_manage_config(httpd_dirsrvadmin_script_t) dirsrv_read_share(httpd_dirsrvadmin_script_t) 389-admin-1.1.35/tests/000077500000000000000000000000001220472121400143475ustar00rootroot00000000000000389-admin-1.1.35/tests/admpw/000077500000000000000000000000001220472121400154575ustar00rootroot00000000000000389-admin-1.1.35/tests/admpw/testget.1000066400000000000000000000000001220472121400172060ustar00rootroot00000000000000389-admin-1.1.35/tests/admpw/testget.2000066400000000000000000000000061220472121400172150ustar00rootroot00000000000000op=get389-admin-1.1.35/tests/admpw/testget.3000066400000000000000000000000561220472121400172230ustar00rootroot00000000000000op=set&admpw.uid=newadmin&admpw.pw=newpassword389-admin-1.1.35/tests/admpw/testget.4000066400000000000000000000000061220472121400172170ustar00rootroot00000000000000op=set389-admin-1.1.35/tests/admpw/testpost.1000066400000000000000000000000001220472121400174140ustar00rootroot00000000000000389-admin-1.1.35/tests/admpw/testpost.2000066400000000000000000000000061220472121400174230ustar00rootroot00000000000000op=get389-admin-1.1.35/tests/admpw/testpost.3000066400000000000000000000000561220472121400174310ustar00rootroot00000000000000op=set&admpw.uid=newadmin&admpw.pw=newpassword389-admin-1.1.35/tests/admpw/testpost.4000066400000000000000000000000061220472121400174250ustar00rootroot00000000000000op=set389-admin-1.1.35/tests/config/000077500000000000000000000000001220472121400156145ustar00rootroot00000000000000389-admin-1.1.35/tests/config/testget.1000066400000000000000000000000011220472121400173440ustar00rootroot00000000000000 389-admin-1.1.35/tests/config/testget.10000066400000000000000000000010271220472121400174350ustar00rootroot00000000000000op=set&nsServerID=&serverRoot=&serverProductName=&serverHostName=&installationTimeStamp=&configuration.nsServerPort=&configuration.nsSuiteSpotUser=&configuration.nsAdminEnableEnduser=&configuration.nsAdminEnableDSGW=&configuration.nsDirectoryInfoRef=&configuration.nsAdminUsers=&configuration.nsErrorLog=&configuration.nsPidLog=&configuration.nsAccessLog=&configuration.nsAdminCacheLifetime=&configuration.nsAdminAccessHosts=&configuration.nsAdminAccessAddresses=&configuration.nsAdminOneACLDir=&configuration.nsDefaultAcceptLanguage=&389-admin-1.1.35/tests/config/testget.11000066400000000000000000000001101220472121400174260ustar00rootroot00000000000000op=get&bogusattr1=bogusval&bogusattr2=bogusval&bogus.bogusattr3=bogusval389-admin-1.1.35/tests/config/testget.12000066400000000000000000000013131220472121400174350ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=12345&configuration.nsSuiteSpotUser=newuser&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsPidLog=newpidlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/config/testget.13000066400000000000000000000012041220472121400174350ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=12345&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/config/testget.2000066400000000000000000000000031220472121400173470ustar00rootroot00000000000000op=389-admin-1.1.35/tests/config/testget.3000066400000000000000000000000061220472121400173530ustar00rootroot00000000000000op=get389-admin-1.1.35/tests/config/testget.4000066400000000000000000000000061220472121400173540ustar00rootroot00000000000000op=set389-admin-1.1.35/tests/config/testget.5000066400000000000000000000000141220472121400173540ustar00rootroot00000000000000op=force_set389-admin-1.1.35/tests/config/testget.6000066400000000000000000000000101220472121400173510ustar00rootroot00000000000000op=bogus389-admin-1.1.35/tests/config/testget.7000066400000000000000000000010771220472121400173700ustar00rootroot00000000000000op=get&objectClass=&nsServerID=&serverRoot=&serverProductName=&serverHostName=&installationTimeStamp=&configuration.objectClass=&configuration.nsServerPort=&configuration.nsSuiteSpotUser=&configuration.nsAdminEnableEnduser=&configuration.nsAdminEnableDSGW=&configuration.nsDirectoryInfoRef=&configuration.nsAdminUsers=&configuration.nsErrorLog=&configuration.nsPidLog=&configuration.nsAccessLog=&configuration.nsAdminCacheLifetime=&configuration.nsAdminAccessHosts=&configuration.nsAdminAccessAddresses=&configuration.nsAdminOneACLDir=&configuration.nsDefaultAcceptLanguage=&389-admin-1.1.35/tests/config/testget.8000066400000000000000000000000601220472121400173600ustar00rootroot00000000000000op=get&bogusattr1=&bogusattr2=&bogus.bogusattr3=389-admin-1.1.35/tests/config/testget.9000066400000000000000000000013151220472121400173650ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=newport&configuration.nsSuiteSpotUser=newuser&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsPidLog=newpidlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/config/testpost.1000066400000000000000000000000011220472121400175520ustar00rootroot00000000000000 389-admin-1.1.35/tests/config/testpost.10000066400000000000000000000010271220472121400176430ustar00rootroot00000000000000op=set&nsServerID=&serverRoot=&serverProductName=&serverHostName=&installationTimeStamp=&configuration.nsServerPort=&configuration.nsSuiteSpotUser=&configuration.nsAdminEnableEnduser=&configuration.nsAdminEnableDSGW=&configuration.nsDirectoryInfoRef=&configuration.nsAdminUsers=&configuration.nsErrorLog=&configuration.nsPidLog=&configuration.nsAccessLog=&configuration.nsAdminCacheLifetime=&configuration.nsAdminAccessHosts=&configuration.nsAdminAccessAddresses=&configuration.nsAdminOneACLDir=&configuration.nsDefaultAcceptLanguage=&389-admin-1.1.35/tests/config/testpost.11000066400000000000000000000001101220472121400176340ustar00rootroot00000000000000op=get&bogusattr1=bogusval&bogusattr2=bogusval&bogus.bogusattr3=bogusval389-admin-1.1.35/tests/config/testpost.12000066400000000000000000000013131220472121400176430ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=12345&configuration.nsSuiteSpotUser=newuser&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsPidLog=newpidlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/config/testpost.13000066400000000000000000000012041220472121400176430ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=12345&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/config/testpost.2000066400000000000000000000000031220472121400175550ustar00rootroot00000000000000op=389-admin-1.1.35/tests/config/testpost.3000066400000000000000000000000061220472121400175610ustar00rootroot00000000000000op=get389-admin-1.1.35/tests/config/testpost.4000066400000000000000000000000061220472121400175620ustar00rootroot00000000000000op=set389-admin-1.1.35/tests/config/testpost.5000066400000000000000000000000141220472121400175620ustar00rootroot00000000000000op=force_set389-admin-1.1.35/tests/config/testpost.6000066400000000000000000000000101220472121400175570ustar00rootroot00000000000000op=bogus389-admin-1.1.35/tests/config/testpost.7000066400000000000000000000010771220472121400175760ustar00rootroot00000000000000op=get&objectClass=&nsServerID=&serverRoot=&serverProductName=&serverHostName=&installationTimeStamp=&configuration.objectClass=&configuration.nsServerPort=&configuration.nsSuiteSpotUser=&configuration.nsAdminEnableEnduser=&configuration.nsAdminEnableDSGW=&configuration.nsDirectoryInfoRef=&configuration.nsAdminUsers=&configuration.nsErrorLog=&configuration.nsPidLog=&configuration.nsAccessLog=&configuration.nsAdminCacheLifetime=&configuration.nsAdminAccessHosts=&configuration.nsAdminAccessAddresses=&configuration.nsAdminOneACLDir=&configuration.nsDefaultAcceptLanguage=&389-admin-1.1.35/tests/config/testpost.8000066400000000000000000000000601220472121400175660ustar00rootroot00000000000000op=get&bogusattr1=&bogusattr2=&bogus.bogusattr3=389-admin-1.1.35/tests/config/testpost.9000066400000000000000000000013151220472121400175730ustar00rootroot00000000000000op=set&nsServerID=newid&serverRoot=/opt/newsroot&serverProductName=New+Name&serverHostName=newname&installationTimeStamp=newtime&configuration.nsServerPort=newport&configuration.nsSuiteSpotUser=newuser&configuration.nsAdminEnableEnduser=newenduser&configuration.nsAdminEnableDSGW=newenabledsgw&configuration.nsDirectoryInfoRef=newinforef&configuration.nsAdminUsers=newadmpw&configuration.nsErrorLog=newerrorlog&configuration.nsPidLog=newpidlog&configuration.nsAccessLog=newaccesslog&configuration.nsAdminCacheLifetime=newcachelifetime&configuration.nsAdminAccessHosts=newaccesshosts&configuration.nsAdminAccessAddresses=newipaddr&configuration.nsAdminOneACLDir=newacldir&configuration.nsDefaultAcceptLanguage=newlang&389-admin-1.1.35/tests/download/000077500000000000000000000000001220472121400161565ustar00rootroot00000000000000389-admin-1.1.35/tests/download/testget.1000066400000000000000000000000001220472121400177050ustar00rootroot00000000000000389-admin-1.1.35/tests/ds_create/000077500000000000000000000000001220472121400163005ustar00rootroot00000000000000389-admin-1.1.35/tests/ds_create/testget.1000066400000000000000000000005651220472121400200470ustar00rootroot00000000000000servport=38900&cfg_sspt_uid=uid%3Dadmin%2C+ou%3DAdministrators%2C+ou%3DTopologyManagement%2C+o%3DNetscapeRoot&ldap_url=ldap%3A%2F%2FHOSTNAME%3APORT%2Fo%3DNetscapeRoot&servuser=USER&cfg_sspt_uid_pw=admin&rootpw=password&servid=localhost2&start_server=1&suitespot3x_uid=admin&suffix=dc%3Dexample%2Cdc%3Dcom&servname=HOSTNAME&rootdn=cn%3DDirectory+Manager&admin_domain=DOMAIN 389-admin-1.1.35/tests/dsconfig/000077500000000000000000000000001220472121400161435ustar00rootroot00000000000000389-admin-1.1.35/tests/dsconfig/testget.1000066400000000000000000000000011220472121400176730ustar00rootroot00000000000000 389-admin-1.1.35/tests/dsconfig/testget.10000066400000000000000000000001711220472121400177630ustar00rootroot00000000000000op=setconfig&dsconfig.sieDN=newsiedn&dsconfig.isieDN=newisiedn&dsconfig.host=newhost&dsconfig.port=390&dsconfig.ssl=false389-admin-1.1.35/tests/dsconfig/testget.2000066400000000000000000000000031220472121400176760ustar00rootroot00000000000000op=389-admin-1.1.35/tests/dsconfig/testget.3000066400000000000000000000000141220472121400177010ustar00rootroot00000000000000op=getconfig389-admin-1.1.35/tests/dsconfig/testget.4000066400000000000000000000000141220472121400177020ustar00rootroot00000000000000op=setconfig389-admin-1.1.35/tests/dsconfig/testget.5000066400000000000000000000000451220472121400177070ustar00rootroot00000000000000=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=389-admin-1.1.35/tests/dsconfig/testget.6000066400000000000000000000000101220472121400177000ustar00rootroot00000000000000op=bogus389-admin-1.1.35/tests/dsconfig/testget.7000066400000000000000000000000231220472121400177050ustar00rootroot00000000000000op=setconfig&bogus=389-admin-1.1.35/tests/dsconfig/testget.8000066400000000000000000000001311220472121400177060ustar00rootroot00000000000000op=setconfig&dsconfig.sieDN=&dsconfig.isieDN=&dsconfig.host=&dsconfig.port=&dsconfig.ssl=389-admin-1.1.35/tests/dsconfig/testget.9000066400000000000000000000001721220472121400177140ustar00rootroot00000000000000op=setconfig&dsconfig.sieDN=newsiedn&dsconfig.isieDN=newisiedn&dsconfig.host=newhost&dsconfig.port=390&dsconfig.ssl=newssl389-admin-1.1.35/tests/help/000077500000000000000000000000001220472121400152775ustar00rootroot00000000000000389-admin-1.1.35/tests/help/testget.1000066400000000000000000000000001220472121400170260ustar00rootroot00000000000000389-admin-1.1.35/tests/help/testget.10000066400000000000000000000000711220472121400171160ustar00rootroot00000000000000helpdir=admin&token=ViewData&mapfile=tokens.map&debug=yes389-admin-1.1.35/tests/help/testget.11000066400000000000000000000001001220472121400171100ustar00rootroot00000000000000helpdir=slapd&token=configuration-system-settings-help&debug=yes389-admin-1.1.35/tests/help/testget.12000066400000000000000000000001231220472121400171160ustar00rootroot00000000000000helpdir=slapd&token=configuration-system-settings-help&mapfile=tokens.map&debug=yes389-admin-1.1.35/tests/help/testget.2000066400000000000000000000000071220472121400170360ustar00rootroot00000000000000genlib=389-admin-1.1.35/tests/help/testget.3000066400000000000000000000000101220472121400170310ustar00rootroot00000000000000helpdir=389-admin-1.1.35/tests/help/testget.4000066400000000000000000000000171220472121400170410ustar00rootroot00000000000000helpdir=&token=389-admin-1.1.35/tests/help/testget.5000066400000000000000000000000641220472121400170440ustar00rootroot00000000000000helpdir=../../../dev/null&token=../../../../dev/null389-admin-1.1.35/tests/help/testget.6000066400000000000000000000001211220472121400170370ustar00rootroot00000000000000helpdir=../../../dev/null&token=../../../../dev/null&mapfile=../../../../dev/null389-admin-1.1.35/tests/help/testget.7000066400000000000000000000000561220472121400170470ustar00rootroot00000000000000helpdir=help&token=help&mapfile=help&debug=yes389-admin-1.1.35/tests/help/testget.8000066400000000000000000000000411220472121400170420ustar00rootroot00000000000000helpdir=help&token=help&debug=yes389-admin-1.1.35/tests/help/testget.9000066400000000000000000000000461220472121400170500ustar00rootroot00000000000000helpdir=admin&token=ViewData&debug=yes389-admin-1.1.35/tests/htmladmin/000077500000000000000000000000001220472121400163245ustar00rootroot00000000000000389-admin-1.1.35/tests/htmladmin/testget.1000066400000000000000000000000001220472121400200530ustar00rootroot00000000000000389-admin-1.1.35/tests/htmladmin/testget.2000066400000000000000000000002351220472121400200660ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=topframepaint&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.3000066400000000000000000000002251220472121400200660ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=index&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.4000066400000000000000000000002251220472121400200670ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=empty&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.5000066400000000000000000000002321220472121400200660ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=framepaint&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.6000066400000000000000000000002321220472121400200670ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=viewselect&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.7000066400000000000000000000002361220472121400200740ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&op=serveractivate&view=viewparam389-admin-1.1.35/tests/htmladmin/testget.8000066400000000000000000000002111220472121400200660ustar00rootroot00000000000000obj=cn%3Dslapd-INSTANCE+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&view=viewparam389-admin-1.1.35/tests/nsroot.ldif000066400000000000000000002440231220472121400165400ustar00rootroot00000000000000version: 1 # entry-id: 1 dn: o=NetscapeRoot nsUniqueId: 5131a203-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organization o: NetscapeRoot creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z aci: (targetattr="*")(version 3.0; acl "Enable Configuration Administrator Group modification"; allow (all) groupdn="ldap:///cn=Configuration Administrators, ou=Groups, ou=TopologyManagement, o=NetscapeRoot";) aci: (targetattr="*")(targetfilter=(o=NetscapeRoot))(version 3.0; acl "Default anonymous access"; allow (read, search) userdn="ldap:///anyone";) aci: (targetattr="*")(version 3.0; acl "Enable Group Expansion"; allow (read, search, compare) groupdnattr="uniquemember";) # entry-id: 2 dn: ou=TopologyManagement, o=NetscapeRoot nsUniqueId: 5131a204-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit ou: TopologyManagement description: Branch for Configuration Administration users and groups creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z aci: (targetattr!="userPassword")(version 3.0; acl "Enable anonymous access"; allow (read, search, compare)userdn="ldap:///anyone";) # entry-id: 3 dn: ou=Groups, ou=TopologyManagement, o=NetscapeRoot nsUniqueId: 5131a205-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit ou: Groups description: Standard Branch for group entries creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 4 dn: ou=Administrators, ou=TopologyManagement, o=NetscapeRoot nsUniqueId: 5131a206-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit ou: Administrators description: Standard branch for Configuration Administrator (uid) entries creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 5 dn: cn=Configuration Administrators, ou=Groups, ou=TopologyManagement, o=NetscapeRoot nsUniqueId: 5131a207-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: groupofuniquenames cn: Configuration Administrators creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z uniqueMember: uid=admin,ou=Administrators, ou=TopologyManagement, o=NetscapeRoot # entry-id: 6 dn: uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot nsUniqueId: 5131a208-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: person objectClass: organizationalperson objectClass: inetorgperson cn: Configuration Administrator sn: Administrator givenName: Configuration uid: admin passwordExpirationTime: 20380119031407Z userPassword: {SSHA}reJj+X8MTuLLpc8VfPDfBVsIKlP4md3HMd0ZSw== creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 7 dn: ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a209-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit objectClass: nsadmindomain ou: localdomain description: Standard branch for configuration information nsAdminDomainName: localdomain creatorsName: cn=directory manager modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172952Z aci: (targetattr=*)(targetfilter=(ou=localdomain))(version 3.0; acl "Enable anonymous access"; allow(read,search) userdn="ldap:///anyone";) # entry-id: 8 dn: ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit ou: Global Preferences creatorsName: cn=directory manager modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307174048Z aci: (targetattr=*)(version 3.0; acl "Enable anonymous access"; allow(read,search) userdn="ldap:///anyone";) description: Default branch for 389 Server Products Global Preferences # entry-id: 9 dn: ou=Host Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit ou: Host Preferences creatorsName: cn=directory manager modifiersName: cn=directory manager createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 10 dn: cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsHost objectClass: groupOfUniqueNames cn: localhost.localdomain serverHostName: localhost.localdomain nsOsVersion: Linux 2.6.9-42.0.8.ELsmp #1 SMP Tue Jan 23 13:01:26 EST 2007 nsHardwarePlatform: i686 aci: (targetattr= *)(targetfilter=(nshardwarePlatform=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z uniqueMember: cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot # entry-id: 11 dn: cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20d-1dd211b2-8008e98c-0e470000 objectClass: nsAdminGroup objectClass: groupOfUniqueNames objectClass: nsDirectoryInfo objectClass: top nsAdminGroupName: Server Group nsConfigRoot: /opt/389-ds nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsAdminSIEDN: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot aci: (targetattr=*)(targetfilter=(nsconfigRoot=*))(version 3.0; acl "Enable delegated access"; allow (read,search, compare) groupdn="ldap:///cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read,search,compare) userdn="ldap:///cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) cn: Server Group creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172854Z uniqueMember: cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot uniqueMember: cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot # entry-id: 12 dn: cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20e-1dd211b2-8008e98c-0e470000 objectClass: nsApplication objectClass: groupOfUniqueNames objectClass: top cn: 389 Directory Server nsProductName: 389 Directory Server nsProductVersion: 1.1.0 nsNickName: slapd nsBuildNumber: 2007.066.1710 nsVendor: 389 Project nsInstalledLocation: /opt/389-ds installationTimeStamp: 20070307172853Z nsExpirationDate: 1183655405 nsBuildSecurity: domestic aci: (targetattr=*)(targetfilter=(nsNickName=*))(version 3.0; acl "Enable delegated access"; allow (read,search, compare) groupdn="ldap:///cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z uniqueMember: cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsServerMigrationClassname: com.netscape.admin.dirserv.task.MigrateCreate@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsServerCreationClassname: com.netscape.admin.dirserv.task.MigrateCreate@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot # entry-id: 13 dn: cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a20f-1dd211b2-8008e98c-0e470000 objectClass: netscapeServer objectClass: nsDirectoryServer objectClass: nsResourceRef objectClass: nsConfig objectClass: groupOfUniqueNames objectClass: top nsServerSecurity: off nsServerID: slapd-localhost nsBindDN: cn=Directory Manager nsBaseDN: dc=example,dc=com serverRoot: /opt/389-ds nsServerPort: 389 nsSecureServerPort: 636 serverProductName: Directory Server (localhost) serverVersionNumber: 1.1.0 installationTimeStamp: 20070307172853Z nsSuiteSpotUser: nobody serverHostName: localhost.localdomain cn: slapd-localhost aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) aci: (targetattr="uniquemember || serverProductName || administratorContactInfo || userpassword || description")(targetfilter=(objectclass=netscapeServer))(version 3.0; acl "Enable access delegation"; allow (write) groupdn="ldap:///cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) uniqueMember: cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot uniqueMember: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot userPassword: {SSHA}o6R0OcE3A3L2Ja8oSy610p3d3sKSp+qMr1xvWQ== creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 14 dn: cn=configuration,cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a210-1dd211b2-8008e98c-0e470000 objectClass: nsResourceRef objectClass: nsAdminObject objectClass: nsDirectoryInfo objectClass: top cn: configuration nsClassname: com.netscape.admin.dirserv.DSAdmin@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsJarfilename: ds11.jar nsDirectoryInfoRef: cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 15 dn: cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a211-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: Tasks creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 16 dn: cn=Operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a212-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 17 dn: cn=task summary, cn=Operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a213-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsConfig description: start stop restart Backup Restore KeyCert Authenticate CompleteImport CompleteExport cn: task summary creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 18 dn: cn=start, cn=Operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a214-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Start@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: start cn: start creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 19 dn: cn=stop, cn=Operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a215-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Stop@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: shutdown cn: stop creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 20 dn: cn=restart, cn=Operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a216-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restart@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: restart cn: restart creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 21 dn: cn=Backup, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a217-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Backup@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: ds_db2bak cn: Backup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 22 dn: cn=Restore, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a218-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restore@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: ds_bak2db cn: Restore creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172853Z modifyTimestamp: 20070307172853Z # entry-id: 23 dn: cn=KeyCert, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a219-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.KeyCert@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: KeyCert creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 24 dn: cn=Authenticate, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Authenticate@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: Authenticate creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 25 dn: cn=CompleteImport, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteImport@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: CompleteImport creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 26 dn: cn=CompleteExport, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteExport@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: CompleteExport creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 27 dn: cn=Export, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21d-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_db2ldif cn: Export creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 28 dn: cn=Import, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21e-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_ldif2db cn: Import creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 29 dn: cn=ViewLog, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a21f-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?ds_viewlog.pl cn: ViewLog creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 30 dn: cn=ListBackups, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a220-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_listdb cn: ListBackups creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 31 dn: cn=Remove, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a221-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_remove cn: Remove creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 32 dn: cn=CreateVLVIndex, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a222-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: vlvindex cn: CreateVLVIndex creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 33 dn: cn=AddIndex, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a223-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: addindex cn: AddIndex creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 34 dn: cn=SNMPCtrl, cn=operation, cn=Tasks, cn=slapd-localhost, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a224-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_snmpctrl cn: SNMPCtrl creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 35 dn: cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a225-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: Tasks creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 36 dn: cn=Operation, cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a226-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 37 dn: cn=Migrate, cn=Operation, cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a227-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?migrateInstance cn: Migrate creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 38 dn: cn=Create, cn=Operation, cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a228-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_create cn: Create creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 39 dn: cn=GetConfigInfo, cn=Operation, cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a229-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?getConfigInfo cn: GetConfigInfo creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 40 dn: cn=MigrateLocalDB, cn=Operation, cn=Tasks, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?migrateLocalDB cn: MigrateLocalDB creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 41 dn: ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalUnit objectClass: extensibleObject ou: admin nsmerge: ADD_IF_EMPTY creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307174048Z # entry-id: 42 dn: ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalunit objectClass: extensibleObject ou: 4.0 nsmerge: ADD_IF_EMPTY creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307174048Z # entry-id: 43 dn: cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22d-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: extensibleObject cn: ResourceEditorExtension nsmerge: ADD_IF_EMPTY creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307174048Z # entry-id: 44 dn: cn=nsroledefinition, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22e-1dd211b2-8008e98c-0e470000 cn: nsroledefinition objectClass: top objectClass: extensibleObject objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleInfo@ds11.jar nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleMembers@ds11.jar nsClassname: com.netscape.admin.dirserv.roledit.ResEditorRoleAccountPage@ds11.jar nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307174048Z # entry-id: 45 dn: cn=cossuperdefinition, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a22f-1dd211b2-8008e98c-0e470000 cn: cossuperdefinition objectClass: top objectClass: extensibleObject objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosInfo@ds11.jar nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosAttributes@ds11.jar nsClassname: com.netscape.admin.dirserv.cosedit.ResEditorCosTemplate@ds11.jar nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307174048Z # entry-id: 46 dn: cn=UserDirectory, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a230-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsDirectoryInfo cn: UserDirectory nsDirectoryURL: ldap://localhost.localdomain:389/dc=example,dc=com nsDirectoryFailoverList: creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 47 dn: cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a238-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsApplication objectClass: groupOfUniqueNames cn: 389 Administration Server nsVendor: 389, Inc. nsProductName: 389 Administration Server nsNickName: admin nsProductVersion: 7.0 nsBuildNumber: 2006.207.021 nsInstalledLocation: /opt/389-ds installationTimeStamp: 20070307172854Z nsBuildSecurity: domestic nsServerMigrationClassname: com.netscape.management.admserv.AdminServerProduct@admserv70.jar aci: (targetattr=*)(targetfilter=(nsNickName=*))(version 3.0; acl "Enable delegated access"; allow (read,search, compare) groupdn="ldap:///cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z uniqueMember: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot # entry-id: 48 dn: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a239-1dd211b2-8008e98c-0e470000 passwordExpirationTime: 20380118031417 objectClass: top objectClass: netscapeServer objectClass: nsAdminServer objectClass: nsResourceRef objectClass: groupOfUniqueNames cn: admin-serv-localhost nsServerID: admin-serv serverRoot: /opt/389-ds serverProductName: Administration Server serverHostName: localhost.localdomain aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) aci: (targetattr="uniquemember || serverProductName || administratorContactInfo || userpassword || description")(targetfilter=(objectclass=netscapeServer))(version 3.0; acl "Enable access delegation"; allow (write) groupdn="ldap:///cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) uniqueMember: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot installationTimeStamp: 20070307172854Z userPassword: {SSHA}/Hki1EvTkF/WHA9HGGvxDMWpyyydXINotO3v8g== creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 49 dn: cn=configuration, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23a-1dd211b2-8008e98c-0e470000 objectClass: nsConfig objectClass: nsAdminConfig objectClass: nsAdminObject objectClass: nsDirectoryInfo objectClass: top cn: Configuration nsServerPort: 32348 nsSuiteSpotUser: root nsServerAddress: nsAdminEnableEnduser: new value nsAdminEnableDSGW: new value nsDirectoryInfoRef: cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsAdminUsers: admin-serv/config/admpw nsErrorLog: admin-serv/logs/error nsPidLog: admin-serv/logs/pid nsAccessLog: admin-serv/logs/access nsAdminCacheLifetime: new value nsAdminAccessHosts: new value nsAdminAccessAddresses: new value nsAdminOneACLDir: adminacl aci: (targetattr=*)(version 3.0; acl "Enable delegated admin to access configuration"; allow (read,search) groupdn="ldap:///cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) nsDefaultAcceptLanguage: en nsClassname: com.netscape.management.admserv.AdminServer@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070418172330Z # entry-id: 50 dn: cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: Tasks creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 51 dn: cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 52 dn: cn=Stop, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23d-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/stopadm.html nsExecRef: stopsrv nsClassname: com.netscape.management.admserv.task.Stop@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: Stop creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 53 dn: cn=Restart, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23e-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/restartadm.html nsExecRef: restartsrv nsClassname: com.netscape.management.admserv.task.Restart@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: Restart creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 54 dn: cn=Authenticate, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a23f-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask nsHelpRef: admin/userauth.html nsExecRef: userauth cn: Authenticate creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 55 dn: cn=ListOldServers, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a240-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: listOldSrvs cn: ListOldServers creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 56 dn: cn=StartConfigDS, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a241-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask nsExecRef: start_config_ds cn: StartConfigDS creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 57 dn: cn=MigrateConfig, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a242-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: migrateConfig cn: MigrateConfig creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 58 dn: cn=MergeConfig, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a243-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: mergeConfig cn: MergeConfig creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 59 dn: cn=StatusPing, cn=Operation, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a244-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: statusping nsLogSuppress: true cn: StatusPing creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 60 dn: cn=Configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a245-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstaskgroup nsTaskLabel: Configuration Tasks Group cn: Configuration creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 61 dn: cn=ServerSetup, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a246-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: config nsClassname: com.netscape.management.admserv.task.ServerSetup@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: ServerSetup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 62 dn: cn=DirectorySetup, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a247-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: dsconfig cn: DirectorySetup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 63 dn: cn=UGDirectorySetup, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a248-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ugdsconfig cn: UGDirectorySetup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 64 dn: cn=AccessSetup, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a249-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: admpw cn: AccessSetup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 65 dn: cn=Logging, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/logging.html nsExecRef: config nsClassname: com.netscape.management.admserv.task.Logging@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: Logging creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 66 dn: cn=SecurityOp, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: security cn: SecurityOp creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 67 dn: cn=CertSetup, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/certrequest.html nsClassname: com.netscape.management.admserv.task.CertSetup@admserv70.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: CertSetup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 68 dn: cn=SSLActivate, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24d-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/ssl_activate.html nsExecRef: sec-activate cn: SSLActivate creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 69 dn: cn=ReadLog, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24e-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/logging.html nsExecRef: ReadLog cn: ReadLog creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 70 dn: cn=HTMLAdmin, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a24f-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/htmladmin.html nsExecRef: htmladmin cn: HTMLAdmin creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 71 dn: cn=StatPingServ, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a250-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/statpingserv.html nsExecRef: statpingserv cn: StatPingServ creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 72 dn: cn=ViewData, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a251-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/viewdata.html nsExecRef: viewdata cn: ViewData creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 73 dn: cn=ViewLog, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a252-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/viewlog.html nsExecRef: viewlog cn: ViewLog creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 74 dn: cn=MonReplication, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a253-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/monreplication.html nsExecRef: monreplication cn: MonReplication creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 75 dn: cn=repl-monitor-cgi.pl, cn=configuration, cn=Tasks, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a254-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsHelpRef: admin/monreplication.html nsExecRef: perl?repl-monitor-cgi.pl cn: repl-monitor-cgi.pl creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 76 dn: cn=Commands, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a255-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: Commands creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 77 dn: cn=sync-task-sie-data, cn=Commands, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a256-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask nsHelpRef: admin/sync-task-sie-data.html nsExecRef: runtime cn: sync-task-sie-data creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 78 dn: cn=change-sie-password, cn=Commands, cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a257-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask nsExecRef: runtime cn: change-sie-password creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 79 dn: ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a258-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalUnit ou: UserPreferences aci: (targetattr = "*")(version 3.0; acl "Allow saving of User Preferences"; allow (add) userdn = "ldap:///all";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 80 dn: cn=Common, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a259-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: nsGlobalParameters objectClass: extensibleObject cn: common nsUniqueAttribute: uid nsUserIDFormat: firstletter_lastname nsUserRDNComponent: uid nsGroupRDNComponent: cn nsmerge: {nsuniqueattribute}ADD_IF_EMPTY nsmerge: {nsuseridformat}ADD_IF_EMPTY nsmerge: {nsuserrdncomponent}ADD_IF_EMPTY nsmerge: {nsgrouprdncomponent}ADD_IF_EMPTY creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 81 dn: cn=Client, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: nsAdminGlobalParameters objectClass: extensibleObject cn: Client nsAdminEndUserHTMLIndex: [--Category:general,General][--Option:edit.cgi?userpinfo,Personal Information][--Option:edit.cgi?userpasswd,Password] nsNickName: admin,,389 Administration Server nsNickName: https,netshare,389 Enterprise Server nsNickName: httpd,httpd,389 FastTrack Server nsNickName: msg,msg,389 Messaging Server nsNickName: news,news,389 Collabra Server nsNickName: proxy,proxy,389 Proxy Server nsNickName: lmspd,lmspd,389 Media Server nsNickName: slapd,slapd,389 Directory Server nsNickName: cert,cert,389 Certificate Server nsNickName: compass,compass,389 Compass Server nsNickName: catalog,catalog,389 Catalog Server nsNickName: calendar,calendar,389 Calendar Server nsmerge: {nsadminenduserhtmlindex}MULTI_MERGE nsmerge: {nsnickname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 82 dn: cn=PublicViews, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsAdminConsoleUser cn: PublicViews aci: (targetattr = "*")(version 3.0; acl "Allow Authenticated Users to Save Public Views"; allow (all) userdn = "ldap:///all";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 83 dn: cn=CustomView, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: CustomView creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 84 dn: cn=inetorgPerson, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25d-1dd211b2-8008e98c-0e470000 cn: inetorgPerson objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorUserPage nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsClassname: com.netscape.management.client.ug.ResEditorNTUser nsClassname: com.netscape.management.client.ug.ResEditorPosixUser nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 85 dn: cn=organizationalPerson, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25e-1dd211b2-8008e98c-0e470000 cn: organizationalPerson objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorUserPage nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 86 dn: cn=groupofuniquenames, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a25f-1dd211b2-8008e98c-0e470000 cn: groupofuniquenames objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.ResEditorGroupInfo nsClassname: com.netscape.management.client.ug.ResEditorGroupMembers nsClassname: com.netscape.management.client.ug.ResEditorAccountPage nsClassname: com.netscape.management.client.ug.LanguagePage nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 87 dn: cn=organizationalunit, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a260-1dd211b2-8008e98c-0e470000 cn: organizationalunit objectClass: nsResourceRef objectClass: nsAdminResourceEditorExtension objectClass: top objectClass: extensibleObject objectClass: nsAdminObject nsClassname: com.netscape.management.client.ug.OUPage nsClassname: com.netscape.management.client.ug.LanguagePage nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 88 dn: cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a261-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: DefaultObjectClassesContainer creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 89 dn: cn=user, cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a262-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: user nsDefaultObjectClass: top nsDefaultObjectClass: person nsDefaultObjectClass: organizationalPerson nsDefaultObjectClass: inetorgperson creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 90 dn: cn=group, cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a263-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: group nsDefaultObjectClass: top nsDefaultObjectClass: groupofuniquenames creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 91 dn: cn=ou, cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a264-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: nsdefaultObjectClasses cn: ou nsDefaultObjectClass: top nsDefaultObjectClass: organizationalunit creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 92 dn: cn=topologyplugin, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a265-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef objectClass: extensibleObject cn: topologyplugin nsmerge: ADD_IF_EMPTY creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 93 dn: cn=defaultplugin, cn=topologyplugin, ou=4.0, ou=Admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a266-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstopologyplugin objectClass: extensibleObject objectClass: nsAdminObject cn: defaultplugin nsClassname: com.netscape.management.client.topology.DefaultTopologyPlugin nsmerge: {nsclassname}MULTI_MERGE creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172854Z modifyTimestamp: 20070307172854Z # entry-id: 94 dn: ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a267-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 95 dn: cn=UI,ou=4.0, ou=admin, ou=Global Preferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a268-1dd211b2-8008e98c-0e470000 cn: UI objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 96 dn: ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a269-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalUnit ou: Console creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 97 dn: ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a26a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: organizationalUnit ou: 4.0 creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 98 dn: cn=General,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a26b-1dd211b2-8008e98c-0e470000 cn: General objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307174343Z nsPreference:: IwojV2VkIE1hciAwNyAxMDo0Mzo0NCBNU1QgMjAwNwpXaWR0aD03NTAKU2hvd1N0YXR1c0Jhcj10cnVlClNob3dCYW5uZXJCYXI9dHJ1ZQpZPTE4NQpYPTIwMwpIZWlnaHQ9NTMwCg== # entry-id: 99 dn: cn=Fonts,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a26c-1dd211b2-8008e98c-0e470000 cn: Fonts objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 100 dn: cn=ResourcePage,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a26d-1dd211b2-8008e98c-0e470000 cn: ResourcePage objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307174343Z nsPreference:: IwojV2VkIE1hciAwNyAxMDo0Mzo0NCBNU1QgMjAwNwpTaG93VHJlZT10cnVlCg== # entry-id: 101 dn: cn=CustomViews,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 5131a26e-1dd211b2-8008e98c-0e470000 cn: CustomViews objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172916Z modifyTimestamp: 20070307172916Z # entry-id: 102 dn: cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb04-1dd211b2-8008e98c-0e470000 objectClass: netscapeServer objectClass: nsDirectoryServer objectClass: nsResourceRef objectClass: nsConfig objectClass: groupOfUniqueNames objectClass: top nsServerSecurity: off nsServerID: slapd-localhost2 nsBindDN: cn=directory manager nsBaseDN: dc=example,dc=com serverRoot: /opt/389-ds nsServerPort: 399 nsSecureServerPort: 636 serverProductName: Directory Server (localhost2) serverVersionNumber: 1.1.0 installationTimeStamp: 20070307174048Z nsSuiteSpotUser: nobody serverHostName: localhost cn: slapd-localhost2 aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) aci: (targetattr="uniquemember || serverProductName || administratorContactInfo || userpassword || description")(targetfilter=(objectclass=netscapeServer))(version 3.0; acl "Enable access delegation"; allow (write) groupdn="ldap:///cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) uniqueMember: cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot uniqueMember: cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot userPassword: {SSHA}KJeCJhQmZyQnjSR+AS1qL9wTa8rgaksW5Zcz6A== creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: cn=server,cn=plugins,cn=config createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z passwordGraceUserTime: 0 # entry-id: 103 dn: cn=configuration,cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb05-1dd211b2-8008e98c-0e470000 objectClass: nsResourceRef objectClass: nsAdminObject objectClass: nsDirectoryInfo objectClass: top cn: configuration nsClassname: com.netscape.admin.dirserv.DSAdmin@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsJarfilename: ds11.jar nsDirectoryInfoRef: cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot";) creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 104 dn: cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb06-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsResourceRef cn: Tasks creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 105 dn: cn=Operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb07-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstaskgroup nsTaskLabel: Operation Tasks Group cn: Operation creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 106 dn: cn=task summary, cn=Operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb08-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nsConfig description: start stop restart Backup Restore KeyCert Authenticate CompleteImport CompleteExport cn: task summary creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 107 dn: cn=start, cn=Operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb09-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Start@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: start cn: start creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 108 dn: cn=stop, cn=Operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0a-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Stop@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: shutdown cn: stop creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 109 dn: cn=restart, cn=Operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0b-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restart@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: restart cn: restart creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 110 dn: cn=Backup, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0c-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Backup@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: ds_db2bak cn: Backup creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 111 dn: cn=Restore, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0d-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Restore@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsExecRef: ds_bak2db cn: Restore creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 112 dn: cn=KeyCert, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0e-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.KeyCert@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: KeyCert creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 113 dn: cn=Authenticate, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb0f-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.Authenticate@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: Authenticate creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 114 dn: cn=CompleteImport, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb10-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteImport@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: CompleteImport creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 115 dn: cn=CompleteExport, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb11-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsClassname: com.netscape.admin.dirserv.task.CompleteExport@ds11.jar@cn=admin-serv-localhost, cn=389 Administration Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot cn: CompleteExport creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 116 dn: cn=Export, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb12-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_db2ldif cn: Export creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 117 dn: cn=Import, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb13-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_ldif2db cn: Import creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 118 dn: cn=ViewLog, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb14-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: perl?ds_viewlog.pl cn: ViewLog creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 119 dn: cn=ListBackups, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb15-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_listdb cn: ListBackups creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 120 dn: cn=Remove, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb16-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_remove cn: Remove creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 121 dn: cn=CreateVLVIndex, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb17-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: vlvindex cn: CreateVLVIndex creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 122 dn: cn=AddIndex, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb18-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: addindex cn: AddIndex creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 123 dn: cn=SNMPCtrl, cn=operation, cn=Tasks, cn=slapd-localhost2, cn=389 Directory Server, cn=Server Group, cn=localhost.localdomain, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb19-1dd211b2-8008e98c-0e470000 objectClass: top objectClass: nstask objectClass: nsAdminObject nsExecRef: ds_snmpctrl cn: SNMPCtrl creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307172952Z modifyTimestamp: 20070307174048Z # entry-id: 127 dn: cn=DS_MISCELLANEOUS,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb20-1dd211b2-8008e98c-0e470000 cn: DS_MISCELLANEOUS objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307173028Z modifyTimestamp: 20070307173028Z # entry-id: 128 dn: cn=TaskTab,ou=4.0,ou=Console,ou="uid=admin, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot",ou=UserPreferences, ou=localdomain, o=NetscapeRoot nsUniqueId: 73c3bb21-1dd211b2-8008e98c-0e470000 cn: TaskTab objectClass: top objectClass: nsAdminConsoleUser creatorsName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot modifiersName: uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot createTimestamp: 20070307173030Z modifyTimestamp: 20070307173030Z 389-admin-1.1.35/tests/restartsrv/000077500000000000000000000000001220472121400165665ustar00rootroot00000000000000389-admin-1.1.35/tests/restartsrv/testget.1000066400000000000000000000000001220472121400203150ustar00rootroot00000000000000389-admin-1.1.35/tests/restartsrv/testget.2000066400000000000000000000000031220472121400203210ustar00rootroot00000000000000op=389-admin-1.1.35/tests/restartsrv/testget.3000066400000000000000000000000071220472121400203260ustar00rootroot00000000000000foo=bar389-admin-1.1.35/tests/restartsrv/testget.4000066400000000000000000000000131220472121400203240ustar00rootroot00000000000000op=asdfasdf389-admin-1.1.35/tests/restartsrv/testget.5000066400000000000000000000000111220472121400203230ustar00rootroot00000000000000op=getpid389-admin-1.1.35/tests/restartsrv/testget.6000066400000000000000000000000121220472121400203250ustar00rootroot00000000000000op=restart389-admin-1.1.35/tests/security/000077500000000000000000000000001220472121400162165ustar00rootroot00000000000000389-admin-1.1.35/tests/security/testpost.1000066400000000000000000000001431220472121400201630ustar00rootroot00000000000000sie=slapd-INSTANCE&dllname=PEM&filename=libnsspem.so&formop=MODULE_OPERATION&format=dll&op_type=add389-admin-1.1.35/tests/security/testpost.10000066400000000000000000000142641220472121400202540ustar00rootroot00000000000000keypwd=88865d09e260d77c6caf9cd040c2a0fe9d182afe&sie=slapd-INSTANCE&formop=INSTALL_CERT&trust_flag=0&certtype=0&installmethod=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&tokenname=internal+%28software%29&certname=new+CA389-admin-1.1.35/tests/security/testpost.11000066400000000000000000000142241220472121400202510ustar00rootroot00000000000000keypwd=password&sie=slapd-INSTANCE&formop=INSTALL_CERT&trust_flag=0&certtype=0&installmethod=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&tokenname=internal+%28software%29&certname=new+CA389-admin-1.1.35/tests/security/testpost.12000066400000000000000000000142251220472121400202530ustar00rootroot00000000000000keypwd=Secret123&sie=slapd-INSTANCE&formop=INSTALL_CERT&trust_flag=0&certtype=0&installmethod=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&tokenname=internal+%28software%29&certname=new+CA389-admin-1.1.35/tests/security/testpost.13000066400000000000000000000142241220472121400202530ustar00rootroot00000000000000keypwd=secret12&sie=slapd-INSTANCE&formop=INSTALL_CERT&trust_flag=0&certtype=0&installmethod=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&tokenname=internal+%28software%29&certname=new+CA389-admin-1.1.35/tests/security/testpost.14000066400000000000000000000141441220472121400202550ustar00rootroot00000000000000sie=slapd-INSTANCE&certtype=0&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&trust_flag=0&formop=INSTALL_CERT&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.15000066400000000000000000000001141220472121400202460ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.16000066400000000000000000000003031220472121400202470ustar00rootroot00000000000000sie=slapd-INSTANCE&trust_flag=144&formop=CHANGE_TRUST&certfingerprint=07%3A02%3ADA%3A73%3A00%3ADD%3A5C%3A64%3A29%3A3B%3A31%3A76%3A6F%3A85%3A75%3A26&certname=internal+%28software%29%3AQE+BOSTON+CA389-admin-1.1.35/tests/security/testpost.17000066400000000000000000000003031220472121400202500ustar00rootroot00000000000000sie=slapd-INSTANCE&trust_flag=128&formop=CHANGE_TRUST&certfingerprint=07%3A02%3ADA%3A73%3A00%3ADD%3A5C%3A64%3A29%3A3B%3A31%3A76%3A6F%3A85%3A75%3A26&certname=internal+%28software%29%3AQE+BOSTON+CA389-admin-1.1.35/tests/security/testpost.18000066400000000000000000000002701220472121400202540ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=FIND_CERTIFICATE&certfingerprint=07%3A02%3ADA%3A73%3A00%3ADD%3A5C%3A64%3A29%3A3B%3A31%3A76%3A6F%3A85%3A75%3A26&certname=internal+%28software%29%3AQE+BOSTON+CA389-admin-1.1.35/tests/security/testpost.19000066400000000000000000000002671220472121400202630ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=FIND_CERTIFICATE&certfingerprint=D7%3AB0%3A2A%3ADC%3ACF%3A97%3A30%3A6C%3A78%3A42%3A4E%3A09%3A35%3A31%3ADD%3A6D&certname=internal+%28software%29%3Aserver-cert389-admin-1.1.35/tests/security/testpost.2000066400000000000000000000000451220472121400201650ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_MODULE389-admin-1.1.35/tests/security/testpost.20000066400000000000000000000001141220472121400202420ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.21000066400000000000000000000000441220472121400202450ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=TOKEN_INFO389-admin-1.1.35/tests/security/testpost.3000066400000000000000000000001141220472121400201630ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.4000066400000000000000000000142021220472121400201670ustar00rootroot00000000000000sie=slapd-INSTANCE&certtype=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&trust_flag=144&formop=INSTALL_CERT&installmethod=1&tokenname=internal+%28software%29&certname=CA389-admin-1.1.35/tests/security/testpost.5000066400000000000000000000142021220472121400201700ustar00rootroot00000000000000sie=slapd-INSTANCE&certtype=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&trust_flag=144&formop=INSTALL_CERT&installmethod=1&tokenname=internal+%28software%29&certname=CA389-admin-1.1.35/tests/security/testpost.6000066400000000000000000000001141220472121400201660ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.7000066400000000000000000000001141220472121400201670ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.8000066400000000000000000000141441220472121400202000ustar00rootroot00000000000000sie=slapd-INSTANCE&certtype=1&dercert=Certificate%3A%0A++++Data%3A%0A++++++++Version%3A+3+%280x2%29%0A++++++++Serial+Number%3A%0A++++++++++++98%3A12%3A07%3A62%3A86%3A07%3A59%3Aec%0A++++++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++Issuer%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Validity%0A++++++++++++Not+Before%3A+Jun++2+22%3A09%3A01+2011+GMT%0A++++++++++++Not+After+%3A+Jun++1+22%3A09%3A01+2014+GMT%0A++++++++Subject%3A+C%3DUS%2C+ST%3DNM%2C+O%3DCO%2C+CN%3DCA%0A++++++++Subject+Public+Key+Info%3A%0A++++++++++++Public+Key+Algorithm%3A+rsaEncryption%0A++++++++++++++++Public-Key%3A+%282048+bit%29%0A++++++++++++++++Modulus%3A%0A++++++++++++++++++++00%3Abb%3Ac1%3Ae3%3Ac7%3Aff%3A79%3A31%3A99%3A56%3A78%3A3e%3Aa8%3Aff%3Ac1%3A%0A++++++++++++++++++++58%3Ac0%3A88%3A15%3A82%3A6c%3Ab6%3A55%3A36%3Af2%3Acd%3Aaa%3A40%3A73%3A83%3A%0A++++++++++++++++++++e4%3Ae1%3A08%3A51%3A39%3A46%3Ab4%3Abb%3A2e%3A4b%3A2d%3A58%3Ab2%3A91%3A57%3A%0A++++++++++++++++++++1b%3A83%3A57%3Ae1%3A91%3A64%3Ac8%3Ac1%3A19%3Af2%3A18%3Af9%3A69%3A74%3A0c%3A%0A++++++++++++++++++++1d%3Aec%3A6f%3A3e%3Af2%3Ac7%3A6c%3Af7%3A06%3A9a%3Ac7%3A51%3A38%3A6f%3A1d%3A%0A++++++++++++++++++++6b%3A2e%3A8f%3Af8%3Ae0%3A3e%3Ae3%3Ab9%3Aac%3Acf%3Aac%3Aac%3Ada%3Af8%3A9c%3A%0A++++++++++++++++++++0f%3A9a%3A37%3A80%3A47%3A93%3Af0%3A1e%3A75%3A3d%3Ad1%3A69%3Ad0%3A15%3Aeb%3A%0A++++++++++++++++++++26%3Afe%3Abf%3A55%3A88%3Aca%3A0d%3Ac1%3A52%3Ae2%3A9a%3A4b%3Aa5%3Ac0%3Ae2%3A%0A++++++++++++++++++++3d%3A26%3A83%3Ab6%3A63%3Ac8%3A41%3A11%3A27%3A68%3A7d%3Ab4%3A82%3Ae4%3A6f%3A%0A++++++++++++++++++++13%3A05%3A2f%3A2f%3A08%3Ac5%3A64%3Ad6%3Aa2%3Aa5%3A61%3A92%3A67%3A15%3A95%3A%0A++++++++++++++++++++cc%3A3e%3A26%3A8d%3Ac7%3A45%3A45%3A28%3A34%3A2c%3A60%3A2f%3A19%3A94%3Abf%3A%0A++++++++++++++++++++a7%3A6a%3A62%3Ac6%3A8a%3A44%3A3a%3Ac9%3A15%3A60%3A6e%3A99%3Ac4%3A1d%3A7f%3A%0A++++++++++++++++++++bc%3Afc%3A40%3A2e%3A45%3Aa1%3Ad8%3A24%3A4c%3A7d%3A63%3A06%3A93%3Ae5%3A8b%3A%0A++++++++++++++++++++2f%3A1b%3A6c%3A79%3A2d%3A8d%3Ab1%3A27%3A8a%3A67%3Aff%3Ace%3Ac8%3A48%3Ad7%3A%0A++++++++++++++++++++a3%3A45%3A64%3A99%3A60%3Af0%3Add%3Ab7%3A83%3Ac2%3Aea%3A23%3Ac4%3Af9%3A82%3A%0A++++++++++++++++++++8e%3Aa0%3Ae5%3Af0%3A63%3Ab1%3A0e%3A15%3Af5%3A10%3Ad2%3Aa5%3A2d%3A53%3A17%3A%0A++++++++++++++++++++20%3A00%3Aa8%3A4e%3Ad9%3A6d%3Ac2%3A11%3A68%3A3a%3A8e%3Ad1%3A3a%3A78%3Af2%3A%0A++++++++++++++++++++1e%3Ad7%0A++++++++++++++++Exponent%3A+65537+%280x10001%29%0A++++++++X509v3+extensions%3A%0A++++++++++++X509v3+Subject+Key+Identifier%3A+%0A++++++++++++++++BF%3A0F%3A9E%3AC2%3AED%3A83%3A48%3A3A%3A77%3A9C%3A46%3A11%3A96%3A02%3AB1%3A70%3AD0%3A61%3A45%3A4A%0A++++++++++++X509v3+Basic+Constraints%3A+critical%0A++++++++++++++++CA%3ATRUE%0A++++++++++++X509v3+Key+Usage%3A+%0A++++++++++++++++Digital+Signature%2C+Certificate+Sign%2C+CRL+Sign%0A++++++++++++X509v3+CRL+Distribution+Points%3A+%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++++++Full+Name%3A%0A++++++++++++++++++URI%3Ahttp%3A%2F%2Flocalhost.localdomain%3A9831%2Fmyca.crl%0A%0A++++++++++++1.3.6.1.4.1.311.21.1%3A+%0A++++++++++++++++...%0A++++++++++++1.3.6.1.4.1.311.21.2%3A+%0A++++++++++++++++..%3B...I..n...F..2...%0A++++Signature+Algorithm%3A+sha1WithRSAEncryption%0A++++++++46%3A4c%3Aa8%3A42%3A64%3A30%3A54%3A03%3A12%3A5d%3A2b%3Adb%3A5a%3A3b%3Af5%3A58%3A23%3A0d%3A%0A++++++++d3%3A4d%3A99%3A2b%3Ab0%3A82%3Ae6%3A87%3A7e%3A1d%3A48%3A9c%3Adb%3A6d%3A42%3Ae0%3Ab6%3Aba%3A%0A++++++++1e%3Af4%3A81%3Ae1%3A3f%3A9c%3A1f%3Ab1%3A2e%3Aed%3A35%3Ae4%3A92%3Aef%3Ab6%3Aa0%3A9d%3A94%3A%0A++++++++15%3A97%3A4c%3A54%3A3f%3Ad3%3A1a%3A6e%3Ad6%3A74%3Aaa%3Ac1%3Aca%3Ac6%3A56%3Ace%3Aa0%3Aa7%3A%0A++++++++07%3Aa5%3A5d%3A47%3A4b%3Aec%3A3f%3A1b%3Acb%3Ae9%3A1a%3Afd%3A2f%3Ae7%3Afc%3A4c%3A23%3A79%3A%0A++++++++4f%3A81%3A77%3A37%3Aab%3A75%3Acc%3A8d%3A3d%3Adf%3A94%3A50%3A2f%3A15%3A2a%3A1f%3A2a%3Af4%3A%0A++++++++e1%3A00%3A43%3A29%3Ac4%3A59%3A54%3A55%3A0e%3Aeb%3A7e%3A79%3A1b%3Aaa%3A8d%3Ac6%3A6c%3A53%3A%0A++++++++38%3Ad9%3Af2%3A55%3Afe%3A8d%3Ad1%3A8e%3A55%3Aa8%3Afd%3A43%3A48%3A58%3Af2%3A25%3Af1%3Abf%3A%0A++++++++6b%3A8b%3A0f%3Aea%3A86%3Ab5%3Aba%3Ab6%3A8e%3A6c%3A81%3A78%3Ac2%3Aa4%3Aea%3A9e%3Ada%3A83%3A%0A++++++++32%3A15%3A7c%3Ac2%3A86%3A43%3A94%3A22%3A39%3A33%3Ae0%3A6f%3A11%3Af9%3A40%3A8f%3A0e%3A60%3A%0A++++++++5c%3A67%3A8d%3A16%3A47%3A0b%3Ab6%3Ad7%3Ae5%3A15%3A78%3A86%3Af7%3Aef%3A7b%3A52%3Aea%3Ae8%3A%0A++++++++83%3A16%3Ae0%3Afc%3A6b%3Ac2%3A26%3Ae8%3Af9%3A0c%3A37%3A60%3A9e%3A61%3Ac2%3Ae5%3A5e%3Af8%3A%0A++++++++72%3A79%3A3f%3A43%3A84%3A39%3A76%3A60%3A6a%3A1b%3A58%3A6c%3A1f%3Aaa%3A27%3Aa3%3A58%3A24%3A%0A++++++++02%3Ad9%3A34%3A53%3A46%3Ab7%3Ae5%3A6e%3A85%3A32%3A1d%3A86%3A86%3Aed%3A08%3Aa9%3Ac5%3A17%3A%0A++++++++54%3A67%3A4c%3A82%0A-----BEGIN+CERTIFICATE-----%0AMIID0DCCArigAwIBAgIJAJgSB2KGB1nsMA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV%0ABAYTAlVTMQswCQYDVQQIDAJOTTELMAkGA1UECgwCQ08xCzAJBgNVBAMMAkNBMB4X%0ADTExMDYwMjIyMDkwMVoXDTE0MDYwMTIyMDkwMVowNDELMAkGA1UEBhMCVVMxCzAJ%0ABgNVBAgMAk5NMQswCQYDVQQKDAJDTzELMAkGA1UEAwwCQ0EwggEiMA0GCSqGSIb3%0ADQEBAQUAA4IBDwAwggEKAoIBAQC7wePH%2F3kxmVZ4Pqj%2FwVjAiBWCbLZVNvLNqkBz%0Ag%2BThCFE5RrS7LkstWLKRVxuDV%2BGRZMjBGfIY%2BWl0DB3sbz7yx2z3BprHUThvHWsu%0Aj%2FjgPuO5rM%2BsrNr4nA%2BaN4BHk%2FAedT3RadAV6yb%2Bv1WIyg3BUuKaS6XA4j0mg7Zj%0AyEERJ2h9tILkbxMFLy8IxWTWoqVhkmcVlcw%2BJo3HRUUoNCxgLxmUv6dqYsaKRDrJ%0AFWBumcQdf7z8QC5FodgkTH1jBpPliy8bbHktjbEnimf%2FzshI16NFZJlg8N23g8Lq%0AI8T5go6g5fBjsQ4V9RDSpS1TFyAAqE7ZbcIRaDqO0Tp48h7XAgMBAAGjgeQwgeEw%0AHQYDVR0OBBYEFL8PnsLtg0g6d5xGEZYCsXDQYUVKMA8GA1UdEwEB%2FwQFMAMBAf8w%0ACwYDVR0PBAQDAgGGMG0GA1UdHwRmMGQwMKAuoCyGKmh0dHA6Ly9sb2NhbGhvc3Qu%0AbG9jYWxkb21haW46OTgzMS9teWNhLmNybDAwoC6gLIYqaHR0cDovL2xvY2FsaG9z%0AdC5sb2NhbGRvbWFpbjo5ODMxL215Y2EuY3JsMBAGCSsGAQQBgjcVAQQDAgEDMCEG%0ACSsGAQQBgjcVAgQUrcg7GeeTSRscbqD9i0bNnzLlkvwwDQYJKoZIhvcNAQEFBQAD%0AggEBAEZMqEJkMFQDEl0r21o79VgjDdNNmSuwguaHfh1InNttQuC2uh70geE%2FnB%2Bx%0ALu015JLvtqCdlBWXTFQ%2F0xpu1nSqwcrGVs6gpwelXUdL7D8by%2Bka%2FS%2Fn%2FEwjeU%2BB%0AdzerdcyNPd%2BUUC8VKh8q9OEAQynEWVRVDut%2BeRuqjcZsUzjZ8lX%2BjdGOVaj9Q0hY%0A8iXxv2uLD%2BqGtbq2jmyBeMKk6p7agzIVfMKGQ5QiOTPgbxH5QI8OYFxnjRZHC7bX%0A5RV4hvfve1Lq6IMW4Pxrwibo%2BQw3YJ5hwuVe%2BHJ5P0OEOXZgahtYbB%2BqJ6NYJALZ%0ANFNGt%2BVuhTIdhobtCKnFF1RnTII%3D%0A-----END+CERTIFICATE-----%0A&trust_flag=0&formop=INSTALL_CERT&tokenname=internal+%28software%29389-admin-1.1.35/tests/security/testpost.9000066400000000000000000000001141220472121400201710ustar00rootroot00000000000000sie=slapd-INSTANCE&formop=LIST_CERTIFICATE&tokenname=internal+%28software%29389-admin-1.1.35/tests/setup.sh000077500000000000000000000222571220472121400160560ustar00rootroot00000000000000#!/bin/sh testdir="$1" hostname=vmhost.testdomain.com domain=testdomain.com sroot=/home/$USER/dsol port=1200 secport=1201 rootdn="cn=directory manager" escapedrootdn='cn\\\\3Ddirectory manager' rootpw=password adminpw=boguspassword adminpw=admin #needinstance=1 #needdata=1 usessl=1 secdir=/home/$USER/save #PATH=/usr/lib64/mozldap:$PATH #export PATH instance=ds if [ "$needinstance" ] ; then $sroot/sbin/setup-ds.pl -s -f - < $sslconf < $tmpfile ldapmodify -x -h $hostname -p $port -D "$rootdn" -w "$rootpw" -c -a -f $tmpfile rm -f $tmpfile done fi rm -rf testtmp mkdir testtmp if [ "$usessl" ] ; then ldapurl="ldaps://$hostname:$secport/o=NetscapeRoot" else ldapurl="ldap://$hostname:$port/o=NetscapeRoot" fi cat > testtmp/adm.conf < testtmp/admpw < testtmp/console.conf < $pwpfile < /dev/null | sort -n > $getlist for test in `cat $getlist` ; do if [ ! -d results/$prog ] ; then mkdir -p results/$prog ; fi sed -e s/HOSTNAME/$hostname/g -e s/DOMAIN/$domain/g -e s/INSTANCE/$instance/g -e s/PORT/$port/g -e s/USER/$USER/g $test > $test.sed basetest=`basename $test` echo "Running test $test" REQUEST_METHOD=GET ; export REQUEST_METHOD QUERY_STRING="`cat $test.sed`" ; export QUERY_STRING SCRIPT_NAME=admin-serv/Tasks/Operation/$prog ; export SCRIPT_NAME # open pwpfile for reading as file desc 4 - CGIs have to use stdin (0) for POST exec 4<$pwpfile PASSWORD_PIPE=4 ; export PASSWORD_PIPE if [ "$DEBUGCMD" = "$VALGRIND" ] ; then VGFILE="results/$prog/vg.$basetest" fi if [ -n "$DEBUGCMD" -a "$DEBUGCMD" = "$GDB" ] ; then echo "break main" > .gdbinit echo "run > results/$prog/$basetest.html" >> .gdbinit ./libtool --mode execute $GDB ./$prog else ./libtool --mode execute ${DEBUGCMD}$VGFILE ./$prog > results/$prog/$basetest.html fi rm $test.sed done rm -f $getlist cp -p testtmp/adm.conf.orig testtmp/adm.conf postlist=/tmp/posttests.$$ find $testdir/$prog -name testpost.\* -print 2> /dev/null | sort -n > $postlist for test in `cat $postlist` ; do if [ ! -d results/$prog ] ; then mkdir -p results/$prog ; fi sed -e s/HOSTNAME/$hostname/g -e s/DOMAIN/$domain/g -e s/INSTANCE/$instance/g -e s/PORT/$port/g -e s/USER/$USER/g $test > $test.sed basetest=`basename $test` echo "Running test $test" REQUEST_METHOD=POST ; export REQUEST_METHOD CONTENT_LENGTH=`wc -c $test.sed | cut -f1 -d' '` ; export CONTENT_LENGTH SCRIPT_NAME=admin-serv/Tasks/Operation/$prog ; export SCRIPT_NAME # open pwpfile for reading as file desc 4 - CGIs have to use stdin (0) for POST exec 4<$pwpfile PASSWORD_PIPE=4 ; export PASSWORD_PIPE if [ "$DEBUGCMD" = "$VALGRIND" ] ; then VGFILE="results/$prog/vg.$basetest" fi if [ -n "$DEBUGCMD" -a "$DEBUGCMD" = "$GDB" ] ; then echo "break main" > .gdbinit echo "run < $test.sed > results/$prog/$basetest.html" >> .gdbinit ./libtool --mode execute $GDB ./$prog else ./libtool --mode execute ${DEBUGCMD}$VGFILE ./$prog < $test.sed > results/$prog/$basetest.html fi rm $test.sed done rm -f $postlist cp -p testtmp/adm.conf.orig testtmp/adm.conf done for prog in $SCRIPTS ; do getlist=/tmp/gettests.$$ find $testdir/$prog -name testget.\* -print 2> /dev/null | sort -n > $getlist for test in `cat $getlist` ; do if [ ! -d results/$prog ] ; then mkdir -p results/$prog ; fi sed -e s/HOSTNAME/$hostname/g -e s/DOMAIN/$domain/g -e s/INSTANCE/$instance/g -e s/PORT/$port/g -e s/USER/$USER/g $test > $test.sed basetest=`basename $test` echo "Running test $test" REQUEST_METHOD=GET ; export REQUEST_METHOD QUERY_STRING="`cat $test.sed`" ; export QUERY_STRING SCRIPT_NAME=slapd/Tasks/Operation/$prog ; export SCRIPT_NAME # open pwpfile for reading as file desc 4 - CGIs have to use stdin (0) for POST exec 4<$pwpfile PASSWORD_PIPE=4 ; export PASSWORD_PIPE if [ -n "$DEBUGCMD" -a "$DEBUGCMD" = "$GDB" ] ; then perl -d admserv/cgi-src40/$prog else perl -w admserv/cgi-src40/$prog fi rm $test.sed done rm -f $getlist cp -p testtmp/adm.conf.orig testtmp/adm.conf done rm -rf $pwpfile .gdbinit 389-admin-1.1.35/tests/stopsrv/000077500000000000000000000000001220472121400160675ustar00rootroot00000000000000389-admin-1.1.35/tests/stopsrv/testget.1000066400000000000000000000000001220472121400176160ustar00rootroot00000000000000389-admin-1.1.35/tests/stopsrv/testget.2000066400000000000000000000000151220472121400176250ustar00rootroot00000000000000return_format389-admin-1.1.35/tests/stopsrv/testget.3000066400000000000000000000000161220472121400176270ustar00rootroot00000000000000return_format=389-admin-1.1.35/tests/stopsrv/testget.4000066400000000000000000000000361220472121400176320ustar00rootroot00000000000000return_format=asdfakljalkajsdf389-admin-1.1.35/tests/stopsrv/testget.5000066400000000000000000000000221220472121400176260ustar00rootroot00000000000000return_format=html389-admin-1.1.35/tests/ugdsconfig/000077500000000000000000000000001220472121400164775ustar00rootroot00000000000000389-admin-1.1.35/tests/ugdsconfig/testget.1000066400000000000000000000000011220472121400202270ustar00rootroot00000000000000 389-admin-1.1.35/tests/ugdsconfig/testget.10000066400000000000000000000003351220472121400203210ustar00rootroot00000000000000op=setconfig&ugdsconfig.inforef=cn%3DUserDirectory%2C+ou%3DGlobal+Preferences%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot&ugdsconfig.dirurl=ldap://newhost:newport/o=newsuffix&ugdsconfig.binddn=newbinddn&ugdsconfig.bindpw=newbindpw389-admin-1.1.35/tests/ugdsconfig/testget.2000066400000000000000000000000031220472121400202320ustar00rootroot00000000000000op=389-admin-1.1.35/tests/ugdsconfig/testget.3000066400000000000000000000000141220472121400202350ustar00rootroot00000000000000op=getconfig389-admin-1.1.35/tests/ugdsconfig/testget.4000066400000000000000000000000141220472121400202360ustar00rootroot00000000000000op=setconfig389-admin-1.1.35/tests/ugdsconfig/testget.5000066400000000000000000000000451220472121400202430ustar00rootroot00000000000000=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=&=389-admin-1.1.35/tests/ugdsconfig/testget.6000066400000000000000000000000101220472121400202340ustar00rootroot00000000000000op=bogus389-admin-1.1.35/tests/ugdsconfig/testget.7000066400000000000000000000000231220472121400202410ustar00rootroot00000000000000op=setconfig&bogus=389-admin-1.1.35/tests/ugdsconfig/testget.8000066400000000000000000000001311220472121400202420ustar00rootroot00000000000000op=setconfig&ugdsconfig.inforef=&ugdsconfig.dirurl=&ugdsconfig.binddn=&ugdsconfig.bindpw=389-admin-1.1.35/tests/ugdsconfig/testget.9000066400000000000000000000002271220472121400202510ustar00rootroot00000000000000op=setconfig&ugdsconfig.inforef=newinforef&ugdsconfig.dirurl=ldap://newhost:newport/o=newsuffix&ugdsconfig.binddn=newbinddn&ugdsconfig.bindpw=newbindpw389-admin-1.1.35/tests/viewdata/000077500000000000000000000000001220472121400161535ustar00rootroot00000000000000389-admin-1.1.35/tests/viewdata/testget.1000066400000000000000000000000011220472121400177030ustar00rootroot00000000000000 389-admin-1.1.35/tests/viewdata/testget.2000066400000000000000000000001751220472121400177200ustar00rootroot00000000000000sie=cn%3Dslapd-INSTANCE%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot389-admin-1.1.35/tests/viewdata/testget.3000066400000000000000000000001761220472121400177220ustar00rootroot00000000000000sie=cn%3Dslapd-INSTANCE2%2C+cn%3D389+Directory+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot389-admin-1.1.35/tests/viewdata/testget.4000066400000000000000000000002101220472121400177100ustar00rootroot00000000000000sie=cn%3Dadmin-serv-INSTANCE%2C+cn%3D389+Administration+Server%2C+cn%3DServer+Group%2C+cn%3DHOSTNAME%2C+ou%3DDOMAIN%2C+o%3DNetscapeRoot 389-admin-1.1.35/tests/viewlog/000077500000000000000000000000001220472121400160235ustar00rootroot00000000000000389-admin-1.1.35/tests/viewlog/testget.1000066400000000000000000000000451220472121400175630ustar00rootroot00000000000000file=access&num=25&str=&id=admin-serv389-admin-1.1.35/tests/viewlog/testget.2000066400000000000000000000000441220472121400175630ustar00rootroot00000000000000file=error&num=25&str=&id=admin-serv389-admin-1.1.35/tests/viewlog/testget.3000066400000000000000000000000521220472121400175630ustar00rootroot00000000000000file=access&num=25&str=&id=slapd-INSTANCE 389-admin-1.1.35/tests/viewlog/testget.4000066400000000000000000000000521220472121400175640ustar00rootroot00000000000000file=errors&num=25&str=&id=slapd-INSTANCE 389-admin-1.1.35/wrappers/000077500000000000000000000000001220472121400150505ustar00rootroot00000000000000389-admin-1.1.35/wrappers/initscript.in000066400000000000000000000144061220472121400175750ustar00rootroot00000000000000#!/bin/sh # # @package_name@ This starts and stops @package_name@ # # chkconfig: - 21 79 # description: @package_name@ Admin Server # processname: @sbindir@/httpd # piddir: @localstatedir@/run/@PACKAGE_BASE_NAME@ # # Source function library. if [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions fi # Source networking configuration. if [ -f /etc/sysconfig/network ] ; then . /etc/sysconfig/network fi # Check that networking is up. if [ "${NETWORKING}" = "no" ] then echo "Networking is down" exit 0 fi # figure out which echo we're using ECHO_N=`echo -n` # some shells echo cannot use -n - linux echo by default cannot use \c echo_n() { if [ "$ECHO_N" = '-n' ] ; then echo "$*\c" else echo -n "$*" fi } # failure and success are not defined on some platforms type failure > /dev/null 2>&1 || { failure() { echo_n " FAILED" } } type success > /dev/null 2>&1 || { success() { echo_n " SUCCESS" } } # On Solaris /var/run is in tmpfs and gets wiped out upon reboot # we have to recreate the /var/run/@package_name@ directory # We also have to make sure that the directory is writable # by the directory server process # the argument to this function is the server instance directory, # which must have a dse.ldif file in it fix_pid_dir_ownership() { if [ -d $piddir ] ; then owner=`grep \^sysuser @instconfigdir@/admin-serv/adm.conf | awk '{print $2}'` dirowner=`ls -ld $piddir | awk '{print $3}'` dirgrp=`ls -ld $piddir | awk '{print $4}'` if [ "$owner" != "$dirowner" ]; then groups $owner | grep $dirgrp > /dev/null 2>&1 rc=$? if [ $rc -eq 0 ]; then chmod 770 $piddir else echo_n "$piddir is not writable for $owner" failure; echo exit 1 fi fi else mkdir -p $piddir owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'` if [ -n "$owner" ] ; then chown $owner $piddir chmod 700 $piddir fi fi } start_script=@sbindir@/start-ds-admin restart_script=@sbindir@/restart-ds-admin stop_script=@sbindir@/stop-ds-admin exec=`grep "^HTTPD=" $start_script | awk -F= '{print $2}'` prog="@package_name@" # PID directory piddir="@localstatedir@/run/@PACKAGE_BASE_NAME@" # PID file pidfile=$piddir/admin-serv.pid lockfile=/var/lock/subsys/@package_name@ [ -f $exec ] || exit 0 umask 077 RETVAL=0 # since we use the start script to start admin, we source the # init config file there, not here # if we ever get rid of the start script, we'll have to uncomment # the following line #[ -f @initconfigdir@/@package_name@ ] && . @initconfigdir@/@package_name@ start() { if [ ! -f $start_script ]; then echo_n "*** Error: $start_script does not exist" failure; echo exit 1 fi echo "Starting $prog: " # the server creates pidfile and writes the pid to it when it is fully # started and available to serve clients server_running=0 if [ -f $pidfile ]; then pid=`cat $pidfile` if kill -0 $pid > /dev/null 2>&1 ; then echo_n " already running" success; echo server_running=1 else echo_n " not running, but pid file exists - attempt to start anyway..." rm -f $pidfile fi fi server_started=0 if [ $server_running -eq 0 ] ; then rm -f $pidfile fix_pid_dir_ownership $start_script if [ $? -eq 0 ]; then server_started=1 # well, perhaps not running, but started ok else failure; echo RETVAL=1 fi fi if [ $server_started -eq 1 ] ; then loop_counter=1 # wait for 10 minutes (600 times 1 seconds) max_count=600 while test $loop_counter -le $max_count ; do loop_counter=`expr $loop_counter + 1` if test ! -f $pidfile ; then sleep 1 else pid=`cat $pidfile` break fi done if kill -0 $pid > /dev/null 2>&1 && test -f $pidfile ; then success; echo else echo_n "*** Error: $prog failed to start" failure; echo RETVAL=1 fi fi [ $RETVAL -eq 0 -a -d /var/lock/subsys ] && touch $lockfile if [ -f $lockfile ]; then restorecon $lockfile fi } stop() { if [ ! -f $stop_script ]; then echo_n "$stop_script does not exist" failure; echo exit 1 fi echo "Shutting down $prog: " if [ -f $pidfile ]; then pid=`cat $pidfile` server_stopped=0 if kill -0 $pid > /dev/null 2>&1 ; then kill $pid if [ $? -eq 0 ]; then server_stopped=1 else failure; echo RETVAL=1 fi fi if [ $server_stopped -eq 1 ] ; then loop_counter=1 # wait for 10 minutes (600 times 1 second) max_count=600 while test $loop_counter -le $max_count; do loop_counter=`expr $loop_counter + 1` if kill -0 $pid > /dev/null 2>&1 ; then sleep 1 else if test -f $pidfile ; then rm -f $pidfile fi break fi done if test -f $pidfile ; then echo_n "*** Error: $prog failed to stop" failure; echo RETVAL=1 else success; echo rm -f $pidfile fi fi fi [ $RETVAL -eq 0 ] && rm -f $lockfile } restart() { stop start } status() { if [ -f $pidfile ]; then pid=`cat $pidfile` if kill -0 $pid > /dev/null 2>&1 ; then echo "$prog (pid $pid) is running..." else echo "$prog dead but pid file exists" fi else echo "$prog is stopped" fi } case "$1" in start|stop|restart|reload|status) $1 ;; condrestart) [ ! -f $lockfile ] || restart ;; *) echo Unknown command $1 echo "Usage: $0 {start|stop|status|restart|condrestart}" exit 2 esac 389-admin-1.1.35/wrappers/systemd.service.in000066400000000000000000000014721220472121400205330ustar00rootroot00000000000000# do not edit this file in /lib/systemd/system - instead do the following: # cp /lib/systemd/system/dirsrv-admin.service /etc/systemd/system/ # edit /etc/systemd/system/dirsrv-admin.service # systemctl daemon-reload # systemctl start dirsrv-admin.service [Unit] Description=@capbrand@ Administration Server. After=syslog.target network.target @systemddirsrvgroupname@ [Service] Type=forking PIDFile=@localstatedir@/run/@PACKAGE_BASE_NAME@/admin-serv.pid # to set the kerberos keytab # Environment=KRB5_KTNAME=@instconfigdir@/myname.keytab EnvironmentFile=@initconfigdir@/@package_name@ ExecStart=@HTTPD@ -k start -f @configdir@/httpd.conf ExecReload=@HTTPD@ -t ExecReload=/bin/kill -HUP $MAINPID ExecStop=@HTTPD@ $OPTIONS -k stop # to raise the file descriptor limit # LimitNOFILE=8192 [Install] WantedBy=multi-user.target
    Bucket Address Key Access Count Delete Next LRU MRU Data