inetutils-2.7/0000755000000000000000000000000015117551724010340 5ustar00inetutils-2.7/.tarball-version0000644000000000000000000000000415117551724013437 0ustar002.7 inetutils-2.7/.version0000644000000000000000000000000415117551724012020 0ustar002.7 inetutils-2.7/AUTHORS0000644000000000000000000000133415117551724011411 0ustar00This is a partial list of people (in alphabetical order) who have contributed to inetutils, some utilities originate from BSB 4.4-Lite2, and might not have an author associated with them. Alain Malgoire Alfred M. Szmidt Arash Yadegarnia Bernhard Rosenkraenzer Dan Stromberg David O'Shea Debarshi Ray Edward Attfield Elian Gidoni Giuseppe Scrivano Guillem Jover Jakob Kaivo Jeff Bailey Jeff Smith Jeroen Dekkers Joachim Gabler Joel N. Weber II Karl Berry Kaveh R. Ghazi Ludovic Courtès Marcus Brinkmann Mats Erik Andersson Matt Roberds Michael Weiser Michal Svoboda Michael Vogt Miles Bader Pedro Alves Petr Salinger Philippe De Muyter Rakesh Pandit Roland McGrath Samuel Thibault Sergey Poznyakoff Simon Josefsson Winston Edmond inetutils-2.7/CHECKLIST0000644000000000000000000001173015117551724011576 0ustar00This text intends to be helpful in the verification of the utilities found within GNU Inetutils. The source archive does contain a small set of test, but they are never able to test all desirable abilities, so this text is collected in the hope that an administrator or packager find hints on important steps to verify claimed abilities. One upstream author found himself overlooking a serious fault, until rethinking procedures similar to the following. This is all the more relevant since GNU Inetutils aims at portability to different operating systems, intending identical abilities for simplification in heterogeneous environments. Most executables delivered by GNU Inetutils depend on only a few, and immediately recognizable, settings or mechanisms. Others, like `ftpd', `telnetd', and `rlogind', depend on multiple configuration files, or depend on external programs that may differ slightly from system to system. Executables in the latter class include all those with Kerberos abilities. Of particular importance, and difficulty to verify, is the server executable `ftpd'. This will be discussed at length below, but let us start with some simpler cases. 1. rlogind and telnetd The server executables `telnetd' and `rlogind' are the only ones depending on the system executable `/bin/login`, or sometimes `/usr/bin/login'. This system program is heavily system dependent, and at present we are aware that login(1) of Solaris and of `util-linux', as found in Arch Linux, is not completely functional in all intended use cases. 2. rcp and rsh The client programs `rcp' and `rsh', certainly when built with Kerberos support, need care since they delegate work via PATH_RSH and PATH_RLOGIN, respectively. All testing efforts must be aware of this. Both locations are settable at configuration time using `--with-path-rsh=...' and `--with-path-rlogin=...'. Bear in mind that BSD systems assign values to those two macros by inspecting , and that these values are used unless overridden. 3. syslogd The included test script for `syslogd' is in fact using command line switches to override the defaults for configu- ration file and ditto directory. The mechanisms should work, but their default settings must be checked for use in prebuilt packages. Again, `--with-path-logconf' and `--with-path-logconfd' are the way to go. The auto-build system Hydra, of NixOS' origin, is known to fail occasionally at reusing a logging file after receiving SIGHUP, but this has never happened during manual checks. Ideas on resolving this matter are most welcome. There could be some dead-lock involved here. 4. ftpd As already stated, the server `ftpd' is particularly picky to verify reliably. The main obstacle lies in its use of four different files for configuration, or in user inter- action. The standard macros PATH_FTPUSERS, PATH_FTPCHROOT, and PATH_FTPWELCOME, PATH_FTPLOGINMESG are relevant here, where the first two are of critical concern for reasons of security. In addition, also `/etc/shells' is referenced. Every packager and administrator _must_ check that the files `ftpusers' and `ftpchroot' are assigned the right locations: $ strings ftpd/ftpd | grep '/etc' Let us sketch a limited set-up intended to uncover faults in `ftpd' while handling `ftpusers' and `ftpchroot'. The file locations below are chosen for brevity, rather than best practice. ### /etc/passwd root:x:0:0::/root:/bin/sh # Invalid interpreter aaa:x:11111:101::/home/aaa:/bin/false # To be denied access. bbb:x:11112:101::/home/bbb:/bin/sh ccc:x:11113:102::/home/ccc:/bin/sh # To be chrooted. ddd:x:11114:101::/home/ddd:/bin/sh eee:x:11115:103::/home/eee:/bin/sh ### /etc/group passes:x:101: banned:x:102: chroot:x:103: ### /etc/ftpusers root bbb @banned ### /etc/ftpchroot ddd @chroot With this set-up, the users `aaa' should be denied access due to an invalid shell, while `bbb' and `ccc' should be reject for being mentioned in `ftpusers', the latter though his group membership. Furthermore, `ddd' and `eee' should be admitted access, but be confined within a chrooted subtree, recognizable by issuing `pwd' in an FTP-session. Here, `eee' is to be chrooted based on its group membership. A final remark regarding the chrooted mode. On GNU systems and Solaris systems, the above templates `/etc/passwd' and `/etc/group', positioned below the chroot directory, would suffice to allow the list command `ls' to resolve numbers as group and user names in directory listings, but they do not suffice on BSD systems. For those unices, `/etc/passwd' is completely irrelevant, and is to be replaced by `/etc/pwd.db'. Starting from a template for `master.passwd', BSD systems need to call pwd_mkdb(8) to generate a minimally usable `/etc/pwd.db'. A responsible BSD administrator is expected to master this! Ideally, the administrator should also check that expired accounts and expired passwords also lead to denied access. The tools vary widely, but usermod(8) and its variants are useful. inetutils-2.7/COPYING0000644000000000000000000010451515117551724011401 0ustar00 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. 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 state 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 3 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU 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. But first, please read . inetutils-2.7/ChangeLog0000644000000000000000000001701215117551724012113 0ustar002025-12-14 Simon Josefsson version 2.7 * NEWS.md: Record release date. 2025-12-06 Simon Josefsson maint: Run './bootstrap --bootstrap-sync' maint: Bump GNULIB_REVISION * bootstrap.conf (GNULIB_REVISION): Use b3518f60173c907453ee5c7d439f967342de6d0c. doc: Mention use of markdown in NEWS * NEWS.md: Add. maint: Drop xz tarballs to reduce maintainer QA * configure.ac (AM_INIT_AUTOMAKE): Remove dist-xz. * README-alpha: Don't mention xz. * bootstrap.conf (buildreq): Drop xz. 2025-12-03 Erik Auerswald syslod, talkd: GNU/Linux w/o utmp compatibility Some newer GNU/Linux systems no longer have a "utmp" file. This file is used by both syslogd and talkd to find the TTY device files of active user sessions in order to send messages to specific or all users. Gnulib can emulate a utmp file via the read_utmp() function from the readutmp module. This emulation is activated by defining "READUTMP_USE_SYSTEMD", triggered via configure's "--enable-systemd" option on systems without utmp and with systemd. But, this emulation reports non-existing TTY device files for active user sessions. Attempting to send a message to a non-existing TTY produces an error, but that is normal behavior for such a system. Thus, ignore this error on such systems, but not others. * NEWS.md: Mention enhancement. * libinetutils/ttymsg.c (inetutils_ttymsg): Ignore errors for non-existings TTY files reported in emulated utmp entries. 2025-11-26 Simon Josefsson doc: Add NEWS->NEWS.md symlink doc: Fix codespell nits doc: Rename NEWS to NEWS.md and markdownify. maint: Run './bootstrap --bootstrap-sync'. maint: Bump GNULIB_REVISION. * bootstrap.conf (GNULIB_REVISION): Use be6027b468. * gl/top/README-release.diff: Update according to changes in the Gnulib file. 2025-11-23 Erik Auerswald tests: check read_utmp as used in syslogd & talkd Both syslogd and talkd use the Gnulib read_utmp options READ_UTMP_USER_PROCESS | READ_UTMP_CHECK_PIDS, but the test file tests/readutmp.c only used READ_UTMP_USER_PROCESS. But tests/readutmp.c is intended to check if syslogd and talkd can read utmp information, so use the same options. * tests/readutmp.c (main): Add READ_UTMP_CHECK_PIDS to options used with Gnulib's read_utmp() function. 2025-11-23 Erik Auerswald syslogd: log ASCII 'DEL' as '^?' DEL is a non-printable control character. Make it visible in syslogd log files by transliterating it in the same way as most other ASCII control characters (TAB and NL are transliterated as SP). * NEWS: Mention change. * src/syslogd.c (printline): Transliterate the ASCII DEL control character the same way as most other ASCII control characters. 2025-11-23 Erik Auerswald syslogd: fix a stack-based buffer overflow When logging a message, ASCII control characters are transliterated. This transliteration uses two printable characters for each control character. If the last character that fits into the destination buffer is a control character, the buffer needs place for two characters in addition to the string terminator. This was missing from the code, resulting in a stack-based buffer overflow weakness (CWE-121). * NEWS: Mention fix. * src/syslogd.c (printline): Allocate an additional byte in the "line" buffer to account for control character transliteration. 2025-11-08 Erik Auerswald doc: explain what "standard shell" means for ftpd One part of ftpd user authentication is to check if the user has a so called "standard shell". But, it is no longer obvious what that actually is. The Linux man-pages project uses different names to designate a "standard shell", i.e., "valid login shell" when documenting /etc/shells, "permitted user shells" and "valid user shell" when documenting getusershell(), making it harder to figure this out. Expand ftpd user authentication step 3 by adding information about /etc/shells and getusershell(), and the different names used for "standard shell". * NEWS: Mention ftpd documentation improvement. * doc/inetutils.texi (ftpd invocation): Explain "standard shell" as used in the ftpd authentication rules. 2025-08-04 Simon Josefsson doc: Use latest GPLv3 COPYING file. Rework README. * COPYING: Sync with gnulib. * README, README.md: Reflow text and symlink for readability/markdown. 2025-07-21 Collin Funk maint: Bump GNULIB_REVISION. * bootstrap.conf (GNULIB_REVISION): Use 91aacb5536. * gl/top/README-release.diff: Update according to changes in the Gnulib file. 2025-07-10 Collin Funk maint: Add the vasprintf-posix module. This module provides the asprintf function that is needed by Inetutils but is missing on many platforms. Found on AIX 7.3. * NEWS: Mention the change. * bootstrap.conf (gnulib_modules): Add vasprintf-posix. 2025-07-08 Simon Josefsson NEWS: Mention Solaris 11 OmniOS link fix. maint: Use non-deprecated gnulib module names. * bootstrap.conf (gnulib_modules): Update per ./bootstrap output. maint: Bump GNULIB_REVISION. * bootstrap.conf (GNULIB_REVISION): Use 92977490. talkd: Fix indentation in last commit. * talkd/table.c (lookup_request): Indent. 2025-07-02 Bruno Haible talkd: Fix use-after-free bug. * talkd/table.c (lookup_request): Fetch ptr->next before possibly deleting the object at ptr. 2025-04-19 Collin Funk Revert "maint: Distribute help2man script." This reverts commit 4511e4a193c150f409006d023bde72203d2d448d. maint: Distribute help2man script. * .x-update-copyright: New file. * bootstrap.conf (buildreq): Remove help2man. * configure.ac: Fallback to distributed help2man if it is not installed. * man/Makefile.am (EXTRA_DIST): Add help2man. * man/help2man: Import file. 2025-02-26 Collin Funk maint: Fix link errors on Solaris 11 OmniOS. * bootstrap.conf (gnulib_modules): Add hostent and socket. * ftp/Makefile.am (ftp_LDADD): New variable. * ftpd/Makefile.am (ftpd_LDADD): New variable. * ifconfig/Makefile.am (ifconfig_LDADD): New variable. * ping/Makefile.am (ping_LDADD): Add $(LIBSOCKET), $(HOSTENT_LIB), $(LIBINTL), and $(GETADDRINFO_LIB). (ping6_LDADD): New variable. * src/Makefile.am (hostname_LDADD, rlogin_LDADD, rsh_LDADD): Add $(HOSTENT_LIB). (tftp_LDADD, rexecd_LDADD): Add $(LIBSOCKET). (rexec_LDADD, dnsdomainname_LDADD, logger_LDADD, inetd_LDADD) (tftpd_LDADD): New variables. (rlogind_LDADD): Add $(LIBSOCKET), $(LIBINTL), and $(GETADDRINFO_LIB). (rshd_LDADD): Add $(HOSTENT_LIB), $(LIBINTL), and $(GETADDRINFO_LIB). (syslogd_LDADD): Add $(LIBSOCKET), $(HOSTENT_LIB), $(LIBINTL), and $(GETADDRINFO_LIB). (uucpd_LDADD): Add $(LIBSOCKET) and $(HOSTENT_LIB). * talk/Makefile.am (talk_LDADD): New variable. * talkd/Makefile.am (talkd_LDADD): New variable. * telnet/Makefile.am (telnet_LDADD): New variable. * telnetd/Makefile.am (telnetd_LDADD): New variable. * tests/Makefile.am (localhost_LDADD, runtime_ipv6_LDADD) (addrpeek_LDADD, tcpget_LDADD): New variables. * whois/Makefile.am (whois_LDADD): New variable. 2025-02-21 Simon Josefsson maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. version 2.6 * NEWS: Record release date. See ChangeLog.? for older entries inetutils-2.7/ChangeLog.00000644000000000000000000023323615117551724012261 0ustar00Sat Aug 8 17:35:14 1998 Joel N. Weber II * ftpd/ftpd.c (anonymous_login_name): New variable. (main): Allow anonymous_login_name to be set with -a flag. (user): Use anonymous_login_name. Sun Apr 26 19:37:09 1998 Joel N. Weber II * syslogd/syslogd.c (logmsg): When opening the console device, pass the O_NOCTTY flag to avoid acquiring a controlling tty. (fprintlog): When opening a log file, pass the O_CREAT flags and O_NOCTTY flags. (cfline): Likewise. Sat Apr 18 11:54:56 1998 Joel N. Weber II * syslogd/syslogd.c (cfline): Allow either spaces or tabs in /etc/syslog.conf; previously, only tabs were allowed for seperators. Sun Apr 12 19:57:51 1998 Joel N. Weber II * whois/whois-servers: Added some comments explaining the search path that the GNU whois client uses. Fri Apr 10 11:13:51 1998 Joel N. Weber II * Changed the Makefile.am in daemon subdirectories to use inetdaemondir instead of bindir. Fri Apr 10 19:53:37 1998 Joel N. Weber II * libinetutils/opieclient.c: Random cosmetic changes. [HAVE_CONFIG_H]: Inclued config.h. Fri Apr 10 11:13:51 1998 Joel N. Weber II * whois/main.c (main): Use inetutils_package and inetutils_version rather than PACKAGE and VERSION. Check the compiled in config file as the second-to-last resort. (config_buffer_netwhois): New function, mostly created by ripping code out of config_file_netwhois. (config_file_netwhois): Use config_buffer_netwhois. * whois/Makefile.am (whois_SOURCES): Added config.c. (EXTRA_DIST): Added gen-config-c. (config.c): Added a rule to generate it from whois-servers using the gen-config-c script. * Makefile.am (SUBDIRS): Added ping. * configure.in: Call IU_ENABLE_CLIENT and AC_SUBST for whois. Update the comment above the AC_SUBST calls for BUILD_; the change of moving AC_SUBST out of IU_ENABLE_FOO wasn't actually necissary. Test for -lz, since I will probably add code that uses it eventually. Supply a value for inetdaemondir. Fri Apr 3 17:11:44 1998 Joel N. Weber II * libtelnet/Makefile.am (libtelnet_a_SOURCES): Removed krb4encpwd.c rsaencpwd.c spx.c; they don't meet our definition of `free software'. Thu Mar 26 20:40:06 1998 Joel N. Weber II * */Makefile.am: Use @BUILD_FOO@ to determine whether to build the program. * configure.in: Call IU_ENABLE_CLIENT for ping. Call AC_SUBST for BUILD_PING. * glob/Makefile.am (AUTOMAKE_OPTIONS): Removed; the options are set adaquaely in ../Makefile.am. (noinst_LIBRARIES): Use @BUILD_LIBGLOB@ rather than libglob.a (EXTRA_LIBRARIES): Added libglob.a * Makefile.am (DISTCLEANFILES): Added `include/*.h include/*/*.h include/stamp-h'. * acinclude.m4 (IU_ENABLE_FOO): Fix syntax errors. Remove call to AC_SUBST; there are now many explicit calls to AC_SUBST to make automake happy. (IU_ENABLE_CLIENT): Use `clients' rather than `client' as the second arg. (IU_ENABLE_SERVER): Use `servers' rather than `server' as the second arg. * configure.in: For every IU_ENABLE_CLIENT and IU_ENABLE_SERVER call, and an AC_SUBST call for the BUILD_FOO variable. * telnet/main.c [ENCRYPTION || AUTHENTICATION || TN3270] (help): Added a second arg to the call to `putc'. * configure.in: Undo Jeff's previous change to this file, so that changing the version number will not force me to wait 20+ minutes (or so it seems) for the inetutils to be rebuilt after I change the version number. Rearrange a few macro calls that were added for the glob library so that autoconf doesn't complain that they're out of order. Removed some more of the old SUBDIRS cruft. When setting enable_talk to `no' after not finding curses, also set BUILD_TALK to the empty string. Set the BUILD_LIBGLOB variable appropriately. * ping/ping.c (version.h): Include it. (show_usage): Use inetutils_bugaddr. (main): Use inetutils_version rather than VERSION. Don't use GNU_PACKAGE. Thu Mar 26 20:47:00 1998 Jeff Bailey * configure.in: put VERSION, PACKAGE, and GNU_PACKAGE back in. * ping/ping.c: Create * ping/Makefile.am: Update with ping.c Thu Mar 26 00:08:39 1998 Joel N. Weber II * ftp/main.c (cmdscanner): Added new code that is used to replace some old code iff HAVE_LIBREADLINE. * ftp/ftp_var.h [HAVE_LIBREADLINE]: Declare `char *line' instead of `char line[200]'. * ftp/Makefile.am (LDADD): Added `$(LIBTERMCAP)'. * Makefile.am (SUBDIRS): Added whois. (DISTCLEANFILES): Added `pathdefs.make paths.defs'. * configure.in: Removed some old cruft related to the old system of not building some directoies. Added calls to IU_ENABLE_SERVER and IU_ENABLE_CLIENT. Added checks for libtermcap, libreadline, and libopie. Generate whois/Makefile. * acinclude.m4 (IU_ENABLE_FOO): New AC_DEFUN. (IU_ENABLE_CLIENT): Likewise. (IU_ENABLE_SERVER): Likewise. Tue Mar 24 11:46:55 1998 Joel N. Weber II * Ran the command for i in `grep man_MANS */Makefile.am|awk -F: '{ print $1 }'`; do (echo;echo 'EXTRA_DIST = $(man_MANS)') >> $i; done * configure.in (AM_INIT_AUTOMAKE): Added a third argument to suppress VERSION and PACKAGE symbols from appearing in config.h Added much code that was formerly in glob/configure.in, before I removed that file. Add glob/Makefile to the `AC_OUTPUT' call. * headers/Makefile.am (EXTRA_DIST): Added `confpaths.h.in'. * ftp/Makefile.am (LDADD): Added `$(LIBGLOB)'. * Makefile.am (EXTRA_DIST): Added paths. (SUBDIRS): Added glob. * uucpd/Makefile.am (INCLUDES): Added `$(PATHDEF_TTY)'. (LDADD): Added `-L../libinetutils -linetutils'. * telnetd/Makefile.am: Added a line that reads `@PATHDEFS_MAKE@'. (INCLUDES): Added `$(PATHDEF_TTY) $(PATHDEF_LOGIN)'. * talkd/Makefile.am: Added a line that reads `@PATHDEFS_MAKE@'. (INCLUDES): Added `$(PATHDEF_DEV)'. * syslogd/Makefile.am: Added a line that reads `@PATHDEFS_MAKE@'. (INCLUDES): Added `$(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGPID) $(PATHDEF_CONSOLE)'. * rshd/Makefile.am (INCLUDES): Added `$(PATHDEF_BSHELL) $(PATHDEF_NOLOGIN) $(PATHDEF_DEFPATH)'. Added a line reading `@PATHDEFS_MAKE@'. * rlogind/Makefile.am (INCLUDES): Added `$(PATHDEF_DEV) $(PATHDEF_LOGIN)'. Added a line reading `@PATHDEFS_MAKE@'. * rexecd/Makefile.am (INCLUDES): Added `$(PATHDEF_DEFPATH) $(PATHDEF_BSHELL)'. (LDADD): Added `-L../libinetutils -linetutils'. Added a line reading `@PATHDEFS_MAKE@'. * rcp/Makefile.am (INCLUDES): Added `$(PATHDEF_BSHELL)'. * libinetutils/Makefile.am (INCLUDES): Added `$(PATHDEF_TTY_PFX) $(PATHDEF_DEVNULL) $(PATHDEF_HEQUIV)'. * inetd/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * ftpd/Makefile.am (INCLUDES): Added `$(PATHDEF_DEVNULL) $(PATHDEF_NOLOGIN) $(PATHDEF_BSHELL)'. * ftp/Makefile.am (INCLUDES): Added `$(PATHDEF_TMP) $(PATHDEF_BSHELL)'. Added a line reading `@PATHDEFS_MAKE@'. Tue Mar 24 00:28:27 1998 Joel N. Weber II * telnet/Makefile.am (noinst_HEADERS): Remove krb4-proto.h; Kerberos 4 doesn't meet our definition of `free software'. (INCLUDES): Add `-DTERMCAP -DLINEMODE -DKLUDGELINEMODE -DENV_HACK'. (LDADD): Add `-L../libinetutils -L../libtelnet -linetutils -ltelnet $(LIBTERMCAP) $(LIBCRYPT)'. (LIBTERMCAP): Set make variable from coresponding configure variable (LIBCRYPT): Likewise. * uucpd/Makefile.am (INCLUDES): Added `$(PATHDEF_UUCICO)'. Added a line that reads `@PATHDEFS_MAKE@'. * tftpd/Makefile.am (noinst_HEADERS): Removed tftpsubs.h (LDADD): Added `-L../libinetutils -linetutils'. * tftp/Makefile.am (tftp_SOURCES): Removed tftpsubs.c; that file has been moved to ../libinetutils. (noinst_HEADERS): Removed tftpsubs.h; that file has been moved to ../headers. (LDADD): Added `-L../libinetutils -linetutils'. Mon Mar 23 11:47:37 1998 Joel N. Weber II * telnetd/Makefile.am (LIBTERMCAP, LIBCRYPT, LIBUTIL): Set make variables corresponding to the configure variables. (LDADD): Added `-L../libinetutils -L../libtelnet -linetutils -ltelnet $(LIBTERMCAP) $(LIBUTIL) $(LIBCRYPT)'. * talkd/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * talk/Makefile.am (INCLUDES): Added `$(NCURSES_INCLUDE)'. (LDADD): Added `$(LIBCURSES) -L../libinetutils -linetutils'. * syslogd/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * rshd/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * rlogin/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * rlogind/Makefile.am (LDADD): Added `-L../libinetutils -linetutils'. * rcp/Makefile.am (INCLUDES): Added `$(PATHDEF_RSH) $(PATHDEF_CP)'. (LDADD): Added `-L../libinetutils -linetutils'. Added a line `@PATHDEFS_MAKE@'. * ftpd/Makefile.am (INCLUDES): Added `$(PATHDEF_FTPWELCOME) $(PATHDEF_FTPUSERS) $(PATHDEF_FTPLOGINMESG)'. (LDADD): Added `-L../libinetutils -L../libtelnet -linetutils -ltelnet'. Added the line `@PATHDEFS_MAKE@'. * ftp/Makefile.am (LDADD): Added ../libinetutils -linetutils. * libinetutils/Makefile.am (libinetutils_a_SOURCES): Removed version.c and all the files covered by @LIBOBS@ (libinetutils_a_LIBADD): Add @LIBOBJS@ (noinst_HEADERS): Removed version.h * configure.in: Removed some old, commented-out cruft. Removed some old code related to the @DIRS@ hack; that code will not be needed in the future. Reinstalled some code that deals with having both a `headers' and `include' tree. Removed the iruserok from one of the two places where it appeared in the AC_REPLACE_FUNCS call. Reinstalled the line `AC_REPLACE_FUNCS(revoke)'; it had been commented out, but I see no ChangeLog entry explaining why, and I suspect that it should not have been commented out. Changed the message that was `checking for system glob is ok' to `checking for ok system glob'. Call `AC_SUBST(VERSION)'. In the call to AC_OUTPUT, added version.h. Sun Mar 22 16:13:49 1998 Joel N. Weber II * Makefile.am (SUBDIRS): Use an explicit list, rather than @DIRS@. Removed some random cruft that I'd previously mistakenly added that is not necissary. * headers/Makefile.am (EXTRA_DIST): Renamed variable from noinst_HEADERS. Added tftpsubs.h. Changed version.h to version.h.in. (dist-hook): Added to distribute some files in the arpa and protocols directories. * inetd/Makefile.am (INCLUDES): Use $(PATHDEF_INETDCONF) instead of the old hardcoded value. Added a line that reads `@PATHDEFS_MAKE@' Mon Mar 9 17:04:55 1998 Joel N. Weber II * inetd/Makefile.am (INCLUDES): Set PATH_INETDCONF. Thu Jan 08 00:16:00 1997 Jeff Bailey * Makefile.am, configure.in: Don't actually define SUBDIRS in configure.in - That confuses automake. Define DIRS instead, and refer to it in Makefile.am. Fixes make problems. Wed Dec 31 14:24:00 1997 Jeff Bailey * Makefile.am: Make SUBDIRS based on autoconf variable. * configure.in: Add the --enable-servers,client back in. Wed Dec 10 23:14:00 1997 Jeff Bailey * configure.in, headers/config.h.in: Build test cases for integrating pathdefs.make into config.h for cleaner Makefiles. See TEEHEE/LALA combo in configure.in for sample. Tue Dec 09 18:18:00 1997 Jeff Bailey * acheader.h: Remove __BSD_SOURCE define Mon Dec 08 18:12:00 1997 Jeff Bailey * headers/Makefile.am: Create * ping/Makefile.am: Create * rexecd/Makefile.am: Create * rlogin/Makefile.am: Create * rlogind/Makefile.am: Create * rsh/Makefile.am: Create * rshd/Makefile.am: Create * syslog/Makefile.am: Create * syslogd/Makefile.am: Create * talk/Makefile.am: Create * talkd/Makefile.am: Create * telnet/Makefile.am: Create * telnetd/Makefile.am: Create * tftp/Makefile.am: Create * tftpd/Makefile.am: Create * uucpd/Makefile.am: Create * libinetutils/Makefile.am: Create * libtelnet/Makefile.am: Create * configure.in: Modify for automake * iumacros.m4: Rename to acinclude.m4 * Makefile.am: Update for directory order * headers/acconfig.h: move to .. * headers/stamp-h.in: Create * acconfig.h: Update with automake defines Sun Dec 07 18:04:00 1997 Jeff Bailey * Makefile.am: Create * ftp/Makefile.am: Create * ftpd/Makefile.am: Create * inetd/Makefile.am: Create * rcp/Makefile.am: Create * missing: add * mkinstalldirs: add * install-sh: add * config.guess: add * config.sub: add * INSTALL: add * COPYING: add * configure.in: Add automake hooks. * config.make.in: Remove * rules.make: Remove 1997-09-18 Miles Bader * libtelnet/kerberos.c (krb_mk_req, krb_rd_req, krb_kntoln, krb_get_cred, krb_get_lrealm, kuserok): Declarations removed. (kerberos4_send, kerberos4_is, kerberos4_reply): Pass addresses of session key args to des functions. * libtelnet/encrypt.h (Schedule): Don't use _ as a field name. * rlogind/rlogind.c: Replace #ifdefs of CRYPT with ENCRYPTION. (do_krb_login): Pass *address* of KDATA->session to des_set_key. * rlogind/Makefile.in (LDLIBS): Add $(LIBAUTH). * libtelnet/enc-proto.h (des_new_random_key, des_set_random_generator_seed, des_key_sched, des_ecb_encrypt, des_string_to_key): Declarations removed. * libtelnet/kerberos.c: Change includes of & to & . * libtelnet/krb4encpwd.c: Likewise. * rsh/rsh.c (main): Pass *address* of CRED.session to des_set_key. * rlogin/rlogin.c (main): Likewise. 1997-09-22 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.3.1c'. * inetd/inetd.c (print_service): Use long instead of int for pointer<->int conversion. * ftpd/ftpd.c (main): Likewise. * telnetd/sys_term.c (addarg): Likewise. Mon Sep 22 19:49:42 1997 Philippe De Muyter * headers/accconfig.h (HAVE_TTYNAME_DECL): New define slot. (HAVE_GETGRNAM_DECL): Ditto. (ttyname): New function prototype #ifndef HAVE_TTYNAME_DECL. (getgrnam): Likewise. * inetd/inetd.c (sys/wait.h): File included only if HAVE_SYS_WAIT_H. * ftpd/ftpd.c, ftpd/popen.c, telnetd/defs.h (sys/wait.h): Ditto. * uucpd/uucpd.c, syslogd/syslogd.c, ftp/cmds.c (sys/wait.h): Ditto. * rcp/util.c, rlogin/rlogin.c, talkd/announce.c (sys/wait.h): Ditto. * syslogd/syslogd.c (sys/resource.h): File included only if HAVE_SYS_RESOURCE_H. * rlogin/rlogin.c (sys/resource.h): Ditto. * configure.in (AC_CHECK_HEADERS): Check for existence of sys/wait.h and sys/resource.h. (IU_CHECK_DECL): Check for declaration of ttyname in unistd.h and getgrnam in grp.h. * libinetutils/openpty.c (termio.h): File included if HAVE_TERMIO_H. (TCSAFLUSH): Macro defined if needed. 1997-09-17 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.3.1b'. * ftp/domacro.c: Make inclusion of unconditional. * libinetutils/daemon.c (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Macros removed. Wed Sep 17 18:14:48 1997 Philippe De Muyter * configure.in ({STDIN,STDOUT,STDERR}_FILENO): Create definitions for those macros if they are not defined in unistd.h. * headers/acconfig.h ({STDIN,STDOUT,STDERR}_FILENO): New define slots. Mon Mar 3 17:56:36 1997 Philippe De Muyter * headers/acconfig.h (HAVE_HOSTENT_H_ADDR_LIST): New macro; (HAVE_GETCWD_DECL, HAVE_GETLOGIN_DECL): New macros. getcwd, getlogin, getpass: New prototypes, if needed. * inetd/inetd.c (sys/resource.h): File included only if HAVE_SYS_RESOURCE_H. (SIGCHLD): Macro defined if not defined. * ftp/ftp.c (hookup): Fixed if not HAVE_HOSTENT_H_ADDR_LIST; do not call fdopen twice with the same file descriptor. * ftp/domacro.c (string.h): File included instead of strings.h if needed. * ftp/extern.h (getpass): Declaration removed. * libtelnet/read_passwd.c: File renamed from read_password.c (> 14). * libtelnet/Makefile.in (SRCS): Reference read_passwd.c, not read_password.c. * libinetutils/localhost.c (localhost): Test ENAMETOOLONG only if defined. * libinetutils/daemon.c (STD{IN,OUT,ERR}_FILENO): Macros defined if not defined. * libinetutils/iruserok.c (ruserok, __icheckhost): Fixed if not HAVE_HOSTENT_H_ADDR_LIST. * configure.in (getcwd, getlogin): Check declarations with IU_CHECK_DECL. (h_addr_list): Check if field exist using IU_CHECK_STRUCT_FIELD. 1997-09-15 Miles Bader * libinetutils/localhost.c: Protect include of . * libinetutils/version.c (inetutils_version): Change to `1.3.1a'. * libinetutils/ttymsg.c (ttymsg): Dynamically allocate DEVICE. [!O_NONBLOCK && O_NDELAY] (O_NDELAY): New macro. 1997-09-12 Miles Bader * rlogin/Makefile.in (SRCS, HDRS, OBJS): Variables removed. (DISTFILES): Don't use $(SRCS) & $(HDRS). (CLEAN): Don't use $(OBJS). (rlogin): Rule removed. * krb.h: File removed. * rsh/rsh.c, rshd/rshd.c: Replace #ifdefs of CRYPT with ENCRYPTION. * rsh/Makefile.in, rshd/Makefile.in (LDLIBS): New variable. * libinetutils/krcmd.c, libinetutils/kcmd.c, libinetutils/des_rw.c: New files (moved from rlogin directory). * rlogin/krcmd.c, rlogin/kcmd.c, rlogin/des_rw.c: Files removed (moved to libinetutils directory). * libinetutils/Makefile.in (SRCS): Add krcmd.c, kcmd.c, & des_rw.c. (OBJS): Add krcmd.o, kcmd.o, & des_rw.o. * rlogin/kcmd.c: Protect whole file with #ifdef KERBEROS. From Alexandre Oliva : * syslogd/syslogd.c (cfline): Remove declaration of hstrerror. * telnetd/utility.c (fatalperror): Remove declaration of strerror. 1997-09-11 Miles Bader * rlogin/des_rw.c (des_set_key): Function removed. * rlogin/rlogin.c, rlogin/krcmd.c, rlogin/des_rw.c: Replace #ifdefs of CRYPT with ENCRYPTION. * rlogin/kcmd.c, rlogin/rlogin.c: Don't include "krb.h" * rlogin/Makefile.in (SRCS, HDRS, OBJS, LDLIBS): New variables. (DISTFILES): Base on $(SRCS) and $(HDRS). (CLEAN): Base on $(OBJS). (rlogin): New rule. * configure.in: If authentication is enabled, also define KERBEROS. * headers/acconfig.h (KERBEROS): New define slot. * libinetutils/version.c (inetutils_version): Change to `1.3.1'. 1997-09-10 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.3b'. * ftp/cmds.c (lcd): Conditionalize use of getcwd with a zero size arg. * configure.in: Check if getcwd (0, 0) is ok. * headers/acconfig.h (HAVE_GETCWD_ZERO_SIZE): New define slot. From Martin Buck : * telnet/sys_bsd.c (TerminalNewMode): Don't limit to 7-bits when not in binary mode. 1997-07-28 Miles Bader * ftp/ftp.c (recvrequest, gunique): Get rid of perm-checking-with-access crap. 1997-05-27 Miles Bader * iumacros.m4: Doc fixes. Tue Mar 4 12:49:00 1997 Philippe De Muyter * paths (PATH_TMP): Added a trailing '/' to default value. Mon Mar 3 23:53:45 1997 Philippe De Muyter * headers/acconfig.h (HAVE_SYS_ERRLIST): New macro. (getpass, hstrerror, strerror): New function declarations, if needed. * inetd/inetd.c (reapchild): Use wait, if not HAVE_WAIT3. * libinetutils/hstrerror.c (hstrerror): Function made const. * libinetutils/strerror.c (strerror): Function made const. (sys_nerr): Fixed variable name. * configure.in (sys_errlist): If variable exists, AC_DEFINE(HAVE_SYS_ERRLIST). Thu Apr 17 12:47:31 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.3a'. Fri Feb 28 17:05:15 1997 Miles Bader * ftpd/ftpd.c (complete_login): Don't segv if CRYPT returns 0. From: Andreas Schwab : * configure.in (sigset_t): Add missing comma. * rcp/rcp.c (source): Print longer-than-long numbers correctly. * ftpd/ftpcmd.y: Likewise. * ftp/cmds.c (restart): Likewise. Tue Feb 25 18:21:18 1997 Miles Bader From David J MacKenzie : * tftpd/tftpd.c (validate_access): Truncate files opened for writing. * ftp/ftp.c (login): Deal correctly with EOF to Name: prompt. Mon Feb 24 00:19:06 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.3'. * libinetutils/version.c (inetutils_version): Change to `1.2o'. * libinetutils/snprintf.c, libinetutils/snprintf.h: Updated from snprintf-1.1. Sun Feb 23 13:22:41 1997 Miles Bader * iumacros.m4 (IU_LIB_NCURSES): Add -with[out]-ncurses-include-dir options. Search $includedir and $prefix/include first in default list. From NIIBE Yutaka : * talk/ctl_transact.c (ctl_transact): Zero CTL_MASK before using. * libinetutils/version.c (inetutils_version): Change to `1.2n'. * rules.make ($(bindir)/%: % $(bindir)): Test $USER as well as the output of whoami, for linux boxes with a broken whoami. Fri Feb 21 14:16:31 1997 Miles Bader * libinetutils/iruserok.c (iruserok): Dynamically allocate PBUF instead of using MAXPATHLEN. (__ivaliduser): Dynanamically allocage BUF rather than using MAXHOSTNAMELEN. [STDC_HEADERS || HAVE_STDLIB_H]: New include. [HAVE_MALLOC_H] : New include. Thu Feb 20 14:40:00 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2m'. * syslog.c: New file. * libinetutils/Makefile.in (SRCS): Add syslog.c. Wed Feb 19 10:02:44 1997 Miles Bader * iumacros.m4 (IU_LIB_NCURSES): Add search for NCURSES_INCLUDE. * config.make.in (NCURSES_INCLUDE): New variable. * talk/Makefile.in (CPPFLAGS): Add $(NCURSES_INCLUDE). * headers/acconfig.h (HAVE_SOCKADDR_IN_SIN_LEN): New define slot. * iumacros.m4 (IU_CONFIG_PATHS): Give up on using IFS to break apart search: paths, just use sed. From NIIBE Yutaka : * talk/ctl.c (daemon_addr, ctl_addr, my_addr): Leave length out of initialization if !HAVE_SOCKADDR_IN_SIN_LEN. * talk/invite.c (invite_remote): Use memcpy instead of bcopy. * talk/look_up.c (check_local): Likewise. * configure.in: Add check for sin_len field in struct sockaddr_in. Fix test for whether we should build talk. Tue Feb 18 22:09:51 1997 Miles Bader * iumacros.m4 (IU_CONFIG_PATHS): Use `set' instead of `read' with a here document, because the latter fucks up in some shells. Tue Feb 18 20:14:48 1997 Kaveh R. Ghazi * configure.in: Add AC_STRUCT_ST_BLKSIZE test. * ftp/cmds.c: Include glob.h last, it defines "const" to null which breaks some system headers. * ftp/ftp.c (recvrequest): Handle missing st_blksize member. * ftp/ftp_var.h: Make all declarations extern except in one file to avoid conflicts when linking. * ftp/main.c (FTP_EXTERN): Activate this macro so the declarations in ftp/ftp_var.h become definitions. * ftpd/ftpcmd.y: Include glob.h last, it defines "const" to null which breaks some system headers. * ftpd/popen.c: Likewise. * ftpd/ftpd.c: Likewise. Also handle missing st_blksize member. * headers/acconfig.h: Normalize variable argument list usage. Also add support to handle missing st_blksize member. * libinetutils/snprintf.c: Normalize variable argument list usage. * libinetutils/snprintf.h: Likewise. Also constify DATA.pf member. * rcp/util.c: Handle missing st_blksize member. * rexecd/rexecd.c: Make environ extern to avoid link time conflicts. * rshd/rshd.c: Likewise. * telnetd/ext.h: Make terminaltype and line be extern to avoid link time conflicts. * telnetd/sys_term.c (rmut): protect use of ut_host member. * telnetd/telnetd.c (main, doit): Likewise. (utmp_len): Only declare if HAVE_UTMP_UT_HOST. * tftp/extern.h (toplevel): New declaration. * tftp/tftp.c (toplevel): Duplicate definition removed. * uucpd/uucpd.c (dologout): Remove unused status variable. Add a case for HAVE_WAITPID. Tue Feb 18 01:13:16 1997 Miles Bader From Alain Magloire : * ftpd/ftpd.c (dologout): Small race condition with SIGURG (D. Greenman) * ftpd/popen.c (popen): Buffer overflow in argv[] (AUSCERT) * ftpd/ftpcmd.y: check_login for PASV (*Hobbit) * libinetutils/version.c (inetutils_version): Change to `1.2l'. * libinetutils/snprintf.c (vsnprintf): New function, slightly modified from snprintf. [!HAVE_SNPRINTF] (snprintf): Now a wrapper that calls vsnprintf. Change param types to match conventional signature. [HAVE_CONFIG_H] : New include. From Marcus Daniels : * configure.in (AC_REPLACE_FUNCS): Add xstrup & getusershell. (vsnprintf): Check for, and possibly replace, this function. * headers/acconfig.h: Declare vsnprintf if the system doesn't. (HAVE_VSNPRINTF): New define slot. * rules.make ($(bindir)/%: % $(bindir)): If $(INST_PROG_FLAGS) is non-empty, only do the install if we're root. * libinetutils/Makefile.in (SRCS): Add getusershell.c & xstrdup.c. Mon Feb 17 15:08:59 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2k'. From Alain Magloire : * talkd/announce.c (strvis): Use '\007' for systems that don't recognize '\a'. (announce): Don't pass TF argument to print_mesg. (print_mesg): Remove TF parameter. Free VIS_USER after we're done with it. * talkd/process.c (process_request): Cast 0 argument to htonl. * libinetutils/ttymsg.c (ttymsg): Add check for dangerous values of LINE, and guard against buffer overflow. * Makefile.in (DISTFILES): Add THANKS. * THANKS: New file. * libinetutils/snprintf.c: Real snprintf replacement, from Alain Magloire . * libinetutils/snprintf.h: New file. * libinetutils/Makefile.in (DISTFILES): Add snprintf.h. From NIIBE Yutaka : * telnetd/sys_term.c (scrub_env): New function. (start_login): Use it. * ftp/ruserpass.c (ruserpass): Use snprintf instead of sprintf. * ftpd/ftpd.c (retrieve): Likewise. * telnetd/utility.c (fatal, fatalperror): Likewise. * telnetd/sys_term.c (startslave, start_login): Likewise. * talkd/announce.c (print_mesg): Likewise. * syslogd/syslogd.c (main, fprintlog, cfline): Likewise. * rlogind/rlogind.c (fatal): Likewise. * rexecd/rexecd.c (error): Likewise. * ping/ping.c (pr_addr): Likewise. * inetd/inetd.c (set_proc_title): Likewise. * iumacros.m4 (IU_LIB_TERMCAP): See if -lcurses works too. (IU_LIB_CURSES): Don't check whether curses needs termcap if $LIBCURSES == $LIBTERMCAP. Sun Feb 16 21:45:02 1997 Miles Bader * telnetd/defs.h, rlogind/rlogind.c, rlogin/rlogin.c : Include removed. Thu Jan 23 18:25:01 1997 Kaveh R. Ghazi * configure.in: Add checks for sys/proc.h, sys/select.h and sys/time.h. Add AC_HEADER_TIME check. Add checks for seteuid, setegid, setreuid, setregid, setresuid, setresgid, killpg, setlinebuf, utimes and utime. Add AC_FUNC_SETVBUF_REVERSED and AC_FUNC_VFORK tests. * ftp/cmds.c: Use TIME_WITH_SYS_TIME macro for time.h headers. * ftp/ftp.c: Likewise. Also include sys/select.h for fd_set on AIX. * ftp/ftp_var.h: Make declarations of mapin/mapout be extern so they don't collide with their definitions below. * ftpd/ftpcmd.y: Include sys/types.h and use TIME_WITH_SYS_TIME macro. Also make declarations of cmttab/sitetab be extern so they don't collide with their definitions below. * ftpd/ftpd.c: Use TIME_WITH_SYS_TIME macro. * headers/acconfig.h: Provide fallback definitions for killpg, seteuid and setegid. * inetd/inetd.c: Include sys/types.h, use TIME_WITH_SYS_TIME macro and include sys/select.h. * libinetutils/xmalloc.c: New file (to support alloca.c.) * libinetutils/Makefile.in: Add xmalloc.c to $(SRCS), add xmalloc.o to $(OBJS). * libinetutils/cleansess.c: Use TIME_WITH_SYS_TIME macro. * libinetutils/iruserok.c: Likewise. * libinetutils/logout.c: Likewise. * libinetutils/logwtmp.c: Likewise. * libinetutils/localhost.c: Include stdlib.h to prototype malloc(). * libtelnet/spx.c (spx_send, spx_is): remove superfluous casts. * rcp/rcp.c: Use TIME_WITH_SYS_TIME macro. Use utime() if utimes() is missing. Cast 4th arg of setsockopt() in toremote() and tolocal() functions. * rexecd/rexecd.c: Include sys/types.h, use TIME_WITH_SYS_TIME macro and include sys/select.h. * rlogin/rlogin.c: Include sys/types.h and use TIME_WITH_SYS_TIME macro. Include sys/proc.h on hpux only. Cast 4th arg of setsockopt() in main(). * rlogind/rlogind.c: Use TIME_WITH_SYS_TIME macro. Include sys/proc.h on hpux only. Include sys/select.h. Cast 4th arg of setsockopt() in main(). * rsh/rsh.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. Cast 4th arg of setsockopt() in main(). * rshd/rshd.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. * syslogd/syslogd.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. Include syslog.h, not sys/syslog.h. Handle missing setlinebuf() function in main(). * talk/ctl_transact.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. * talk/get_names.c: Include sys/types.h. * talk/invite.c: Use TIME_WITH_SYS_TIME macro. * talk/io.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. * talk/msgs.c: Use TIME_WITH_SYS_TIME macro. * talkd/announce.c: Use TIME_WITH_SYS_TIME macro. Include stdlib.h to prototype malloc(). Remove superfluous cast of malloc() in function print_mesg(). * talkd/table.c: Use TIME_WITH_SYS_TIME macro. * talkd/talkd.c: Use TIME_WITH_SYS_TIME macro. * telnet/commands.c: Include stdlib.h to prototype malloc(). Only prototype strchr()/strrchr()/htons() if they are not macros. Avoid superfluous cast of malloc() in function env_init(). * telnet/externs.h: Include termio.h & termios.h, not sys/termio.h & sys/termios.h. * telnet/main.c: Only prototype strrchr() if its not a macro. * telnet/network.c: Use TIME_WITH_SYS_TIME macro. Include sys/select.h. * telnet/sys_bsd.c: Likewise. * telnet/telnet.c: Include stdlib.h to prototype malloc(). * telnet/utilities.c: Use TIME_WITH_SYS_TIME macro. * telnetd/defs.h: Use TIME_WITH_SYS_TIME macro. Include sys/proc.h on hpux only. Do #undef SE to avoid redecl warnings. * telnetd/telnetd.c (telnet): Do #undef HE to avoid redecl warnings. * telnetd/utility.c (edithost, putf): Only prototype strncpy()/strchr()/strrchr() if they are not macros. * tftp/tftp.c: Use TIME_WITH_SYS_TIME macro. * uucpd/uucpd.c: Likewise. Also, wrap comments after #else and #endif with /* */ in all cases. Fri Jan 24 14:17:08 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2j'. * iumacros.m4 (IU_CONFIG_PATHS): Temporarily suppress autoconf quoting around regexps containing "[" and "]". * paths (PATH_UTMP, PATH_WTMP, PATH_LASTLOG): Add /var/adm to file search path. * config.make.in (CPPFLAGS): Add $(CPPFLAGS-$(; all references changed. (clear_mode): Renamed from clearmode, for consistency with setmode; all references changed. * iumacros.m4 (IU_LIB_NCURSES): New macro. (IU_LIB_TERMCAP): Use IU_LIB_NCURSES, and prefer ncurses as the termcap library when it exists. (IU_LIB_CURSES): Special case ncurses (it never requires termcap). (_iu_curses_needs_termcap): Macro removed. * uucpd/uucpd.c (doit): Use PATH_UUCICO instead of _PATH_UUCICO. (dologin): Use PATH_LASTLOG instead of _PATH_LASTLOG. [HAVE_UTMP_H] : New include. * uucpd/Makefile.in (CPPFLAGS): Add $(PATHDEF_LASTLOG). Use $(PATHDEF_UUCICO) instead of old wrong define. Thu Jan 23 13:12:03 1997 Miles Bader * libinetutils/version.c (libinetutils_version): Change to `1.2i'. * configure.in: Move general library tests before any function tests. * telnetd/sys_term.c (login_tty): Use setpgid instead of setpgrp. * telnet/commands.c: Protect includes with HAVE_..._H rather than random system defines. (tn): Protect declaration of htons with !HAVE_HTONS_DECL. * configure.in (htons): Add new declaration check. (AC_CHECK_HEADERS): Add sys/param.h, unistd.h, sys/file.h & fcntl.h. * headers/acconfig.h (HAVE_HTONS_DECL): New define slot. * telnetd/sys_term.c (wtmpf): Initialize from PATH_WTMP. [!PARENT_DOES_UTMP] (utmpf): Initialize from PATH_UTMP. [NEWINIT && HAVE_UTMP_H && HAVE_UTMP_UT_TV] (HAVE_WTMP_UT_TV): New macro. [NEWINIT && HAVE_UTMPX_H && HAVE_UTMPX_UT_TV] (HAVE_WTMP_UT_TV): New macro. * configure.in: Check for ut_tv in struct utmpx, not struct wtmp. Only do tests using / when they exist. * headers/acconfig.h (HAVE_UTMPX_UT_TV): Renamed from HAVE_WTMP_UT_TV. * telnetd/Makefile.in (CPPFLAGS): Add $(PATHDEF_UTMP) & $(PATHDEF_WTMP). * libinetutils/stub_tgetent.c (tgetent): Add missing semi. Wed Jan 22 20:51:31 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2h'. Tue Jan 21 15:32:56 1997 Miles Bader * libinetutils/openpty.c (openpty): Only use TIOCSWINSZ if it's defined. * configure.in: Add existance & decl tests for h_errno. * headers/acconfig.h (HAVE_H_ERRNO, HAVE_H_ERRNO_DECL): New define slots. Mon Jan 20 20:35:53 1997 Miles Bader * libinetutils/herror.c (herror): New file. * configure.in (AC_REPLACE_FUNCS): Add herror. * libinetutils/Makefile.in (SRCS): Add herror.c. * rsh/rsh.c (main): Always use sigset_t & OSIGS & SIGS variables, and pass a pointer to the talk function. (talk): Always use a pointer for the OSIGS arg (was OMASK). * headers/acconfig.h (HAVE_UTMP_UT_TV, sigset_t): Add define slots. * telnetd/sys_term.c (rmut): Use HAVE_WTMP_UT_TV rather than HAVE_UTMPX_H || HAVE_UTMP_UT_TV. * configure.in (sigset_t): New type replacement. Add check for ut_tv field in struct wtmp. Wed Jan 15 16:52:31 1997 Miles Bader * ftpd/ftpd.c (makedir): Provide the absolute name of the new directory in the reply, as per rfc959. Mon Jan 20 19:55:30 1997 Kaveh R. Ghazi * ftp/extern.h (command): Constify fmt argument. * ftp/ftp.c (command): Normalize variable argument list usage. Require both HAVE_STDARG_H && __STDC__==1 to allow inclusion of and use of ellipses, failing either we fall back on and va_alist. Ensure stdarg.h/varargs.h appears before syslog.h in all cases to avoid problems on solaris. * ftp/ruserpass.c: Likewise. * ftpd/ftpd.c (reply, lreply, setproctitle): Likewise. * headers/err.h: Likewise. * libinetutils/err.c (warn, warnx, err, errx): Likewise. * libinetutils/snprintf.c (snprintf): Likewise. * rcp/rcp.c (oldw, run_err): Likewise. * rlogin/rlogin.c (warning): Likewise. * rsh/rsh.c (warning): Likewise. * rshd/rshd.c (error): Likewise. * telnet/commands.c (call): Likewise. Mon Jan 13 22:17:38 1997 Kaveh R. Ghazi * configure.in (AC_CHECK_HEADERS): Add sys/sysmacros.h for solaris to get the roundup() macro. (AC_CHECK_FUNCS): Add waitpid(). * ftp/cmds.c: Don't declare "union wait status". Its never used and causes problems for posix sys/wait.h. Consequently, pass 0 to the wait() function. Add an (ignored) int parameter to function passed to signal(). * ftp/ftp.c: Likewise for functions passed to signal(). * ftp/main.c: Likewise for functions passed to signal(). * ftpd/popen.c: Add POSIX signal handling. * inetd/inetd.c: Likewise. * libinetutils/ttymsg.c: Likewise. * rcp/rcp.c: Change macro MODEMASK to RCP_MODEMASK to avoid conflict with solaris sys/vnode.h header. * rcp/util.c: Include sys/sysmacros.h for solaris to get the roundup() macro. * rexecd/rexecd.c: Use O_RDWR instead of "2" in call to open(). * rlogind/rlogind.c: Don't define FD_SETSIZE, let OS headers do it. * rsh/rsh.c: Add POSIX signal handling. * rshd/rshd.c: Use O_RDWR instead of "2" in call to open(). * syslogd/syslogd.c: Test MSG_BSIZE, not HAVE_SYS_MSGBUF_H, when deciding if we have MSG_BSIZE. Add POSIX signal handling. Optionally use waitpid(). Also, don't declare "union wait status", its never used and causes problems for posix sys/wait.h. Consequently, pass 0 to the waitpid()/wait3() functions. * talk/ctl_transact.c: Use fd_set not int for file descriptor set. Also set mask with FD_SET, not an explicit bit shift operation. * talk/init_disp.c: Fix POSIX signal handling. * talk/invite.c: Cast 2nd arg of sendto() to (const char *). * talk/msgs.c: Add an (ignored) int parameter to function passed to signal(). * telnet/sys_bsd.c: Add POSIX signal handling. * telnetd/sys_term.c: Check HAVE_UTMP_UT_HOST before using ut_host. Also, check HAVE_UTMPX_H||HAVE_UTMP_UT_TV before using ut_tv field. * telnetd/telnetd.c: Use O_RDWR instead of "2" in call to open(). * telnetd/termstat.c: Evaluate tty_istrapsig() not tty_istrapsig. * tftp/tftp.c: Cast 2nd arg of sendto() to (const char *). Also cast 2nd arg of recvfrom() to (char *). * tftpd/tftpd.c: Include sys/filio.h. Use O_RDONLY & O_WRONLY instead of "0" & "1" in call to open(). Add an (ignored) int parameter to function passed to signal(). Cast the 2nd arg of send() to (const char *). Cast the 2nd arg ot recv to (char *). * uucpd/uucpd.c: Include termios.h for decl of TIOCNOTTY on solaris. Also use O_RDWR instead of "2" in call to open(). Mon Jan 13 14:06:24 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2g'. * iumacros.m4 (IU_LIB_CURSES): Add --disable-ncurses option. Use _iu_curses_needs_termcap to keep the requirements of curses and ncurses separate. (_iu_curses_needs_termcap): New macro. Sat Jan 11 16:42:43 1997 Kaveh R. Ghazi * libinetutils/forkpty.c: sunos4 cc chokes on indented cpp directives. Put # in first column and put indentation after it. * libinetutils/openpty.c: Likewise. Also change auto variable declaration to avoid zero sized array error on sunos4 cc. * libinetutils/iruserok.c: KNRize function signatures. Fri Jan 10 14:22:18 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2f'. * tftp/main.c (put, get): Use strchr rather than index. (tail): Use strrchr rather than rindex. (index, rindex): Declarations removed. * rlogind/rlogind.c (setup_term): Use strchr rather than index. * talk/get_names.c (get_names): Likewise. * tftp/tftp.c (tpacket): Likewise. : New include. * rcp/rcp.c, tftp/tftp.c, tftpd/tftpd.c [!HAVE_STRERROR_DECL] (strerror): New declaration. * tftp/tftp.c (nak): Remove declaration of strerror. (errno): Protect declaration with !HAVE_ERRNO_DECL. * headers/acconfig.h [HAVE_STRCHR] (strchr, strrchr): New macros. [HAVE_STRCHR_DECL] (strchr, strrchr): New declarations. (HAVE_STRCHR_DECL, HAVE_STRERROR_DECL): New define slots. * configure.in (AC_CHECK_FUNCS): Add index & strchr. (strchr, strerror): New declaration tests. * libinetutils/iruserok.c (rcmd, rresvport): Functions removed. * talk/io.c (talk): Use fd_setsinstead of ints for select. (STDIN_MASK): Macro removed. : New include. * libinetutils/err.c (_VA, vwarnx, vwarn, warn, warnx, verr, verrx, err, errx): Make FORMAT const. * headers/err.h: Update prototypes to include const where appropriate. * tftpd/tftpd.c (verifyhost, errtomsg): Add const to return type. (struct errmsg): Make E_MSG field const. * tftp/tftp.c (struct errmsg): Make E_MSG field const. * syslogd/syslogd.c (cvthname, printline, printsys, logmsg, fprintlog, decode, logerror): Add const all over the place. * ftpd/ftpd.c (dolog): Add const to decl of NAME. * rshd/rshd.c (doit): Add const to decls of HOSTNAME, ERRORSTR, and ERRORHOST. (local_domain, topdomain): Add const to decl of H. * rlogind/rlogind.c (doit): Add const to decl of RAW_HOSTNAME. * syslog/syslog.c (main): If LOG_PERROR isn't defined, don't support -s option. * rlogin/rlogin.c (main, setsignal, done, lostpeer, reader, stop, writeroob): Use setsig instead of sigaction crap. (setsig): New declaration. [!_POSIX_VDISABLE] (_POSIX_VDISABLE): New macro. * libinetutils/setsig.c: New file. * libinetutils/Makefile.in (OBJS): Add setsig.o. (SRCS): Add setsig.c. * headers/syslog-int.h: New file. * headers/Makefile.in (DISTFILES): Add syslog-int.h. * syslog/syslog.c [!HAVE_SYSLOG_INTERNAL] : New include. * syslogd/syslogd.c: Likewise. * configure.in: Add check for the special stuff in enabled by defining SYSLOG_NAMES. * headers/acconfig.h (HAVE_SYSLOG_INTERNAL): New define slot. * iumacros.m4 (IO_CHECK_MACRO): Quote arguments to IU_RESULT_ACTIONS. Wed Jan 8 14:55:47 1997 Miles Bader * rlogind/rlogind.c (setup_term): Use cfsetispeed & cfsetospeed if cfsetspeed isn't defined. * configure.in (AC_CHECK_FUNCS): Add cfsetspeed. * telnetd/sys_term.c [HAVE_SYS_TTY_H] : Include removed. [t_erase] (t_erase, t_kill, t_intrc, t_quitc, t_startc, t_stopc, t_eofc, t_brkc, t_suspc, t_dsuspc, t_rprntc, t_flushc, t_werasc, t_lnextc): Undefs removed. Tue Jan 7 13:10:05 1997 Kaveh R. Ghazi * configure.in (IU_CHECK_DESC): Add checks for pclose, getpass and getusershell. Change sig_t, sig_atomic_t tests to look in signal.h, not sys/signal.h. Add check for sys/filio.h, sys/ptyvar.h and sys/sockio.h. * ftp/extern.h: Test HAVE_GETPASS_DECL. * telnet/authenc.c: Likewise. * ftp/ftp.c: Test HAVE_PCLOSE_DECL. * ftpd/extern.h: Test HAVE_GETUSERSHELL_DECL. * ftpd/ftpd.c: Change &array[x] to array+x to pacify sunos4 cc. Cast the result of alloca(). * ftpd/popen.c: Cast the result of malloc(). * headers/acconfig.h: Add slots for pclose, getpass and getusershell. * headers.crypt.h: Test HAVE_CRYPT_DECL, not HAVE_CRYPT, when deciding to declare crypt(). * libinetutils/snprintf.c: Add missing arg "ap" to calls to va_arg(). KNRize function signature of vsnprintf() and add missing format parameter. Also, check __STDC__ in addition to HAVE_STDARG_H since hpux cc has the header but does not understand elipses in function signatures by default. * libtelnet/auth.c: Test HAVE_*_H macro, not __STDC__ for headers. * libtelnet/enc_des.c: Likewise. * libtelnet/encrypt.c: Likewise. * libtelnet/kerberos.c: Likewise. * libtelnet/krb4encpwd.c: Likewise. * libtelnet/rsaencpwd.c: Likewise. * libtelnet/spx.c: Likewise. * telnetd/defs.h: Likewise. Also test HAVE_SYS_FILIO_H, not FILIO_H, and do not base include on !FILIO_H. Test and include sys/stream.h, sys/tty.h and sys/ptyvar.h. * telnet/externs.h: Likewise for filio.h stuff. * rlogin/rlogin.c: Include sys/stream.h, sys/tty.h, sys/ptyvar.h, and sys/sockio.h. * libtelnet/kerberos5.c: Don't base "const" support on __STDC__. * rshd/rshd.c: Add alloca() support and cast the result of alloca(). Also test and include sys/filio.h. * rlogind/rlogind.c: Likewise for sys/filio.h. Test and include sys/stream.h, sys/tty.h, sys/ptyvar.h, and sys/sockio.h. * rexecd/rexecd.c: Likewise for filio.h. * tftp/tftpsubs.c: Likewise. * rsh/rsh.c: Likewise. * talk/io.c: Likewise. * talkd/announce.c: Don't assume sprintf() returns int. * syslogd/syslogd.c: Likewise. Also cast the result of malloc(). Tue Jan 7 15:33:14 1997 Miles Bader * libinetutils/revoke.c: New file. (AC_REPLACE_FUNCS): Add revoke. * libinetutils/Makefile.in (SRCS): Add revoke.c. * libinetutils/login_tty.c: New file. * configure.in (AC_REPLACE_FUNCS): Add login_tty. (AC_CHECK_FUNCS): Add setsid. * libinetutils/Makefile.in (SRCS): Add login_tty.c. * paths (PATH_HEQUIV): New path (only necessary for iruserok.c). * libinetutils/iruserok.c : New include. [HAVE_ARPA_NAMESER_H] : New include. : New include. (iruserok): Change _PATH_HEQUIV to PATH_HEQUIV. * configure.in (AC_CHECK_HEADERS): Add arpa/nameser.h. * libinetutils/Makefile.in (SRCS): Add iruserok.c. (CPPFLAGS): Add $(CPPFLAGS-$<) (CPPFLAGS-iruserok.c): New variable. Tue Jan 7 18:06:37 1997 Bernhard Rosenkraenzer * configure.in: Check for bsd library, which enables some bsd-style functions (revoke()) under Linux (and probably a few other OSes). * iumacros.m4: Use ncurses rather than curses if possible. (fixes scrollok problem with Linux) * glob/Makefile.in (install): New dummy target to enable make install in the root directory * configure.in (AC_REPLACE_FUNCS): Add iruserok. * libinetutils/iruserok.c: New file. * Makefile.in (DISTCLEAN): Add config.cache. * libinetutils/openpty.c, libinetutils/forkpty.c: Replaced with versions that should work (NetKit-B based) Sun Jan 5 18:28:05 1997 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2e'. * configure.in: Test $inetutils_cv_macro_fd_set_macros, not $inetutils_cv_fd_set_macros. * configure.in (INCLUDES): Add protocols/talkd.h. * headers/Makefile.in (DISTFILES): Add protocols & protocols/talkd.h. * ftp/ftp.c [!HAVE_FCLOSE_DECL] (fclose): New declaration. * telnetd/sys_term.c : Make include conditional on HAVE_SYS_STREAM_H, not STREAMS. * configure.in (AC_CHECK_HEADERS): Add sys/stream .h. Sat Jan 4 20:05:29 1997 Miles Bader * ftpd/ftpd.c [!HAVE_FCLOSE_DECL] (fclose): New declaration. * configure.in (libresolv): New check. (sig_atomic_t): New type check. (fclose): New decl check. * headers/acconfig.h (sig_atomic_t, HAVE_FCLOSE_DECL): New define slots. * iumacros.m4 (IU_CONFIG_PATHS): Store cache variables in a temporary files so that they can be exported out of the subshell in which some shells evaluate the main loop. Instead of calling AC_C_CROSS, require AC_PROG_CC. * headers/acconfig.h (HAVE_ENVIRON_DECL): New define slot. * configure.in: Add check for declaration of ENVIRON. Add AC_PREREQ of 2.12. Fri Jan 3 17:50:51 1997 Miles Bader * libinetutils/memset.c, libinetutils/memmove.c, libinetutils/setenv.c: New files. * headers/acconfig.h [!HAVE_MEMCPY] (memcpy): Define to use memmove. [!HAVE_BCOPY] (bcopy): Define to use memmove. [!HAVE_BZERO] (bzero): Define to use memset. [!HAVE_MEMMOVE] (bcopy): New declaration. [!HAVE_MEMSET] (memset): New declaration. * libinetutils/Makefile.in (SRCS): Add memmove.c, memset.c, & setenv.c. * configure.in (AC_REPLACE_FUNCS): Add memset. (AC_CHECK_FUNCS): Check for memcpy, bcopy, & bzero. Tue Dec 31 00:26:13 1996 Miles Bader * telnetd/telnetd.c (_console, cprintf): Debugging gunk removed. * libinetutils/Makefile.in (SRCS): Update to reflect directory contents. Portability changes for sunos from "Kaveh R." : * configure.in (AC_C_CONST, AC_FUNC_ALLOCA): New tests. (AC_REPLACE_FUNCS): Add memmove & setenv. (nsl, socket): Test for these libraries. * ftpd/ftpd.c: Add alloca support. * ftpd/ftpd.c, syslogd/syslogd.c [!LINE_MAX] (LINE_MAX): New macro. * ftp/ftp.c (initconn): Don't use ansi-c string concatenation. * libinetutils/Makefile.in (OBJS): Add @ALLOCA@. * libinetutils/cleansess.c (cleanup_session): Use K&R style definition. * libinetutils/hstrerror.c (hstrerror): Use K&R style definition. * libinetutils/logout.c (logout): Use K&R style definition. * libinetutils/version.c [HAVE_CONFIG_H] : New include. * libinetutils/err.c [!HAVE_STDARG_H] (_VA): Add missing backslashes. [!HAVE_STDARG_H] (_VA, VAS): Supply missing AP argument to va_arg. * ftp/ruserpass.c [HAVE_CONFIG_H] : New include. * rexecd/rexecd.c (path, doit): Use PATH_ instead of _PATH_ defines. * talkd/announce.c (announce): Likewise. * talkd/process.c (find_user): Likewise. * telnetd/sys_term.c (start_login, getptyslave): Likewise. * talkd/talkd.c (main): Likewise. * telnetd/telnetd.c (telnet): Likewise. * uucpd/uucpd.c (main): Likewise. * rexecd/Makefile.in, talkd/Makefile.in (CPPFLAGS): New variable. * rlogin/rlogin.c, ftpd/ftpd.c, syslog/syslog.c, syslogd/syslogd.c, tftpd/tftpd.c : New include. * syslogd/Makefile.in (CPPFLAGS): Add $(PATHDEF_LOG). * telnetd/sys_term.c: Test HAVE_UTMPX_H rather than UTMPX. * tftp/main.c : New include. * uucpd/Makefile.in (CPPFLAGS): Add $(PATHDEF_TTY). * libinetutils/version.c (inetutils_version): Change to `1.2d'. * Makefile.in (pkgdirs): Renamed from auxdirs. (SUBDIRS, SERVERS, CLIENTS, BOTH): Use $(pkgdirs) instead of $(auxdirs). (DIST_SUBDIRS): New variable. (DISTFILES): Use $(DIST_SUBDIRS) instead of $(SUBDIRS). (dist-subdirs): Use $(DIST_SUBDIRS) instead of @SUBDIRS@. Mon Dec 30 15:45:59 1996 Miles Bader * libinetutils/version.c (inetutils_version): Change to `1.2c'. * libinetutils/login.c, libinetutils/forkpty.c: New dummy files. * libinetutils/Makefile (SRCS): Add err.c, login.c, and forkpty.c. * libinetutils/logout.c : New include. (logout): declare variable RD. * headers/acconfig.h [!HAVE_SIG_T] (sig_t): Move to top-level. * ftp/main.c (long_options, ohelp, main): Add --prompt/-p. (DEFAULT_PROMPT): New macro. (prompt): New variable. (main): If FROMATTY, default PROMPT to DEFAULT_PROMPT. (cmdscanner): Print a prompt when there is one, rather than only when on a tty. * libinetutils/version.c (inetutils_version): Change to `1.2b'. * Makefile.in (auxdirs): New variable. (SUBDIRS, SERVERS, CLIENTS, BOTH): Use $(auxdirs). (dist-subdirs): New rule. * iumacros.m4 (IU_CONFIG_PATHS): Use hairy eval construct to deal with translating @( to $( in iu_val, because some shells improperly deal with nested quotes. Fri Dec 27 23:56:25 1996 Miles Bader * libinetutils/Makefile.in (SRCS): Add openpty.c (bogus, but...). Tue Dec 24 14:37:55 1996 Miles Bader * telnet/commands.c (ToggleList): Don't make entry for "termdata" dependent on `unix' being defined. * telnet/externs.h (termdata): Likewise. * telnetd/sys_term.c (startslave): Remove declaration of time(). * iumacros.m4 (IU_CONFIG_PATHS): Escape paths stored in the autoconf cache to avoid problems with the shell evaluating make variable notation, by storing `$(' as `@('. * telnet/commands.c (env_init): Use correct hostname in sprintf. * Makefile.in (DISTFILES): Add iumacros.m4. * libinetutils/version.c (inetutils_version): Change to "1.2a". Tue Nov 12 19:25:44 1996 Miles Bader * iumacros.m4 (IU_CONFIG_PATHS): Make default iu_test_type 'r', not 'e' (which apparently isn't totally standard). Thu Oct 24 17:21:36 1996 Miles Bader * telnet/telnet.c (init_term): Renamed from setupterm to avoid conflict with ncurses. (gettermname): Call init_term instead of setupterm. Mon Oct 21 16:21:15 1996 Miles Bader * config.make.in (LINK_DISTFILES): Add `;' before '}'. Avoid posix sh bogosity with null for-loop. * rsh/rsh.c (try_help, help, pusage): New function. (usage): Use pusage & try_help. (warning): Use __PROGNAME. (main): Add long option handling. (long_options): New variable. "version.h": New include. * libinetutils/version.c (inetutils_package): New variable. * headers/version.h (inetutils_package): New declaration. * ftp/main.c (main): Use INETUTILS_PACKAGE. * ftpd/ftpd.c (statcmd, main): Likewise. * telnet/main.c (main): Likewise. (help): Add program description. * ftpd/ftpd.c (inetutils_version): Declaration removed. "version.h": New include. Fri Sep 27 13:07:03 1996 Miles Bader * libinetutils/version.c (inetutils_bugaddr): New variable. (inetutils_version): Get rid of package name. Change to version 1.3. * ftp/main.c (main): Supply program name when printing the version, and use INETUTILS_VERSION as only the version number. * ftpd/ftpd.c (main, statcmd): Likewise. * ftp/main.c (ohelp): Add bug reporting address. * telnet/main.c (help): Likewise. * headers/version.h (inetutils_bugaddr): New declaration. Tue Sep 24 19:16:34 1996 Miles Bader * telnetd/telnetd.c (telnet): Restore #if accidentally deleted when removing debugging printfs. * headers/crypt.h: Use crypt unconditionally if HAVE_CRYPT is defined. Fri Aug 30 11:47:44 1996 Miles Bader * telnetd/telnetd.c (telnet): Remove unecessary debugging printfs. Wed Aug 21 12:42:28 1996 Miles Bader * configure.in (enable_talk): Define `HAVE_OSOCKADDR_H' if we supply that include file. * headers/acconfig.h (HAVE_OSOCKADDR): Define slot removed. (HAVE_OSOCKADDR_H): New define slot. * talkd/talkd.c : Conditionalize on HAVE_OSOCKADDR_H instead of !HAVE_OSOCKADDR. Tue Aug 20 19:55:32 1996 Miles Bader * headers/Makefile.in (DISTFILES): Add err.h. Fri Aug 16 00:49:23 1996 Miles Bader * Makefile.in (DISTFILES): Add TODO. * tftp/main.c (get_args): New function. (setpeer, put, get, setrexmt, settimeout): Use get_args. (command): Use fgets instead of gets. * Makefile.in (dist): Remove dependency on $(DISTFILES). (DISTFILES): Add $(SUBDIRS). Remove glob & glob/*. (dist-prepare): Don't make subdirectories explicitly. Link or copy package directories as a unit into the distribution. (DISTPACKAGES): New variable. * headers/Makefile.in (DISTFILES): Add confpaths.h.in. * headers/crypt.h [__GNUC__] (CRYPT): Use alternate definition to avoid apparent gcc bug with weak refs and ?: operator. * ftpd/ftpd.c (try_login): New function, guts from `pass'. (pass): Call try_login. (user): Always ask for a password for an uknown user. Call try_login directly if a known user with no password. * headers/Makefile.in (DISTFILES): Remove iupaths.h. Thu Aug 15 22:29:46 1996 Miles Bader * uucpd/uucpd.c (dologin, dologout): Always use logwtmp now. : Include removed. (struct utmp): Type removed. (dologout): Check HAVE_WAIT3 instead of BSDINETD. * ftpd/ftpd.c (end_login, pass, dologout): Use logwtmp_keep_open. * ftpd/Makefile.in (SRCS): Remove logwtmp.c. * logwtmp.c: File removed. * configure.in: Add check for errno being declared. * libinetutils/logwtmp.c [!HAVE_ERRNO_DECL] (errno): New decl. [HAVE_ERRNO_H] : New [KEEP_OPEN] Add code to define `logwtmp_keep_open' version. * libinetutils/logwtmp.c : New include. * libinetutils/Makefile.in (CPPFLAGS): Add $(PATHDEF_WTMP) and $(PATHDEF_UTMP). (SRCS): Add logwtmpko.c. (OBJS): Add logwtmpko.o. * logwtmpko.c: New file. * headers/acconfig.h (HAVE_STAT_ST_MTIMESPEC): Renamed from HAVE_ST_TIMESPEC. (HAVE_STAT_ST_MTIME_USC): Renamed from HAVE_ST_TIME_USEC. (HAVE_ATTR_WEAK_REFS, HAVE_UTMP_UT_TYPE, HAVE_UTMP_UT_HOST, HAVE_UTMP_UT_TV): New define slots. * headers/crypt.h: Replace HAVE_WEAK_REFS with HAVE_ATTR_WEAK_REFS, and test for any of the three with HAVE_WEAK_REFS. * configure.in (sys_glob): Add checks for ut_type, ut_host, and ut_tv fields in struct utmp. (AC_CHECK_HEADERS): Add utmp.h & utmpx.h. (AC_CHECK_FUNCS): Add flock, ftruncate, wait3. * libinetutils/logwtmp.c (_logwtmp): Close FD after use. * ftpd/logwtmp.c: Replace with version derived from libinetutils. * rcp/rcp.c (write_stat_time): Replace HAVE_ST_TIME* with HAVE_STAT_ST_MTIME* (as generated by new configure rules). Thu Aug 8 02:37:15 1996 Miles Bader * iumacros.m4: New file. * configure.in: Use macros from iumacros.m4. Rearrange to be more clear, and add lots of comments. Check for libutils functions in libutil if it exists. Wed Aug 7 15:24:45 1996 Miles Bader * configure.in (AC_CHECK_FUNCS): Remove strdup & logwtmp. (AC_REPLACE_FUNCS): Add strdup, logout, & logwtmp. * libinetutils/logout.c, libinetutils/logwtmp.c, libinetutils/cleansess.c, libinetutils/strdup.c: New files. * libinetutils/Makefile.in (SRCS): Add strdup.c, logout.c, logwtmp.c, & cleansess.c. (OBJS): Add cleansess.o. * ftp/cmds.c [!HAVE_STRDUP] (strdup): Function removed. * ftpd/logwtmp.c [!PATH_WTMP && WTMP_FILE] (PATH_WTMP): Macro removed. * rlogind/rlogind.c [HAVE_FD_SET_MACROS_IN_SYS_TIME_H] : New include. * configure.in: Rework format of path configuration file. * headers/acconfig.h: Include at end. * headers/confpaths.h.in: Renamed from iu_paths.h. * paths: Change format of entries. * libinetutils/Makefile.in (CPPFLAGS): New variable. * libinetutils/daemon.c, libinetutils/ttymsg.c, rexecd/rexecd.c, talkd/announce.c, talkd/process.c, talkd/talkd.c, uucpd/uucpd.c : Include removed. * ftp/cmds.c, ftpd/ftpd.c, ftpd/logwtmp.c, inetd/inetd.c, rcp/rcp.c, rcp/util.c, rlogind/rlogind.c, rsh/rsh.c, rshd/rshd.c, syslogd/syslogd.c, telnetd/sys_term.c, telnetd/telnetd.c : Include removed. * Makefile.in (DISTCLEAN): Add pathdefs.make and paths.defs. Tue Aug 6 01:44:37 1996 Miles Bader * libinetutils/version.c (inetutils_version): Change to 1.2. * paths: New file. * configure.in: Add huge wodge of code to parse the `paths' file and produce pathdefs.make and paths.defs. * Makefile.in (DISTFILES): Add paths. * config.make.in: Put @PATHDEFS_MAKE@ at the end. * headers/iu_paths.h: New file. * headers/Makefile.in (DISTFILES): Add iu_paths.h & remove paths.h. * inetd/Makefile.in, telnetd/Makefile.in, ftpd/Makefile.in, syslogd/makefile.in, rsh/Makefile.in, rlogind/Makefile.in, rcp/Makefile.in (CPPFLAGS): Use $(PATHDEF_...) variables. * inetd/inetd.c, ftp/cmds.c, telnetd/telnetd.c, telnetd/sys_term.c, syslogd/syslogd.c, rshd/rshd.c, rlogind/rlogind.c, rcp/util.c : Changed from . * rsh/rsh.c, rcp/rcp.c : New include. * inetd/inetd.c (CONFIG): Initialize from PATH_INETDCONF. * ftp/Makefile.in, rshd/Makefile.in (CPPFLAGS): New macro. * syslogd/syslogd.c (LogName, ConfFile, PidFile, ctty, main, wallmsg): Use PATH_* macros instead of _PATH_* ones. * ftp/cmds.c (remglob, shell): Likewise * rsh/rsh.c (main): Likewise. * rshd/rshd.c (doit): Likewise. * rlogind/rlogind.c (doit, cleanup): Likewise. * rcp/util.c (susystem): Likewise. * rcp/rcp.c (toremote, tolocal): Likewise. * telnetd/sys_term.c (start_login): Likewise. Mon Aug 5 00:23:07 1996 Miles Bader * configure.in: Check to see if the fd_set macros are defined by rather than (!). * headers/acconfig.h (HAVE_FD_SET_MACROS_IN_SYS_TIME_H): New def slot. * rsh/rsh.c [HAVE_FD_SET_MACROS_IN_SYS_TIME_H] : New inc. * talk/init_disp.c (init_display): Use sigaction or sigvec as appr. * configure.in: Include $LIBTERMCAP in LIBCURSES if necessary. * rlogin/rlogin.c (oob): Only use TIOCFLUSH if it's defined. (writer): Only check VDSUSP if it's defined. * talkd/announce.c : Include removed. * rsh/rsh.c: [HAVE_STDARG_H] : New include. [!HAVE_STDARG_H] : Conditionalize include. * libinetutils/hstrerror.c: New file. * libinetutils/Makefile.in (SRCS): Add strerror.c & hstrerror.c. * headers/acconfig.h (HAVE_H_ERRLIST_DECL): New define slot. * configure.in: Check for hstrerror, and various things to provide a replacement if it doesn't exist. * syslogd/syslogd.c (cfline): Declare hstrerror. * rlogind/rlogind.c [!TTYDEF_IFLAG] (TTYDEF_IFLAG), [!TTYDEF_OFLAG] (TTYDEF_OFLAG), [!TTYDEF_LFLAG] (TTYDEF_LFLAG): New macros. * rshd/rshd.c (doit): Use setpgid instead of setpgrp. * uucpd/uucpd.c (dologin): Only write lastlog if HAVE_STRUCT_LASTLOG. * configure.in: Add check for struct lastlog in . * headers/acconfig.h (HAVE_STRUCT_LASTLOG): New define slot. * daemon.c: New file. libinetutils/Makefile.in (SRCS): Add daemon.c. * configure.in (AC_REPLACE_FUNCS): New test, for daemon. * configure.in: Check whether crypt is declared in . (AC_CHECK_FUNCS): Add sigvec & sigaction. * inetd/inetd.c (main): Use sigaction, sigvec, or signal as appropriate. * rlogin/rlogin.c (main): Likewise. * headers/acconfig.h (HAVE_CRYPT_DECL): New define slot. * headers/crypt.h: If there's a system decl for crypt, use an ambiguous argument signature (`()') to avoid conflicting with it. * ftpd/ftpd.c (send_file_list): Test for '\0' in name rather than looking at DIR's d_namlen field (which doesn't exist on all systems). (retrieve, store): Use SEEK_* macros instead of L_*. [!LOG_FTP] (LOG_FTP): New macro. (version): Variable removed. (main, statcmd): Use INETUTILS_VERSION instead of VERSION. * configure.in: Add tests for SEEK_* macros and L_* macros, defining the SEEK_* ones if they don't already exists. * headers/acconfig.h (SEEK_SET, SEEK_CUR, SEEK_END): New define slots. * tftpd/tftpd.c [!LOG_FTP] (LOG_FTP): New macro. * telnetd/sys_term.c (tty_linemode): If EXTPROC isn't defined, always return false (we can't set linemode either in this case). * telnetd/telnetd.c (telnet): Only use TIOCPKT_IOCTL if it's defined. * telnet/externs.h: Prefer termios if both & exist. Move define of `termio' to `termios' outside of file-already- included test, as sometimes the file's already been included. * ftp/ruserpass.c: Include or before including (which needs va_list). (localhost): New declaration. * ftp/ftp.c [!HAVE_HSTRERROR] (hookup): Add grot to print error message for h_errno, using herror. Sun Aug 4 23:00:29 1996 Miles Bader * ftp/cmds.c (site_idle): Renamed from `idle' to avoid conflict with linux . * ftp/extern.h: Likewise. (command): Add arg decls to prototype. * ftp/cmdtab.c (cmdtab): Change entry for "idle" to use site_idle. * ftp/ftp.c [HAVE_STDARG_H] : New include. [!HAVE_STDARG_H] : Conditionalize include. (command): Make work with either or . * configure.in (AC_CHECK_HEADERS): Add glob.h. Check for system glob, and config in our own if necessary. * Makefile.in (SUBDIRS, SERVERS, CLIENTS, BOTH): Add @subdirs@, the autoconf-supplied list of sub-configured directories. (DISTFILES): Add `glob' and `glob/*' (ick, but what else can be done without modifying glob?). * ftp/Makefile.in, ftpd/Makefile.in (LDLIBS): Add $(LIBGLOB). * config.make.in (LIBGLOB): New variable. * headers/Makefile.in (DISTFILES): Add paths.h. Wed Jul 31 14:49:18 1996 Miles Bader * telnet/main.c (help): Shorten description for -l/--user. * configure.in: Add a check for various types of weak reference. Add crypt.h to INCLUDES. * headers/acconfig.h (HAVE_WEAK_REFS, HAVE_PRAGMA_WEAK_REFS, HAVE_ASM_WEAK_REFS): New define slots. * headers/crypt.h: New file. * headers/Makefile.in (DISTFILES): Add crypt.h. * ftpd/ftpd.c (pass): Use CRYPT instead of crypt. * libtelnet/krb4encpwd.c (passwdok): Likewise. * libtelnet/rsaencpwd.c (rsaencpwd_passwdok): Likewise. * rexecd/rexecd.c (doit): Likewise. * uucpd/uucpd.c (doit): Likewise * ftpd/ftpd.c, libtelnet/krb4encpwd.c, libtelnet/rsaencpwd.c, rexecd/rexecd.c, uucpd/uucpd.c : New include. Tue Jul 30 18:36:11 1996 Miles Bader * libinetutils/version.c (inetutils_version): Change to 1.1. * configure.in (AC_CHECK_FUNCS): Check for crypt. Check for EWOULDBLOCK. * ftpd/ftpd.c (pass): Only call crypt if HAVE_CRYPT defined. * libtelnet/krb4encpwd.c (passwdok): Likewise * libtelnet/rsaencpwd.c (passwdok): Likewise. * rexecd/rexecd.c (doit): Likewise. * uucpd/uucpd.c (doit): Likewise. * headers/acconfig.h (EWOULDBLOCK): New define slot. Sat Jul 27 11:32:13 1996 Miles Bader * uucpd/uucpd.c [!HAVE_LOGWTMP] (dologin): Supply name to copy in wtmp. * rlogind/rlogind.c : New include. (fatal): Don't depend on sprintf returning a count. * telnetd/defs.h: Prefer termios if & exist. * inetd/inetd.c : New include. (line): Define with a size of 2048 if LINE_MAX isn't defined. Fri Jul 26 09:06:41 1996 Miles Bader * headers/Makefile.in (DISTFILES): Add `arpa' (the directory). * config.make.in (_LINK_DISTFILE): Copy directories too. Wed Jul 24 01:36:15 1996 Miles Bader * config.make.in (_LINK_DISTFILE): Copy into $(DISTDIR)/$$FILE. (LINK_DISTFILES): Always set $$FILE as well as $$DISTFILE before using $(_LINK_DISTFILE). Tue Jul 23 22:59:49 1996 Miles Bader * Makefile.in: Use dependencies instead of shell loops for iteration over subdirs, to make it interruptible in a sane fashion. Mon Jul 22 00:14:09 1996 Miles Bader * headers/arpa/telnet.h, headers/arpa/ftp.h, headers/arpa/tftp.h: New files. * headers/Makefile (DISTFILES): Add arpa/telnet.h, arpa/ftp.h, & arpa/tftp.h. * configure.in (INCLUDES): Likewise. * tftp/tftp.c [HAVE_CONFIG_H] : New include. * configure.in (paths.h): New test. (AC_CHECK_HEADERS): Add stdlib.h, errno.h, string.h, stdarg.h & sys/cdefs.h. Check for __P in , not . Define HAVE___P if we do. (verrx, strerror, __progname, snprintf): New tests. Check for sig_t. (AC_CHECK_FUNCS): Temporarily add $LIBUTIL to $LIBS while doing this. * headers/acconfig.h (HAVE_SYS_ERRLIST_DECL, HAVE_SIG_T, HAVE___PROGNAME, HAVE_SNPRINTF): New entries. [!HAVE_SIG_T] (sig_t): New macro. * libinetutils/err.c: New file. * libinetutils/__progname.c: New file. * libinetutils/strerror.c: New file. * libinetutils/snprintf.c: New file. * headers/err.h: New file. * ftp/main.c, rcp/rcp.c, rlogin/rlogin.c, rsh/rsh.c, talk/talk.c [!HAVE___PROGNAME] (main): Set __progname. * rcp/rcp.c, rsh/rsh.c, rshd/rshd.c : New include. Sun Jul 21 12:19:48 1996 Miles Bader * configure.in (AC_CONFIG_HEADER): Added. Add test for __P in . (termlib): New test, if can't find termcap. (curses): Don't depend on termcap if it's not necessary. (util, crypt): Define unique substs for each lib found. * config.make.in (CPPFLAGS): Remove -D_BSD_SOURCE (now in config.h). (LIBCRYPT, LIBUTIL): New variables. * ftpd/Makefile.in, ftp/Makefile.in, rlogind/Makefile.in, rexecd/Makefile.in, uucpd/Makefile.in (LDLIBS): New variable. * telnet/Makefile.in, telnetd/Makefile.in (LDLIBS): Add $(LIBUTIL) & $(LIBCRYPT) * Makefile.in (MAINTCLEAN, DISTCLEAN): New variables. (distclean): Use $(DISTCLEAN). (maintainer-clean): New target. (%-clients, %-servers): New targets. * headers/acconfig.h: New file. * headers/Makefile.in (DISTFILES): Add config.h.in & acconfig.h. (MAINTCLEAN): New variable. * uucpd/uucpd.c, tftpd/tftpd.c, tftp/tftpsubs.c, tftp/main.c, telnetd/utility.c, telnetd/termstat.c, telnetd/telnetd.c, telnetd/sys_term.c, telnetd/state.c, telnetd/slc.c, telnetd/global.c, telnetd/authenc.c, telnet/telnet.c, telnet/utilities.c, telnet/tn3270.c, telnet/terminal.c, telnet/sys_bsd.c, telnet/ring.c, telnet/network.c, telnet/main.c, telnet/commands.c, telnet/authenc.c, talkd/talkd.c, talkd/table.c, talkd/process.c, talkd/print.c, talkd/announce.c, talk/talk.c, talk/msgs.c, talk/look_up.c, talk/io.c, talk/invite.c, talk/init_disp.c, talk/get_names.c, talk/get_addrs.c, talk/display.c, talk/ctl_transact.c, talk/ctl.c, syslogd/syslogd.c, syslog/syslog.c, rshd/rshd.c, rsh/rsh.c, rlogind/rlogind.c, rlogin/rlogin.c, rlogin/krcmd.c, rlogin/kcmd.c, rlogin/des_rw.c, rexecd/rexecd.c, rcp/util.c, rcp/rcp.c, libtelnet/rsaencpwd.c, libtelnet/read_password.c, libtelnet/misc.c, libtelnet/krb4encpwd.c, libtelnet/kerberos5.c, libtelnet/kerberos.c, libtelnet/genget.c, libtelnet/enc_des.c, libtelnet/auth.c, libinetutils/ttymsg.c, libinetutils/localhost.c, inetd/inetd.c, ftpd/ftpd.c, ftpd/ftpcmd.y, ftp/main.c, ftp/ftp.c, ftp/domacro.c, ftp/cmdtab.c, ftp/cmds.c [HAVE_CONFIG_H] : New include. * rules.make (install, uninstall, mostlyclean, distclean, maintainer-clean, dist): Make :: rules. (clean): New rule. (mostlyclean): Merge with clean. (.PHONY): New target. (uninstall): Put command in right place. * ftp/Makefile.in, uucpd/Makefile.in, tftpd/Makefile.in, tftp/Makefile.in, telnetd/Makefile.in, telnet/Makefile.in, talkd/Makefile.in, talk/Makefile.in, syslogd/Makefile.in, syslog/Makefile.in, rshd/Makefile.in, rsh/Makefile.in, rlogin/Makefile.in, rcp/Makefile.in, libtelnet/Makefile.in, libinetutils/Makefile.in, ftpd/Makefile.in (clean): Target removed. (CLEAN, OBJS): New variables. * inetd/Makefile.in (CLEAN): New variable. (clean): Target removed. (inet): Depend on inetd.o directly. * tftpd/Makefile.in (tftpd): Depend on $(OBJS), not $(SRCS:.c=.o) * tftp/Makefile.in (tftp): Likewise. * telnetd/Makefile.in (telnetd): Likewise. * telnet/Makefile.in (telnet): Likewise. * talkd/Makefile.in (talkd): Likewise. * talk/Makefile.in (talk): Likewise. * rcp/Makefile.in (rcp): Likewise. * libtelnet/Makefile.in (libtelnet.a): Likewise. * libinetutils/Makefile.in (libinetutils.a): Likewise. * ftpd/Makefile.in (ftpd): Likewise. * talkd/announce.c [!HAVE_VIS_H] (strvis): Test CH for printability, not *STR (STR has already been incremented). Fri Jul 19 01:37:46 1996 Miles Bader * rsh/Makefile.in (INST_PROG_FLAGS): New variable. * rcp/Makefile.in (INST_PROG_FLAGS): New variable. Fri Jul 12 13:08:26 1996 Miles Bader * talkd/announce.c (tty_msg): New declaration. * talk/look_up.c (check_local): Replace one hack for copying the addr into the message with another. * talk/invite.c (invite_remote): Likewise. * talk/init_disp.c (set_edit_chars): Use tcgetattr if we have it. [HAVE_TERMIOS] : New include. [!HAVE_TERMIOS]: Guard with HAVE_SYS_IOCTL_COMPAT_H. * configure.in (AC_CHECK_HEADERS): Add sys/ioctl_compat.h. (AC_CHECK_FUNCS): Add tcgetattr. * talkd/announce.c: Guard include of with HAVE_VIS_H. [!HAVE_VIS_H] (strvis): New function. * configure.in (AC_CHECK_HEADERS): Add vis.h. * libinetutils/localhost.c: New file. * libinetutils/Makefile.in (SRCS): Add localhost.c. * ftp/ruserpass.c (ruserpass): Use localhost. * rlogind/rlogind.c (local_domain): Likewise. * rshd/rshd.c (local_domain): Likewise. * talk/get_names.c (get_names): Likewise. * telnet/commands.c (env_init): Use likewise. * telnet/telnet.c (telnet): Likewise. * ftpd/ftpd.c (main): Use localhost. (hostname_len): Variable removed. * syslogd/syslogd.c (LocalHostNameLen): Variable removed. (localhost): New declaration. (main): Use localhost. * talkd/talkd.c (main): Use localhost. (hostname): Change to be a char *. (localhost): New declaration. * talkd/announce.c (hostname): Change to be a char *. * talkd/print.c, talkd/process.c, talkd/table.c, talkd/talkd.c, talkd/announce.c, talk/look_up.c, talk/get_names.c, talk/invite.c, talk/ctl_transact.c, talk/ctl.c, talk/get_addrs.c: [!HAVE_OSOCKADDR] : New include. * configure.in: Check for struct osockaddr in . * headers/osockaddr.h: New file. * headers/Makefile.in (DISTFILES): Add osockaddr.h. * configure.in: Change references to $ac_cv_lib_LIB variables to $ac_cv_lib_LIB_FUNC. * syslog/Makefile.in ($(bindir)/logger): Remove before linking. * configure.in (SUBDIRS): Add headers. * headers/Makefile.in: New file. * libinetutils/Makefile.in (DISTFILES): Remove $(HDRS). (HDRS): Variable removed. Thu Jul 11 00:39:45 1996 Miles Bader * headers: New directory. * configure.in: Link include files from headers. LIB_INCLUDES -> INCLUDES. (_ISRCS, _DSTS, SUBDIR_MAKEFILES): Frob quoting to satisfy brain-dead shells. * ftpd/logwtmp.c (_PATH_WTMP): Define to be WTMP_FILE if necessary. Check for HAVE_UTMPNAME too. * configure.in: Check for -lcrypt. * inetd/inetd.c (set_proc_title): Renamed from `setproctitle' to avoid conflict with the function in netbsd. (chargen_stream, discard_stream, echo_stream): Use set_proc_title. * ftp/main.c (ohelp): Remove extra newline. * telnet/main.c (help): Remove extra newlines. Fiddle text. Wed Jul 10 03:41:39 1996 Miles Bader * ftp/main.c (ohelp, try_help, usage): New functions. (long_options): New variable. (main): Use getopt_long, and new help functions. , : New includes. * telnet/main.c (try_help): New function. (usage): Use try_help, not help. (help): Remove arg, and only implement long help. (main): Use help & try_help appropiately. * config.make.in (_LINK_DISTFILE): New variable. (LINK_DISTFILES): Use $(_LINK_DISTFILE); support OPT_DISTFILES. * rules.make (distclean): Remove $(DISTCLEAN) too. (maintainer-clean): New rule. * ftpd/Makefile.in (MAINTCLEAN): New variable. (OPT_DISTFILES): New variable. * uucpd/uucpd.c (dologin, dologout): If HAVE_LOGWTMP, use it. * ftpd/logwtmp.c (logwtmp): If HAVE_SETUTENT_R, use a more sysvish style of wtmp frobbing. * configure.in (AC_CHECK_FUNCS): Add setutent_r & logwtmp. * Makefile.in (distclean, clean): Split out targets, and clean up here. Use $(SUBDIRS). * telnetd/Makefile.in, telnet/Makefile.in (LDLIBS): Use $(LIBTERMCAP), not -ltermcap. * configure.in: Put library specs for found libraries in specific substs. * config.make.in (LIBCURSES, LIBTERMCAP, LIBAUTH): New variables. (LDLIBS): Put $(LIBS) last. * libinetutils/stub_tgetent.c: New file. * talk/Makefile.in (LDLIBS): Use $(LIBCURSES), not -lcurses. * libinetutils/Makefile.in (SRCS): Enumerate all sources, don't include @LIBOBJS@. (libinetutils.a): List constant objects + @LIBOBJS@. * ftp/Makefile.in, ftpd/Makefile.in, libinetutils/Makefile.in, libtelnet/Makefile.in, rcp/Makefile.in, rlogin/Makefile.in, talk/Makefile.in, telnet/Makefile.in, telnetd/Makefile.in, tftp/Makefile.in (HDRS): New variable. (DISTFILES): Add $(HDRS). * config.make.in (CPPFLAGS): Add -I$(srcdir). * Makefile.in (distname): Depend on libinetutils/version.c. Variable is named `inetutils_version', not `version_string'. * libinetutils/version.c, libinetutils/version.h (inetutils_version): Renamed from version_string. * telnet/main.c (main): Use inetutils_version, not version_string. * configure.in: Add test for setpgid. * rexecd/rexecd.c (doit): Use setpgid instead of setpgrp. * config.make.in (CPPFLAGS): Add -D_BSD_SOURCE. * syslogd/Makefile.in (syslogd): Rule removed. * talkd/Makefile.in (talkd): Get rid of ttymsg.o. * ftpd/Makefile.in (ftpd): Fix subst for generating .o files. * config.make.in (top_srcdir): Variable removed. * ftp/Makefile.in, ftpd/Makefile.in, inetd/Makefile.in, libinetutils/Makefile.in, libtelnet/Makefile.in, ping/Makefile.in, rcp/Makefile.in, rexecd/Makefile.in, rlogin/Makefile.in, rlogind/Makefile.in, rsh/Makefile.in, rshd/Makefile.in, syslog/Makefile.in, syslogd/Makefile.in, talk/Makefile.in, talkd/Makefile.in, telnet/Makefile.in, telnetd/Makefile.in, tftp/Makefile.in, tftpd/Makefile.in, uucpd/Makefile.in (top_srcdir): New variable. * telnet/main.c (help): New function. (usage): Just use help now. (long_options): New variable. (main): Use help sometimes instead of usage. Use getopt_long. Add --help and --version options. , "version.h": New includes. * libinetutils: New directory, mostly from old comon dir. * common: Dir removed. * config.make.in (CPPFLAGS): Add -I../include. (LDLIBS): Add -L../inetinetutils -linetutils. * configure.in (COMMON): New variable & subst. (SUBDIRS): Add $COMMON. Add rules for using gnu getopt. Add rules for linking in optional header files into obj include dir. * Makefile.in (COMMON): Use autoconf subst. Tue Jul 9 16:15:15 1996 Miles Bader * configure.in (SUBDIRS): New subst. (AC_OUTPUT): Automatically compute the subdir makefiles. Fix test to turn on talk if $enable_talk == maybe. * Makefile.in (distname, dist): New targets. * rules.make (dist): New rule. * config.make.in (LINK_DISTFILES): New variable. * inetd/Makefile.in, libtelnet/Makefile.in, rcp/Makefile.in, rexecd/Makefile.in, ftpd/Makefile.in, telnetd/Makefile.in, rshd/Makefile.in, rlogind/Makefile.in, uucpd/Makefile.in, syslogd/Makefile.in, tftpd/Makefile.in, telnet/Makefile.in, ftp/Makefile.in, rsh/Makefile.in, rlogin/Makefile.in, tftp/Makefile.in, syslog/Makefile.in, talkd/Makefile.in, talk/Makefile.in (SRCS, DISTFILES): New variables. * libtelnet/Makefile.in (OBJS): Derive from $(SRCS). * inetd/Makefile.in (inetd): Derive objects from $(SRCS). * rcp/Makefile.in (rcp): Likewise. * ftpd/Makefile.in (ftpd): Likewise. * telnet/Makefile.in (telnet): Likewise. * ftp/Makefile.in (ftp): Likewise. * tftp/Makefile.in (tftp): Likewise. * talk/Makefile.in (tftp): Likewise. * syslogd/Makefile.in (ttymsg.o): Rule removed. (syslogd): Derive syslogd objects from $(SRCS) (keep ttymsg.o). * tftpd/Makefile.in (tftpd): Derive tftpd objects from $(SRCS) (keep tftpsubs.o). * talkd/Makefile.in (ttymsg.o): Rule removed. (talkd): Derive talkd objects from $(SRCS) (keep ttymsg.o). * config.make.in (VPATH): Add $(srcdir)/common * common/version.c, common/version.h: New files. * configure.in (CLIENTS): Remove ping. Change `logger' to `syslog'. Tue Jun 25 02:42:06 1996 Roland McGrath * ftp/cmds.c: Include errno.h. Wed Feb 7 17:06:04 1996 Miles Bader * ftp/cmds.c (remglob): Make sure return value is mallocated. (mdelete): Free CP after use. (remglob): Don't keep BUF around between calls, as the caller frees it. Wed Jan 31 16:08:44 1996 Miles Bader * ftpd/ftpd.c (user, pass): Don't require users to have a password. Sat Dec 30 06:36:41 1995 Roland McGrath * ftpd/ftpcmd.y: Allow `SITE IDLE 0' for non-anonymous user to disable idle timer. Copyright (C) 1995-2025 Free Software Foundation, Inc. This file is part of GNU Inetutils. GNU Inetutils 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 3 of the License, or (at your option) any later version. GNU Inetutils 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 `http://www.gnu.org/licenses/'. inetutils-2.7/ChangeLog.10000644000000000000000000225404115117551724012261 0ustar002021-04-28 Simon Josefsson telnet: Support --bind (-b) for NetKit compatibility. * NEWS: Add. * doc/inetutils.texi (telnet invocation): Add --bind (-b). * telnet/commands.c (tn): New variables hostaddr and srchostp. Parse -b parameter. Update usage string. If -b is set, call getaddrinfo on it and pass that ai_addr on to bind. * telnet/main.c (srcaddr): New global variable. (argp_options): Add --bind (-b). (parse_opt): Set srcaddr to -b value. (main): Propagate -b value to tn function. 2021-02-11 Simon Josefsson * TODO: Add items discussed on mailing list. 2021-02-05 Simon Josefsson Use gnulib sys_types module so we can assume sys/types.h. * tests/waitdaemon.c, tests/runtime-ipv6.c, tests/readutmp.c: Drop HAVE_SYS_TYPES_H test. * bootstrap.conf (gnulib_modules): Add explicit sys_types. 2021-02-05 Simon Josefsson Fix some autoreconf 2.71 warnings. * configure.ac: Remove obsolete AC_HEADER_STDC, AC_HEADER_TIME, AC_FUNC_SETVBUF_REVERSED, and AC_DECL_SYS_SIGLIST. Don't check for sys/time.h, we never use the test result. 2021-02-01 Alfred M. Szmidt * ftp/ftp.c (getreply): Fix possible buffer overflow (backport from OpenBSD); reported by O. Bittner, D. Maier, M. Munier, J. Beier of SecT, TU Berlin. 2021-01-29 Simon Josefsson ping6: Don't allow unprivileged users to flood ping. * ping/ping6.c (parse_opt): For non-root users, limit interval like ping.c to avoid DoS. Reported in . * ping/ping_common.h (PING_MIN_USER_INTERVAL): Add. * ping/ping.c (MIN_USER_INTERVAL): Remove, replaced by PING_MIN_USER_INTERVAL. (parse_opt): Update use. 2021-01-28 Simon Josefsson * telnet/commands.c (logoutcmd): Renamed from logout. Conflicts with system utmp.h's logout(3). (cmdtab): Use logoutcmd instead of logout. 2021-01-28 Simon Josefsson * tests/libls.sh (LSDIR): Fix parallel testing. Found on Guix and Debian, solution is to not use CWD as test directory for libls. Inspired by trivial patch by Guillem Jover . 2021-01-28 Simon Josefsson ping, ping6: Fix unchecked setuid return. * ping/ping.c (main): Fail if setuid fail. Trivial patch from Jayakrishna Vadayath . * ping/ping6.c (main): Likewise. 2021-01-28 Simon Josefsson * tests/hostname.sh: Use uname as fallback if system lack hostname command. Only require mktemp when running root test. 2021-01-28 Simon Josefsson * tests/hostname.sh: Use system hostname, not system uname, for comparison. 2021-01-28 Simon Josefsson * configure.ac: Don't call gl_FUNC_READLINE. Not needed since we now use readline gnulib module. 2021-01-28 Simon Josefsson Fix link failure with absent -lutil on Solaris 10. * configure.ac (LIBUTIL): Prefer PTY_LIBS in Makefile.am over adding -lutil for pty-functions. * src/Makefile.am (LDADD): Add PTY_LIB. * telnetd/Makefile.am (LDADD): Likewise. * tests/Makefile.am (identify_LDADD): Likewise. 2021-01-27 Simon Josefsson * bootstrap.conf (buildreq): Add gzip and xz. 2021-01-27 Simon Josefsson * .gitignore: Rewrite to use leading / for most top-level files, and general update. 2021-01-26 Simon Josefsson Sync release process with gnulib approach. * NEWS: Fix syntax to conform to gnulib release-prep rules. * cfg.mk: Drop news-check-regexp. * bootstrap.conf (gnulib_modules): Use readme-release. Drop now implicit announce-gen, gnupload and maintainer-makefile. * bootstrap.conf (bootstrap_epilogue): Add function, fixing README-release. * gl/top/README-release.diff: Add file. * .gitignore: Add README-release. * cfg.mk (exclude_file_name_regexp--sc_trailing_blank): Add, for README-release.diff. * configure.ac (AC_INIT): Don't use sed-expression, it is incompatible with gnulib's do-release-commit-and-tag. * cfg.mk (git-version-gen-tag-sed-script): Drop. * .prev-version: Add file, indicating 1.9.4 as previous release. * README-alpha (Release procedures): Removed, replaced by README-release. * cfg.mk (release-prep-hook): Don't disable it, we now support it. 2021-01-25 Simon Josefsson Silence 'make syntax-check'. * libls/ls.c: Don't include if we are not using it. 2021-01-25 Simon Josefsson Don't use deprecated gnulib module 'gettext' and replace readline.m4 with gnulib readline module. * bootstrap.conf (gnulib_modules): Remove gettext. Add readline. * am/readline.m4: Remove file. 2021-01-25 Simon Josefsson Only do what git-version-gen recommends regarding .version. * Makefile.am (DISTCLEANFILES): Don't distclean $(top_builddir)/.version. 2021-01-25 Simon Josefsson Fix hostname.sh to not call system hostname, and improve diagnostics. * tests/hostname.sh: Fix typo. Improve output on failures. 2021-01-25 Simon Josefsson Fix 'make check' on broken platforms without /etc/protocols. * tests/traceroute-localhost.sh: Skip test if /etc/protocols doesn't exist, copied from existing code in tests/inetd.sh. * tests/ping-localhost.sh: Likewise. 2021-01-25 Simon Josefsson git-version-gen: Sync with git-version-gen usage instructions. * Makefile.am (EXTRA_DIST): Add. (BUILT_SOURCES): Use srcdir. (.version): Likewise. 2021-01-24 Simon Josefsson * configure.ac: Fix disabling when all rcmd is missing. * configure.ac: Warn when rcmd is missing. * README-alpha (Prerequisites): Mention xz, for dist. 2021-01-24 Simon Josefsson Build/doc fixes. * README-alpha (Checking Out the Sources): Use git URL mentioned on Savannah page. (Prerequisites): Add bash, gcc, ncurses. * bootstrap: Updated from gnulib. 2020-11-10 Mats Erik Andersson * configure.ac (AC_PREREQ): Require autoconf 2.64, caused by changes in Gnulib. 2020-06-05 Mats Erik Andersson * ifconfig/system/linux.c (linux_if_nameindex): New, incompatible signature of contemporary Gnulib function read_file(). 2020-05-10 Mats Erik Andersson * whois/data.h (hide_strings): Add Brazilian pattern. * whois/ip6_del_list: Update with more ranges. 2020-05-08 Mats Erik Andersson whois: Delegation list for IPv6 ranges. * whois/.gitignore: Add `ip6_del.h'. * whois/Makefile.am (BUILT_SOURCES): Add `ip6_del.h'. (EXTRA_DIST): Add `ip6_del_list', `ip6_del.h', `make_ip6_del.pl'. (noinst_HEADERS): Add `ip6_del.h'. (ip6_del.h): New target. * whois/data.h (ip6_assign): New array. * whois/ip6_del_list: New file. * whois/make_ip6_del.pl: New file. * whois/whois.c (whichwhois): Regard absence of period, colon, and hyphen as evidence of NSI NIC or ASN. Test for this and for email address before any test for numeric addressing. Implement code for IPv6 delegation matching, to be triggered by the presence of a colon in the given query string. 2020-05-07 Mats Erik Andersson whois: Tweak command line arguments. * whois/whois.c (whichwhois): Skip any single character token, as it must be a search directive for a server. Prune the known IPv6 delegations to reflect only the valid one. Use ARIN as default IPv6 serving instance, since the old 6BONE server is no longer responsive. 2020-05-07 Mats Erik Andersson whois: Improved hiding of legal disclaimers. * whois/as_del_list: Two additional delegations. * whois/data.h (hide_strings): Add string patterns for present day services at ARIN, LACNIC, and RIPE. * whois/whois.c (do_query): After successful location of a stop pattern, go back into search state, instead of cancelling further matching. The service at ARIN inserts identical disclaimer at the beginning, as well as at the end of a response. 2020-05-06 Mats Erik Andersson * bootstrap: Updated from gnulib. 2020-04-27 Tim Rühsen telnet: Use memove for overlapping memory instead of strncpy. Overlapping source and destination buffers are not supported by strncpy and give undefined results. 7.24.2.3 of ISO/IEC 9899:201x: "If copying takes place between objects thatoverlap, the behavior is undefined." * telnet/commands.c (cmds): Use memove for overlapping memory instead of strncpy. 2020-04-12 Mats Erik Andersson whois: Delegation of IP and AS. Attempt improving the list of IP range delegation within the scope of old A-class ranges. The intention is to establish as many ranges of width 22, or wider, and also to verify old claims. * whois/as_del_list: Update and correct existing AS range delegations, and add a few more, random but existing. * whois/ip_del_list: Add a large number of delegations within former A-class ranges, and correct two erroneous instances. * whois/whois.c (whereas): Raise the upper limit of known ASN. (queryformat): Rewrite query statement intended for ARIN. 2020-04-06 Mats Erik Andersson whois: Include ERX ranges for APNIC. The content of the following web page was scanned to identify the ranges within old B-classes that were assigned to APNIC by the ERX project, Early Registration Transfer. After some cross checking, a few intermediate ranges for other registars were included for better resolution. https://www.apnic.net/manage-ip/manage-historical-resources/erx-project/erx-transfer-to-apnic/ * whois/ip_del_list: Add a large amount of APNIC address ranges. 2020-04-05 Mats Erik Andersson Support for libidn2 in addition to libidn. * am/libidn.m4 (have_IDN2, have_IDN): New local variables. Detect presence of libidn2 by checking for `idn2_to_ascii_lz', but still aim at backwards compatibility. Detect header file `idna.h' as well as `idn2.h', but prefer libidn2 to libidn, should both libraries be detected. * configure.ac (--with-idn): Mention that IDN2 is acceptable. (idn_link): New variable. (ftp_PROPS, ping_PROPS, talk_PROPS, telnet_PROPS, tftp_PROPS) (traceroute_PROPS): Update these to state `idn', or `idn2'. * ftp/ftp.c [HAVE_IDN2_H && HAVE_IDN2]: Include `idn2.h'. [(!HAVE_IDN2_H || !HAVE_IDN2) && HAVE_IDNA_H]: Include `idna.h'. (hookup) [HAVE_IDN || HAVE_IDN2]: Use compatibility function idna_to_ascii_lz(). * ping/libping.c (ping_set_dest): Likewise. * ping/ping6.c (ping_set_dest): Likewise. * src/tftp.c (resolve_name): Likewise. * src/traceroute.c (main): Likewise. * talk/get_addrs.c (get_addrs) [HAVE_DECL_GETADDRINFO || HAVE_IDN || HAVE_IDN2]: Declare ERR. [HAVE_IDN || HAVE_IDN2]: Likewise. * telnet/commands.c (tn): Declare HOSTTMP. Likewise. 2020-04-04 Alfred M. Szmidt * ping/ping6.c (print_packet_too_big): Use %u when printing MTU. 2020-02-29 Tim Rühsen uucpd: Fix buffer overflows. This fixes several missing string termination issues with strncpy. Also REMOTEHOST of size NI_MAXHOST was strcpy'ed into LINE, which just had 32 bytes on the stack. * src/uucpd.c (SCPYN): Promote macro to global scope, but expand its action by writing the final NUL character. (dologin): Increase size of LINE. Use existing macro SCPYN instead of strncpy. [PATH_LASTLOG && HAVE_STRUCT_LASTLOG]: Delete local macro SCPYN. 2020-02-29 Tim Rühsen uucpd: Fix heap buffer overflow. Usernames >= 56 bytes would overflow the char arrays Username and Logname. This change mitigates this, but still silently truncates these arrays. Silent truncation should be checked throughout the code, possibly within a more comprehensive code review. * src/uucpd.c (Username, Logname): Increase size to 72 bytes. (doit): Use snprintf instead of sprintf. 2020-02-29 Tim Rühsen telnet: Use strdup instead malloc+strcpy. * telnet/commands.c (tn): Assign HOSTNAME using strdup(). 2020-02-29 Tim Rühsen telnet: Fix -Wsign-compare in suboption. * telnet/telnet.c (suboption): Explicitly cast sizeof() to int. 2020-02-29 Tim Rühsen telnetd: Silence -Wimplicit-fallthrough. * telnetd/state.c (willoption): Squeelch warning. 2020-02-29 Tim Rühsen telnetd: Silence unused warning for getterminaltype. * telnetd/utility.c (getterminaltype): Squeelch warning. 2020-02-29 Tim Rühsen ftp: Silence -Wimplicit-fallthrough warning. * ftp/domacro.c (domacro): Squeelch warning. 2020-02-29 Tim Rühsen ftp: Silence -Wimplicit-fallthrough. * ftp/cmds.c (domap): Squeelch warning. 2020-02-29 Tim Rühsen ftp: Fix multipliers for M(ega) and G(iga). This is *not* a fix as the comment accidentally states. It is to silence -Wimplicit-fallthrough and to avoid multiple multiplications in case of a non-optimized build. The HASHBYTES type needs to be reviewed later as g/G only allows digits 1 and 2 without integer overflow, which is undefined behavior. * ftp/cmds.c (sethash): Remove cascaded multiplications. 2020-02-29 Tim Rühsen ftp: Fix return value of remglob. * ftp/cmds.c (remglob): Switch roles of old values after NULL check. 2020-02-29 Tim Rühsen ftp: Fix possible buffer overflow. * ftp/ftp.c (hookup): Terminate string after strncpy. 2020-02-29 Tim Rühsen ftp: Fix two misuses of strncpy (read buffer overflow). * ftp/ftp.c (pswitch): Correctly set the terminating NUL. 2020-02-29 Tim Rühsen talk: Fix uninitialized variable NREADY. * talk/ctl_transact.c (ctl_transact): Initialize NREADY to 0. 2020-02-29 Tim Rühsen whois: Silence -Wimplicit-fallthrough. * whois/whois.c (main): Squeelch warning. 2020-02-29 Tim Rühsen ping, ping6: Silence -Wimplicit-fallthrough. * ping/ping.c (parse_opt): Squeelch warning. * ping/ping6.c (parse_opt): Likewise. 2020-02-17 Tim Rühsen ping6: Fix memleak in ping_set_dest. * ping/ping6.c (ping_set_dest): New function signature. Rearrange code to avoid memory leak. * ping/ping6.h (ping_set_dest): Change signature in declaration. 2020-02-17 Tim Rühsen ping: Fix memleak in ping_set_dest. * ping/libping.c (ping_set_dest): New function signature. Rearrange code to avoid memory leak. [HAVE_DECL_GETADDRINFO]: Rename P as RHOST. * ping/ping.h (ping_set_dest): Change signature in declaration. 2020-02-16 Tim Rühsen libls: Remove unused variable kflag. * libls/ls.c (ls_main): Remove unused variable. 2020-02-16 Tim Rühsen ftpd: Fix multiple definition (GCC 10). * ftpd/extern.h (errcatch): Declare as extern. * ftpd/ftpd.c (errcatch): Define variable. 2020-02-16 Tim Rühsen telnetd: Fix multiple definition (GCC 10). * telnetd/utility.c (not42): Declare as extern. 2020-02-16 Tim Rühsen * src/rcp.c (tolocal): Remove unused variable LEN. 2020-02-16 Tim Rühsen telnet: Fix silent truncation (off-by-one check) If the DISPLAY variable had exactly 44 bytes, the SE byte (end sub negotiation) was silently truncated. This concerns CVE-2019-0053. * telnet/telnet.c (suboption): Add case of equality in conditional, supplementing strict inequality. 2020-02-21 Mats Erik Andersson Various compiler warnings, getting closer to `-Werror'. * libls/print.c (printlong): The functions major() and minor() have no portable value type, so cast as `int'. * ping/ping.c (decode_type): Initialize HOSTNAME to NULL. * src/hostname.c (parse_opt, main) : The prototype of sethostname() is not portable, so cast as `void *'. Do this also on both members in a conditional clause. * src/logger.c (parse_level): Cast PRIORITYNAMES and FACILITYNAMES as `CODE *', since BSD-systems assign these a constant type. * src/syslogd.c (textpri, cfline): Likewise. * src/rcp.c (source, rsource): Type length of `stat.st_mode' is not portable, so cast as `int'. * src/traceroute.c (trace_write): Make loop variable I unsigned. 2020-02-20 Mats Erik Andersson rexecd, rshd: Avoid false failure message. * src/rexecd.c (doit) [HAVE_SETLOGIN]: Only call setsid() in case the session leader is different from the present process. * src/rshd.c (doit) [HAVE_SETLOGIN]: Likewise. 2020-02-20 Mats Erik Andersson rcp: Recursive reception was broken. The commit 67b49c54 broke the use case of locally receiving multiple files for a recursive copying action. This was found and established by Zhixiong Chi. Now revert the relevant part of the old commit, as the suggested patch is nearly a verbatim change back. The differences await further analysis. Original report is contained in: https://lists.gnu.org/archive/html/bug-inetutils/2019-12/msg00000.html * src/rcp.c (sink) [targisdir]: Revert to the legacy, and functional, implementation of string allocation. 2020-02-10 Mats Erik Andersson Simplify coding of test program `runtime-ipv6', by using standard getopt() library function, thus making the code self sufficient. * tests/runtime-ipv6.c: Migrate away from argp_parse() to standard getopt(). Let environment variable VERBOSE contribute a short message in case the program tests successfully. Also use AI_NUMERICSERV for completeness. 2020-02-09 Mats Erik Andersson test-snprintf: New test program. An implementation dependent feature of snprintf() is tested. The BSD unices and OpenSolaris relatives are known to be more forgiving, than is Linux/glibc and kfreebsd/glibc. The issue was brought to our attention by Zhixiong Chi in: https://lists.gnu.org/archive/html/bug-inetutils/2019-05/msg00002.html * tests/test-snprintf.c: New file. * tests/Makefile.am (check_PROGRAMS, TESTS): Add `test-snprintf'. * tests/.gitignore: Likewise. 2020-02-04 Mats Erik Andersson Buffer overflow in tftp and tftpd. Recent versions of Gnu libc and Gcc are injecting buffer checks into strcpy(). Both executables, tftp and tftpd, are effectively copying into a formally declared `char th_msg[1]', ignorant of the underlying buffer being of size PKTSIZE. Problem was reported by Mike Gilbert and Ricardo Ribalda Delgado: https://lists.gnu.org/archive/html/bug-inetutils/2017-12/msg00001.html https://lists.gnu.org/archive/html/bug-inetutils/2019-07/msg00002.html * src/tftp.c (nak): Replace strcpy() by memcpy(), after the needed calculation of string length. * src/tftpd.c (nak): Likewise. * tests/tftp.sh: New compound test with multiple requests. 2020-02-03 Mats Erik Andersson whois: AUDA services Australia. Update server name. Forwarded from Adam King: https://lists.gnu.org/archive/html/bug-inetutils/2018-07/msg00001.html * whois/tld_serv_list (.au): Update server, now at AUDA. 2020-02-03 Mats Erik Andersson Better portability for BSD install. Install hooks for programs that require root ownership, were written with GNU install in mind. Reported and suggested by Bill Cole: https://lists.gnu.org/archive/html/bug-inetutils/2018-07/msg00005.html * ping/Makefile.am (install-ping-hook): Place program switches to INSTALL_PROGRAM before file argument, thus helping BSD install. Rewrite failure comment, and add exit error code. * src/Makefile.am (install-traceroute-hook, install-rsh-hook) (install-rlogin-hook, install-rcp-hook): Likewise. 2020-02-01 Mats Erik Andersson tests: Less system logging. * tests/ftp-localhost.sh (LOGGING): New variable. Let the server program do system logging only if LOGGING has been defined. * tests/tftp.sh (LOGGING): Likewise. Add a test case where a non-existing file is requested. Check that the number of tries and of successes agree in order to suppress the final text. * README: Add some remarks on our testing abilities. 2020-01-31 Mats Erik Andersson whois: IP delegation update. * whois/ip_del_list: Update with entries as stated by IANA with publication date 2019-12-27. 2020-01-31 Mats Erik Andersson whois: Failure of service name. The IANA has made badly founded changes to the list of port names, promoting `nicname' and introducing the aliases list `Who Is', thus making `Who' and `Is' into functional services, and also loosing `whois'. Some systems were careless enough to adopt this badly wrought change. Reported by Shahab Vahedi in: https://lists.gnu.org/archive/html/bug-inetutils/2020-01/msg00023.html * whois/whois.c (openconn): Fall back to service `nicname', should `whois' fail. 2020-01-29 Mats Erik Andersson More work on CVE-2019-0053. Telnet protocol messages must not be corrupted when buffer overflows are detected, but should be reported as errors. * telnet/telnet.c (suboption): Check that prepared protocol message in fact fits in intermediary buffer without truncation. Tweak indentation for visibility of protocol elements in snprintf. Allocate space also for final NUL-character. * telnetd/telnetd.c (telnetdrun): Increase DATA string size by one. * telnetd/termstat.c (localstat, flowstat, clientstat): Likewise. Insufficiently declared length of string variable. * telnetd/utility.c (printsub): Declare TBUF with maximal extent. 2020-01-28 Mats Erik Andersson Better test coverage, mostly IPv6. * tests/ftp-localhost.sh [TEST_IPV6 && TARGET6]: Add the possible test cases that existed for IPv4, but did not for IPv6. [do_transfer]: Explicitly remove copied $PUTME for reliability. [TEST_IPV6 && TARGET6 && do_transfer]: New test for name mapping. * tests/syslogd.sh [do_unix_socket || do_inet_socket]: Do priority `notice' for each of local socket, IPv4 socket, and IPv6 socket, as is applicable. (COUNT_WRAP): Reworked calculation on grounds as above. [do_inet_socket && TEST_IPV6 && TARGET6]: Test facilities `user.info' and `user.debug' with IPv6. * tests/tftp.sh (do_secure_setting): Test all of $ADDRESSES. * tests/.gitignore: Add runtime-ipv6 to list. 2020-01-27 Mats Erik Andersson Portability to an old Solaris shell. * tests/tools.sh.in (EGREP, FGREP, RUNTIME_IPV4, RUNTIME_IPV6): Inside parameter substitution, put value between quotes, since some old shells stumble on non-quoted space characters. * tests/ifconfig.sh (evaluation of FORMAT): Likewise. Make sure that scripts are individually executable. * tests/ftp-parser.sh (EXEEXT): Test empty before reading tools.sh. * tests/libls.sh (EXEEXT): Likewise. * tests/ifconfig_modes.sh: Read tools.sh. 2020-01-26 Mats Erik Andersson Examination of testing scripts. * tests/ftp-localhost.sh [TEST_IPV4 && TARGET]: Implement one additional level of indentation in this large text block. Some additional fixes of indentation and improved readability. * tests/inetd.sh: Improve regex when refusing test directories. * tests/syslogd.sh: Likewise. * tests/ping-localhost.sh: Use back quotes for portability. * tests/traceroute-localhost.sh: Likewise. 2020-01-24 Mats Erik Andersson runtime-ipv6: Implicit dependency on services file. In a chrooted test environment, access to a particular resource like /etc/services, need not be granted. * tests/runtime-ipv6.c: Replace symbolic service name `tftp' by a numerical and harmless port string. 2020-01-24 Mats Erik Andersson Separation of test cases according to IPv4, and to IPv6. The two precious macros TEST_IPV4 and TEST_IPV6 are controlling whether the indicated address family is checked in our tests. Test coverage is left unequal. * configure.ac (TEST_IPV4): New macro. The new switch `--disable-ipv4' suppresses IPv4 during target `check'. * tests/Makefile.am (tools_subst): Replace @TEST_IPV4@. * tests/tools.sh.in (TEST_IPV4, RUNTIME_IPV4, RUNTIME_IPV6): New variables. (TEST_IPV4, TEST_IPV6): If either is `auto', make a runtime check for availability, and set to `no' in case of failure. * tests/runtime-ipv6.c: Implement switches `-4' and `-6', making it possible to test for either address family at runtime. [EAI_NODATA]: Return this error in a corner case, or else EAI_FAIL. * tests/ftp-localhost.sh: Remove code now existing in tools.sh.in. Separate existing test cases according to IPv4 and IPv6, by means of conditionals with TEST_IPV4 and TARGET, or TEST_IPV6 and TARGET6. [TEST_IPV4 = TEST_IPV6 = no]: Skip test. * tests/ping-localhost.sh: Likewise. * tests/syslogd.sh: Likewise. * tests/telnet-localhost.sh: Likewise. * tests/tftp.sh: Likewise. * tests/ifconfig.sh [TEST_IPV4 = no]: Skip test. * tests/inetd.sh (TARGET6): New variable. [TEST_IPV4 = TEST_IPV6 = no]: Skip test. Implement subcases for IPv6, and condition old cases on TEST_IPV4. * tests/traceroute-localhost.sh [TEST_IPV4 = no]: Skip test. [TEST_IPV4 && TARGET]: Condition each case completely. 2020-01-22 Mats Erik Andersson Correctly detect presence of IPv6. * tests/runtime-ipv6.c [AI_ADDRCONFIG] (hints.ai_flags): Add AI_ADDRCONFIG for better selectivity. 2020-01-20 Mats Erik Andersson Test robustly in absence of IPv6. For systems without functional IPv6 addressing at runtime, suppress this address family in our tests, whenever IPv6 was configured as autodetected. Helpful answer by Bruno Haible originating from effects in a Raspbian system: https://lists.gnu.org/archive/html/bug-inetutils/2020-01/msg00021.html * tests/Makefile.am (check_PROGRAMS): Add `runtime-ipv6'. * tests/ftp-localhost.sh (RUNTIME_IPV6): New variable. [TEST_IPV6 == auto]: Set TEST_IPV6 to `no' when runtime presence of IPv6 is in the negative. Thus effectively inhibiting all use within this script of IPv6 addresses. * tests/ping-localhost.sh: Likewise. * tests/syslogd.sh: Likewise. * tests/telnet-localhost.sh: Likewise. * tests/tftp.sh: Likewise. * tests/runtime-ipv6.c: New file. * configure.ac (AC_ISC_POSIX): Delete obsolete test. 2020-01-18 Mats Erik Andersson Minor portability glitches in Solaris and in AIX. * am/libcurses.m4 (IU_LIB_TERMCAP) [!_XOPEN_CURSES]: Conditionally include the header . * telnet/telnet.c [HAVE_CURSES_TGETENT & !_XOPEN_CURSES]: Likewise. * telnetd/utility.c [HAVE_CURSES_TGETENT & !_XOPEN_CURSES]: Likewise. * ftp/ftp.c (h_errno): Delete declaration, not in use. * ftpd/ftpd.c (FTP_NAMES): Assign a value to this macro. 2020-01-14 Mats Erik Andersson Make test of ftp-parser slightly more forgiving. Darwin systems might prepend a path stem to local directory. Assaf Gordon reported https://lists.gnu.org/archive/html/bug-inetutils/2020-01/msg00005.html * tests/ftp-parser.sh: Check number of responses to mixed command list, and extract any prepended path resulting from `lcd'. (DIR_STEM): New variable. This modifies matching test after `lpwd'. 2020-01-13 Mats Erik Andersson The Gnulib module `regex' requires linking that was not made explicit in our source. Discovered by Bruno Haible with AIX 7.2. https://lists.gnu.org/archive/html/bug-inetutils/2020-01/msg00012.html * talkd/Makefile.am (LD_ADD): Add $(LIBTHREAD) and $(LIB_MBRTOWC). 2020-01-13 Mats Erik Andersson Attempt to build correctly on Cygwin, new and old. Reported and suggested by Bruno Haible in https://lists.gnu.org/archive/html/bug-inetutils/2020-01/msg00013.html * configure.ac: Check for header . When it is missing disable the targets `tftp', and `tftpd'. * am/enable.m4 (IU_ENABLE_FOO): Append $EXEEXT to `target_BUILD'. 2020-01-12 Mats Erik Andersson Suppress building of remote execution commands on systems that offer no rcmd functionality. This happens with embedded systems like Alpine Linux and musl libc, as reported by Assaf Gordon and Bruno Haible. * configure.ac: Check for function rcmd(). Disable building of `rcp', `rlogin', and `rsh' when no rcmd variant is present. (WITH_RCMD): New precompiler macro. 2020-01-11 Mats Erik Andersson The glibc manual page for ether address specifies . Use this for GNU/Linux in the hope of resolving also musl libc, as used with Alpine Linux. Reported by Bruno Haible. * ifconfig/system/linux.c [HAVE_NETINET_ETHER_H]: Include the library header instead of the system specific header . 2020-01-11 Mats Erik Andersson Consistent use of `grep' tools in scripts. * configure.ac (EGREP, FGREP): New and precious variables. * tests/Makefile.am (tools_subst): Replace @EGREP@ and @FGREP@. * tests/ftp-parser.sh (reply): Use $EGREP to detect size in answer, and apply a single, alternating regex. * tests/ifconfig_modes.sh: Replace all `grep' by $GREP. * tests/inetd.sh: Likewise. * tests/libls.sh: Likewise. Drop unused `-e' flag. * tests/syslogd.sh: Likewise. Use `$FGREP -f' instead of non-portable `$GREP -f'. In two cases where `grep' needed multiple regexes, use $EGREP and alternating regexes. * tests/tools.sh.in (EGREP, FGREP): New variables. 2020-01-01 Simon Josefsson telnet: Validate supplied environment variables. CVE-2019-0053 * telnet/telnet.c (suboption): Use snprintf instead of sprintf. * telnet/utilities.c (printsub): Likewise. 2020-01-01 Guillem Jover (tiny change) * ping/ping_echo.c (struct icmp_diag): Fix typo. 2020-01-01 Simon Josefsson * NEWS: Document user-visible changes since last release. 2020-01-01 Simon Josefsson * THANKS: Credit Mats. 2020-01-01 Simon Josefsson * cfg.mk: Silence 'make syntax-check'. 2020-01-01 Simon Josefsson * bootstrap: Updated from gnulib. 2020-01-01 Simon Josefsson * telnet/telnet.c (telsnd): Telnet -E(no escape) is treating _POSIX_VDISABLE char as escape. Reported by Mikhail Bychek . 2018-11-12 Mats Erik Andersson * src/tftpd.c (main): Add LOG_NDELAY to openlog(). The file descriptor for logging must be active before chrooting happens. 2018-11-09 Mats Erik Andersson * bootstrap: Updated from gnulib. * configure.ac (AC_PREREQ): Require autoconf 2.63. Gnulib needs a more recent version due to demands put forward by libtool. 2018-09-06 Simon Josefsson * README-alpha (Development): Remove broken links. * bootstrap: Updated from gnulib. 2017-07-10 Omer Anson (tiny change) * src/hostname.c (parse_file): Free name and allocate one extra byte for it. 2017-07-10 Omer Anson (tiny change) * src/hostname.c (set_name): Handle case when hostname_new is NULL. 2017-07-10 Omer Anson (tiny change) * ftpd/ftpd.c (options) : Mention mandatory argument. 2017-06-22 Omer Anson (tiny change) * ftp/main.c (main): Don't assume that uninitialized argv[argv] is NULL. 2017-03-04 Mats Erik Andersson telnetd: Use tty, not pty on Solaris. Setting of terminal attributes as well setting of window size must be done via the slave descriptor, not the master descriptor. * telnetd/term.c [SOLARIS || SOLARIS10] (set_termbuf): New variables NAME, TTY. A call to ptsname() reveals whether `pty' is a master. Then open that file, update TTY, and call _term_setattr(). [SOLARIS || SOLARIS10] (init_termbuf): Simplify to use a single call to _term_getattr(), similar to set_termbuf(). * telnetd/termstat.c: Include . [TIOCSWINSZ && (SOLARIS || SOLARIS10)] (clientstat) : New variables NAME, TTY. Similar mechanism as above, but call ioctl with window size. [TIOCSWINSZ && (SOLARIS || SOLARIS10)] (defer_terminit): Likewise. 2017-03-03 Mats Erik Andersson Test utility displays some termcaps. * tests/Makefile.am (identify_LDADD): Set to contain `$(top_builddir)/lib/libgnu.a' and `$(LIBUTIL)'. * tests/identify.c: Include . [HAVE_TERMIOS_H]: Include , , . [HAVE_TERMIOS_H && HAVE_FCNTL_H]: Include . [HAVE_TCGETATTR] (test_flag): New macro. [HAVE_TCGETATTR] (do_termcap): New function. [HAVE_TCGETATTR] (main): Call do_termcap(). 2017-03-02 Fredrik Fornwall (tiny change) ftp: Portability to Android. Without a check for HAVE_DECL_GETPASS and without making a local function declaration, the implicit declaration causes crashes on 64-bit systems lacking declared getpass(), such as Android. Reported in: http://lists.gnu.org/archive/html/bug-inetutils/2016-10/msg00000.html * ftp/cmds.c [!HAVE_DECL_GETPASS] (user, account): Declare getpass() as external function. * ftp/ftp.c (login): Likewise. 2017-03-02 Mats Erik Andersson whois: Update Canadian TLD server. Old host name no longer exists. Reported by Neil Mayhem: http://lists.gnu.org/archive/html/bug-inetutils/2017-01/msg00000.html * whois/tld_serv_list (.ca): New host 'whois.cira.ca'. 2017-02-27 Mats Erik Andersson telnetd: Portability of TTY termcap to Solaris systems. * telnetd/term.c: Include header . [SOLARIS10 || SOLARIS] (init_termbuf): If applicable, open the slave TTY and extract terminal capabilities, since these systems do not assign a line discipline to the master PTY. New variables NAME and TTY. 2017-02-27 Mats Erik Andersson telnetd: Portable option debugging. BSD systems assign IAC and _POSIX_VDISABLE the common decimal value 255. Hence the NVT enforces value duplication more often during their transmission, than GNU and Solaris systems do. * telnetd/utility.c (printsub) : Increase suboption pointer I sufficiently to counteract duplication. This has to distinguish between in/out/none. In recursive mode, suppress newline at the end of suboption printing. * telnetd/slc.c (send_slc) : Editing characters are reported using SLC_DEFAULT rather than ignored due to SLC_NOSUPPORT, when they are not supported locally. This conforms with RFC 1184, section 2.4. The test for support checks the set 'current', not 'defset', which fits the wording found in RFC 1184. 2017-02-23 Mats Erik Andersson telnetd: Scrub USER from environment. Discard the environment variable USER. It will later be set properly for autologin, but at least one BSD system passes a preset value when telnetd starts, a value which will cause rejected login when autologin is not in effect. * telnetd/telnetd.c (telnetd_setup): Unset environment variable USER before calling getterminaltype(). 2017-02-21 Mats Erik Andersson * bootstrap: Updated from gnulib. 2017-02-21 Mats Erik Andersson telnetd: Debugging of mainly line mode options. * telnetd/telnetd.c (telnetd_run): Assemble flow control data in new string variable DATA, then send it and include for debug reporting in category 'options'. * telnetd/termstat.c (localstat, flowstat, clientstat): Likewise, also for line mode data. * telnetd/utility.c (printsub) : Test TBUF[0] to calculate replacement string, since TBUF[1] is not guaranteed to be initialized by the preceding snprintf(). 2016-05-23 Mats Erik Andersson hostname: Avoid a trailing space. Suppress the space character after the last presented IP number. Problem reported by Terje Strand in http://lists.gnu.org/archive/html/bug-inetutils/2016-04/msg00001.html * src/hostname.c (get_ip_addresses): Emit a space character only in case a further IP address will be printed. 2016-02-16 Mats Erik Andersson traceroute: Subprivileged use case. A fallback for ICMP tracing relevant to GNU/Linux is implemented, allowing a rudimentary but suid-less use case. The ability to identify intermediary hosts is missing, due to the crippled capability of receiving ICMP packets other than ICMP_ECHOREPLY. * src/traceroute.c (struct trace): New member `no_ident'. (trace_init): Initiate `t->no_ident'. : In case a raw socket for an ICMP protocol fails, fall back to a datagram socket. (trace_read) : Short circuit `ic->icmp_id != pid' with the conditional `t->no_ident == 0'. (trace_write) : New variable I. Initialize HDR to its full extent. If `t->no_ident' is non-zero, insert our intended target as payload of HDR for trace identification. 2016-02-12 Mats Erik Andersson ping: Implement subprivileged echo method. Add fallback code usable by GNU/Linux to create a datagram socket for sending ICMP ECHOREQUEST. The change is related to issue #37252. * ping/libping.c (useless_ident): New variable. (ping_init): When a raw socket fails, fall back to a datagram socket. In case of success, increase `useless_ident' since the kernel choses a packet identity, overwriting our choice. (my_echo_reply, ping_recv): Short circuit the tests for packet identity with the value of `useless_identity'. 2016-02-09 Mats Erik Andersson * configure.ac (missing ipv6 or icmp6): Disable `ping6' using the macro IU_DISABLE_TARGET. 2016-01-23 Mats Erik Andersson ftp: Allow remote user in command. Ability implemented after a query by Andreas Adamcik, on the legacy use of getlogin() versus the more admitting getuid(). * ftp/ftp.c (hookup): Check for an embedded at-sign in the input variable `host', keeping the rightmost part. New variable P. (login): Likewise, but also using the string part to the left of the last at-sign as remote user name. * doc/inetutils.texi (ftp invocation): Document this ability. * NEWS: Likewise. 2016-01-22 Mats Erik Andersson * bootstrap: Updated from gnulib. 2015-12-29 Mats Erik Andersson tests/ftp-localhost.sh: Incomplete error handling. The use of sysctl(8) with option `set -e` active during script execution needs a robust exception handler. Reported by Ingo Brückl in http://lists.gnu.org/archive/html/bug-inetutils/2015-12/msg00000.html * tests/ftp-localhost.sh: Locate sysctl(8) using `command` with an augmented search path. When computing VALUE_V6ONLY in a subshell, add a short circuit with `true` to prevent interruption of the test script. (SYSCTL): New variable. 2015-10-08 Mats Erik Andersson syslogd: Redefine faulty macro LOG_MAKEPRI whenever needed. Systems with Glibc header file prior to 2.17, are not correctly defining the helper macro LOG_MAKEPRI. This effects our syslog service whenever it receives kernel messages from a remote host. The issue was mentioned in Debian's BTS as report #729666. * src/logprio.h [LOG_MAKEPRI]: Check that the macro does not shift the first argument. If it does, undefine it and apply our corrected definition. * src/syslogd.c [LOG_MAKEPRI]: Likewise. Display a precompiler warning to the effect that we have diagnosed an issue. 2015-09-15 Mats Erik Andersson * doc/inetutils.texi (ifconfig invocation): New chapter. 2015-08-19 Mats Erik Andersson AIX systems have a system call send_file(). Rename our calls. * src/tftp.c (send_file): Rename to... (tftp_sendfile): ... this. (put): Call tftp_sendfile, not send_file. * src/tftpd.c (send_file): Rename to... (tftpd_sendfile): ... this. (formats): List tftpd_sendfile call, not send_file. 2015-08-15 Mats Erik Andersson telnetd: Premature connection closure. When many connections are attempted in quick succession, a substantial number of them are cancelled. This does not appear for manual use cases, but for contrived automated set-ups. The cause seems to be a change in the evaluation of pty_read(), which was done to coincide with the condition in use by the original BSD implementation. Issue reported and suggested by Chris Severance in http://lists.gnu.org/archive/html/bug-inetutils/2015-07/msg00006.html * telnetd/telnetd.c (telnetd_run): Break the loop only by the stronger condition `pty_read() < 0', i.e., only on non-masked read errors. This reverts a change introduced in 2015-03-15. * telnetd/utility.c (pty_read): Add a comment that the read errors EWOULDBLOCK, EAGAIN, and EIO are treated specially. 2015-08-07 Mats Erik Andersson ifconfig: Statistics for BSD systems. * ifconfig/system/bsd.c (system_fh_ifstat_query) (get_if_data_by_name, system_fh_missing_stat): New functions. (_IU_DECLARE2): New macro. (system_fh_rx_bytes, system_fh_rx_dropped, system_fh_rx_errors) (system_fh_rx_packets, system_fh_tx_bytes, system_fh_tx_errors) (system_fh_tx_packets, system_fh_collisions): New functions defined using _IU_DECLARE2. (system_fh_tx_dropped): New function. * ifconfig/system/bsd.h (_IU_CAT2, _IU_DCL, _IU_EXTRN): New macros identical to those in `ifconfig/system/linux.h'. (SYSTEM_FORMAT_HANDLER) : New handler hooks. (system_fh_ifstat_query, system_fh_missing_stat): New prototypes. (system_fh_rx_bytes, system_fh_tx_bytes, system_fh_rx_dropped) (system_fh_tx_dropped, system_fh_rx_errors, system_fh_tx_errors) (system_fh_rx_packets, system_fh_tx_packets, system_fh_collisions): New prototypes generated by _IU_EXTERN. 2015-08-02 Mats Erik Andersson ifconfig: Verbose report on changed flags. * ifconfig/changeif.c (set_flags): In verbose report mode, compose a message to name those flags that were set, and also those that were cleared. 2015-08-01 Mats Erik Andersson ifconfig: Apply flags correctly. When finalizing actions, some flags could be forgotten. In particular, the flag 'up' was ignored whenever an address was assigned at the same time. This is related to the fact that an invocation only effecting interface flags, still resulted in a full printout if interface status. This latter behaviour differs from all other implementations and is rather annoying. The issue was detected and reported by Hans-Peter Budek in http://lists.gnu.org/archive/html/bug-inetutils/2015-07/msg00000.html * ifconfig/options.c (pending_setflags, pending_clrflags): Define as static variables. (pending_valid): New variable. (argp_options) : Delete the claim that 'up' be a default action together with address. (parse_opt_set_flag): When `ifp' exists, update `ifp->valid' with IF_VALID_FLAGS. Otherwise, update `pending_valid'. (parse_opt_finalize): If `ifp' exists and `pending_valid` is set, then update `ifp->valid'. The update of `ifp->setflags' and `ifp->clrflags' is performed independently of assigning an output format, as the latter would cause a printout also when only some flag is being altered. * ifconfig/options.h (IF_VALID_FLAGS): New macro. (IF_VALID_HWADDR): Updated value. (pending_setflags. pending_clrflags): Removed declaration. 2015-07-30 Mats Erik Andersson ifconfig: A work-around specific to GNU/Hurd. This system uses a mixture of BSD definitions and GNU/Linux interfaces. In particular, some care is needed to check interface hardware type. * ifconfig/system/hurd.c (_ARP_MASK): New macro. (arphrd_symbols): Apply _ARP_MASK to each member `value'. 2015-07-25 Mats Erik Andersson ifconfig: Symbolic name as peer address. * ifconfig/changeif.c (set_dstaddr): Adapt code block used by set_address(), thereby first using either getaddrinfo() or gethostbyname() to resolve a possibly symbolic peer destination, then setting the established address. 2015-07-25 Mats Erik Andersson ifconfig: Support changing of hardware address. Implement the setting of link level addresses for systems running GNU/Linux. * ifconfig/changeif.c [HAVE_NETINET_ETHER_H]: Include header . (set_hwaddr): New function. (configure_if): Call set_hwaddr() whenever `ifp->valid' contains IF_VALID_HWADDR. * ifconfig/options.c (ifconfig_initializer): Add a further NULL at the end. (parse_opt_set_hwaddr): New function built by the generic macro PARSE_OPT_SET_ADDR. * ifconfig/options.h (struct ifconfig): Define IF_VALID_HWADDR and add a new member `hwaddr'. (parse_opt_set_hwaddr): New prototype. * ifconfig/system/linux.c (system_help): Add parsed option `ether|hwaddr|lladdr MACADDR'. (system_parse_opt_rest): New enum value EXPECT_HWADDR. Insert this into the parser, triggering on all the keywords `ether', `hwaddr', and `lladdr' for best portability. 2015-07-21 Mats Erik Andersson ifconfig: Implement a hardware list for BSD systems. Patterned on the hardware recognition already in use by GNU/Linux, use a similar mechanism for all of BSD. * ifconfig/system/bsd.c (print_hwaddr_ether): New function. (ift_symbols): New variable. (ift_findvalue): New function. (system_fh_hwaddr_query, system_fh_hwaddr) (system_fh_hwtype_query, system_fh_hwtype): Adjust mechanisms to use the table `ift_symbols' via ift_findvalue(). ifconfig: Report tunnels in two more formats. * ifconfig/options.c (formats) : Add two entries for the endpoints of tunnels. : Add a line to display tunnels. ifconfig: Add a missing interface flag. * ifconfig/flags.c [IFF_CANTCONFIG] (if_flags): Add the extended interface flag `CANTCONFIG'. 2015-07-20 Mats Erik Andersson ifconfig: More info on tunnel interfaces. * ifconfig/options.c (formats) : Add destination address for point-to-point interfaces. It is present in some other formats. : Display tunnel addresses for p-t-p interfaces. : Add destination address for p-t-p interfaces and hardware type and hardware address for any device. * ifconfig/system/bsd.c (system_fh_brdaddr_query): Check that IFF_BROADCAST is set and access the relevant member `fp->ifa_broadaddr'. (system_fh_brdaddr): Check for set IFF_BROADCAST. (system_fh_tunnel_query, system_fh_tundst, system_fh_tunsrc): New functions. * ifconfig/system/bsd.h (SYSTEM_FORMAT_HANDLER): Add the keys `tunnel?', `tundst', and `tunsrc'. (system_fh_tunnel_query, system_fh_tundst, system_fh_tunsrc): New prototypes. 2015-07-18 Mats Erik Andersson rcp: Integer overflow. During transmission of large files, size exceeding 2GB, a long integer variable overflows. Issue reported and identified by Wenlin Kang in http://lists.gnu.org/archive/html/bug-inetutils/2015-07/msg00004.html * src/rcp.c (sink): Change SIZE to have type `off_t'. 2015-07-18 Mats Erik Andersson ifconfig: Improve the support for GNU/Hurd. Add system specific abilities, including parsing of command line and hardware addresses. * ifconfig/system.h [__GNU__]: Include "system/hurd.h". * ifconfig/system.c [__GNU__]: Include "system/hurd.c". * ifconfig/system/Makefile.am (noinst_HEADERS): Add the files `hurd.h' and `hurd.c'. * ifconfig/system/hurd.h, ifconfig/system/hurd.c: New files. * ifconfig/system/generic.c: Include . (system_parse_opt, system_parse_opt_rest, system_configure): Apply _GL_UNUSED_PARAMETER to all arguments, as these functions are placeholders and no-ops. 2015-07-17 Mats Erik Andersson ifconfig: Sporadically appearing regression. Device flags are sometimes calculated before their query using SIOCGIFFLAGS. First observed on GNU/Hurd. * ifconfig/printif.c (fh_brdaddr_query, fh_dstaddr_query): Execute ioctl(SIOCGIFFLAGS) before calculating UFLAGS. 2015-05-27 Alfred M. Szmidt * Makefile.am (ACLOCAL_AMFLAGS): New variable. 2015-06-06 Guillem Jover * ftp/cmds.c (setpeer): Misspelled message. 2015-05-22 Guillem Jover libls: Alignment issue on sparc systems. The test suite executed by Debian's build daemon uncovered a failure on sparc due to incomplete alignment on word boundaries. * libls/fts.c (ALIGNBYTES, ALIGN): New macros. (fts_alloc): Add ALIGNBYTES to the size being allocated to P, a structure FTSENT. Then compose the assignment of `P->fts_statp' with macro ALIGN to force correct alignment for the pointer to `struct stat'. 2015-05-19 Mats Erik Andersson ifconfig: Fix BSD-specific interface access. Recently FreeBSD abandoned support for ioctl calls with SIOCGIFNETMASK and SIOCGIFBRDADDR. Instead the use of `struct ifaddrs' is the only mechanism. This had already been put to use in other cases, and is portably available in all BSD flavours. * ifconfig/system/bsd.c (system_fh_brdaddr_query) (system_fh_brdaddr, system_fh_netmask_query, system_fh_netmask): New functions. * ifconfig/system/bsd.h (SYSTEM_FORMAT_HANDLER): Add the new functions to this list, thus replacing the default handlers. Also add their prototypes. 2015-05-18 Mats Erik Andersson ftp: Accept named, non-numerical ports. * ftp/cmds.c (setpeer): Test whether port string looks numerical. Perform a look-up in the contrary case. 2015-05-17 Mats Erik Andersson ifconfig: Regression during interface selection. Without arguments, ifconfig is expected to print status of all interfaces that are in state `UP'. The mechanism to detect this state was corrupted when 32-bit flags were implemented. The issue was reported by Juergen Daubert in http://lists.gnu.org/archive/html/bug-inetutils/2015-05/msg00002.html * ifconfig/printif.c (fh_ifdisplay_query): Logically invert every use of N. [SIOCGIFFLAGS] (fh_ifdisplay_query): Calculate UFLAGS after executing `ioctl(SIOCGIFFLAGS)', since only then is the value of `form->ifr->ifr_flags' valid. This side effect of ioctl() was not taken into account in previously committed code with 32-bit flags. 2015-05-13 Guillem Jover ping, ping6: Always use line buffered output. When stdout is redirected, libc will change the stream to be fully buffered. Suppress this, gaining the standard behaviour of other implementations. Issue was first reported as a wishlist bug of Debian: https://bugs.debian.org/782727. * ping/ping.c (main): Request line buffering on stdout, adding a call to setvbuf(). * ping/ping6.c (main): Likewise. 2015-05-12 Alfred M. Szmidt * bootstrap.conf (gnulib_modules): Add announce-gen. 2015-05-02 Mats Erik Andersson * tests/inetd.sh (PASSWD, PWDDB, PROTOCOLS): New variables. Check for system files required by `inetd'. Skip test when not found, which can happen in incomplete chroots. 2015-04-17 Mats Erik Andersson * ftpd/conf.c, ftpd/ftpd.c, ifconfig/system/bsd.c, ifconfig/system/linux.c, libtelnet/encrypt.c: Remove duplicate semicolon. 2015-04-16 Mats Erik Andersson * cfg.mk (git-version-gen-tag-sed-script): New variable using the same sed script as found in `configure.ac'. It is needed to get a more reliable target `dist'. * tests/.gitignore: Add some generated test products. 2015-04-15 Mats Erik Andersson * bootstrap: Updated from gnulib. * doc/.gitignore: Add `/gendocs_template_min'. The file is added during bootstrap. 2015-04-09 Mats Erik Andersson Incomplete test of syslogd. Whenever message passing via local socket is disabled, the wrapping test caused a false negative. Fix this by letting it fall back to an INET socket. * tests/syslogd.sh: Include the `wrapping message' whenever either of $do_unix_socket or $do_inet_socket is true. Fix the counter COUNT_WRAP to be set under the same prerequisite only. 2015-04-08 Mats Erik Andersson syslogd: Overlapping string locations. Configuration lines with leading white space are normalized by copying a string to an overlapping location. Issue found by Alex Kost and reported to us in http://lists.gnu.org/archive/html/bug-inetutils/2015-04/msg00001.html * src/syslogd.c (load_conffile): Declare P in smallest possible code block. Use `memmove' instead of `strcpy' to neutralize the effects of overlapping locations. * tests/syslogd.sh: Add a new test case, checking resistance to leading white space and wrapped lines in configuration file. (OUT_NOTICE, COUNT_NOTICE, wrapped, COUNT_WRAP): New variables. 2015-04-02 Mats Erik Andersson Testing of inetd service. * tests/inetd.sh: In verbose mode, report the value of USER. Include a printout of the configuration file when the SIGHUP test loop fails. 2015-03-31 Alfred M. Szmidt * doc/inetutils.texi: Re-order chapters. 2015-03-30 Mats Erik Andersson Texinfo: Slight reordering of nodes. This makes all chapters consistent in themselves. * doc/inetutils.texi: Put direntry `dnsdomainname' first in dircategory `Individual utilities', for alphabetic reasons. Interchange nodes `dnsdomainname invocation' and `hostname invocation' in response to that change. (ftp invocation): In sub-menu, move `The .netrc file' to be last entry in the list. Move the node `Ftp environment' from last to third relative position in this chapter. Position three comes from the ordering in the established sub-menu. 2015-03-30 Mats Erik Andersson Texinfo: Improve typeset output. * doc/inetutils.texi: Replace all @smallexample by @example. (inetd invocation): Make the multi-line example two spaces narrower in order to fit into a rendered PDF page. (tftpd invocation): Rephrase a sentence for easier line breaks, thus avoiding text extending into the right margin. 2015-03-21 Mats Erik Andersson Portability of time format string. * telnetd/utility.c (_var_short_name) : Change `%P' to `%p' in format string for strftime(), as the former is a GNU exclusive extension of no portability at all. Another conversion specifier `%l' is not POSIX conforming, but seems to be generally supported, so it is left untouched. 2015-03-20 Mats Erik Andersson telnetd: Texinfo documentation. * doc/inetutils.texi (telnetd invocation): Add a section on the use of replacement tokens in the execution string. 2015-03-19 Mats Erik Andersson telnetd: Enable autologin in legacy mode. Without Kerberos authentication the autologin code was not determining what user name to hand over to the login service. Adding the user name, when applicable, resolves the issue. Bug was reported by Kuaikuai Wu in http://lists.gnu.org/archive/html/bug-inetutils/2014-12/msg00010.html * telnetd/telnetd.c [SOLARIS10] (login_invocation): Add device path "-d %L" and user name "%U", the latter in the form of an else clause to the selector "%?u". [!SOLARIS10] (login_invocation): Likewise for "%U" only. * telnetd/utility.c (getterminaltype): Change the paramater name `user_name' to `uname', as the former shadows a precious and global variable name. (_var_short_name) : New case, returning full path to the PTY device assigned to client. : New case, returning a copy of the environment variable USER, or an empty string. 2015-03-16 Mats Erik Andersson ftp: Honour host aliases. While establishing the connection, do not replace the desired peer name with its canonical name. This prevents correct use of the netrc file. Bug reported by John Sullivan in http://lists.gnu.org/archive/html/bug-inetutils/2015-02/msg00000.html * ftp/cmds.c (setpeer): Do not assign value from hookup() to HOST. Instead, only test if it is non-null. 2015-03-15 Mats Erik Andersson telnetd: Suppress PTY packet data. The server is receiving PTY input in packet mode, but is not properly discarding PIOCPKT_DATA before handing over input to the network socket. Do this correctly. * telnetd/telnetd.c (telnet_run) : Break the loop also if pty_read() returns zero. Add a final call to pty_get_char() before ending FD_ISSET(pty, &ibits). This call was mistakenly located within the subcase where TIOCPKT_NOSTOP or TIOCPKT_DOSTOP is handled. 2015-03-14 Mats Erik Andersson Complaints during IPv6-less testing. Unused IPv6 directives cause logged complaints by inetd. * tests/ftp-localhost.sh: Add a tcp6 listener to `inetd.conf' only if TEST_IPV6 is not `no'. * tests/tftp.sh: Likewise with udp6. 2015-03-14 Mats Erik Andersson Build failures while IPv6 is disabled. * configure.ac (ENABLE_hstrerror): New conditional variable. * src/rlogind.c [IPV6] (checkhost): Move right parenthesis outside of precompiler conditional. * telnetd/Makefile.am [ENABLE_hstrerror]: Add $(LIBRESOLV) to LDADD. With IPv6 disabled, the code in `telnetd/telnetd.c' uses hstrerror(), so Solaris must link against libresolv. 2015-02-28 Mats Erik Andersson Fully configure testing without IPv6. Pick up testing addresses for IP and IPv6 at configuration time. Now a BSD jail can successfully test all network services. * configure.ac (TARGET, TARGET6): New precious variables. Set their default values. * tests/Makefile.am (tools_subst): Add TARGET and TARGET to substi- tution rules. * tests/tools.sh.in (TARGET, TARGET6): New variables. * tests/ifconfig.sh (TARGET, target): New variables. (find_lo_addr): Replace hardcoded `127.0.0.1' with `$target'. * tests/ping-localhost.sh : Add a test `$TEST_IPV6 != no'. * tests/syslogd.sh (TARGET6): Remove surrounding brackets. <$TEST_IPV6 != no>: Enclose `$TARGET6' in brackets for `$LOGGER'. 2015-02-27 Mats Erik Andersson Allow testing without IPv6. Configuration with `--disable-ipv6' as well as individual tests with `TEST_IPV6=no' need to avoid mandatory IPv6. * configure.ac (TEST_IPV6): New precious variable. * tests/Makefile.am (tools_subst): Add substitution of TEST_IPV6. * tests/tools.sh.in (TEST_IPV6): New variable. * tests/ftp-localhost.sh: Check `$TEST_IPV6 != no' before adding any test cases with IPv6 addressing. * tests/syslogd.sh: Likewise. * tests/telnet-localhost.sh: Likewise. (TARGET46): New variable, defaulting to `::ffff:$TARGET'. * tests/tftp.sh (TARGET, TARGET6): New variables. <$ADDRESSES = sense>: Compute this case before building a default address list. Add switch `-a' when executing $IFCONFIG. (ADDRESSES): Start with TARGET, add TARGET6 if `$TEST_IPV6 != no'. 2015-01-31 Mats Erik Andersson telnet: Printing of uninitialized characters. When preparing submodes of linemode for presentation, in case no submode is set, the string to be printed might make use of uninitialized string content, in an otherwise sane call to fprintf(). This is in error already in the legacy code. * telnet/utilities.c (printsub) : Test TBUF[0] to calculate replacement string, since TBUF[1] is not guaranteed to be initialized by the preceding sprintf(). 2015-01-30 Mats Erik Andersson * bootstrap: Updated from gnulib. 2015-01-20 Mats Erik Andersson telnetd: Incomplete processing of PTY data. The reception of SIGCHLD can make the transfer of data from the PTY stream to the client side's network stream incomplete. The problem was raised as Debian Bug #607415, but is applicable also here, due to a common origin. A setting with the option `-E /some/script' displays this error irregularly. * telnetd/telnetd.c (pending_sigchld): New variable. (telnetd_setup): Call setsig() when assigning SIGCHLD. Set the action to chld_is_done(). (telnetd_run) : If pending_sigchld is set, flush the network output buffer and exit the loop with cleanup(SIGCHLD). (chld_is_done): New function, used as signal action. * telnetd/utility.c (pty_read) : Set consistent text prefixes in output. (printdata): Cast char array value as `unsigned char' to avoid an implicit cast as integer, implied in the format string `%02x'. 2015-01-17 Mats Erik Andersson * telnetd/state.c (dooption) : Remove outdated and misnamed ifdef on TELOPT_ENVIRON. (suboption): Remove outdated ifdef on TELOPT_NEW_ENVIRON. (send_status) : Pass only the suboption payload into printsub(), by stepping over IAC+SB in the string buffer. * telnetd/utility.c (printsub) : When an unexpected mode must be reported numerically, print the correct byte in pointer[0], not some other pseudo-random value. 2014-11-11 Mats Erik Andersson * bootstrap: Updated from gnulib. 2014-11-11 Mats Erik Andersson ping: Fix testing when ping6 is not built. Reported by jb999 in bug-inetutils. * tests/ping-localhost.sh: Bracket test clauses to conform with intuitive logic and precedence rules. 2014-10-17 Mats Erik Andersson syslogd, logger: Incomplete range checking. * src/logger.c (IU_MAX_FAC): Delete macro. (decode): Use LOG_FACMASK in range checking. The use of numeric facilities was broken for the most part. * src/logprio.h [!LOG_MAKEPRI] (LOG_MAKEPRI): Change to a portable and correct definition. [!INTERNAL_MARK] (INTERNAL_MARK): Adjust to the corrected behaviour of LOG_MAKEPRI. * src/syslogd.c [!LOG_MAKEPRI] (LOG_MAKEPRI): Change to a portable and correct definition. (printline): Reset `pri' to DEFUPRI whenever the facility is non-existent. This protects against CVE-2014-3684. Make a three bit shift of LOG_KERN for code consistency. (cfline): After decoding priority, check also upper limit. Likewise for facility, and update `facilities_seen' only after a completed range error check. * tests/syslogd.sh (OUT_UNOTICE, OUT_LOCAL0): New variables. (COUNT4, COUNT5, COUNT4_notice, COUNT4_illegal, COUNT5_user) (COUNT5_local): Likewise. Add three new configuration stanzas to initial setup, all with invalid information. In the second setup, capture facility `info' exactly, and make a new `notice' also exact. Add a further file in the conf-directory, specifying capture of `local0.=notice'. Add five new test messages using Unix socket, intending to detect more accurately the handling of priorities, numerical as well as illegal or default values. 2014-08-29 Mats Erik Andersson * tests/libls.sh: Add a dummy execution of $LS in order to avoid a false negative caused by code coverage runs. 2014-08-13 Mats Erik Andersson * tests/libls.sh : Execute `set -x'. (REPLY_a1, REPLY_A1, diff): Changed. Update the check based on these, thus avoiding `sed -n '$='' which could not be trusted on NixOS' build daemon. 2014-08-11 Mats Erik Andersson * tests/libls.sh: Improve failure diagnostic when testing the switches `-a' and `-A'. The build daemon at NixOS had an issue during this subcase. 2014-08-03 Mats Erik Andersson Support libshishi with Sun Studio. * configure.ac : Call AC_SEARCH_LIBS, not AC_CHECK_LIB, when looking for libshishi. This allows the C-compiler from Sun Studio 12.1 to correctly detect and build shishi support. 2014-08-02 Mats Erik Andersson More tests for better code coverage. * tests/Makefile.am [ENABLE_libls] (dist_check_SCRIPTS): Add `libls.sh'. [ENABLE_ftp] (dist_check_SCRIPTS): Add `ftp-parser.sh'. * tests/ftp-parser.sh: New script. * tests/ifconfig.sh: Add more test cases. * tests/libls.sh: New script. * ifconfig/options.c (formats): Add format `?' as a synonym for format `help'. 2014-08-01 Mats Erik Andersson ping, ping6: Repair pattern production. A pattern stated on the command line was never made productive, instead only nulls were inserted to the correct length. * ping/ping.c, ping/ping6.c (pattern_len): Set to MAXPATTERN. (parse_opt): Size of PATTERN is now MAXPATTERN. * ping/ping_common.h (MAXPATTERN): New macro. * ping/ping_common.c (init_data_buffer): Increment I before checking for end of pattern. This avoids an insertion of the closing null character. (decode_pattern): Remove _GL_UNUSED_PARAMETER on `pattern_data'. Insert scanned data C into pattern buffer. 2014-08-01 Mats Erik Andersson * ftp/ftp.c (ptransfer): Change BS to be of type float. Improve readability by having speed estimates printed as `Mbytes/s', `kbytes/s', or `bytes/s' as suitable. 2014-07-30 Alfred M. Szmidt * telnetd/utility.c (nextitem, netclear, printoption, printsub) (printdata): Remove register keyword usage. (printsub): Don't add integer to string to try and skip quote. 2014-07-28 Giuseppe Scrivano * tests/ls.c: Include not "config.h". 2014-07-26 Mats Erik Andersson whois: Cooperate with misbehaving servers. Some servers, like "whois.ripe.net", "whois.arin.net", and "whois.eu", partially abort communication when the socket is closed for writing. Report by Alexander Zubkov: . * whois/whois.c (gwhois_argp_options): Increase GRP and insert a separating subheader. (do_query): Remove call to shutdown(). The alternate and much similar lookup call query_crsnic() did not half-close the socket for writing. * doc/inetutils.texi (whois invocation): Add a section about environment variables accessed by `whois'. 2014-07-22 Mats Erik Andersson libls: Inconsistent options. The options '-l', '-m' and '-n' were not overruling each other in the expected manner. Build `ls' from `libls' for testing purposes, but do not install it. * configure.ac (enable_libls): Set to `no' when testing against `ac_cv_func_fchdir' fails. Publish with AC_SUBST. [ENABLE_libls]: New variable. * summary.sh.in (libls_BUILD, libls_PROPS, enable_libls): Detect these; report whether `libls' is being built. * libls/ls.c (ls_main) <'l' || 'm' || 'n'>: Reset missing flags correctly, in order that '-l', '-m' and '-n' overrule each other on the command line. * tests/Makefile.am [ENABLE_libls] (noinst_PROGRAMS): Add `ls'. [ENABLE_libls] (ls_LDADD): New variable. * tests/ls.c: New file. 2014-07-17 Mats Erik Andersson Portability of canonical host name. In response to a numerical address, getaddrinfo() does not populate `ai_canonname' by necessity. * ftp/ftp.c (hookup): Copy `RES->ai_canonname' only if set. Copy from RHOST otherwise. * ping/libping.c (ping_set_dest): Likewise; with P. * ping/ping6.c (ping_set_dest): Likewise, with RHOST. * src/traceroute.c (main): Likewise. 2014-07-16 Mats Erik Andersson Handle access timing in fractions of a second. * configure.ac (HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC) (HAVE_STRUCT_STAT_ST_ATIM_TV_USEC, HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC) (HAVE_STRUCT_STAT_ST_CTIM_TV_USEC, HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) (HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC): Check for existing time field for sub-second timing in `struct stat'. (HAVE_STRUCT_STAT_ST_BLKSTAT): Make the macro functional! * libls/cmp.c (modcmp) [HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC] [HAVE_STRUCT_STAT_ST_MTIM_TV_USEC]: Compare in sub-seconds. (acccmp) [HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC] [HAVE_STRUCT_STAT_ST_ATIM_TV_USEC]: Likewise. (statmod) [HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC] [HAVE_STRUCT_STAT_CT_MTIM_TV_USEC]: Likewise (revmodcmp, revaccmp, revstatmod, revsizecmp): Replace code by a simple sign change of modcmp(), acccmp(), etcetera. * src/rcp.c [HAVE_STAT_ST_MTIMESPEC || HAVE_STAT_ST_MTIME_USEC] (write_stat_time): Remove unused and obsolete code. [HAVE_STRUCT_STAT_ST_ATIM_NSEC || HAVE_STRUCT_STAT_ST_ATIM_USEC] [HAVE_STRUCT_STAT_ST_MTIM_NSEC || HAVE_STRUCT_STAT_ST_MTIM_USEC] (write_stat_time): Code portably for sub-second accuracy. 2014-07-14 Mats Erik Andersson ftp: Hash command semantic. Toggle hash state when argument is not set, only then. * ftp/cmds.c (sethash): Activate marker when a numeric argument is found; toggle when no argument is present. A non-numeric argument leads to status reporting only. 2014-06-05 Mats Erik Andersson ftp: Alternate selection of .netrc file. * ftp/ftp_var.h (netrc): New variable. * ftp/main.c (argp_options) <-N/--netrc>: New option. (parse_opt) <'N'>: New case. (main): Initialize `netrc'. * ftp/ruserpass.c (remote_userpass): If `netrc' is NULL, check NETRC in environment. Whenever `netrc' has content, us it instead of `~/.netrc'. Once CFILE is valid, make sure that the file location is a regular file, otherwise returning to the interpreter. * tests/ftp-localhost.sh: Two new test cases, checking the functionality of NETRC in environment, and the option `-N'. 2014-05-16 Mats Erik Andersson ftp: Size multipliers for hash increments. * ftp/cmds.c (sethash): New variable P. Detect and apply multipliers when setting the increment size for hash markers, i.e., allow commands like "hash 32m". 2014-04-29 Mats Erik Andersson hostname: Degenerate cases. Better replies when name resolution fails. * configure.ac: Remove check for gethostname in libresolv. If hstrerror is missing, check for it in libresolv. (LIBRESOLV): New variable published using AC_SUBST. * src/Makefile.am (hostname_LDADD): New variable. * src/hostname.c (get_name): Call puts() only if NAME carries some content. Will, most importantly, reply with an empty string, not an empty line, when no aliases are found. (get_aliases): Return an empty string when the host's name cannot be resolved. (get_fqdn): Fall back to the system reported hostname when name resolution fails. [HAVE_HSTRERROR] (get_ip_addresses): Exit with an error when name resolution fails. * tests/hostname.sh: Check availability of mktemp. (posttest): New function, used as trap. : New test case with switch '-F'. 2014-04-26 Mats Erik Andersson libinetutils: Skeletal preparations for Heimdal. * configure.ac : Disable rlogind and rshd. (KERBEROS_VERSION): Publish it using AC_SUBST. * libinetutils/kerberos5.c: New file, mostly copied in from `shishi.c' as a guide. * libinetutils/Makefile.am (libinetutils_a_SOURCES): Remove `des_rw.c', and add `kerberos5.c'. * libinetutils/kcmd.c: Remove support for KRB4, replacing all macros KERBEROS by KRB5. [KRB5]: Include and "kerberos5_def.h". [KRB5] (kcmd): Update declarations, and make small, obvious adaptions to Kerberos5. (kcmd): Refactor steps common to SHISHI and KRB5, such as protocol exchange and address resolution. They differ at the end, calling shishi_auth() or kerberos_auth(). 2014-04-25 Mats Erik Andersson Begin support for Heimdal's Kerberos. Very incomplete code for `rsh', but a needed start. * libinetutils/kerberos5_def.h: New file. * libinetutils/krcmd.c: Remove support for KRB4, replacing most macros KERBEROS by KRB5. [KRB5]: Include and "kerberos5_def.h". [KRB5] (kcmd, krcmd, krcmd_mutual): Update declarations, and make small, obvious adaptions to Kerberos5. [KRB5] (krcmd_mutual): Update value of AUTHOPTS. * libinetutils/Makefile.am (noinst_HEADERS): Add `kerberos5_def.h'. * src/rsh.c: Replace macro KERBEROS by KRB5, temporarily making an exception in some code related to encryption. [KRB5]: Include and "kerberos5_def.h". [KRB5] (ctx, keyblock, server): New variables. [KRB5 && ENCRYPTION] (parse_opt) : Remove call to des_set_key(). [KRB5 || SHISHI] (main): Refactor code for port lookup and command string generation, since Kerberos5 and Shishi have common traits. [KRB5] (main): Adapt to new signatures of krcmd() and krcmd_mutual(). Initialize `ctx', and reimplement realm lookup using Kerberos5 API. 2014-04-25 Mats Erik Andersson Silence warnings with libshishi. * libinetutils/kcmd.c [KERBEROS || SHISHI] (kcmd): Declare realm argument as `const char *'. * libinetutils/krcmd.c [KERBEROS || SHISHI] (kcmd, krcmd, krcmd_mutual): Likewise. * libinetutils/shishi.c [SHISHI] (shishi_auth): Likewise. * libinetutils/shishi_def.h [SHISHI] (shishi_auth, krcmd) (krcmd_mutual): Likewise. * src/rcp.c [KERBEROS || SHISHI] (dest_realm): Likewise. * src/rlogin.c [KERBEROS || SHISHI] (dest_realm): Likewise. * src/rsh.c [KERBEROS || SHISHI] (dest_realm): Likewise. * src/rlogind.c (rlogind_auth): Initialize HOSTNAME. 2014-03-28 Mats Erik Andersson syslogd: Local time option. * src/syslogd.c (set_local_time): New variable. (option enum): Remove OPT_PIDFILE. (argp_options) : New alias 'P'. <-T/--local-time>: New option. (parse_opt) : Replaces OPT_PIDFILE. : New case. (logmsg): If `set_local_time' is set, use NOW to generate a time stamp, not the initial portion of the message. 2014-03-23 Mats Erik Andersson ifconfig: Parse address family. Allow for address family argument on supported systems. * ifconfig/system/bsd.c (system_parse_opt_rest): New enum values EXPECT_COMMAND and EXPECT_AF. Use the first to detect `create' and `destroy', but claiming lack of support. Accept `inet' as family, but reject `inet6'. Rewrite return status. * ifconfig/system/linux.c (system_parse_opt_rest): Rename enum value EXPECT_INET to EXPECT_AF. Detect family `inet6', but reject it. * ifconfig/system/solaris.c (system_parse_opt_rest): New enum value EXPECT_AF. Accept `inet' as address family argument, but reject `inet6'. Rewrite return status. 2014-03-20 Mats Erik Andersson ifconfig: Command line parsing. Implement flag parsing for BSD and Solaris. Accept only changeable flags on GNU/Linux. * ifconfig/system/linux.c (system_parse_opt_rest): Accept only masks which correspond to changeable flags, using IU_IFF_CANTCHANGE. * ifconfig/system/bsd.c, ifconfig/system/solaris.c (system_parse_opt_rest): New variables MASK and REV. Check if the command line argument can be interpreted as a changeable flag argument. 2014-03-15 Mats Erik Andersson ifconfig: Changeable flags on GNU/Linux. * ifconfig/flags.h (IU_IFF_CANTCHANGE): Remove IFF_POINTOPOINT, IFF_ALLMULTI, IFF_BROADCAST, IFF_MULTICAST, and IFF_PROMISC, since they are changeable on GNU/Linux, and they are included natively in IFF_CANTCHANGE on other systems. 2014-03-13 Mats Erik Andersson logger: Source address resolution. * src/logger.c (open_socket) [HAVE_DECL_GETADDRINFO] : Delete resolver hint for numeric address. 2014-03-10 Mats Erik Andersson hostname: Sanity checks in corner cases. * src/hostname.c (get_name): Use reply from get_fqdn() only if it gave a host name, not the artificial "(none)". (set_name): Reject an empty host name. (parse_file): Initialize NAME. Improve error message when getline() claims empty input. Break out of loop only if sscanf() produced a printable string. 2014-02-22 Mats Erik Andersson ifconfig: Allow flags richer than 16 bits. Systems like GNU/kFreeBSD and FreeBSD use two `short int' to represent interface flags. Adapt to this fact. * ifconfig/changeif.c (set_flags): Apply mask 0xffff to flags. [ifr_flagshigh]: Calculate flag changes also on ifr_flagshigh. * ifconfig/flags.c [IFF_PPROMISC] (if_flags): Add user land setable flag "PROMISC". [IFF_MONITOR] (if_flags): Add flag "MONITOR". [IFF_STATICARP] (if_flags): Add flag "STATICARP". [IFF_STATICARP] (flag_char_tab): Add short flag 's'. [IFF_MONITOR] (flag_char_tab): Add short flag 'm'. * ifconfig/options.c (formats) : Print flags numerically using format string "%x". * ifconfig/printif.c (put_flags): Change signature. New type of F is `unsigned int'. New variable UFLAGS. Work with UFLAGS, not `flags'. (put_flags_short): New signature. [SIOCGIFFLAGS] (fh_ifdisplay_query, fh_brdaddr_query) (fh_dstaddr_query, fh_flags): New variable UFLAGS, replacing `form->ifr->ifr_flags'. * ifconfig/printif.h (put_flags): Change prototype. 2014-02-15 Mats Erik Andersson ifconfig: No listing of unchangeable flags. * ifconfig/flags.h [!IFF_CANTCHANGE]: Define it as naught. (IU_IFF_CANTCHANGE): New macro. * ifconfig/flags.c (if_list_flags): Do not list flags that are known to give constant properties. New macro FLAGS_COMMENT. Add its contents to the end of the requested flags listing. Skip a named flag if it matches IU_IFF_CANTCHANGE. Also skip flags named like 'link2/altphys', since their components do appear in the listing. Portability issues in test script. * tests/ifconfig_modes.sh (MTU): Set to 1324 initially, to get above 1280 needed for IPv6 compatibility. The switch '-o' of uname is not portable. 2014-02-15 Mats Erik Andersson * tests/ifconfig_modes.sh: Add test case to explain failures to automatically bring the interface up at an address change. GNU/Linux is affected by this. 2014-02-14 Mats Erik Andersson * ifconfig/flags.c (if_list_flags): Increment counter only in the for-statement; update the insertion of list delimiters. Each second flag name was falsely scrubbed. 2014-02-14 Mats Erik Andersson Script for testing of ifconfig's modes. Will document all tested features. * tests/ifconfig_modes.sh: New file. Intentionally without execution bit, and not for automatic testing. * tests/Makefile.am (EXTRA_DIST): Add `ifconfig_modes.sh`. 2014-02-12 Mats Erik Andersson * ifconfig/options.c (formats): Add format `check' as a synonym for `check-existence'. 2014-02-09 Mats Erik Andersson ftp: Detect one-time passwords. RFC 2228 reserves response code 336 for replies used with challange-response authentication. * ftp/cmds.c (user): React to response code 336 within FTP command `USER', print its message, and possibly discard an already supplied password. * ftp/ftp.c (login): Likewise. 2014-02-09 Mats Erik Andersson ftpd: Parse commands of RFC 2228. Tokens are implemented, but no actions. * ftpd/ftpcmd.y (ADAT, AUTH, CCC, CONF, ENC, MIC, PBSZ) (PROT): New tokens. (cmdtab): New entries `ADAT', `AUTH', `CCC', `CONF', `ENC', `MIC', `PBSZ', and `PROT'. All are marked as unimplemented. 2013-12-23 Alfred M. Szmidt * doc/inetutils.texi (rsh invocation): Use @item for first entry in @table. 2013-12-19 Mats Erik Andersson * bootstrap: Updated from gnulib. 2013-12-13 Mats Erik Andersson ftpd: Follow RFC 2577 by default. Prevent user name guessing as standard, but offer an option to keep the more informational responses. * ftpd/extern.h (logged_in): Remove unused variable. (rfc2577): New variable. (struct credentials): New component DELAYED_REJECT. * ftpd/ftpd.c (rfc2577): New variable. (OPT_NONRFC2577): New enum value. (options): New option `--non-rfc2577'. (parse_opt) : Reset `rfc2577'. (user): New variable RET. After auth_user(), display messages in the old manner only if `rfc2577' is not set, or if guest access is being requested. Otherwise, update `cred.delayed_reject' for later access. (end_login): Reset `pcred->delayed_reject'. (pass): On returning from auth_pass(), check also `cred.delayed_reject' to minimize the amount of user information returned to the client. ftpd: The standard protocol in RFC 959 demands that a client be informed before closing down. * ftpd/ftpd.c (pass) : Send a reply message 421 before closing connection. 2013-12-10 Mats Erik Andersson inetd: Logging of resolution and binding errors. * src/inetd.c (setup): Alternate syslog format, and debug message, when a service node has been set. (expand_enter): Likewise, adding debug message. ftp: Trivial misspelling. Reported by Joe Steffee in . * ftp/ftp.c (hookup): Spell `response' correctly. 2013-11-28 Mats Erik Andersson rlogind, telnet, telnetd: Modify exit status. * src/rlogind.c (rlogind_mainloop): Delay cleanup() call until libshishi has torn down its structures. (cleanup): New variable STATUS. If `signo' is SIGCHLD, call waitpid() to reap the waiting child process and use its return status for the whole server's status. Waiting for the child resolves a race condition when tearing down the pseudo-terminal pair, since the slave now is gone when the master side is being closed down. * telnet/commands.c (tn): Use exit status 0 when setjmp() manages to execute telnet(). Otherwise, keep 1. (command) [unix || __unix || __unix__]: Enclose the complete else-block within preprocessor conditionals. * telnetd/pty.c (cleanup): Let STATUS have full scope in this function, and use it for exit(). Execute waitpid() only if `sig' is SIGCHLD, and update STATUS for later use. On SIGHUP, set STATUS to success, which happens only at reception of TELOPT_LOGOUT from client. * telnetd/state.c (dooption) : Call cleanup() with argument SIGHUP, since the client willingly leaves off. 2013-11-24 Mats Erik Andersson inetd: Ensure successful daemon mode. * src/inetd.c (main) : Abort with a syslog message, should daemon() return unsuccessfully. * libinetutils/daemon.c (waitdaemon): Return with failure, should chdir("/") fail. Check all calls to chdir. * src/rshd.c (doit): Make a syslog error message and abort execution, should chdir("/") fail. * src/uucpd.c (doit): Abort with a message to stderr, should chdir("/") fail. 2013-11-23 Mats Erik Andersson Check all returns from fgets. Handle every failed fgets() with care. * ftp/cmds.c (user): Set account string to empty when fgets() fails. * src/rexec.c (main): Likewise for password string. * src/tftp.c (get_args): Call makeargv() only on successful call to fgets(). Otherwise, instantiate a trivial command list containing command name only. * telnet/commands.c (setescape): Leave escape character unchanged when fgets() fails. (tn) : Call makeargv() only for successful fgets(). Otherwise, print a message and rely on later usage printout. (command): Print a line feed at EOF on stream error. 2013-11-15 Mats Erik Andersson tftp: Buffer size checking. Hardened builds need a helping hand in interpreting a bogus array length. * src/tftp.c (makerequest): New variables ARGLEN, LEN. Use them in calculating available space for file name. [HAVE_STRUCT_TFTPHDR_TH_U]: Calculate CP using an offset argument. Needed to prevent false negatives from stack allocation protectors. 2013-11-05 Mats Erik Andersson Improve detection of readline. * am/readline.m4 (gl_FUNC_READLINE): Check for libedit with AC_LIB_LINKFLAGS_BODY and with AC_CACHE_CHECK. : Ignore . : Prefer . Define HAVE_READLINE if readline() was located in one of the libraries, and if its use had not been disabled. Define HAVE_LIBREADLINE and HAVE_LIBEDIT if it was found in the corresponding library. * ftp/Makefile.am (LDADD): Remove $(LIBGLOB), $(LIBTERMCAP). The latter is handled by LIBREADLINE. * configure.ac (ftp_PROPS): Do not add $LIBTERMCAP. 2013-10-16 Mats Erik Andersson syslogd, talkd: Act on failed read_utmp. * src/syslogd.c (wallmsg) [UTMP_NAME_FUNCTION || !HAVE_GETUTXENT]: Check call to read_utmp() for failure, filing an error massage. * talkd/process.c (find_user) [!HAVE_GETUTXUSER]: Likewise, then returning FAILED. rsh: Symbolic descriptor name. * src/rsh.d (talk): Use STDOUT_FILENO and STDERR_FILENO as arguments to write(). 2013-10-16 Mats Erik Andersson rsh: Kill child process after SIGPIPE. The default action for SIGPIPE will leave the child process running. This caused, until now and including legacy implementations, blocking of stdin, and to conditionally leave also the remote server running. * src/rsh.c (end_of_pipe): New variable. (sigpipe): New function. (talk) [HAVE_SIGACTION]: New variable SA. : Assign a signal handler to SIGPIPE. Add `&& !end_of_pipe' to the loop condition, so that talk() returns after SIGPIPE. The child process will then be killed at the end of main(). 2013-10-06 Mats Erik Andersson rsh: Detach input stream. The option `-n/--no-input' was incomplete. * src/rsh.c (main) : Call shutdown(SHUT_WR) on socket REM. (talk): Use symbolic macro SHUT_WR in shutdown(). * doc/inetutils.texi (rsh invocation)