.gitignore | 1 - AUTHORS | 1 + README | 2 +- THANKS | 716 +++++++++++++++++++++++++++++++++++++++++++++++ bootstrap.conf | 3 - configure.ac | 2 + doc/coreutils.texi | 54 ++-- m4/hostname.m4 | 26 ++ man/Makefile.am | 1 + man/mksock.x | 4 + src/Makefile.am | 4 + src/chroot.c | 4 + src/date.c | 9 +- src/dircolors.hin | 13 +- src/hostname.c | 409 +++++++++++++++++++++++++-- src/ls.c | 6 +- src/mksock.c | 162 +++++++++++ tests/misc/help-version | 1 + 18 files changed, 1348 insertions(+), 70 deletions(-) diff --git a/.gitignore b/.gitignore index cc17996..72204b2 100644 --- a/.gitignore +++ b/.gitignore @@ -82,5 +82,4 @@ ID Makefile Makefile.in TAGS -THANKS THANKS-to-translators diff --git a/AUTHORS b/AUTHORS index 0c15472..cc5b3c7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -46,6 +46,7 @@ md5sum: Ulrich Drepper, Scott Miller, David Madore mkdir: David MacKenzie mkfifo: David MacKenzie mknod: David MacKenzie +mksock: Dmitry V. Levin mktemp: Jim Meyering, Eric Blake mv: Mike Parker, David MacKenzie, Jim Meyering nice: David MacKenzie diff --git a/README b/README index eaa5fb0..2da93d4 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ The programs that can be built with this package are: [ arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold groups head hostid hostname id install join kill - link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup + link ln logname ls md5sum mkdir mkfifo mknod mksock mktemp mv nice nl nohup nproc od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..c25e396 --- /dev/null +++ b/THANKS @@ -0,0 +1,716 @@ +These people have contributed to the GNU coreutils (formerly, the fileutils, +textutils, and/or sh-utils packages). Some have reported problems, others +have contributed improvements to the documentation, actual code, and even +complete programs. Those contributions are described in the version control +logs and ChangeLog files. If your name has been left out, if you'd rather +not be listed, or if you'd prefer a different address be used, please send a +note to the bug-report mailing list (as seen at end of e.g., cp --help). + +Aaron Burgemeister dajoker@gmail.com +Aaron Hawley ashawley@uvm.edu +Achim Blumensath blume@corona.oche.de +A Costa agcosta@gis.net +Adam Jimerson vendion@charter.net +Adam Klein aklein@debian.org +Adam Sampson ats@offog.org +Adrian Bunk bunk@stusta.de +AIDA Shinra shinra@j10n.org +Akim Demaille demaille@inf.enst.fr +Alain Magloire alain@qnx.com +Alan Curry pacman-cu@kosh.dhis.org +Alan Iwi iwi@atm.ox.ac.uk +Albert Chin-A-Young china@thewrittenword.com +Albert Hopkins ahopkins@dynacare.com +Alberto Accomazzi alberto@cfa0.harvard.edu +aldomel aldomel@ix.netcom.com +Alen Muzinic zveki@fly.cc.fer.hr +Alexander Nguyen vinh@seas.ucla.edu +Alexander V. Lukyanov lav@netis.ru +Alexandre Duret-Lutz duret_g@epita.fr +Alexey Solovyov alekso@math.uu.se +Alexey Vyskubov alexey@pippuri.mawhrin.net +Alfred M. Szmidt ams@kemisten.nu +Allen Hewes allen@decisiv.net +Andi Kleen freitag@alancoxonachip.com +Andreas Dilger adilger@sun.com +Andreas Frische andreasfrische@gmail.com +Andreas Gruenbacher ag@bestbits.at +Andreas Jaeger jaeger@gnu.org +Andreas Luik luik@isa.de +Andreas Schwab schwab@linux-m68k.org +Andreas Stolcke stolcke@ICSI.Berkeley.EDU +Andrei Gaponenko andr@triumf.ca +Andre Novaes Cunha Andre.Cunha@br.global-one.net +Andres Soolo andres@soolo.matti.ee +Andrew Burgess aab@cichlid.com +Andrew Church achurch@achurch.org +Andrew Dalke dalke@bioreason.com +Andrew Fabbro andrew@fabbro.org +Andrew Pham andpha@us.ibm.com +Andrew Tridgell tridge@samba.org +Andrey Borzenkov arvidjaar@mail.ru +Andries Brouwer Andries.Brouwer@cwi.nl +Andy Longton alongton@metamark.com +Anthony Thyssen anthony@griffith.edu.au +Antonio Rendas ajrendas@yahoo.com +Ariel Faigon ariel@cthulhu.engr.sgi.com +Arjan Opmeer arjan.opmeer@gmail.com +Arne Henrik Juul arnej@imf.unit.no +Arnold Robbins arnold@skeeve.com +Arthur Pool pool@commerce.uq.edu.au +Arun Sharma arun.sharma@intel.com +Arvind Autar Autar022@planet.nl +Assaf Gordon assafgordon@gmail.com +Augey Mikus mikus@dqc.org +Aurelien Jarno aurel32@debian.org +Austin Donnelly Austin.Donnelly@cl.cam.ac.uk +Axel Dörfler axeld@pinc-software.de +Axel Kittenberger Anshil@gmx.net +Barry Kelly http://barrkel.blogspot.com/ +Bauke Jan Douma bjdouma@xs4all.nl +Ben Elliston bje@air.net.au +Bengt Martensson bengt@mathematik.uni-Bremen.de +Ben Harris bjh21@netbsd.org +Benjamin Cutler cutlerbc@simla.colostate.edu +Benno Schulenberg bensberg@justemail.net +Benoît Knecht benoit.knecht@fsfe.org +Ben Walton bwalton@artsci.utoronto.ca +Bernard Giroud bernard.giroud@creditlyonnais.ch +Bernd Eckenfels ecki@debian.org +Bernd Leibing bernd.leibing@rz.uni-ulm.de +Bernd Melchers melchers@cis.fu-berlin.de +Bernhard Baehr bernhard.baehr@gmx.de +Bernhard Gabler bernhard@uni-koblenz.de +Bernhard Marx berny@bernhard-marx.de +Bernhard Rosenkraenzer bero@redhat.de +Bernhard Voelker mail@bernhard-voelker.de +Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be +Bert Wesarg bert.wesarg@googlemail.com +Bill Brelsford wb@k2di.net +Bill Peters peters@gaffel.as.arizona.edu +Bjorn Helgaas helgaas@rsn.hp.com +Bob McCracken kerouac@ravenet.com +Bo Borgerson gigabo@gmail.com +Bob Proulx bob@proulx.com +Branden Robinson branden@necrotic.deadbeast.net +Brendan O'Dea bod@compusol.com.au +Brian Kimball bfk@footbag.org +Brian M. Carlson sandals@crustytoothpaste.ath.cx +Brian Silverman bsilverman@conceptxdesign.com +Brian Youmans 3diff@gnu.org +Britton Leo Kerin fsblk@aurora.uaf.edu +Bruce Korb bkorb@gnu.org +Bruce Robertson brucer@theodolite.dyndns.org +Bruno Haible bruno@clisp.org +Carl Johnson carlj@cjlinux.home.org +Carl Lowenstein cdl@mpl.UCSD.EDU +Carlos Canau Carlos.Canau@relay.puug.pt +Carl Roth roth@urs.us +C de-Avillez hggdh2@gmail.com +Charles Karney karney@pppl.gov +Charles Randall crandall@matchlogic.com +Chas. Owens chas.owens@gmail.com +Chen Guo chen.guo.0625@gmail.com +Chip Salzenberg chip@valinux.com +Chris Clayton chris2553@googlemail.com +Chris Faylor cgf@cygnus.com +Chris J. Bednar cjb@AdvancedDataSolutions.com +Chris Jones cjns1989@gmail.com +Chris Lesniewski ctl@mit.edu +Chris Sylvain csylvain@umm.edu +Christi Alice Scarborough christi@chiark.greenend.org.uk +Christian Harkort christian.harkort@web.de +Christian Krackowizer ckrackowiz@std.schuler-ag.com +Christian Rose menthos@menthos.com +Christian von Roques roques@pond.sub.org +Christophe LYON christophe.lyon@st.com +Chris Yeo cyeo@biking.org +Chuck Hedrick hedrick@klinzhai.rutgers.edu +Clark Morgan cmorgan@aracnet.com +Clement Wang clem.wang@overture.com +Cliff Miller cbm@whatexit.org +Colin Plumb colin@nyx.net +Colin Watson cjw44@riva.ucam.org +Collin Rogowski collin@rogowski.de +Cray-Cyber Project http://www.cray-cyber.org +Cristian Cadar cristic@stanford.edu +Cyril Bouthors cyril@bouthors.org +Dale Scheetz dwarf@polaris.net +Dameon G. Rogers dgr03@uark.edu +Dan Hagerty hag@gnu.ai.it.edu +Dan Hipschman dsh@linux.ucla.edu +Daniel Bergstrom noa@melody.se +Daniel Dunbar daniel@zuster.org +Daniel P. Berrangé berrange@redhat.com +Dániel Varga danielv@axelero.hu +Dan Jacobson jidanni@jidanni.org +Danny Levinson danny.levinson@overture.com +Dan Pascu dan@services.iiruc.ro +Darrel Francis d.francis@cheerful.com +Darren Salt ds@youmustbejoking.demon.co.uk +Dave Beckett dajobe@dajobe.org +David Alan Gilbert gilbertd@treblig.org +David A. Wheeler dwheeler@dwheeler.com +David Bartley dtbartle@csclub.uwaterloo.ca +David Dyck dcd@tc.fluke.COM +Davide Canova kc.canova@gmail.com +David Eisner cradle@umd.edu +David Flynn dav@chess.plus.com +David Gast dgast@csulb.edu +David Godfrey dave@delta.demon.co.uk +David Luyer david_luyer@pacific.net.au +David Madore david.madore@ens.fr +David Malone dwmalone@cnri.dit.ie +Dawson Engler engler@stanford.edu +Dean Gaudet dean-savannah@arctic.org +Deepak Goel deego@gnufans.org +Denis Excoffier denis.excoffier@airbus.com +Denis McKeon dmckeon@swcp.com +Dennis Clarke dclarke@blastwave.org +Dennis Henriksen opus@flamingo.osrl.dk +Dennis Smit ds@nerds-incorporated.org +Derek Clegg dclegg@next.com +Dick Streefland dick_streefland@tasking.com +Dirk-Jan Faber djfaber@snow.nl +Dirk Lattermann dlatt@t-online.de +Dmitry Rutsky rutsky@school.ioffe.rssi.ru +Dmitry V. Levin ldv@altlinux.org +Donni Erpel donald@appc11.gsi.de +Don Parsons dparsons@synapse.kent.edu +Doug Coleman coleman@iarc1.ece.utexas.edu +Doug McLaren dougmc@comco.com +Dragos Harabor dharabor@us.oracle.com +Duncan Roe duncanr@optimation.com.au +Ed Avis ed@membled.com +Ed Santiago ed@edsantiago.com +Edward Welbourne eddy@opera.com +Edzer Pebesma Edzer.Pebesma@rivm.nl +Egmont Koblinger egmont@uhulinux.hu +Eirik Fuller eirik@hackrat.com +Eivind eivindt@multinet.no +Elbert Pol elbert.pol@gmail.com +Elias Pipping pipping@gentoo.org +Eli Zaretskii eliz@is.elta.co.il +Emile LeBlanc leblanc@math.toronto.edu +Emmanuel Lacour elacour@home-dn.net +Eric Backus ericb@lsid.hp.com +Eric Blake eblake@redhat.com +Eric G. Miller egm2@jps.net +Eric Pemente pemente@northpark.edu +Eric S. Raymond esr@snark.thyrsus.com +Erik Auerswald auerswal@unix-ag.uni-kl.de +Erik Bennett bennett@cvo.oneworld.com +Erik Corry erik@kroete2.freinet.de +Evan Hunt ethanol@armory.com +Felix Lee flee@teleport.com +Felix Rauch Valenti frauch@cse.unsw.edu.au +Ferdinand fw@scenic.mine.nu +Filipus Klutiero chealer@gmail.com +Fletcher Mattox fletcher@cs.utexas.edu +Florent Bayle florent@sarcelle.net +Florian Schlichting fschlich@cis.fu-berlin.de +Florin Iucha fiucha@hsys.mic.ro +Francesco Montorsi fr_m@hotmail.com +François Pinard pinard@iro.umontreal.ca +Frank Adler fadler@allesklar.de +Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU +Frédéric L. W. Meunier 0@pervalidus.net +Frederik Eaton frederik@caltech.edu +Fred Fish fnf@ninemoons.com +Gabor Z. Papp gzp@gzp.org.hu +Gaël Quéri gqueri@mail.dotcom.fr +Galen Hazelwood galenh@micron.net +Gary Anderson ganderson@clark.net +Gary Johnson garyjohn@spk.agilent.com +Gary V. Vaughan gary@gnu.org +Gaute Hvoslef Kvalnes gaute@verdsveven.com +Geoff Collyer geoff at collyer.net +Geoff Kuenning geoff@cs.hmc.edu +Geoff Odhner geoff@franklin.com +Geoff Whale geoffw@cse.unsw.EDU.AU +Gerald Pfeifer gerald@pfeifer.com +Gerhard Poul gpoul@gnu.org +Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp +Gilles Espinasse g.esp@free.fr +Giuseppe Scrivano gscrivano@gnu.org +Glen Lenker glen.lenker@gmail.com +Göran Uddeborg goeran@uddeborg.se +GOTO Masanori gotom@debian.or.jp +G.P. Halkes buscom@ghalkes.nl +Greg Louis glouis@dynamicro.on.ca +Greg McGary gkm@gnu.org +Greg Metcalfe metcalfegreg@qwest.net +Gregory Leblanc gleblanc@cu-portland.edu +Greg Schafer gschafer@zip.com.au +Greg Troxel gdt@bbn.com +Greg Wooledge gawooledge@sherwin.com +Guenter Knauf lists@gknw.net +Guido Leenders guido.leenders@invantive.com +Guntram Blohm Extern.Guntram.Blohm@AUDI.DE +Guochun Shi gshi@ncsa.uiuc.edu +Hans Ginzel hans@matfyz.cz +Hans Lermen lermen@fgan.de +Hans Verkuil hans@wyst.hobby.nl +Harald Dunkel harald.dunkel@t-online.de +Harry Liu rliu@lek.ugcs.caltech.edu +Harti Brandt brandt@fokus.fraunhofer.de +Harvey Eneman Harvey.Eneman@oracle.com +Heikki Orsila heikki.orsila@iki.fi +Heiko Marr h.marr@webmasters.de +Helen Faulkner helen_ml_faulkner@yahoo.co.uk +Herbert Xu herbert@gondor.apana.org.au +H. J. Lu hjl@valinux.com +Holger Berger hberger@ess.nec.de +Hon-Yin Kok hkok@yoda.unl.edu +Hugh Daniel hugh@xanadu.com +Iain Calder ic56@rogers.com +Ian Bruce ian.bruce@myrealbox.com +Ian Jackson ijackson@chiark.greenend.org.uk +Ian Kent ikent@redhat.com +Ian Lance Taylor ian@cygnus.com +Ian Turner vectro@pipeline.com +Iida Yosiaki iida@gnu.org +Ilya N. Golubev gin@mo.msk.ru +Ingo Saitz ingo@debian.org +Ingo Weinhold ingo_weinhold@gmx.de +Ivan Labath labath3@st.fmph.uniba.sk +Ivan Sichmann Freitas ivansichfreitas@gmail.com +Ivo Timmermans ivo@debian.org +Jacky Fong jacky.fong@utoronto.ca +James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk +James Hunt jamesodhunt@hotmail.com +James james@albion.glarp.com +James Lemley James.Lemley@acxiom.com +James Ralston ralston@pobox.com +James R. Van Zandt jrv@debian.org +James Sneeringer jvs@ocslink.com +James Tanis jtt@soscorp.com +James Youngman jay@gnu.org +Jamie Lokier jamie@imbolc.ucc.ie +Jamie McClelland jm@mayfirst.org +Jan Blunck jblunck@suse.de +Jan Engelhardt jengelh@medozas.de +Jan Fedak J.Fedak@sh.cvut.cz +Jan Moringen jan.moringen@uni-bielefeld.de +Jan Nieuwenhuizen janneke@gnu.org +Janos Farkas chexum@shadow.banki.hu +Jan-Pawel Wrozstinski jpwroz@gmail.com +Jari Aalto jari.aalto@cante.net +Jarkko Hietaniemi jhi@epsilon.hut.fi +Jarod Wilson jwilson@redhat.com +Jean Charles Delepine delepine@u-picardie.fr +Jeff Liu jeff.liu@oracle.com +jeff.liu jeff.liu@oracle.com +Jeff Moore jbm@mordor.com +Jeff Sheinberg jeff@bsrd.net +Jens Elkner elkner@imsgroup.de +Jens Schmidt jms@jsds.hamburg.com +Jeph Cowan jeph@ucar.edu +Jeremy Maitin-Shepard jbms@cmu.edu +Jerome Abela abela@hsc.fr +Jérôme Zago bug-coreutils-ml@agt-the-walker.net +Jerry Snitselaar dev@snitselaar.org +Jesse Kornblum kornblum@usna.edu +Jesse Thilo jgt2@eecs.lehigh.edu +Jie Liu jeff.liu@oracle.com +Jie Xu xuj@iag.net +Jim Blandy jimb@cyclic.com +Jim Dennis jimd@starshine.org +Jim Meyering jim@meyering.net +Joachim Schmitz jojo@schmitz-digital.de +Joakim Rosqvist dvljrt@cs.umu.se +Jochen Hein jochen@jochen.org +Joel E. Denny jdenny@clemson.edu +Joe Orton joe@manyfish.co.uk +Joerg Sonnenberger joerg@britannica.bec.de +Joey Degges jdegges@gmail.com +Joey Hess joeyh@debian.org +Johan Boule bohan@bohan.dyndns.org +Johan Danielsson joda@pdc.kth.se +John Bley jbb6@acpub.duke.edu +John David Anglin dave.anglin@nrc.ca +John Gatewood Ham zappaman@alphabox.compsci.buu.ac.th +John Gotts jgotts@umich.edu +John Kendall kendall@capps.com +John Kodis kodis@acm.org +John Murphy jam@philabs.research.philips.com +John Roll john@panic.harvard.edu +John Salmon johns@mullet.anu.edu.au +John Stanley johnstops@verizon.net +John Summerfield summer@OS2.ami.com.au +Jon Peatfield J.S.Peatfield@damtp.cam.ac.uk +Jon Ringuette jonr@scharp.org +Joost van Baal joostvb@xs4all.nl +Jordi Pujol jordipujolp@gmail.com +Jorge Stolfi stolfi@ic.unicamp.br +Joseph S. Myers jsm28@cam.ac.uk +Josh Triplett josh@freedesktop.org +Joshua Hudson joshudson@gmail.com +Josselin Mouette joss@debian.org +J. Scott Edwards qrw.software@gmail.com +Juan F. Codagnone juam@arnet.com.ar +Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de +Julian Bradfield jcb@inf.ed.ac.uk +Jungshik Shin jshin@pantheon.yale.edu +Jürgen Fluk louis@dachau.marco.de +Jurriaan thunder7@xs4all.nl +Justin Pryzby justinpryzby@users.sourceforge.net +jvogel jvogel@linkny.com +Kai Henningsen kai@debian.org +Kai-Uwe Rommel rommel@informatik.tu-muenchen.de +Kalle Olavi Niemitalo kon@iki.fi +Kamal Paul Nigam Kamal_Paul_Nigam@gs35.sp.cs.cmu.edu +Kamil Dudka kdudka@redhat.com +Karel Zak kzak@redhat.com +Karl Berry karl@gnu.org +Karl Eichwalder keichwa@gmx.net +Karl Heuer kwzh@gnu.org +Karl-Michael Schneider schneide@phil.uni-passau.de +Karsten Thygesen karthy@kom.auc.dk +Kaveh R. Ghazi ghazi@caip.rutgers.edu +Keith M. Briggs keith.briggs@bt.com +Keith Owens kaos@audio.apana.org.au +Keith Thompson kst@cts.com +Ken Pizzini kenp@halcyon.com +Kevin Mudrick kmudrick@healthmarketscience.com +Kim Hansen kim@i9.dk +Kirk Kelsey kirk.kelsey@0x4b.net +Kjetil Torgrim Homme kjetilho@ifi.uio.no +Kristin E Thomas kristint@us.ibm.com +Kristoffer Rose kris@diku.dk +??? kytek@cybercomm.net +Ladislav Hagara ladislav.hagara@unob.cz +Larry McVoy lm@sgi.com +Lars Hecking lhecking@nmrc.ucc.ie +Lasse Collin lasse.collin@tukaani.org +Leah Q eequor@earthlink.net +Lehti Rami rammer@cs.tut.fi +Leonard N. Zubkoff lnz@dandelion.com +Leonardo Milano lmilano@udel.edu +Lluís Batlle viriketo@gmail.com +Lorne Baker lbaker@nitro.avint.net +Luke Hassell lukehassell@yahoo.com +Luke Kendall lukekendall@optushome.com.au +Maciej Kwapulinski pikpok@univ.gda.pl +Manas Garg manas@cygsoft.com +Manfred Hollstein manfred@s-direktnet.de +Marc Boucher marc@mbsi.ca +Marc Haber mh+debian-bugs@zugschlus.de +Marc Kleine-Budde mkl@pengutronix.de +Marc Lehman schmorp@schmorp.de +Marco Franzen Marco.Franzen@Thyron.com +Marc Olzheim marcolz@stack.nl +Marcus Brinkmann http://www.marcus-brinkmann.de +Marcus Daniels marcus@ee.pdx.edu +Marek Polacek mpolacek@redhat.com +Mark A. Thomas thommark@access.digex.net +Mark Conty Mark_Conty@cargill.com +Mark D. Roth roth@uiuc.edu +Mark Funkenhauser mfunkenhauser@rogers.com +Mark Harris mark@monitor.designacc.com +Mark Hewitt mhewitt@armature.com +Mark Hounschell markh@compro.net +Mark Hubbart discord@mac.com +Mark Kettenis kettenis@phys.uva.nl +Mark Melahn mmelahn@gmail.com +Mark Nudelman marknu@flash.net +Markus Demleitner msdemlei@auriga.ari.uni-heidelberg.de +Mark W. Eichin eichin@cygnus.com +Martin Buck martin.buck@ascom.ch +Martin Gallant martyg@goodbit.net +Martin Hippe martin.hippe@schlund.de +Martin Jacobs martin.jacobs@arcor.de +Martin martin@dresden.nacamar.de +Martin Michlmayr tbm@cyrius.com +Martin Mitchell martin@debian.org +Martin P.J. Zinser zinser@decus.de +Marty Leisner leisner@sdsp.mc.xerox.com +Masami Takikawa takikawm@CS.ORST.EDU +Matěj Cepl mcepl@redhat.com +Matej Vela mvela@public.srce.hr +Mate Wierdl mw@moni.msci.memphis.edu +Mathias Brodala info@noctus.net +Mathieu Bridon bochecha@fedoraproject.org +Matias A. Fonzo selk@dragora.org +Matt Harden matth@mindspring.com +Matthew Arnison maffew@cat.org.au +Matthew Braun matthew@ans.net +Matthew Clarke Matthew_Clarke@mindlink.bc.ca +Matthew M. Boedicker matthewm@boedicker.org +Matthew S. Levine mslevine@theory.lcs.mit.edu +Matthew Smith matts@bluesguitar.org +Matthew Swift swift@alum.mit.edu +Matthew Woehlke mw_triad@users.sourceforge.net +Matthias Urlichs smurf@noris.de +Matti Aarnio matti.aarnio@zmailer.org +Mattias Wadenstein maswan@acc.umu.se +Matt Kraai kraai@ftbfs.org +Matt Perry matt@primefactor.com +Matt Pham mattvpham@gmail.com +Matt Schalit mschalit@pacbell.net +Matt Swift swift@alum.mit.edu +Max Chang maxchang@ucla.edu +Meelis Roos mroos@tartu.cyber.ee +Micah Cowan micah@cowan.name +Michael Bacarella mbac@netgraft.com +Michael Deutschmann michael@talamasca.ocis.net +Michael Elizabeth Chastain mec.gnu@mindspring.com +Michael Gaughen mgaughen@polyserve.com +Michael Hasselberg mikelh@zonta.ping.de +Michael Hohn hohn@math.utah.edu +Michael J. Croghan mcroghan@usatoday.com +Michael McFarland sidlon@yahoo.com +Michael McLagan mmclagan@invlogic.com +Michael Meskes michael@fam-meskes.de +Michael michael@aplatform.com +Michael ??? michael@roka.net +Michael Piefel piefel@informatik.hu-berlin.de +Michael Speer knomenet@gmail.com +Michael Steffens michael.steffens@s.netic.de +Michael Stone mstone@debian.org +Michael Stutz stutz@dsl.org +Michael van Elst mlelstv@dev.de.cw.net +Michael Veksler mveksler@techunix.technion.ac.il +Michail Litvak mci@owl.openwall.com +Michal Politowski mpol@charybda.icm.edu.pl +Michal Svec msvec@suse.cz +Michel Robitaille robitail@IRO.UMontreal.CA +Michiel Bacchiani bacchian@raven.bu.edu +Mikael Magnusson mikachu@gmail.com +Mike Castle dalgoda@ix.netcom.com +Mike Coleman mkc@mathdogs.com +Mike Frysinger vapier@gentoo.org +Mike Jetzer mjetzer@mke.catalystwms.com +Mikko Tuumanen m@sorvankyla.yok.utu.fi +Mikulas Patocka mikulas@artax.karlin.mff.cuni.cz +Miles Bader miles@gnu.ai.mit.edu +Minh Tran-Le tranle@intellicorp.com +Moritz Orbach ml-coreutils@apfelboymchen.homeunix.net +Morten Welinder terra@diku.dk +M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp +Nadav Har'El nyh@math.technion.ac.il +Neal H Walfield neal@cs.uml.edu +Neil Brown neilb@cse.unsw.edu.au +Nelson H. F. Beebe beebe@math.utah.edu +Nick Estes debian@nickstoys.com +Nick Graham nick.d.graham@gmail.com +Nick Lawes nlawes@silverplatter.com +Nickolai Zeldovich nickolai@cs.stanford.edu +Nicolas François nicolas.francois@centraliens.net +Niklas Edmundsson nikke@acc.umu.se +Nikola Milutinovic Nikola.Milutinovic@ev.co.yu +Nima Nikzad nnikzad@ucla.edu +Nix nix@esperi.org.uk +Noah Friedman friedman@splode.com +Noel Cragg noel@red-bean.com +Norbert Kiesel nkiesel@tbdnetworks.com +Olatunji Oluwabukunmi Ruwase tjruwase@stanford.edu +Olav Morkrid olav@funcom.com +Ole Laursen olau@hardworking.dk +Oliver Kiddle okiddle@yahoo.co.uk +Olivier Fourdan ofourdan@redhat.com +Ondřej Vašík ovasik@redhat.com +Ørn E. Hansen oehansen@daimi.aau.dk +Oskar Liljeblad osk@hem.passagen.se +Otavio Salvador otavio@ossystems.com.br +Pádraig Brady p@draigbrady.com +Paolo Bonzini bonzini@gnu.org +Patrick Mauritz oxygene@studentenbude.ath.cx +Patrick Schoenfeld schoenfeld@debian.org +Patrick W. Plusnick II pwplusnick2@gmail.com +Paul D. Smith psmith@gnu.org +Paul Eggert eggert@cs.ucla.edu +Paul Ghaleb paul.ghaleb@st.com +Paul Jarc prj@po.cwru.edu +Paul Marinescu paul.marinescu@imperial.ac.uk +Paul Nevai nevai@ops.mps.ohio-state.edu +Paul Sauer paul@alexa.com +Paul Slootman paul@debian.org +Paul Townsend aab@purdue.edu +Paul Worrall paul@basilisk.uklinux.net +Pawel Prokop pablo@wizard.ae.krakow.pl +Peng Yu pengyu.ut@gmail.com +Per Cederqvist ceder@lysator.liu.se +Per Kristian Hove perhov@math.ntnu.no +Per Starbäck starback@stp.lingfil.uu.se +Peter Breitenlohner peb@mppmu.mpg.de +Peter Dyballa peter_dyballa@web.de +Peter Eriksson peter@ifm.liu.se +Peter Fales psfales@alcatel-lucent.com +Peter Horst peter@ointment.org +Peter Moulder reiter@netspace.net.au +Peter O'Gorman bug-coreutils@mlists.thewrittenword.com +Peter Samuelson psamuels@sampo.creighton.edu +Peter Seebach seebs@taniemarie.solon.com +Petr Salinger Petr.Salinger@seznam.cz +Petr Uzel petr.uzel@suse.cz +Petter Reinholdtsen pere@hungry.com +Phelippe Neveu pneveu@pcigeomatics.com +Philippe De Muyter phdm@macqel.be +Philippe Schnoebelen Philippe.Schnoebelen@imag.fr +Philip Rowlands phr@doc.ic.ac.uk +Phillip Jones mouse@datastacks.com +Phil Richards phil.richards@vf.vodafone.co.uk +Piergiorgio Sartor sartor@sony.de +Pieter Bowman bowman@math.utah.edu +Piotr Gackiewicz gacek@intertele.pl +Piotr Kwapulinski kwap@univ.gda.pl +Prashant TR tr@eth.net +Priit Jõerüüt jemm4jemm@yahoo.com +Rainer Orth ro@TechFak.Uni-Bielefeld.DE +Ralf Wildenhues Ralf.Wildenhues@gmx.de +Ralf W. Stephan stephan@tmt.de +Ralph Loader loader@maths.ox.ac.uk +Raul Miller moth@magenta.com +Raúl Núñez de Arenas Coronado raul@pleyades.net +Reuben Thomas rrt@sc3d.org +ribalba geerd.dietger.hoffmann@gmail.com +Richard A Downing richard.downing@bcs.org.uk +Richard Braakman dark@xs4all.nl +Richard Dawe rich@phekda.freeserve.co.uk +Richard J. Rauenzahn rrauenza@hairball.cup.hp.com +Richard Neill rn214@hermes.cam.ac.uk +Richard Sharman rsharman@magmacom.com +Rick Sladkey jrs@world.std.com +Rick Stanley rstanley@rsiny.com +Rik Faith faith@cs.unc.edu +Risto Kankkunen kankkune@lingsoft.fi +Robert H. de Vries robert@and.nl +Robert Lindgren robert@orcafat.com +Robert Millan zeratul2@wanadoo.es +Robert Schwebel r.schwebel@pengutronix.de +Robin H. Johnson robbat2@gentoo.org +Rob Wortman wyrm@haell.com +Rodrigo Campos rodrigo@sdfg.com.ar +Rogier Wolff R.E.Wolff@BitWizard.nl +Roland Huebner ro-huebner@gmx.de +Roland Turner raz.tah.bet@raz.cx +Ronald F. Guilmette rfg@netcom.com +Ross Alexander r.alexander@auckland.ac.nz +Ross Paterson rap@doc.ic.ac.uk +Ross Ridge rridge@calum.csclub.uwaterloo.ca +Rudolf Kastl rkastl@redhat.com +Sahil Amoli sahilamoli@gmail.com +Sami Farin sfarin@ratol.fi +Sami Kerola kerolasa@iki.fi +Samuel Tardieu sam@rfc1149.net +Samuel Thibault samuel.thibault@ens-lyon.org +Samuli Karkkainen Samuli.Karkkainen@hut.fi +Sander van Malssen svm@kozmix.ow.nl +Santiago Vila Doncel sanvila@unex.es +Savochkin Andrey Vladimirovich saw@msu.ru +Scott Harrison scott.gnu.2009@scottrix.co.uk +Scott Lurndal slurn@griffin.engr.sgi.com +Sébastien Maret smaret@umich.edu +Sergei Steshenko sergstesh@yahoo.com +Sergey Vlasov vsu@altlinux.org +Shing-Shong Shei shei@cs.indiana.edu +Simon Josefsson simon@josefsson.org +Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de +Solar Designer solar@owl.openwall.com +Stanislav Ievlev inger@altlinux.ru +Stavros Passas stabat@ics.forth.gr +Stefano Lattarini stefano.lattarini@gmail.com +Stefan Vargyas stvar@yahoo.com +Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr +Stéphane Raimbault stephane.raimbault@gmail.com +Stephen Depooter sbdep@myrealbox.com +Stephen Eglen eglen@pcg.wustl.edu +Stephen Gildea gildea@stop.mail-abuse.org +Stephen Smoogen smooge@mindspring.com +Steve McConnel steve@acadcomp.sil.org +Steve McIntyre steve@einval.com +Steven Drake sbd@users.sourceforge.net +Steven G. Johnson stevenj@alum.mit.edu +Steven Mocking ufo@quicknet.nl +Steven Parkes smparkes@smparkes.net +Steven P Watson steven@magelico.net +Steven Schubiger schubiger@gmail.com +Steven Schveighoffer schveiguy@yahoo.com +Steve Ward planet36@gmail.com +Stuart Citrin ctrn3e8@gmail.com +Stuart Kemp skemp@peter.bmc.com +Stuart Shelton stuart@shelton.me +Sven Joachim svenjoac@gmx.de +Szakacsits Szabolcs szaka@sienet.hu +Tadayoshi Funaba tadf@kt.rim.or.jp +TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp +Theodore Ts'o tytso@rsts-11.mit.edu +Theodoros V. Kalamatianos thkala@softlab.ece.ntua.gr +The Wanderer inverseparadox@comcast.net +Thiago Farina tfransosi@gmail.com +Thien-Thi Nguyen ttn@gnuvola.org +Thomas Bushnell thomas@gnu.ai.mit.edu +Thomas Goerlich thomas@schnappmatik.de +Thomas Hood jdthood@yahoo.co.uk +Thomas Luzat thomas@luzat.com +Thomas M.Ott thmo-13@gmx.de +Thomas Quinot thomas@Cuivre.FR.EU.ORG +Thomas Schwinge tschwinge@gnu.org +Thomas Wolff mined@towo.net +Tim J. Robbins tjr@FreeBSD.org +Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu +Tim Ryan Tim_Ryan@bnz.co.nz +Tim Smithers mouse@dmouse.com.au +Tim Underwood timunderwood@gmail.com +Tim Waugh twaugh@redhat +Tobias Quathamer toddy@debian.org +Tobias Stoeckmann tobias@bugol.de +Toby Peterson toby@opendarwin.org +Todd A. Jacobs tjacobs@codegnome.org +Tomas Pospisek tpo@sourcepole.ch +Tomas Smetana t.smetana@gmail.com +Tom Fitzhenry tom@tom-fitzhenry.me.uk +Tom Haynes thomas@netapp.com +Tommi Kyntola tkyntola@cc.hut.fi +Tom Quinn trq@dionysos.thphys.ox.ac.uk +Ton Hospel thospel@mail.dma.be +Ton Nijkes ton@murphy.nl +Tony Kocurko akocurko@mun.ca +Tony Leneis tony@plaza.ds.adp.com +Tony Robinson ajr@eng.cam.ac.uk +Toralf Förster toralf.foerster@gmx.de +Torbjorn Granlund tege@nada.kth.se +Torbjorn Lindgren tl@funcom.no +Torsten Landschoff torsten@pclab.ifg.uni-kiel.de +Tristan Miller psychonaut@nothingisreal.com +Tzvi Rotshtein tzvi.ro@gmail.com +Ulrich Drepper drepper@gnu.org +Ulrich Hermisson ulrich_hermisson@hotmail.com +Urs Thuermann urs@isnogud.escape.de +Uwe H. Steinfeld usteinfeld@gmx.net +Vesselin Atanasov vesselin@bgnet.bg +Ville Skyttä ville.skytta@iki.fi +Vincent Lefevre vincent@vinc17.org +Vineet Chadha chadha@acis.ufl.edu +Vin Shelton acs@alumni.princeton.edu +Vitali Lovich vlovich@gmail.com +Vitaly A. Ostanin vyt@altlinux.org +Vito Caputo vcaputo@pengaru.com +Vlada Macek tuttle@bbs.fsik.cvut.cz +Volker Borchert bt@teknon.de +Volker Paul vpaul@dohle.com +Wartan Hachaturow wart@tepkom.ru +Wayne Stewart wstewa@atl.com +Wenjun Zheng zwj@yahoo.com +Werner Almesberger Werner.Almesberger@epfl.ch +Wichert Akkerman wichert@cistron.nl +Will Edgington wedgingt@acm.org +William Bader william@nscs.fast.net +William Dowling will@franklin.com +William Lewis wiml@omnigroup.com +wiregauze wiregauze@yahoo.com +Wis Macomson wis.macomson@intel.com +Wojciech Purczynski cliph@isec.pl +Wolfram Kleff kleff@cs.uni-bonn.de +Won-kyu Park wkpark@chem.skku.ac.kr +Yang Ren ryang@redhat.com +Yanko Kaneti yaneti@declera.com +Yann Dirson dirson@debian.org +Yutaka Amanai yasai-itame1942@jade.plala.or.jp +Zvi Har'El rl@math.technion.ac.il +Марк Коренберг socketpair@gmail.com + +;; Local Variables: +;; coding: utf-8 +;; End: diff --git a/bootstrap.conf b/bootstrap.conf index 820cb54..cd7b02d 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -295,15 +295,12 @@ automake 1.11.1 autopoint - bison - gettext 0.17 -git 1.4.4 gperf - gzip - makeinfo 4.13 patch - perl 5.5 -rsync - tar - -xz - " # Automake requires that ChangeLog exist. diff --git a/configure.ac b/configure.ac index 8241b55..4674729 100644 --- a/configure.ac +++ b/configure.ac @@ -362,6 +362,8 @@ AC_CHECK_DECLS([strsignal, sys_siglist, _sys_siglist, __sys_siglist], , , [AC_INCLUDES_DEFAULT #include ]) +gt_PREREQ_HOSTNAME + cu_LIB_CHECK cu_GMP diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 7b37f60..5f5b684 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -11488,15 +11488,17 @@ In most modern shells, @command{false} is a built-in command, so when you use @samp{false} in a script, you're probably using the built-in command, not the one documented here. -@command{false} honors the @option{--help} and @option{--version} options. +@command{false} ignores all options. -This version of @command{false} is implemented as a C program, and is thus -more secure and faster than a shell script implementation, and may safely -be used as a dummy shell for the purpose of disabling accounts. +@strong{Please note} that this system uses a non-GNU version of +@command{false}, not the version supplied with GNU coreutils. +The GNU version of @command{false} is a C program that actually honors +some options. -Note that @command{false} (unlike all other programs documented herein) -exits unsuccessfully, even when invoked with -@option{--help} or @option{--version}. +This version of @command{false} is implemented as a tiny C program that +does not use the dynamic linker or any libraries. It is thus more secure +and faster than a shell script implementation, and may safely +be used as a dummy shell for the purpose of disabling accounts. Portable programs should not assume that the exit status of @command{false} is 1, as it is greater than 1 on some @@ -11520,23 +11522,17 @@ In most modern shells, @command{true} is a built-in command, so when you use @samp{true} in a script, you're probably using the built-in command, not the one documented here. -@command{true} honors the @option{--help} and @option{--version} options. - -Note, however, that it is possible to cause @command{true} -to exit with nonzero status: with the @option{--help} or @option{--version} -option, and with standard -output already closed or redirected to a file that evokes an I/O error. -For example, using a Bourne-compatible shell: +@command{true} ignores all options. -@example -$ ./true --version >&- -./true: write error: Bad file number -$ ./true --version > /dev/full -./true: write error: No space left on device -@end example +@strong{Please note} that this system uses a non-GNU version of +@command{true}, not the version supplied with GNU coreutils. +The GNU version of @command{true} is a C program that actually honors +some options (and may even be caused to exit with nonzero status on +some subtle error conditions). -This version of @command{true} is implemented as a C program, and is thus -more secure and faster than a shell script implementation, and may safely +This version of @command{true} is implemented as a tiny C program that +does not use the dynamic linker or any libraries. It is thus more secure +and faster than a shell script implementation, and may safely be used as a dummy shell for the purpose of disabling accounts. @node test invocation @@ -13610,8 +13606,8 @@ database to be consulted afresh, and so will give a different result. @flindex utmp @command{logname} prints the calling user's name, as found in a -system-maintained file (often @file{/var/run/utmp} or -@file{/etc/utmp}), and exits with a status of 0. If there is no entry +system-maintained file (often @file{/var/run/utmp}), +and exits with a status of 0. If there is no entry for the calling process, @command{logname} prints an error message and exits with a status of 1. @@ -13686,9 +13682,9 @@ users [@var{file}] @flindex utmp @flindex wtmp With no @var{file} argument, @command{users} extracts its information from -a system-maintained file (often @file{/var/run/utmp} or -@file{/etc/utmp}). If a file argument is given, @command{users} uses -that file instead. A common choice is @file{/var/log/wtmp}. +a system-maintained file (often @file{/var/run/utmp}). +If a file argument is given, @command{users} uses +that file instead. A common choice is @file{/var/run/utmp}. The only options are @option{--help} and @option{--version}. @xref{Common options}. @@ -13720,8 +13716,8 @@ line, login time, and remote hostname or X display. @flindex utmp @flindex wtmp If given one non-option argument, @command{who} uses that instead of -a default system-maintained file (often @file{/var/run/utmp} or -@file{/etc/utmp}) as the name of the file containing the record of +a default system-maintained file (often @file{/var/run/utmp}) +as the name of the file containing the record of users logged on. @file{/var/log/wtmp} is commonly given as an argument to @command{who} to look at who has previously logged on. diff --git a/m4/hostname.m4 b/m4/hostname.m4 new file mode 100644 index 0000000..a1ef1f9 --- /dev/null +++ b/m4/hostname.m4 @@ -0,0 +1,26 @@ +# hostname.m4 serial 1 (gettext-0.11) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Prerequisites of the hostname.c program. +AC_DEFUN([gt_PREREQ_HOSTNAME], +[ + AC_CHECK_HEADERS(arpa/inet.h) + AC_CHECK_FUNCS(gethostname gethostbyname getdomainname setdomainname inet_ntop) + + AC_MSG_CHECKING([for IPv6 sockets]) + AC_CACHE_VAL(gt_cv_socket_ipv6,[ + AC_TRY_COMPILE([ +#include +#include +#include ], +[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;], + gt_cv_socket_ipv6=yes, gt_cv_socket_ipv6=no) + ]) + AC_MSG_RESULT($gt_cv_socket_ipv6) + if test $gt_cv_socket_ipv6 = yes; then + AC_DEFINE(HAVE_IPV6, 1, [Define if defines AF_INET6.]) + fi +]) diff --git a/man/Makefile.am b/man/Makefile.am index cb4408c..8010a82 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -75,6 +75,7 @@ md5sum.1: $(common_dep) $(srcdir)/md5sum.x ../src/md5sum.c mkdir.1: $(common_dep) $(srcdir)/mkdir.x ../src/mkdir.c mkfifo.1: $(common_dep) $(srcdir)/mkfifo.x ../src/mkfifo.c mknod.1: $(common_dep) $(srcdir)/mknod.x ../src/mknod.c +mksock.1: $(common_dep) $(srcdir)/mksock.x ../src/mksock.c mktemp.1: $(common_dep) $(srcdir)/mktemp.x ../src/mktemp.c mv.1: $(common_dep) $(srcdir)/mv.x ../src/mv.c nice.1: $(common_dep) $(srcdir)/nice.x ../src/nice.c diff --git a/man/mksock.x b/man/mksock.x new file mode 100644 index 0000000..1857073 --- /dev/null +++ b/man/mksock.x @@ -0,0 +1,4 @@ +[NAME] +mksock \- Create unix domain sockets +[DESCRIPTION] +.\" Add any additional description here diff --git a/src/Makefile.am b/src/Makefile.am index b0b7eb5..7fe02d4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,6 +83,7 @@ EXTRA_PROGRAMS = \ mkdir \ mkfifo \ mknod \ + mksock \ mktemp \ mv \ nl \ @@ -306,6 +307,9 @@ remove_LDADD = mv_LDADD += $(remove_LDADD) rm_LDADD += $(remove_LDADD) +# for tgetent +ls_LDADD += -ltinfo + # for eaccess, euidaccess copy_LDADD += $(LIB_EACCESS) remove_LDADD += $(LIB_EACCESS) diff --git a/src/chroot.c b/src/chroot.c index 8bd39fc..c762a05 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -268,6 +268,10 @@ main (int argc, char **argv) if (fail) exit (EXIT_CANCELED); + /* These variables are useless inside chroot. ALT#16024 */ + unsetenv("TMP"); + unsetenv("TMPDIR"); + /* Execute the given command. */ execvp (argv[0], argv); diff --git a/src/date.c b/src/date.c index 755736a..588f42c 100644 --- a/src/date.c +++ b/src/date.c @@ -461,14 +461,7 @@ main (int argc, char **argv) format = DATE_FMT_LANGINFO (); if (! *format) { - /* Do not wrap the following literal format string with _(...). - For example, suppose LC_ALL is unset, LC_TIME=POSIX, - and LANG="ko_KR". In that case, POSIX says that LC_TIME - determines the format and contents of date and time strings - written by date, which means "date" must generate output - using the POSIX locale; but adding _() would cause "date" - to use a Korean translation of the format. */ - format = "%a %b %e %H:%M:%S %Z %Y"; + format = dcgettext(NULL, N_("%a %b %e %H:%M:%S %Z %Y"), LC_TIME); } } diff --git a/src/dircolors.hin b/src/dircolors.hin index bab7c9b..a3c1ad1 100644 --- a/src/dircolors.hin +++ b/src/dircolors.hin @@ -6,7 +6,12 @@ # are permitted provided the copyright notice and this notice are preserved. # The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the -# slackware version of dircolors) are recognized but ignored. +# slackware version of dircolors) are recognized but ignored by GNU dircolors. + +# This file goes in the /etc directory, and must be world readable. +# You can copy this file to .dircolors in your $HOME directory to override +# the system defaults. This is also may be handled directly by the +# /etc/profile.d/color_ls.sh and /etc/profile.d/color_ls.csh scripts. # Below, there should be one TERM entry for each termtype that is colorizable TERM Eterm @@ -104,14 +109,16 @@ EXEC 01;32 #.bat 01;32 # Or if you want to colorize scripts even if they do not have the # executable bit actually set. -#.sh 01;32 -#.csh 01;32 +.sh 01;32 +.csh 01;32 # archives or compressed (bright red) .tar 01;31 .tgz 01;31 +.arc 01;31 .arj 01;31 .taz 01;31 +.lha 01;31 .lzh 01;31 .lzma 01;31 .tlz 01;31 diff --git a/src/hostname.c b/src/hostname.c index 0e01bb1..b61b58d 100644 --- a/src/hostname.c +++ b/src/hostname.c @@ -24,7 +24,9 @@ #include "system.h" #include "long-options.h" #include "error.h" +#include "errno.h" #include "quote.h" +#include "xalloc.h" #include "xgethostname.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -32,6 +34,148 @@ #define AUTHORS proper_name ("Jim Meyering") +/* Support for using gethostbyname(). */ +#if HAVE_GETHOSTBYNAME +# include +# include /* defines AF_INET, AF_INET6 */ +# include /* declares ntohs(), defines struct sockaddr_in */ +# if HAVE_ARPA_INET_H +# include /* declares inet_ntoa(), inet_ntop() */ +# endif +# if HAVE_IPV6 +# if !defined(__CYGWIN__) /* Cygwin has only s6_addr, no s6_addr16 */ +# if defined(__APPLE__) && defined(__MACH__) /* MacOS X */ +# define in6_u __u6_addr +# define u6_addr16 __u6_addr16 +# endif + /* Use s6_addr16 for portability. See RFC 2553. */ +# ifndef s6_addr16 +# define s6_addr16 in6_u.u6_addr16 +# endif +# define HAVE_IN6_S6_ADDR16 1 +# endif +# endif +# include /* defines struct hostent, declares gethostbyname() */ +#endif + +/* Converts an AF_INET address to a printable, presentable format. + BUFFER is an array with at least 15+1 bytes. ADDR is 'struct in_addr'. */ +#if HAVE_INET_NTOP +# define ipv4_ntop(buffer,addr) \ + inet_ntop (AF_INET, &addr, buffer, 15+1) +#else +# define ipv4_ntop(buffer,addr) \ + strcpy (buffer, inet_ntoa (addr)) +#endif + +#if HAVE_IPV6 +/* Converts an AF_INET6 address to a printable, presentable format. + BUFFER is an array with at least 45+1 bytes. ADDR is 'struct in6_addr'. */ +# if HAVE_INET_NTOP +# define ipv6_ntop(buffer,addr) \ + inet_ntop (AF_INET6, &addr, buffer, 45+1) +# elif HAVE_IN6_S6_ADDR16 +# define ipv6_ntop(buffer,addr) \ + sprintf (buffer, "%x:%x:%x:%x:%x:%x:%x:%x", \ + ntohs ((addr).s6_addr16[0]), \ + ntohs ((addr).s6_addr16[1]), \ + ntohs ((addr).s6_addr16[2]), \ + ntohs ((addr).s6_addr16[3]), \ + ntohs ((addr).s6_addr16[4]), \ + ntohs ((addr).s6_addr16[5]), \ + ntohs ((addr).s6_addr16[6]), \ + ntohs ((addr).s6_addr16[7])) +# else +# define ipv6_ntop(buffer,addr) \ + sprintf (buffer, "%x:%x:%x:%x:%x:%x:%x:%x", \ + ((addr).s6_addr[0] << 8) | (addr).s6_addr[1], \ + ((addr).s6_addr[2] << 8) | (addr).s6_addr[3], \ + ((addr).s6_addr[4] << 8) | (addr).s6_addr[5], \ + ((addr).s6_addr[6] << 8) | (addr).s6_addr[7], \ + ((addr).s6_addr[8] << 8) | (addr).s6_addr[9], \ + ((addr).s6_addr[10] << 8) | (addr).s6_addr[11], \ + ((addr).s6_addr[12] << 8) | (addr).s6_addr[13], \ + ((addr).s6_addr[14] << 8) | (addr).s6_addr[15]) +# endif +#endif + +/* Output format types. */ +typedef enum +{ default_format, short_format, domain_format, long_format, ip_format } +output_format_t; + +/* Query name types. */ +typedef enum +{ host_query, dns_query, nis_query } +query_name_t; + +/* Long options. */ +static const struct option long_options[] = { + {"fqdn", no_argument, NULL, 'f'}, + {"long", no_argument, NULL, 'f'}, + {"ip-address", no_argument, NULL, 'i'}, + {"short", no_argument, NULL, 's'}, + + {"dns", no_argument, NULL, 'd'}, + {"domain", no_argument, NULL, 'd'}, + + {"nis", no_argument, NULL, 'y'}, + {"yp", no_argument, NULL, 'y'}, + + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +}; + +#ifndef INITIAL_DOMAINNAME_LENGTH +# define INITIAL_DOMAINNAME_LENGTH 34 +#endif + +/* Return the current domainname in malloc'd storage. + If malloc fails, exit. + Upon any other failure, return NULL and set errno. */ +char * +xgetdomainname (void) +{ + char *domainname = NULL; + size_t size = INITIAL_DOMAINNAME_LENGTH; + + while (1) + { + /* Use SIZE_1 here rather than SIZE to work around the bug in + SunOS 5.5's getdomainname whereby it NUL-terminates DOMAINNAME + even when the name is as long as the supplied buffer. */ + size_t size_1; + + domainname = x2realloc (domainname, &size); + size_1 = size - 1; + domainname[size_1 - 1] = '\0'; + errno = 0; + +#ifdef HAVE_GETDOMAINNAME + if (getdomainname (domainname, size_1) == 0) + { + if (!domainname[size_1 - 1]) + break; + } + else +#else + errno = ENOSYS; +#endif + if (errno != 0 && errno != ENAMETOOLONG && errno != EINVAL + /* OSX/Darwin does this when the buffer is not large enough */ + && errno != ENOMEM) + { + int saved_errno = errno; + free (domainname); + errno = saved_errno; + return NULL; + } + } + + return domainname; +} + #if !defined HAVE_SETHOSTNAME && defined HAVE_SYSINFO && \ defined HAVE_SYS_SYSTEMINFO_H # include @@ -43,7 +187,7 @@ sethostname (char *name, size_t namelen) return (sysinfo (SI_SET_HOSTNAME, name, namelen) < 0 ? -1 : 0); } -# define HAVE_SETHOSTNAME 1 /* Now we have it... */ +# define HAVE_SETHOSTNAME 1 /* Now we have it... */ #endif void @@ -57,10 +201,19 @@ usage (int status) printf (_("\ Usage: %s [NAME]\n\ or: %s OPTION\n\ -Print or set the hostname of the current system.\n\ +Print or set the hostname or domainname of the current system.\n\ +\n\ +Output format:\n\ + -s, --short short host name\n\ + -f, --fqdn, --long long host name, includes fully qualified\n\ + domain name, and aliases\n\ + -i, --ip-address addresses for the hostname\n\ + -d, --dns, --domain DNS domain name\n\ + -y, --yp, --nis NIS/YP domain name\n\ +\n\ +Informative output:\n\ \n\ -"), - program_name, program_name); +"), program_name, program_name); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); emit_ancillary_info (); @@ -68,10 +221,15 @@ Print or set the hostname of the current system.\n\ exit (status); } +static void print_name (query_name_t, output_format_t); +static void set_name (query_name_t, const char *); + int main (int argc, char **argv) { - char *hostname; + int optc; + output_format_t format = default_format; + query_name_t query = host_query; initialize_main (&argc, &argv); set_program_name (argv[0]); @@ -81,37 +239,240 @@ main (int argc, char **argv) atexit (close_stdout); + if (STREQ (program_name, "dnsdomainname")) + query = dns_query; + + if (STREQ (program_name, "domainname") + || STREQ (program_name, "nisdomainname") + || STREQ (program_name, "ypdomainname")) + query = nis_query; + parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version, usage, AUTHORS, (char const *) NULL); - if (getopt_long (argc, argv, "", NULL, NULL) != -1) - usage (EXIT_FAILURE); + + /* Parse command line options. */ + while ((optc = + getopt_long (argc, argv, "dfisyhV", long_options, NULL)) != EOF) + switch (optc) + { + case 'f': + if (query != host_query || format != default_format) + { + error (0, 0, _("incompatible options")); + usage (EXIT_FAILURE); + } + format = long_format; + break; + case 's': + if (query != host_query || format != default_format) + { + error (0, 0, _("incompatible options")); + usage (EXIT_FAILURE); + } + format = short_format; + break; + case 'i': + if (query != host_query || format != default_format) + { + error (0, 0, _("incompatible options")); + usage (EXIT_FAILURE); + } + format = ip_format; + break; + + case 'd': + if (query == nis_query || format != default_format) + { + error (0, 0, _("incompatible options")); + usage (EXIT_FAILURE); + } + query = dns_query; + break; + + case 'y': + if (query == dns_query || format != default_format) + { + error (0, 0, _("incompatible options")); + usage (EXIT_FAILURE); + } + query = nis_query; + break; + + case 'h': + case_GETOPT_HELP_CHAR; + case 'V': + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: + usage (EXIT_FAILURE); + /* NOTREACHED */ + } if (argc == optind + 1) + set_name (query, argv[optind]); + + else if (argc <= optind) + print_name (query, format); + + else { -#ifdef HAVE_SETHOSTNAME - /* Set hostname to operand. */ - char const *name = argv[optind]; - if (sethostname (name, strlen (name)) != 0) - error (EXIT_FAILURE, errno, _("cannot set name to %s"), quote (name)); -#else - error (EXIT_FAILURE, 0, - _("cannot set hostname; this system lacks the functionality")); -#endif + error (0, 0, _("extra operand %s"), quote (argv[optind + 1])); + usage (EXIT_FAILURE); } - if (argc <= optind) + exit (EXIT_SUCCESS); +} + +static void +print_hostname (output_format_t format) +{ + char *hostname; + char *dot; +#if HAVE_GETHOSTBYNAME + struct hostent *h; + size_t i; +#endif + + hostname = xgethostname (); + if (hostname == NULL) + error (EXIT_FAILURE, errno, _("cannot determine hostname")); + + switch (format) { - hostname = xgethostname (); - if (hostname == NULL) - error (EXIT_FAILURE, errno, _("cannot determine hostname")); + case default_format: + /* Print the hostname, as returned by the system call. */ printf ("%s\n", hostname); + break; + + case short_format: + /* Print only the part before the first dot. */ + dot = strchr (hostname, '.'); + if (dot != NULL) + *dot = '\0'; + printf ("%s\n", hostname); + break; + + case domain_format: + /* Print only the part after the first dot. */ + dot = strchr (hostname, '.'); + if (dot != NULL) + hostname = dot + 1; + printf ("%s\n", hostname); + break; + + case long_format: + /* Look for netwide usable hostname using gethostbyname(). */ +#if HAVE_GETHOSTBYNAME + h = gethostbyname (hostname); + if (h != NULL) + printf ("%s\n", h->h_name); + else +#endif + printf ("%s\n", hostname); + break; + + case ip_format: + /* Look for netwide usable IP addresses using gethostbyname(). */ +#if HAVE_GETHOSTBYNAME + h = gethostbyname (hostname); + if (h != NULL && h->h_addr_list != NULL) + { + bool found = false; + for (i = 0; h->h_addr_list[i] != NULL; ++i) + { +#if HAVE_IPV6 + if (h->h_addrtype == AF_INET6) + { + char buffer[45 + 1]; + ipv6_ntop (buffer, + *(const struct in6_addr *) h->h_addr_list[i]); + printf ("%s%s", (found ? " " : ""), buffer); + found = true; + } + else +#endif + if (h->h_addrtype == AF_INET) + { + char buffer[15 + 1]; + ipv4_ntop (buffer, + *(const struct in_addr *) h->h_addr_list[i]); + printf ("%s%s", (found ? " " : ""), buffer); + found = true; + } + } + if (found) + putchar ('\n'); + } +#endif + break; + } +} + +static void +print_nisname (void) +{ + char *domainname; + + domainname = xgetdomainname (); + if (domainname == NULL) + error (EXIT_FAILURE, errno, _("cannot determine domainname")); + + printf ("%s\n", domainname); +} + +static void +print_name (query_name_t query, output_format_t format) +{ + switch (query) + { + case host_query: + print_hostname (format); + return; + case dns_query: + print_hostname (domain_format); + return; + case nis_query: + print_nisname (); + return; } +} - if (optind + 1 < argc) +static const char * +name_of_query (query_name_t query) +{ + switch (query) { - error (0, 0, _("extra operand %s"), quote (argv[optind + 1])); - usage (EXIT_FAILURE); + case host_query: + return "host"; + case dns_query: + return "DNS domain"; + case nis_query: + return "NIS domain"; + default: + return ""; } +} - exit (EXIT_SUCCESS); +static void +set_name (query_name_t query, const char *name) +{ + switch (query) + { +#ifdef HAVE_SETHOSTNAME + case host_query: + if (sethostname (name, strlen (name)) != 0) + error (EXIT_FAILURE, errno, _("cannot set %s name to %s"), + name_of_query (query), quote (name)); + break; +#endif +#ifdef HAVE_SETDOMAINNAME + case nis_query: + if (setdomainname (name, strlen (name)) != 0) + error (EXIT_FAILURE, errno, _("cannot set %s name to %s"), + name_of_query (query), quote (name)); + break; +#endif + default: + error (EXIT_FAILURE, ENOSYS, + _("cannot set %s name"), name_of_query (query)); + } } diff --git a/src/ls.c b/src/ls.c index 1b0c250..c5200fe 100644 --- a/src/ls.c +++ b/src/ls.c @@ -84,6 +84,7 @@ #include "system.h" #include +#include #include "acl.h" #include "argmatch.h" @@ -1898,7 +1899,10 @@ decode_switches (int argc, char **argv) print_with_color = (i == color_always || (i == color_if_tty - && isatty (STDOUT_FILENO))); + && isatty (STDOUT_FILENO) + && getenv("TERM") + && tgetent(NULL, getenv("TERM")) > 0 + && tgetstr("md", NULL) > 0)); if (print_with_color) { diff --git a/src/mksock.c b/src/mksock.c new file mode 100644 index 0000000..40fe678 --- /dev/null +++ b/src/mksock.c @@ -0,0 +1,162 @@ +/* mksock -- create unix domain sockets. + Copyright (C) 90, 91, 1995-2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 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 . */ + +/* Written by Dmitry V. Levin + based on mknod.c by David MacKenzie et al. */ + +#include +#include +#include +#include +#include +#include + +#include "system.h" +#include "error.h" +#include "modechange.h" +#include "quote.h" + +/* The official name of this program (e.g., no `g' prefix). */ +#define PROGRAM_NAME "mksock" + +#define AUTHORS "Dmitry V. Levin" + +static struct option const longopts[] = +{ + {"mode", required_argument, NULL, 'm'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +}; + +void +usage (int status) +{ + if (status != EXIT_SUCCESS) + fprintf (stderr, _("Try `%s --help' for more information.\n"), + program_name); + else + { + printf (_("Usage: %s [OPTION] NAME...\n"), program_name); + fputs (_("\ +Create unix domain sockets with the given NAMEs.\n\ +\n\ + -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask\n\ +"), stdout); + fputs (HELP_OPTION_DESCRIPTION, stdout); + fputs (VERSION_OPTION_DESCRIPTION, stdout); + emit_ancillary_info (); + } + exit (status); +} + +int +main (int argc, char **argv) +{ + mode_t newmode; + const char *specified_mode = 0; + int errors = EXIT_SUCCESS; + int optc; + + initialize_main (&argc, &argv); + set_program_name (argv[0]); + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + atexit (close_stdout); + + while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1) + { + switch (optc) + { + case 0: + break; + case 'm': + specified_mode = optarg; + break; + case_GETOPT_HELP_CHAR; + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + default: + usage (EXIT_FAILURE); + } + } + + if (optind == argc) + { + error (EXIT_SUCCESS, 0, _("too few arguments")); + usage (EXIT_FAILURE); + } + + newmode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); + if (specified_mode) + { + struct mode_change *change = mode_compile (specified_mode); + if (!change) + error (EXIT_FAILURE, 0, _("invalid mode")); + newmode = mode_adjust (newmode, false, umask (0), change, NULL); + free (change); + if (newmode & ~S_IRWXUGO) + error (EXIT_FAILURE, 0, + _("mode must specify only file permission bits")); + } + + for (; optind < argc; ++optind) + { + struct sockaddr_un sun; + int fd; + + if (strlen (argv[optind]) >= sizeof (sun)) + { + error (EXIT_SUCCESS, EINVAL, _("cannot bind socket `%s'"), + quote (argv[optind])); + errors = EXIT_FAILURE; + continue; + } + + memset (&sun, 0, sizeof (sun)); + sun.sun_family = AF_UNIX; + strcpy (sun.sun_path, argv[optind]); + + fd = socket (PF_UNIX, SOCK_STREAM, 0); + if (fd < 0) + { + error (EXIT_SUCCESS, errno, _("cannot create socket `%s'"), + quote (argv[optind])); + errors = EXIT_FAILURE; + continue; + } + + if (specified_mode && fchmod (fd, newmode)) + { + error (EXIT_SUCCESS, errno, _("cannot set permissions of socket `%s'"), + quote (argv[optind])); + close (fd); + errors = EXIT_FAILURE; + continue; + } + + if (bind (fd, (struct sockaddr *) &sun, sizeof (sun))) + { + error (EXIT_SUCCESS, errno, _("cannot bind socket `%s'"), + quote (argv[optind])); + errors = EXIT_FAILURE; + } + close (fd); + } + + return errors; +} diff --git a/tests/misc/help-version b/tests/misc/help-version index 0482209..4c29acc 100755 --- a/tests/misc/help-version +++ b/tests/misc/help-version @@ -138,6 +138,7 @@ chgrp_setup () { args=--version; } chown_setup () { args=--version; } mkfifo_setup () { args=--version; } mknod_setup () { args=--version; } +mksock_setup () { args=--version; } # Punt on uptime, since it fails (e.g., failing to get boot time) # on some systems, and we shouldn't let that stop `make check'. uptime_setup () { args=--version; }