sudo-1.6.8p12-001-ubuntu6.patch 117 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994
  1. --- sudo-1.6.8p12.orig/sudoers.man.in
  2. +++ sudo-1.6.8p12/sudoers.man.in
  3. @@ -759,7 +759,7 @@
  4. .IP "exempt_group" 12
  5. .IX Item "exempt_group"
  6. Users in this group are exempt from password and \s-1PATH\s0 requirements.
  7. -This is not set by default.
  8. +On Debian systems, this is set to the group 'sudo' by default.
  9. .IP "verifypw" 12
  10. .IX Item "verifypw"
  11. This option controls when a password will be required when a user runs
  12. --- sudo-1.6.8p12.orig/sudo.man.in
  13. +++ sudo-1.6.8p12/sudo.man.in
  14. @@ -185,8 +185,7 @@
  15. \&\fBsudo\fR determines who is an authorized user by consulting the file
  16. \&\fI@sysconfdir@/sudoers\fR. By giving \fBsudo\fR the \fB\-v\fR flag a user
  17. can update the time stamp without running a \fIcommand.\fR The password
  18. -prompt itself will also time out if the user's password is not
  19. -entered within \f(CW\*(C`@password_timeout@\*(C'\fR minutes (unless overridden via
  20. +prompt itself will not time out in Debian's version (unless overridden via
  21. \&\fIsudoers\fR).
  22. .PP
  23. If a user who is not listed in the \fIsudoers\fR file tries to run a
  24. --- sudo-1.6.8p12.orig/parse.yacc
  25. +++ sudo-1.6.8p12/parse.yacc
  26. @@ -120,6 +120,7 @@
  27. } \
  28. match[top].user = UNSPEC; \
  29. match[top].cmnd = UNSPEC; \
  30. + match[top].cmndall= UNSPEC; \
  31. match[top].host = UNSPEC; \
  32. match[top].runas = UNSPEC; \
  33. match[top].nopass = def_authenticate ? UNSPEC : TRUE; \
  34. @@ -135,6 +136,7 @@
  35. } \
  36. match[top].user = match[top-1].user; \
  37. match[top].cmnd = match[top-1].cmnd; \
  38. + match[top].cmndall= match[top-1].cmndall; \
  39. match[top].host = match[top-1].host; \
  40. match[top].runas = match[top-1].runas; \
  41. match[top].nopass = match[top-1].nopass; \
  42. @@ -675,6 +677,7 @@
  43. }
  44. }
  45. + SETMATCH(cmnd_all, TRUE);
  46. $$ = TRUE;
  47. }
  48. | ALIAS {
  49. @@ -705,6 +708,7 @@
  50. $$ = NOMATCH;
  51. }
  52. free($1);
  53. + SETMATCH(cmnd_all, FALSE);
  54. }
  55. | COMMAND {
  56. if (printmatches == TRUE) {
  57. @@ -730,6 +734,7 @@
  58. free($1.cmnd);
  59. if ($1.args)
  60. free($1.args);
  61. + SETMATCH(cmnd_all, FALSE);
  62. }
  63. ;
  64. --- sudo-1.6.8p12.orig/env.c
  65. +++ sudo-1.6.8p12/env.c
  66. @@ -77,7 +77,7 @@
  67. /*
  68. * Prototypes
  69. */
  70. -char **rebuild_env __P((char **, int, int));
  71. +char **rebuild_env __P((char **, int, int, int));
  72. char **zero_env __P((char **));
  73. static void insert_env __P((char *, int));
  74. static char *format_env __P((char *, ...));
  75. @@ -89,6 +89,8 @@
  76. static const char *initial_badenv_table[] = {
  77. "IFS",
  78. "CDPATH",
  79. + "SHELLOPTS",
  80. + "PS4",
  81. "LOCALDOMAIN",
  82. "RES_OPTIONS",
  83. "HOSTALIASES",
  84. @@ -140,6 +142,12 @@
  85. "LC_*",
  86. "LANG",
  87. "LANGUAGE",
  88. + "TERM",
  89. + "HOME",
  90. + "LOGNAME",
  91. + "DISPLAY",
  92. + "XAUTHORITY",
  93. + "XAUTHORIZATION",
  94. NULL
  95. };
  96. @@ -321,10 +329,11 @@
  97. * Also adds sudo-specific variables (SUDO_*).
  98. */
  99. char **
  100. -rebuild_env(envp, sudo_mode, noexec)
  101. +rebuild_env(envp, sudo_mode, noexec, noclean)
  102. char **envp;
  103. int sudo_mode;
  104. int noexec;
  105. + int noclean;
  106. {
  107. char **ep, *cp, *ps1;
  108. int okvar, iswild, didvar;
  109. @@ -429,7 +438,7 @@
  110. * env_check.
  111. */
  112. for (ep = envp; *ep; ep++) {
  113. - okvar = 1;
  114. + okvar = noclean;
  115. /* Skip variables with values beginning with () (bash functions) */
  116. if ((cp = strchr(*ep, '=')) != NULL) {
  117. @@ -438,6 +447,7 @@
  118. }
  119. /* Skip anything listed in env_delete. */
  120. +#if 0
  121. for (cur = def_env_delete; cur && okvar; cur = cur->next) {
  122. len = strlen(cur->value);
  123. /* Deal with '*' wildcard */
  124. @@ -451,9 +461,10 @@
  125. okvar = 0;
  126. }
  127. }
  128. +#endif
  129. /* Check certain variables for '%' and '/' characters. */
  130. - for (cur = def_env_check; cur && okvar; cur = cur->next) {
  131. + for (cur = def_env_check; cur; cur = cur->next) {
  132. len = strlen(cur->value);
  133. /* Deal with '*' wildcard */
  134. if (cur->value[len - 1] == '*') {
  135. @@ -463,8 +474,24 @@
  136. iswild = 0;
  137. if (strncmp(cur->value, *ep, len) == 0 &&
  138. (iswild || (*ep)[len] == '=') &&
  139. - strpbrk(*ep, "/%")) {
  140. - okvar = 0;
  141. + strpbrk(*ep, "/%") == NULL) {
  142. + okvar = 1;
  143. + }
  144. + }
  145. +
  146. + /* keep variables in env_keep */
  147. + for (cur = def_env_keep; cur; cur = cur->next) {
  148. + len = strlen(cur->value);
  149. + /* Deal with '*' wildcard */
  150. + if (cur->value[len - 1] == '*') {
  151. + len--;
  152. + iswild = 1;
  153. + } else
  154. + iswild = 0;
  155. + if (strncmp(cur->value, *ep, len) == 0 &&
  156. + (iswild || (*ep)[len] == '=')) {
  157. + okvar = 1;
  158. + break;
  159. }
  160. }
  161. --- sudo-1.6.8p12.orig/sudoers.pod
  162. +++ sudo-1.6.8p12/sudoers.pod
  163. @@ -93,7 +93,7 @@
  164. Cmnd_Alias ::= NAME '=' Cmnd_List
  165. - NAME ::= [A-Z]([A-Z][0-9]_)*
  166. + NAME ::= [A-Z]([a-z][A-Z][0-9]_)*
  167. Each I<alias> definition is of the form
  168. @@ -568,7 +568,7 @@
  169. =item C<%%>
  170. -two consecutive C<%> characters are collaped into a single C<%> character
  171. +two consecutive C<%> characters are collapsed into a single C<%> character
  172. =back
  173. @@ -669,8 +669,8 @@
  174. =item exempt_group
  175. -Users in this group are exempt from password and PATH requirements.
  176. -This is not set by default.
  177. +Users in this group are exempt from password and PATH requirements. This
  178. +option is turned on for Debian.
  179. =item verifypw
  180. --- sudo-1.6.8p12.orig/ins_classic.h
  181. +++ sudo-1.6.8p12/ins_classic.h
  182. @@ -32,7 +32,7 @@
  183. "Where did you learn to type?",
  184. "Are you on drugs?",
  185. "My pet ferret can type better than you!",
  186. - "You type like i drive.",
  187. + "You type like I drive.",
  188. "Do you think like you type?",
  189. "Your mind just hasn't been the same since the electro-shock, has it?",
  190. --- sudo-1.6.8p12.orig/config.guess
  191. +++ sudo-1.6.8p12/config.guess
  192. @@ -1,11 +1,9 @@
  193. #! /bin/sh
  194. # Attempt to guess a canonical system name.
  195. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  196. -# 2000, 2001, 2002 Free Software Foundation, Inc.
  197. -#
  198. -# $Sudo: config.guess,v 1.10 2004/08/09 23:04:35 millert Exp $
  199. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  200. -timestamp='2002-11-30'
  201. +timestamp='2005-08-03'
  202. # This file is free software; you can redistribute it and/or modify it
  203. # under the terms of the GNU General Public License as published by
  204. @@ -19,13 +17,15 @@
  205. #
  206. # You should have received a copy of the GNU General Public License
  207. # along with this program; if not, write to the Free Software
  208. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  209. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  210. +# 02110-1301, USA.
  211. #
  212. # As a special exception to the GNU General Public License, if you
  213. # distribute this file as part of a program that contains a
  214. # configuration script generated by Autoconf, you may include it under
  215. # the same distribution terms that you use for the rest of that program.
  216. +
  217. # Originally written by Per Bothner <per@bothner.com>.
  218. # Please send patches to <config-patches@gnu.org>. Submit a context
  219. # diff and a properly formatted ChangeLog entry.
  220. @@ -55,7 +55,7 @@
  221. GNU config.guess ($timestamp)
  222. Originally written by Per Bothner.
  223. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  224. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  225. Free Software Foundation, Inc.
  226. This is free software; see the source for copying conditions. There is NO
  227. @@ -68,11 +68,11 @@
  228. while test $# -gt 0 ; do
  229. case $1 in
  230. --time-stamp | --time* | -t )
  231. - echo "$timestamp" ; exit 0 ;;
  232. + echo "$timestamp" ; exit ;;
  233. --version | -v )
  234. - echo "$version" ; exit 0 ;;
  235. + echo "$version" ; exit ;;
  236. --help | --h* | -h )
  237. - echo "$usage"; exit 0 ;;
  238. + echo "$usage"; exit ;;
  239. -- ) # Stop option processing
  240. shift; break ;;
  241. - ) # Use stdin as input.
  242. @@ -100,14 +100,18 @@
  243. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  244. # use `HOST_CC' if defined, but it is deprecated.
  245. -# This shell variable is my proudest work .. or something. --bje
  246. +# Portable tmp directory creation inspired by the Autoconf team.
  247. -set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
  248. -(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
  249. - || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
  250. -dummy=$tmpdir/dummy ;
  251. -files="$dummy.c $dummy.o $dummy.rel $dummy" ;
  252. -trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
  253. +set_cc_for_build='
  254. +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
  255. +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
  256. +: ${TMPDIR=/tmp} ;
  257. + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  258. + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  259. + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  260. + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
  261. +dummy=$tmp/dummy ;
  262. +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  263. case $CC_FOR_BUILD,$HOST_CC,$CC in
  264. ,,) echo "int x;" > $dummy.c ;
  265. for c in cc gcc c89 c99 ; do
  266. @@ -115,15 +119,13 @@
  267. CC_FOR_BUILD="$c"; break ;
  268. fi ;
  269. done ;
  270. - rm -f $files ;
  271. if test x"$CC_FOR_BUILD" = x ; then
  272. CC_FOR_BUILD=no_compiler_found ;
  273. fi
  274. ;;
  275. ,,*) CC_FOR_BUILD=$CC ;;
  276. ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  277. -esac ;
  278. -unset files'
  279. +esac ; set_cc_for_build= ;'
  280. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  281. # (ghazi@noc.rutgers.edu 1994-08-24)
  282. @@ -196,104 +198,109 @@
  283. # contains redundant information, the shorter form:
  284. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  285. echo "${machine}-${os}${release}"
  286. - exit 0 ;;
  287. + exit ;;
  288. *:OpenBSD:*:*)
  289. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  290. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  291. - exit 0 ;;
  292. + exit ;;
  293. + *:ekkoBSD:*:*)
  294. + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
  295. + exit ;;
  296. + macppc:MirBSD:*:*)
  297. + echo powerppc-unknown-mirbsd${UNAME_RELEASE}
  298. + exit ;;
  299. + *:MirBSD:*:*)
  300. + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
  301. + exit ;;
  302. alpha:OSF1:*:*)
  303. - if test $UNAME_RELEASE = "V4.0"; then
  304. + case $UNAME_RELEASE in
  305. + *4.0)
  306. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  307. - fi
  308. + ;;
  309. + *5.*)
  310. + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  311. + ;;
  312. + esac
  313. + # According to Compaq, /usr/sbin/psrinfo has been available on
  314. + # OSF/1 and Tru64 systems produced since 1995. I hope that
  315. + # covers most systems running today. This code pipes the CPU
  316. + # types through head -n 1, so we only detect the type of CPU 0.
  317. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  318. + case "$ALPHA_CPU_TYPE" in
  319. + "EV4 (21064)")
  320. + UNAME_MACHINE="alpha" ;;
  321. + "EV4.5 (21064)")
  322. + UNAME_MACHINE="alpha" ;;
  323. + "LCA4 (21066/21068)")
  324. + UNAME_MACHINE="alpha" ;;
  325. + "EV5 (21164)")
  326. + UNAME_MACHINE="alphaev5" ;;
  327. + "EV5.6 (21164A)")
  328. + UNAME_MACHINE="alphaev56" ;;
  329. + "EV5.6 (21164PC)")
  330. + UNAME_MACHINE="alphapca56" ;;
  331. + "EV5.7 (21164PC)")
  332. + UNAME_MACHINE="alphapca57" ;;
  333. + "EV6 (21264)")
  334. + UNAME_MACHINE="alphaev6" ;;
  335. + "EV6.7 (21264A)")
  336. + UNAME_MACHINE="alphaev67" ;;
  337. + "EV6.8CB (21264C)")
  338. + UNAME_MACHINE="alphaev68" ;;
  339. + "EV6.8AL (21264B)")
  340. + UNAME_MACHINE="alphaev68" ;;
  341. + "EV6.8CX (21264D)")
  342. + UNAME_MACHINE="alphaev68" ;;
  343. + "EV6.9A (21264/EV69A)")
  344. + UNAME_MACHINE="alphaev69" ;;
  345. + "EV7 (21364)")
  346. + UNAME_MACHINE="alphaev7" ;;
  347. + "EV7.9 (21364A)")
  348. + UNAME_MACHINE="alphaev79" ;;
  349. + esac
  350. + # A Pn.n version is a patched version.
  351. # A Vn.n version is a released version.
  352. # A Tn.n version is a released field test version.
  353. # A Xn.n version is an unreleased experimental baselevel.
  354. # 1.2 uses "1.2" for uname -r.
  355. - eval $set_cc_for_build
  356. - cat <<EOF >$dummy.s
  357. - .data
  358. -\$Lformat:
  359. - .byte 37,100,45,37,120,10,0 # "%d-%x\n"
  360. -
  361. - .text
  362. - .globl main
  363. - .align 4
  364. - .ent main
  365. -main:
  366. - .frame \$30,16,\$26,0
  367. - ldgp \$29,0(\$27)
  368. - .prologue 1
  369. - .long 0x47e03d80 # implver \$0
  370. - lda \$2,-1
  371. - .long 0x47e20c21 # amask \$2,\$1
  372. - lda \$16,\$Lformat
  373. - mov \$0,\$17
  374. - not \$1,\$18
  375. - jsr \$26,printf
  376. - ldgp \$29,0(\$26)
  377. - mov 0,\$16
  378. - jsr \$26,exit
  379. - .end main
  380. -EOF
  381. - $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
  382. - if test "$?" = 0 ; then
  383. - case `$dummy` in
  384. - 0-0)
  385. - UNAME_MACHINE="alpha"
  386. - ;;
  387. - 1-0)
  388. - UNAME_MACHINE="alphaev5"
  389. - ;;
  390. - 1-1)
  391. - UNAME_MACHINE="alphaev56"
  392. - ;;
  393. - 1-101)
  394. - UNAME_MACHINE="alphapca56"
  395. - ;;
  396. - 2-303)
  397. - UNAME_MACHINE="alphaev6"
  398. - ;;
  399. - 2-307)
  400. - UNAME_MACHINE="alphaev67"
  401. - ;;
  402. - 2-1307)
  403. - UNAME_MACHINE="alphaev68"
  404. - ;;
  405. - 3-1307)
  406. - UNAME_MACHINE="alphaev7"
  407. - ;;
  408. - esac
  409. - fi
  410. - rm -f $dummy.s $dummy && rmdir $tmpdir
  411. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  412. - exit 0 ;;
  413. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  414. + exit ;;
  415. Alpha\ *:Windows_NT*:*)
  416. # How do we know it's Interix rather than the generic POSIX subsystem?
  417. # Should we change UNAME_MACHINE based on the output of uname instead
  418. # of the specific Alpha model?
  419. echo alpha-pc-interix
  420. - exit 0 ;;
  421. + exit ;;
  422. 21064:Windows_NT:50:3)
  423. echo alpha-dec-winnt3.5
  424. - exit 0 ;;
  425. + exit ;;
  426. Amiga*:UNIX_System_V:4.0:*)
  427. echo m68k-unknown-sysv4
  428. - exit 0;;
  429. + exit ;;
  430. *:[Aa]miga[Oo][Ss]:*:*)
  431. echo ${UNAME_MACHINE}-unknown-amigaos
  432. - exit 0 ;;
  433. + exit ;;
  434. *:[Mm]orph[Oo][Ss]:*:*)
  435. echo ${UNAME_MACHINE}-unknown-morphos
  436. - exit 0 ;;
  437. + exit ;;
  438. *:OS/390:*:*)
  439. echo i370-ibm-openedition
  440. - exit 0 ;;
  441. + exit ;;
  442. + *:z/VM:*:*)
  443. + echo s390-ibm-zvmoe
  444. + exit ;;
  445. + *:OS400:*:*)
  446. + echo powerpc-ibm-os400
  447. + exit ;;
  448. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  449. echo arm-acorn-riscix${UNAME_RELEASE}
  450. - exit 0;;
  451. + exit ;;
  452. + arm:riscos:*:*|arm:RISCOS:*:*)
  453. + echo arm-unknown-riscos
  454. + exit ;;
  455. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  456. echo hppa1.1-hitachi-hiuxmpp
  457. - exit 0;;
  458. + exit ;;
  459. Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  460. # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  461. if test "`(/bin/universe) 2>/dev/null`" = att ; then
  462. @@ -301,29 +308,32 @@
  463. else
  464. echo pyramid-pyramid-bsd
  465. fi
  466. - exit 0 ;;
  467. + exit ;;
  468. NILE*:*:*:dcosx)
  469. echo pyramid-pyramid-svr4
  470. - exit 0 ;;
  471. - DRS?6000:UNIX_SV:4.2*:7*)
  472. + exit ;;
  473. + DRS?6000:unix:4.0:6*)
  474. + echo sparc-icl-nx6
  475. + exit ;;
  476. + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  477. case `/usr/bin/uname -p` in
  478. - sparc) echo sparc-icl-nx7 && exit 0 ;;
  479. + sparc) echo sparc-icl-nx7; exit ;;
  480. esac ;;
  481. sun4H:SunOS:5.*:*)
  482. echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  483. - exit 0 ;;
  484. + exit ;;
  485. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  486. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  487. - exit 0 ;;
  488. + exit ;;
  489. i86pc:SunOS:5.*:*)
  490. echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  491. - exit 0 ;;
  492. + exit ;;
  493. sun4*:SunOS:6*:*)
  494. # According to config.sub, this is the proper way to canonicalize
  495. # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  496. # it's likely to be more like Solaris than SunOS4.
  497. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  498. - exit 0 ;;
  499. + exit ;;
  500. sun4*:SunOS:*:*)
  501. case "`/usr/bin/arch -k`" in
  502. Series*|S4*)
  503. @@ -332,10 +342,10 @@
  504. esac
  505. # Japanese Language versions have a version number like `4.1.3-JL'.
  506. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  507. - exit 0 ;;
  508. + exit ;;
  509. sun3*:SunOS:*:*)
  510. echo m68k-sun-sunos${UNAME_RELEASE}
  511. - exit 0 ;;
  512. + exit ;;
  513. sun*:*:4.2BSD:*)
  514. UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  515. test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  516. @@ -347,10 +357,10 @@
  517. echo sparc-sun-sunos${UNAME_RELEASE}
  518. ;;
  519. esac
  520. - exit 0 ;;
  521. + exit ;;
  522. aushp:SunOS:*:*)
  523. echo sparc-auspex-sunos${UNAME_RELEASE}
  524. - exit 0 ;;
  525. + exit ;;
  526. # The situation for MiNT is a little confusing. The machine name
  527. # can be virtually everything (everything which is not
  528. # "atarist" or "atariste" at least should have a processor
  529. @@ -361,37 +371,40 @@
  530. # be no problem.
  531. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  532. echo m68k-atari-mint${UNAME_RELEASE}
  533. - exit 0 ;;
  534. + exit ;;
  535. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  536. echo m68k-atari-mint${UNAME_RELEASE}
  537. - exit 0 ;;
  538. + exit ;;
  539. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  540. echo m68k-atari-mint${UNAME_RELEASE}
  541. - exit 0 ;;
  542. + exit ;;
  543. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  544. echo m68k-milan-mint${UNAME_RELEASE}
  545. - exit 0 ;;
  546. + exit ;;
  547. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  548. echo m68k-hades-mint${UNAME_RELEASE}
  549. - exit 0 ;;
  550. + exit ;;
  551. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  552. echo m68k-unknown-mint${UNAME_RELEASE}
  553. - exit 0 ;;
  554. + exit ;;
  555. + m68k:machten:*:*)
  556. + echo m68k-apple-machten${UNAME_RELEASE}
  557. + exit ;;
  558. powerpc:machten:*:*)
  559. echo powerpc-apple-machten${UNAME_RELEASE}
  560. - exit 0 ;;
  561. + exit ;;
  562. RISC*:Mach:*:*)
  563. echo mips-dec-mach_bsd4.3
  564. - exit 0 ;;
  565. + exit ;;
  566. RISC*:ULTRIX:*:*)
  567. echo mips-dec-ultrix${UNAME_RELEASE}
  568. - exit 0 ;;
  569. + exit ;;
  570. VAX*:ULTRIX*:*:*)
  571. echo vax-dec-ultrix${UNAME_RELEASE}
  572. - exit 0 ;;
  573. + exit ;;
  574. 2020:CLIX:*:* | 2430:CLIX:*:*)
  575. echo clipper-intergraph-clix${UNAME_RELEASE}
  576. - exit 0 ;;
  577. + exit ;;
  578. mips:*:*:UMIPS | mips:*:*:RISCos)
  579. eval $set_cc_for_build
  580. sed 's/^ //' << EOF >$dummy.c
  581. @@ -415,33 +428,33 @@
  582. exit (-1);
  583. }
  584. EOF
  585. - $CC_FOR_BUILD -o $dummy $dummy.c \
  586. - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
  587. - && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
  588. - rm -f $dummy.c $dummy && rmdir $tmpdir
  589. + $CC_FOR_BUILD -o $dummy $dummy.c &&
  590. + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  591. + SYSTEM_NAME=`$dummy $dummyarg` &&
  592. + { echo "$SYSTEM_NAME"; exit; }
  593. echo mips-mips-riscos${UNAME_RELEASE}
  594. - exit 0 ;;
  595. + exit ;;
  596. Motorola:PowerMAX_OS:*:*)
  597. echo powerpc-motorola-powermax
  598. - exit 0 ;;
  599. + exit ;;
  600. Motorola:*:4.3:PL8-*)
  601. echo powerpc-harris-powermax
  602. - exit 0 ;;
  603. + exit ;;
  604. Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  605. echo powerpc-harris-powermax
  606. - exit 0 ;;
  607. + exit ;;
  608. Night_Hawk:Power_UNIX:*:*)
  609. echo powerpc-harris-powerunix
  610. - exit 0 ;;
  611. + exit ;;
  612. m88k:CX/UX:7*:*)
  613. echo m88k-harris-cxux7
  614. - exit 0 ;;
  615. + exit ;;
  616. m88k:*:4*:R4*)
  617. echo m88k-motorola-sysv4
  618. - exit 0 ;;
  619. + exit ;;
  620. m88k:*:3*:R3*)
  621. echo m88k-motorola-sysv3
  622. - exit 0 ;;
  623. + exit ;;
  624. AViiON:dgux:*:*)
  625. # DG/UX returns AViiON for all architectures
  626. UNAME_PROCESSOR=`/usr/bin/uname -p`
  627. @@ -457,29 +470,29 @@
  628. else
  629. echo i586-dg-dgux${UNAME_RELEASE}
  630. fi
  631. - exit 0 ;;
  632. + exit ;;
  633. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  634. echo m88k-dolphin-sysv3
  635. - exit 0 ;;
  636. + exit ;;
  637. M88*:*:R3*:*)
  638. # Delta 88k system running SVR3
  639. echo m88k-motorola-sysv3
  640. - exit 0 ;;
  641. + exit ;;
  642. XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  643. echo m88k-tektronix-sysv3
  644. - exit 0 ;;
  645. + exit ;;
  646. Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  647. echo m68k-tektronix-bsd
  648. - exit 0 ;;
  649. + exit ;;
  650. *:IRIX*:*:*)
  651. echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  652. - exit 0 ;;
  653. + exit ;;
  654. ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  655. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  656. - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  657. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  658. + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  659. i*86:AIX:*:*)
  660. echo i386-ibm-aix
  661. - exit 0 ;;
  662. + exit ;;
  663. ia64:AIX:*:*)
  664. if [ -x /usr/bin/oslevel ] ; then
  665. IBM_REV=`/usr/bin/oslevel`
  666. @@ -487,7 +500,7 @@
  667. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  668. fi
  669. echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  670. - exit 0 ;;
  671. + exit ;;
  672. *:AIX:2:3)
  673. if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  674. eval $set_cc_for_build
  675. @@ -502,15 +515,18 @@
  676. exit(0);
  677. }
  678. EOF
  679. - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
  680. - rm -f $dummy.c $dummy && rmdir $tmpdir
  681. - echo rs6000-ibm-aix3.2.5
  682. + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
  683. + then
  684. + echo "$SYSTEM_NAME"
  685. + else
  686. + echo rs6000-ibm-aix3.2.5
  687. + fi
  688. elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  689. echo rs6000-ibm-aix3.2.4
  690. else
  691. echo rs6000-ibm-aix3.2
  692. fi
  693. - exit 0 ;;
  694. + exit ;;
  695. *:AIX:*:[45])
  696. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  697. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  698. @@ -524,28 +540,28 @@
  699. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  700. fi
  701. echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  702. - exit 0 ;;
  703. + exit ;;
  704. *:AIX:*:*)
  705. echo rs6000-ibm-aix
  706. - exit 0 ;;
  707. + exit ;;
  708. ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  709. echo romp-ibm-bsd4.4
  710. - exit 0 ;;
  711. + exit ;;
  712. ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  713. echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
  714. - exit 0 ;; # report: romp-ibm BSD 4.3
  715. + exit ;; # report: romp-ibm BSD 4.3
  716. *:BOSX:*:*)
  717. echo rs6000-bull-bosx
  718. - exit 0 ;;
  719. + exit ;;
  720. DPX/2?00:B.O.S.:*:*)
  721. echo m68k-bull-sysv3
  722. - exit 0 ;;
  723. + exit ;;
  724. 9000/[34]??:4.3bsd:1.*:*)
  725. echo m68k-hp-bsd
  726. - exit 0 ;;
  727. + exit ;;
  728. hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  729. echo m68k-hp-bsd4.4
  730. - exit 0 ;;
  731. + exit ;;
  732. 9000/[34678]??:HP-UX:*:*)
  733. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  734. case "${UNAME_MACHINE}" in
  735. @@ -602,16 +618,36 @@
  736. }
  737. EOF
  738. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  739. - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
  740. - rm -f $dummy.c $dummy && rmdir $tmpdir
  741. + test -z "$HP_ARCH" && HP_ARCH=hppa
  742. fi ;;
  743. esac
  744. + if [ ${HP_ARCH} = "hppa2.0w" ]
  745. + then
  746. + eval $set_cc_for_build
  747. +
  748. + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  749. + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
  750. + # generating 64-bit code. GNU and HP use different nomenclature:
  751. + #
  752. + # $ CC_FOR_BUILD=cc ./config.guess
  753. + # => hppa2.0w-hp-hpux11.23
  754. + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  755. + # => hppa64-hp-hpux11.23
  756. +
  757. + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  758. + grep __LP64__ >/dev/null
  759. + then
  760. + HP_ARCH="hppa2.0w"
  761. + else
  762. + HP_ARCH="hppa64"
  763. + fi
  764. + fi
  765. echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  766. - exit 0 ;;
  767. + exit ;;
  768. ia64:HP-UX:*:*)
  769. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  770. echo ia64-hp-hpux${HPUX_REV}
  771. - exit 0 ;;
  772. + exit ;;
  773. 3050*:HI-UX:*:*)
  774. eval $set_cc_for_build
  775. sed 's/^ //' << EOF >$dummy.c
  776. @@ -639,149 +675,166 @@
  777. exit (0);
  778. }
  779. EOF
  780. - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
  781. - rm -f $dummy.c $dummy && rmdir $tmpdir
  782. + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
  783. + { echo "$SYSTEM_NAME"; exit; }
  784. echo unknown-hitachi-hiuxwe2
  785. - exit 0 ;;
  786. + exit ;;
  787. 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  788. echo hppa1.1-hp-bsd
  789. - exit 0 ;;
  790. + exit ;;
  791. 9000/8??:4.3bsd:*:*)
  792. echo hppa1.0-hp-bsd
  793. - exit 0 ;;
  794. + exit ;;
  795. *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  796. echo hppa1.0-hp-mpeix
  797. - exit 0 ;;
  798. + exit ;;
  799. hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  800. echo hppa1.1-hp-osf
  801. - exit 0 ;;
  802. + exit ;;
  803. hp8??:OSF1:*:*)
  804. echo hppa1.0-hp-osf
  805. - exit 0 ;;
  806. + exit ;;
  807. i*86:OSF1:*:*)
  808. if [ -x /usr/sbin/sysversion ] ; then
  809. echo ${UNAME_MACHINE}-unknown-osf1mk
  810. else
  811. echo ${UNAME_MACHINE}-unknown-osf1
  812. fi
  813. - exit 0 ;;
  814. + exit ;;
  815. parisc*:Lites*:*:*)
  816. echo hppa1.1-hp-lites
  817. - exit 0 ;;
  818. + exit ;;
  819. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  820. echo c1-convex-bsd
  821. - exit 0 ;;
  822. + exit ;;
  823. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  824. if getsysinfo -f scalar_acc
  825. then echo c32-convex-bsd
  826. else echo c2-convex-bsd
  827. fi
  828. - exit 0 ;;
  829. + exit ;;
  830. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  831. echo c34-convex-bsd
  832. - exit 0 ;;
  833. + exit ;;
  834. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  835. echo c38-convex-bsd
  836. - exit 0 ;;
  837. + exit ;;
  838. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  839. echo c4-convex-bsd
  840. - exit 0 ;;
  841. + exit ;;
  842. CRAY*Y-MP:*:*:*)
  843. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  844. - exit 0 ;;
  845. + exit ;;
  846. CRAY*[A-Z]90:*:*:*)
  847. echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  848. | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  849. -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  850. -e 's/\.[^.]*$/.X/'
  851. - exit 0 ;;
  852. + exit ;;
  853. CRAY*TS:*:*:*)
  854. echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  855. - exit 0 ;;
  856. - CRAY*T3D:*:*:*)
  857. - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  858. - exit 0 ;;
  859. + exit ;;
  860. CRAY*T3E:*:*:*)
  861. echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  862. - exit 0 ;;
  863. + exit ;;
  864. CRAY*SV1:*:*:*)
  865. echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  866. - exit 0 ;;
  867. + exit ;;
  868. + *:UNICOS/mp:*:*)
  869. + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  870. + exit ;;
  871. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  872. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  873. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  874. FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  875. echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  876. - exit 0 ;;
  877. + exit ;;
  878. + 5000:UNIX_System_V:4.*:*)
  879. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  880. + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  881. + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  882. + exit ;;
  883. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  884. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  885. - exit 0 ;;
  886. + exit ;;
  887. sparc*:BSD/OS:*:*)
  888. echo sparc-unknown-bsdi${UNAME_RELEASE}
  889. - exit 0 ;;
  890. + exit ;;
  891. *:BSD/OS:*:*)
  892. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  893. - exit 0 ;;
  894. + exit ;;
  895. *:FreeBSD:*:*)
  896. - # Determine whether the default compiler uses glibc.
  897. - eval $set_cc_for_build
  898. - sed 's/^ //' << EOF >$dummy.c
  899. - #include <features.h>
  900. - #if __GLIBC__ >= 2
  901. - LIBC=gnu
  902. - #else
  903. - LIBC=
  904. - #endif
  905. -EOF
  906. - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
  907. - rm -f $dummy.c && rmdir $tmpdir
  908. - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
  909. - exit 0 ;;
  910. + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  911. + exit ;;
  912. i*:CYGWIN*:*)
  913. echo ${UNAME_MACHINE}-pc-cygwin
  914. - exit 0 ;;
  915. + exit ;;
  916. i*:MINGW*:*)
  917. echo ${UNAME_MACHINE}-pc-mingw32
  918. - exit 0 ;;
  919. + exit ;;
  920. + i*:windows32*:*)
  921. + # uname -m includes "-pc" on this system.
  922. + echo ${UNAME_MACHINE}-mingw32
  923. + exit ;;
  924. i*:PW*:*)
  925. echo ${UNAME_MACHINE}-pc-pw32
  926. - exit 0 ;;
  927. - x86:Interix*:3*)
  928. - echo i586-pc-interix3
  929. - exit 0 ;;
  930. + exit ;;
  931. + x86:Interix*:[34]*)
  932. + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
  933. + exit ;;
  934. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  935. echo i${UNAME_MACHINE}-pc-mks
  936. - exit 0 ;;
  937. + exit ;;
  938. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  939. # How do we know it's Interix rather than the generic POSIX subsystem?
  940. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  941. # UNAME_MACHINE based on the output of uname instead of i386?
  942. echo i586-pc-interix
  943. - exit 0 ;;
  944. + exit ;;
  945. i*:UWIN*:*)
  946. echo ${UNAME_MACHINE}-pc-uwin
  947. - exit 0 ;;
  948. + exit ;;
  949. + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  950. + echo x86_64-unknown-cygwin
  951. + exit ;;
  952. p*:CYGWIN*:*)
  953. echo powerpcle-unknown-cygwin
  954. - exit 0 ;;
  955. + exit ;;
  956. prep*:SunOS:5.*:*)
  957. echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  958. - exit 0 ;;
  959. + exit ;;
  960. *:GNU:*:*)
  961. + # the GNU system
  962. echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  963. - exit 0 ;;
  964. + exit ;;
  965. + *:GNU/*:*:*)
  966. + # other systems with GNU libc and userland
  967. + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  968. + exit ;;
  969. i*86:Minix:*:*)
  970. echo ${UNAME_MACHINE}-pc-minix
  971. - exit 0 ;;
  972. + exit ;;
  973. arm*:Linux:*:*)
  974. echo ${UNAME_MACHINE}-unknown-linux-gnu
  975. - exit 0 ;;
  976. + exit ;;
  977. + cris:Linux:*:*)
  978. + echo cris-axis-linux-gnu
  979. + exit ;;
  980. + crisv32:Linux:*:*)
  981. + echo crisv32-axis-linux-gnu
  982. + exit ;;
  983. + frv:Linux:*:*)
  984. + echo frv-unknown-linux-gnu
  985. + exit ;;
  986. ia64:Linux:*:*)
  987. echo ${UNAME_MACHINE}-unknown-linux-gnu
  988. - exit 0 ;;
  989. + exit ;;
  990. + m32r*:Linux:*:*)
  991. + echo ${UNAME_MACHINE}-unknown-linux-gnu
  992. + exit ;;
  993. m68*:Linux:*:*)
  994. echo ${UNAME_MACHINE}-unknown-linux-gnu
  995. - exit 0 ;;
  996. + exit ;;
  997. mips:Linux:*:*)
  998. eval $set_cc_for_build
  999. sed 's/^ //' << EOF >$dummy.c
  1000. @@ -799,8 +852,7 @@
  1001. #endif
  1002. EOF
  1003. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
  1004. - rm -f $dummy.c && rmdir $tmpdir
  1005. - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
  1006. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  1007. ;;
  1008. mips64:Linux:*:*)
  1009. eval $set_cc_for_build
  1010. @@ -819,15 +871,17 @@
  1011. #endif
  1012. EOF
  1013. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
  1014. - rm -f $dummy.c && rmdir $tmpdir
  1015. - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
  1016. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  1017. ;;
  1018. + or32:Linux:*:*)
  1019. + echo or32-unknown-linux-gnu
  1020. + exit ;;
  1021. ppc:Linux:*:*)
  1022. echo powerpc-unknown-linux-gnu
  1023. - exit 0 ;;
  1024. + exit ;;
  1025. ppc64:Linux:*:*)
  1026. echo powerpc64-unknown-linux-gnu
  1027. - exit 0 ;;
  1028. + exit ;;
  1029. alpha:Linux:*:*)
  1030. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  1031. EV5) UNAME_MACHINE=alphaev5 ;;
  1032. @@ -841,7 +895,7 @@
  1033. objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  1034. if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  1035. echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  1036. - exit 0 ;;
  1037. + exit ;;
  1038. parisc:Linux:*:* | hppa:Linux:*:*)
  1039. # Look for CPU level
  1040. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  1041. @@ -849,22 +903,25 @@
  1042. PA8*) echo hppa2.0-unknown-linux-gnu ;;
  1043. *) echo hppa-unknown-linux-gnu ;;
  1044. esac
  1045. - exit 0 ;;
  1046. + exit ;;
  1047. parisc64:Linux:*:* | hppa64:Linux:*:*)
  1048. echo hppa64-unknown-linux-gnu
  1049. - exit 0 ;;
  1050. + exit ;;
  1051. s390:Linux:*:* | s390x:Linux:*:*)
  1052. echo ${UNAME_MACHINE}-ibm-linux
  1053. - exit 0 ;;
  1054. + exit ;;
  1055. + sh64*:Linux:*:*)
  1056. + echo ${UNAME_MACHINE}-unknown-linux-gnu
  1057. + exit ;;
  1058. sh*:Linux:*:*)
  1059. echo ${UNAME_MACHINE}-unknown-linux-gnu
  1060. - exit 0 ;;
  1061. + exit ;;
  1062. sparc:Linux:*:* | sparc64:Linux:*:*)
  1063. echo ${UNAME_MACHINE}-unknown-linux-gnu
  1064. - exit 0 ;;
  1065. + exit ;;
  1066. x86_64:Linux:*:*)
  1067. echo x86_64-unknown-linux-gnu
  1068. - exit 0 ;;
  1069. + exit ;;
  1070. i*86:Linux:*:*)
  1071. # The BFD linker knows what the default object file format is, so
  1072. # first see if it will tell us. cd to the root directory to prevent
  1073. @@ -882,15 +939,15 @@
  1074. ;;
  1075. a.out-i386-linux)
  1076. echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  1077. - exit 0 ;;
  1078. + exit ;;
  1079. coff-i386)
  1080. echo "${UNAME_MACHINE}-pc-linux-gnucoff"
  1081. - exit 0 ;;
  1082. + exit ;;
  1083. "")
  1084. # Either a pre-BFD a.out linker (linux-gnuoldld) or
  1085. # one that does not give us useful --help.
  1086. echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  1087. - exit 0 ;;
  1088. + exit ;;
  1089. esac
  1090. # Determine whether the default compiler is a.out or elf
  1091. eval $set_cc_for_build
  1092. @@ -913,18 +970,23 @@
  1093. LIBC=gnuaout
  1094. #endif
  1095. #endif
  1096. + #ifdef __dietlibc__
  1097. + LIBC=dietlibc
  1098. + #endif
  1099. EOF
  1100. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
  1101. - rm -f $dummy.c && rmdir $tmpdir
  1102. - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
  1103. - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
  1104. + test x"${LIBC}" != x && {
  1105. + echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  1106. + exit
  1107. + }
  1108. + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
  1109. ;;
  1110. i*86:DYNIX/ptx:4*:*)
  1111. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1112. # earlier versions are messed up and put the nodename in both
  1113. # sysname and nodename.
  1114. echo i386-sequent-sysv4
  1115. - exit 0 ;;
  1116. + exit ;;
  1117. i*86:UNIX_SV:4.2MP:2.*)
  1118. # Unixware is an offshoot of SVR4, but it has its own version
  1119. # number series starting with 2...
  1120. @@ -932,24 +994,27 @@
  1121. # I just have to hope. -- rms.
  1122. # Use sysv4.2uw... so that sysv4* matches it.
  1123. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  1124. - exit 0 ;;
  1125. + exit ;;
  1126. i*86:OS/2:*:*)
  1127. # If we were able to find `uname', then EMX Unix compatibility
  1128. # is probably installed.
  1129. echo ${UNAME_MACHINE}-pc-os2-emx
  1130. - exit 0 ;;
  1131. + exit ;;
  1132. i*86:XTS-300:*:STOP)
  1133. echo ${UNAME_MACHINE}-unknown-stop
  1134. - exit 0 ;;
  1135. + exit ;;
  1136. i*86:atheos:*:*)
  1137. echo ${UNAME_MACHINE}-unknown-atheos
  1138. - exit 0 ;;
  1139. + exit ;;
  1140. + i*86:syllable:*:*)
  1141. + echo ${UNAME_MACHINE}-pc-syllable
  1142. + exit ;;
  1143. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
  1144. echo i386-unknown-lynxos${UNAME_RELEASE}
  1145. - exit 0 ;;
  1146. + exit ;;
  1147. i*86:*DOS:*:*)
  1148. echo ${UNAME_MACHINE}-pc-msdosdjgpp
  1149. - exit 0 ;;
  1150. + exit ;;
  1151. i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  1152. UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  1153. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1154. @@ -957,15 +1022,16 @@
  1155. else
  1156. echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1157. fi
  1158. - exit 0 ;;
  1159. - i*86:*:5:[78]*)
  1160. + exit ;;
  1161. + i*86:*:5:[678]*)
  1162. + # UnixWare 7.x, OpenUNIX and OpenServer 6.
  1163. case `/bin/uname -X | grep "^Machine"` in
  1164. *486*) UNAME_MACHINE=i486 ;;
  1165. *Pentium) UNAME_MACHINE=i586 ;;
  1166. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1167. esac
  1168. echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1169. - exit 0 ;;
  1170. + exit ;;
  1171. i*86:*:3.2:*)
  1172. if test -f /usr/options/cb.name; then
  1173. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1174. @@ -983,73 +1049,73 @@
  1175. else
  1176. echo ${UNAME_MACHINE}-pc-sysv32
  1177. fi
  1178. - exit 0 ;;
  1179. + exit ;;
  1180. pc:*:*:*)
  1181. # Left here for compatibility:
  1182. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1183. # the processor, so we play safe by assuming i386.
  1184. echo i386-pc-msdosdjgpp
  1185. - exit 0 ;;
  1186. + exit ;;
  1187. Intel:Mach:3*:*)
  1188. echo i386-pc-mach3
  1189. - exit 0 ;;
  1190. + exit ;;
  1191. paragon:*:*:*)
  1192. echo i860-intel-osf1
  1193. - exit 0 ;;
  1194. + exit ;;
  1195. i860:*:4.*:*) # i860-SVR4
  1196. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1197. echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  1198. else # Add other i860-SVR4 vendors below as they are discovered.
  1199. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  1200. fi
  1201. - exit 0 ;;
  1202. + exit ;;
  1203. mini*:CTIX:SYS*5:*)
  1204. # "miniframe"
  1205. echo m68010-convergent-sysv
  1206. - exit 0 ;;
  1207. + exit ;;
  1208. mc68k:UNIX:SYSTEM5:3.51m)
  1209. echo m68k-convergent-sysv
  1210. - exit 0 ;;
  1211. + exit ;;
  1212. M680?0:D-NIX:5.3:*)
  1213. echo m68k-diab-dnix
  1214. - exit 0 ;;
  1215. - M68*:*:R3V[567]*:*)
  1216. - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  1217. - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
  1218. + exit ;;
  1219. + M68*:*:R3V[5678]*:*)
  1220. + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1221. + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
  1222. OS_REL=''
  1223. test -r /etc/.relid \
  1224. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1225. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1226. - && echo i486-ncr-sysv4.3${OS_REL} && exit 0
  1227. + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1228. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1229. - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
  1230. + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1231. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1232. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1233. - && echo i486-ncr-sysv4 && exit 0 ;;
  1234. + && { echo i486-ncr-sysv4; exit; } ;;
  1235. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1236. echo m68k-unknown-lynxos${UNAME_RELEASE}
  1237. - exit 0 ;;
  1238. + exit ;;
  1239. mc68030:UNIX_System_V:4.*:*)
  1240. echo m68k-atari-sysv4
  1241. - exit 0 ;;
  1242. + exit ;;
  1243. TSUNAMI:LynxOS:2.*:*)
  1244. echo sparc-unknown-lynxos${UNAME_RELEASE}
  1245. - exit 0 ;;
  1246. + exit ;;
  1247. rs6000:LynxOS:2.*:*)
  1248. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1249. - exit 0 ;;
  1250. + exit ;;
  1251. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
  1252. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1253. - exit 0 ;;
  1254. + exit ;;
  1255. SM[BE]S:UNIX_SV:*:*)
  1256. echo mips-dde-sysv${UNAME_RELEASE}
  1257. - exit 0 ;;
  1258. + exit ;;
  1259. RM*:ReliantUNIX-*:*:*)
  1260. echo mips-sni-sysv4
  1261. - exit 0 ;;
  1262. + exit ;;
  1263. RM*:SINIX-*:*:*)
  1264. echo mips-sni-sysv4
  1265. - exit 0 ;;
  1266. + exit ;;
  1267. *:SINIX-*:*:*)
  1268. if uname -p 2>/dev/null >/dev/null ; then
  1269. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1270. @@ -1057,64 +1123,73 @@
  1271. else
  1272. echo ns32k-sni-sysv
  1273. fi
  1274. - exit 0 ;;
  1275. + exit ;;
  1276. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1277. # says <Richard.M.Bartel@ccMail.Census.GOV>
  1278. echo i586-unisys-sysv4
  1279. - exit 0 ;;
  1280. + exit ;;
  1281. *:UNIX_System_V:4*:FTX*)
  1282. # From Gerald Hewes <hewes@openmarket.com>.
  1283. # How about differentiating between stratus architectures? -djm
  1284. echo hppa1.1-stratus-sysv4
  1285. - exit 0 ;;
  1286. + exit ;;
  1287. *:*:*:FTX*)
  1288. # From seanf@swdc.stratus.com.
  1289. echo i860-stratus-sysv4
  1290. - exit 0 ;;
  1291. + exit ;;
  1292. + i*86:VOS:*:*)
  1293. + # From Paul.Green@stratus.com.
  1294. + echo ${UNAME_MACHINE}-stratus-vos
  1295. + exit ;;
  1296. *:VOS:*:*)
  1297. # From Paul.Green@stratus.com.
  1298. echo hppa1.1-stratus-vos
  1299. - exit 0 ;;
  1300. + exit ;;
  1301. mc68*:A/UX:*:*)
  1302. echo m68k-apple-aux${UNAME_RELEASE}
  1303. - exit 0 ;;
  1304. + exit ;;
  1305. news*:NEWS-OS:6*:*)
  1306. echo mips-sony-newsos6
  1307. - exit 0 ;;
  1308. + exit ;;
  1309. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1310. if [ -d /usr/nec ]; then
  1311. echo mips-nec-sysv${UNAME_RELEASE}
  1312. else
  1313. echo mips-unknown-sysv${UNAME_RELEASE}
  1314. fi
  1315. - exit 0 ;;
  1316. + exit ;;
  1317. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1318. echo powerpc-be-beos
  1319. - exit 0 ;;
  1320. + exit ;;
  1321. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1322. echo powerpc-apple-beos
  1323. - exit 0 ;;
  1324. + exit ;;
  1325. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1326. echo i586-pc-beos
  1327. - exit 0 ;;
  1328. + exit ;;
  1329. SX-4:SUPER-UX:*:*)
  1330. echo sx4-nec-superux${UNAME_RELEASE}
  1331. - exit 0 ;;
  1332. + exit ;;
  1333. SX-5:SUPER-UX:*:*)
  1334. echo sx5-nec-superux${UNAME_RELEASE}
  1335. - exit 0 ;;
  1336. + exit ;;
  1337. SX-6:SUPER-UX:*:*)
  1338. echo sx6-nec-superux${UNAME_RELEASE}
  1339. - exit 0 ;;
  1340. + exit ;;
  1341. Power*:Rhapsody:*:*)
  1342. echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1343. - exit 0 ;;
  1344. + exit ;;
  1345. *:Rhapsody:*:*)
  1346. echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1347. - exit 0 ;;
  1348. + exit ;;
  1349. *:Darwin:*:*)
  1350. - echo `uname -p`-apple-darwin${UNAME_RELEASE}
  1351. - exit 0 ;;
  1352. + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1353. + case $UNAME_PROCESSOR in
  1354. + *86) UNAME_PROCESSOR=i686 ;;
  1355. + unknown) UNAME_PROCESSOR=powerpc ;;
  1356. + esac
  1357. + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1358. + exit ;;
  1359. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1360. UNAME_PROCESSOR=`uname -p`
  1361. if test "$UNAME_PROCESSOR" = "x86"; then
  1362. @@ -1122,22 +1197,25 @@
  1363. UNAME_MACHINE=pc
  1364. fi
  1365. echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1366. - exit 0 ;;
  1367. + exit ;;
  1368. *:QNX:*:4*)
  1369. echo i386-pc-qnx
  1370. - exit 0 ;;
  1371. - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
  1372. + exit ;;
  1373. + NSE-?:NONSTOP_KERNEL:*:*)
  1374. + echo nse-tandem-nsk${UNAME_RELEASE}
  1375. + exit ;;
  1376. + NSR-?:NONSTOP_KERNEL:*:*)
  1377. echo nsr-tandem-nsk${UNAME_RELEASE}
  1378. - exit 0 ;;
  1379. + exit ;;
  1380. *:NonStop-UX:*:*)
  1381. echo mips-compaq-nonstopux
  1382. - exit 0 ;;
  1383. + exit ;;
  1384. BS2000:POSIX*:*:*)
  1385. echo bs2000-siemens-sysv
  1386. - exit 0 ;;
  1387. + exit ;;
  1388. DS/*:UNIX_System_V:*:*)
  1389. echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1390. - exit 0 ;;
  1391. + exit ;;
  1392. *:Plan9:*:*)
  1393. # "uname -m" is not consistent, so use $cputype instead. 386
  1394. # is converted to i386 for consistency with other x86
  1395. @@ -1148,25 +1226,44 @@
  1396. UNAME_MACHINE="$cputype"
  1397. fi
  1398. echo ${UNAME_MACHINE}-unknown-plan9
  1399. - exit 0 ;;
  1400. + exit ;;
  1401. *:TOPS-10:*:*)
  1402. echo pdp10-unknown-tops10
  1403. - exit 0 ;;
  1404. + exit ;;
  1405. *:TENEX:*:*)
  1406. echo pdp10-unknown-tenex
  1407. - exit 0 ;;
  1408. + exit ;;
  1409. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1410. echo pdp10-dec-tops20
  1411. - exit 0 ;;
  1412. + exit ;;
  1413. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1414. echo pdp10-xkl-tops20
  1415. - exit 0 ;;
  1416. + exit ;;
  1417. *:TOPS-20:*:*)
  1418. echo pdp10-unknown-tops20
  1419. - exit 0 ;;
  1420. + exit ;;
  1421. *:ITS:*:*)
  1422. echo pdp10-unknown-its
  1423. - exit 0 ;;
  1424. + exit ;;
  1425. + SEI:*:*:SEIUX)
  1426. + echo mips-sei-seiux${UNAME_RELEASE}
  1427. + exit ;;
  1428. + *:DragonFly:*:*)
  1429. + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1430. + exit ;;
  1431. + *:*VMS:*:*)
  1432. + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1433. + case "${UNAME_MACHINE}" in
  1434. + A*) echo alpha-dec-vms ; exit ;;
  1435. + I*) echo ia64-dec-vms ; exit ;;
  1436. + V*) echo vax-dec-vms ; exit ;;
  1437. + esac ;;
  1438. + *:XENIX:*:SysV)
  1439. + echo i386-pc-xenix
  1440. + exit ;;
  1441. + i*86:skyos:*:*)
  1442. + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1443. + exit ;;
  1444. esac
  1445. #echo '(No uname command or uname output not recognized.)' 1>&2
  1446. @@ -1198,7 +1295,7 @@
  1447. #endif
  1448. #if defined (__arm) && defined (__acorn) && defined (__unix)
  1449. - printf ("arm-acorn-riscix"); exit (0);
  1450. + printf ("arm-acorn-riscix\n"); exit (0);
  1451. #endif
  1452. #if defined (hp300) && !defined (hpux)
  1453. @@ -1287,12 +1384,12 @@
  1454. }
  1455. EOF
  1456. -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
  1457. -rm -f $dummy.c $dummy && rmdir $tmpdir
  1458. +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1459. + { echo "$SYSTEM_NAME"; exit; }
  1460. # Apollos put the system type in the environment.
  1461. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
  1462. +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1463. # Convex versions that predate uname can use getsysinfo(1)
  1464. @@ -1301,22 +1398,22 @@
  1465. case `getsysinfo -f cpu_type` in
  1466. c1*)
  1467. echo c1-convex-bsd
  1468. - exit 0 ;;
  1469. + exit ;;
  1470. c2*)
  1471. if getsysinfo -f scalar_acc
  1472. then echo c32-convex-bsd
  1473. else echo c2-convex-bsd
  1474. fi
  1475. - exit 0 ;;
  1476. + exit ;;
  1477. c34*)
  1478. echo c34-convex-bsd
  1479. - exit 0 ;;
  1480. + exit ;;
  1481. c38*)
  1482. echo c38-convex-bsd
  1483. - exit 0 ;;
  1484. + exit ;;
  1485. c4*)
  1486. echo c4-convex-bsd
  1487. - exit 0 ;;
  1488. + exit ;;
  1489. esac
  1490. fi
  1491. @@ -1327,7 +1424,9 @@
  1492. the operating system you are using. It is advised that you
  1493. download the most up to date version of the config scripts from
  1494. - ftp://ftp.gnu.org/pub/gnu/config/
  1495. + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
  1496. +and
  1497. + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
  1498. If the version you run ($0) is already up to date, please
  1499. send the following data and any information you think might be
  1500. --- sudo-1.6.8p12.orig/config.sub
  1501. +++ sudo-1.6.8p12/config.sub
  1502. @@ -1,11 +1,9 @@
  1503. #! /bin/sh
  1504. # Configuration validation subroutine script.
  1505. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  1506. -# 2000, 2001, 2002 Free Software Foundation, Inc.
  1507. -#
  1508. -# $Sudo: config.sub,v 1.11 2003/01/20 21:07:51 millert Exp $
  1509. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  1510. -timestamp='2002-11-30'
  1511. +timestamp='2005-07-08'
  1512. # This file is (in principle) common to ALL GNU software.
  1513. # The presence of a machine in this file suggests that SOME GNU software
  1514. @@ -23,14 +21,15 @@
  1515. #
  1516. # You should have received a copy of the GNU General Public License
  1517. # along with this program; if not, write to the Free Software
  1518. -# Foundation, Inc., 59 Temple Place - Suite 330,
  1519. -# Boston, MA 02111-1307, USA.
  1520. -
  1521. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  1522. +# 02110-1301, USA.
  1523. +#
  1524. # As a special exception to the GNU General Public License, if you
  1525. # distribute this file as part of a program that contains a
  1526. # configuration script generated by Autoconf, you may include it under
  1527. # the same distribution terms that you use for the rest of that program.
  1528. +
  1529. # Please send patches to <config-patches@gnu.org>. Submit a context
  1530. # diff and a properly formatted ChangeLog entry.
  1531. #
  1532. @@ -72,7 +71,7 @@
  1533. version="\
  1534. GNU config.sub ($timestamp)
  1535. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  1536. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  1537. Free Software Foundation, Inc.
  1538. This is free software; see the source for copying conditions. There is NO
  1539. @@ -85,11 +84,11 @@
  1540. while test $# -gt 0 ; do
  1541. case $1 in
  1542. --time-stamp | --time* | -t )
  1543. - echo "$timestamp" ; exit 0 ;;
  1544. + echo "$timestamp" ; exit ;;
  1545. --version | -v )
  1546. - echo "$version" ; exit 0 ;;
  1547. + echo "$version" ; exit ;;
  1548. --help | --h* | -h )
  1549. - echo "$usage"; exit 0 ;;
  1550. + echo "$usage"; exit ;;
  1551. -- ) # Stop option processing
  1552. shift; break ;;
  1553. - ) # Use stdin as input.
  1554. @@ -101,7 +100,7 @@
  1555. *local*)
  1556. # First pass through any local machine types.
  1557. echo $1
  1558. - exit 0;;
  1559. + exit ;;
  1560. * )
  1561. break ;;
  1562. @@ -120,7 +119,8 @@
  1563. # Here we must recognize all the valid KERNEL-OS combinations.
  1564. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  1565. case $maybe_os in
  1566. - nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
  1567. + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
  1568. + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
  1569. os=-$maybe_os
  1570. basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  1571. ;;
  1572. @@ -146,7 +146,7 @@
  1573. -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  1574. -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  1575. -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  1576. - -apple | -axis | -sr2201*)
  1577. + -apple | -axis | -knuth | -cray)
  1578. os=
  1579. basic_machine=$1
  1580. ;;
  1581. @@ -230,14 +230,16 @@
  1582. | a29k \
  1583. | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
  1584. | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
  1585. + | am33_2.0 \
  1586. | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
  1587. - | clipper \
  1588. + | bfin \
  1589. + | c4x | clipper \
  1590. | d10v | d30v | dlx | dsp16xx \
  1591. | fr30 | frv \
  1592. | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  1593. | i370 | i860 | i960 | ia64 \
  1594. - | ip2k \
  1595. - | m32r | m68000 | m68k | m88k | mcore \
  1596. + | ip2k | iq2000 \
  1597. + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
  1598. | mips | mipsbe | mipseb | mipsel | mipsle \
  1599. | mips16 \
  1600. | mips64 | mips64el \
  1601. @@ -246,28 +248,37 @@
  1602. | mips64vr4100 | mips64vr4100el \
  1603. | mips64vr4300 | mips64vr4300el \
  1604. | mips64vr5000 | mips64vr5000el \
  1605. + | mips64vr5900 | mips64vr5900el \
  1606. | mipsisa32 | mipsisa32el \
  1607. + | mipsisa32r2 | mipsisa32r2el \
  1608. | mipsisa64 | mipsisa64el \
  1609. + | mipsisa64r2 | mipsisa64r2el \
  1610. | mipsisa64sb1 | mipsisa64sb1el \
  1611. | mipsisa64sr71k | mipsisa64sr71kel \
  1612. | mipstx39 | mipstx39el \
  1613. | mn10200 | mn10300 \
  1614. + | ms1 \
  1615. + | msp430 \
  1616. | ns16k | ns32k \
  1617. - | openrisc | or32 \
  1618. + | or32 \
  1619. | pdp10 | pdp11 | pj | pjl \
  1620. | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
  1621. | pyramid \
  1622. - | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
  1623. + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
  1624. | sh64 | sh64le \
  1625. - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
  1626. + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
  1627. + | sparcv8 | sparcv9 | sparcv9b \
  1628. | strongarm \
  1629. - | tahoe | thumb | tic80 | tron \
  1630. + | tahoe | thumb | tic4x | tic80 | tron \
  1631. | v850 | v850e \
  1632. | we32k \
  1633. - | x86 | xscale | xstormy16 | xtensa \
  1634. + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
  1635. | z8k)
  1636. basic_machine=$basic_machine-unknown
  1637. ;;
  1638. + m32c)
  1639. + basic_machine=$basic_machine-unknown
  1640. + ;;
  1641. m6811 | m68hc11 | m6812 | m68hc12)
  1642. # Motorola 68HC11/12.
  1643. basic_machine=$basic_machine-unknown
  1644. @@ -295,19 +306,19 @@
  1645. | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
  1646. | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
  1647. | avr-* \
  1648. - | bs2000-* \
  1649. - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
  1650. - | clipper-* | cydra-* \
  1651. + | bfin-* | bs2000-* \
  1652. + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
  1653. + | clipper-* | craynv-* | cydra-* \
  1654. | d10v-* | d30v-* | dlx-* \
  1655. | elxsi-* \
  1656. | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
  1657. | h8300-* | h8500-* \
  1658. | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
  1659. | i*86-* | i860-* | i960-* | ia64-* \
  1660. - | ip2k-* \
  1661. - | m32r-* \
  1662. + | ip2k-* | iq2000-* \
  1663. + | m32r-* | m32rle-* \
  1664. | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
  1665. - | m88110-* | m88k-* | mcore-* \
  1666. + | m88110-* | m88k-* | maxq-* | mcore-* \
  1667. | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
  1668. | mips16-* \
  1669. | mips64-* | mips64el-* \
  1670. @@ -316,29 +327,40 @@
  1671. | mips64vr4100-* | mips64vr4100el-* \
  1672. | mips64vr4300-* | mips64vr4300el-* \
  1673. | mips64vr5000-* | mips64vr5000el-* \
  1674. + | mips64vr5900-* | mips64vr5900el-* \
  1675. | mipsisa32-* | mipsisa32el-* \
  1676. + | mipsisa32r2-* | mipsisa32r2el-* \
  1677. | mipsisa64-* | mipsisa64el-* \
  1678. + | mipsisa64r2-* | mipsisa64r2el-* \
  1679. | mipsisa64sb1-* | mipsisa64sb1el-* \
  1680. | mipsisa64sr71k-* | mipsisa64sr71kel-* \
  1681. - | mipstx39 | mipstx39el \
  1682. + | mipstx39-* | mipstx39el-* \
  1683. + | mmix-* \
  1684. + | ms1-* \
  1685. + | msp430-* \
  1686. | none-* | np1-* | ns16k-* | ns32k-* \
  1687. | orion-* \
  1688. | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
  1689. | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
  1690. | pyramid-* \
  1691. | romp-* | rs6000-* \
  1692. - | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
  1693. + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
  1694. | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
  1695. - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
  1696. - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
  1697. - | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
  1698. + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
  1699. + | sparclite-* \
  1700. + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
  1701. + | tahoe-* | thumb-* \
  1702. + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
  1703. + | tron-* \
  1704. | v850-* | v850e-* | vax-* \
  1705. | we32k-* \
  1706. - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
  1707. - | xtensa-* \
  1708. + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
  1709. + | xstormy16-* | xtensa-* \
  1710. | ymp-* \
  1711. | z8k-*)
  1712. ;;
  1713. + m32c-*)
  1714. + ;;
  1715. # Recognize the various machine names and aliases which stand
  1716. # for a CPU type and a company and sometimes even an OS.
  1717. 386bsd)
  1718. @@ -355,6 +377,9 @@
  1719. basic_machine=a29k-amd
  1720. os=-udi
  1721. ;;
  1722. + abacus)
  1723. + basic_machine=abacus-unknown
  1724. + ;;
  1725. adobe68k)
  1726. basic_machine=m68010-adobe
  1727. os=-scout
  1728. @@ -434,12 +459,27 @@
  1729. basic_machine=j90-cray
  1730. os=-unicos
  1731. ;;
  1732. + craynv)
  1733. + basic_machine=craynv-cray
  1734. + os=-unicosmp
  1735. + ;;
  1736. + cr16c)
  1737. + basic_machine=cr16c-unknown
  1738. + os=-elf
  1739. + ;;
  1740. crds | unos)
  1741. basic_machine=m68k-crds
  1742. ;;
  1743. + crisv32 | crisv32-* | etraxfs*)
  1744. + basic_machine=crisv32-axis
  1745. + ;;
  1746. cris | cris-* | etrax*)
  1747. basic_machine=cris-axis
  1748. ;;
  1749. + crx)
  1750. + basic_machine=crx-unknown
  1751. + os=-elf
  1752. + ;;
  1753. da30 | da30-*)
  1754. basic_machine=m68k-da30
  1755. ;;
  1756. @@ -462,6 +502,10 @@
  1757. basic_machine=m88k-motorola
  1758. os=-sysv3
  1759. ;;
  1760. + djgpp)
  1761. + basic_machine=i586-pc
  1762. + os=-msdosdjgpp
  1763. + ;;
  1764. dpx20 | dpx20-*)
  1765. basic_machine=rs6000-bull
  1766. os=-bosx
  1767. @@ -515,10 +559,6 @@
  1768. basic_machine=h8500-hitachi
  1769. os=-hms
  1770. ;;
  1771. - sr2201*)
  1772. - basic_machine=harp1e-hitachi
  1773. - os=-hiuxmpp
  1774. - ;;
  1775. harris)
  1776. basic_machine=m88k-harris
  1777. os=-sysv3
  1778. @@ -644,10 +684,6 @@
  1779. mips3*)
  1780. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  1781. ;;
  1782. - mmix*)
  1783. - basic_machine=mmix-knuth
  1784. - os=-mmixware
  1785. - ;;
  1786. monitor)
  1787. basic_machine=m68k-rom68k
  1788. os=-coff
  1789. @@ -735,9 +771,12 @@
  1790. basic_machine=hppa1.1-oki
  1791. os=-proelf
  1792. ;;
  1793. - or32 | or32-*)
  1794. + openrisc | openrisc-*)
  1795. basic_machine=or32-unknown
  1796. - os=-coff
  1797. + ;;
  1798. + os400)
  1799. + basic_machine=powerpc-ibm
  1800. + os=-os400
  1801. ;;
  1802. OSE68000 | ose68000)
  1803. basic_machine=m68000-ericsson
  1804. @@ -770,18 +809,24 @@
  1805. pentiumpro | p6 | 6x86 | athlon | athlon_*)
  1806. basic_machine=i686-pc
  1807. ;;
  1808. - pentiumii | pentium2)
  1809. + pentiumii | pentium2 | pentiumiii | pentium3)
  1810. basic_machine=i686-pc
  1811. ;;
  1812. + pentium4)
  1813. + basic_machine=i786-pc
  1814. + ;;
  1815. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  1816. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  1817. ;;
  1818. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  1819. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  1820. ;;
  1821. - pentiumii-* | pentium2-*)
  1822. + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  1823. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  1824. ;;
  1825. + pentium4-*)
  1826. + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  1827. + ;;
  1828. pn)
  1829. basic_machine=pn-gould
  1830. ;;
  1831. @@ -840,6 +885,10 @@
  1832. sb1el)
  1833. basic_machine=mipsisa64sb1el-unknown
  1834. ;;
  1835. + sei)
  1836. + basic_machine=mips-sei
  1837. + os=-seiux
  1838. + ;;
  1839. sequent)
  1840. basic_machine=i386-sequent
  1841. ;;
  1842. @@ -847,6 +896,9 @@
  1843. basic_machine=sh-hitachi
  1844. os=-hms
  1845. ;;
  1846. + sh64)
  1847. + basic_machine=sh64-unknown
  1848. + ;;
  1849. sparclite-wrs | simso-wrs)
  1850. basic_machine=sparclite-wrs
  1851. os=-vxworks
  1852. @@ -913,10 +965,6 @@
  1853. basic_machine=i386-sequent
  1854. os=-dynix
  1855. ;;
  1856. - t3d)
  1857. - basic_machine=alpha-cray
  1858. - os=-unicos
  1859. - ;;
  1860. t3e)
  1861. basic_machine=alphaev5-cray
  1862. os=-unicos
  1863. @@ -925,14 +973,18 @@
  1864. basic_machine=t90-cray
  1865. os=-unicos
  1866. ;;
  1867. - tic4x | c4x*)
  1868. - basic_machine=tic4x-unknown
  1869. - os=-coff
  1870. - ;;
  1871. tic54x | c54x*)
  1872. basic_machine=tic54x-unknown
  1873. os=-coff
  1874. ;;
  1875. + tic55x | c55x*)
  1876. + basic_machine=tic55x-unknown
  1877. + os=-coff
  1878. + ;;
  1879. + tic6x | c6x*)
  1880. + basic_machine=tic6x-unknown
  1881. + os=-coff
  1882. + ;;
  1883. tx39)
  1884. basic_machine=mipstx39-unknown
  1885. ;;
  1886. @@ -946,6 +998,10 @@
  1887. tower | tower-32)
  1888. basic_machine=m68k-ncr
  1889. ;;
  1890. + tpf)
  1891. + basic_machine=s390x-ibm
  1892. + os=-tpf
  1893. + ;;
  1894. udi29k)
  1895. basic_machine=a29k-amd
  1896. os=-udi
  1897. @@ -989,6 +1045,10 @@
  1898. basic_machine=hppa1.1-winbond
  1899. os=-proelf
  1900. ;;
  1901. + xbox)
  1902. + basic_machine=i686-pc
  1903. + os=-mingw32
  1904. + ;;
  1905. xps | xps100)
  1906. basic_machine=xps100-honeywell
  1907. ;;
  1908. @@ -1019,6 +1079,9 @@
  1909. romp)
  1910. basic_machine=romp-ibm
  1911. ;;
  1912. + mmix)
  1913. + basic_machine=mmix-knuth
  1914. + ;;
  1915. rs6000)
  1916. basic_machine=rs6000-ibm
  1917. ;;
  1918. @@ -1035,13 +1098,10 @@
  1919. we32k)
  1920. basic_machine=we32k-att
  1921. ;;
  1922. - sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
  1923. + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
  1924. basic_machine=sh-unknown
  1925. ;;
  1926. - sh64)
  1927. - basic_machine=sh64-unknown
  1928. - ;;
  1929. - sparc | sparcv9 | sparcv9b)
  1930. + sparc | sparcv8 | sparcv9 | sparcv9b)
  1931. basic_machine=sparc-sun
  1932. ;;
  1933. cydra)
  1934. @@ -1114,19 +1174,21 @@
  1935. | -aos* \
  1936. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1937. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1938. - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  1939. - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1940. + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
  1941. + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1942. + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1943. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1944. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1945. | -chorusos* | -chorusrdb* \
  1946. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1947. - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  1948. + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
  1949. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1950. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1951. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1952. | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1953. | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1954. - | -powermax* | -dnix*)
  1955. + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1956. + | -skyos* | -haiku*)
  1957. # Remember, each alternative MUST END IN *, to match a version number.
  1958. ;;
  1959. -qnx*)
  1960. @@ -1144,12 +1206,15 @@
  1961. os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1962. ;;
  1963. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1964. - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  1965. + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1966. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1967. ;;
  1968. -mac*)
  1969. os=`echo $os | sed -e 's|mac|macos|'`
  1970. ;;
  1971. + -linux-dietlibc)
  1972. + os=-linux-dietlibc
  1973. + ;;
  1974. -linux*)
  1975. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1976. ;;
  1977. @@ -1162,6 +1227,9 @@
  1978. -opened*)
  1979. os=-openedition
  1980. ;;
  1981. + -os400*)
  1982. + os=-os400
  1983. + ;;
  1984. -wince*)
  1985. os=-wince
  1986. ;;
  1987. @@ -1183,6 +1251,9 @@
  1988. -atheos*)
  1989. os=-atheos
  1990. ;;
  1991. + -syllable*)
  1992. + os=-syllable
  1993. + ;;
  1994. -386bsd)
  1995. os=-bsd
  1996. ;;
  1997. @@ -1205,6 +1276,9 @@
  1998. -sinix*)
  1999. os=-sysv4
  2000. ;;
  2001. + -tpf*)
  2002. + os=-tpf
  2003. + ;;
  2004. -triton*)
  2005. os=-sysv3
  2006. ;;
  2007. @@ -1235,6 +1309,15 @@
  2008. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  2009. os=-mint
  2010. ;;
  2011. + -aros*)
  2012. + os=-aros
  2013. + ;;
  2014. + -kaos*)
  2015. + os=-kaos
  2016. + ;;
  2017. + -zvmoe)
  2018. + os=-zvmoe
  2019. + ;;
  2020. -none)
  2021. ;;
  2022. *)
  2023. @@ -1266,6 +1349,9 @@
  2024. arm*-semi)
  2025. os=-aout
  2026. ;;
  2027. + c4x-* | tic4x-*)
  2028. + os=-coff
  2029. + ;;
  2030. # This must come before the *-dec entry.
  2031. pdp10-*)
  2032. os=-tops20
  2033. @@ -1309,9 +1395,15 @@
  2034. *-be)
  2035. os=-beos
  2036. ;;
  2037. + *-haiku)
  2038. + os=-haiku
  2039. + ;;
  2040. *-ibm)
  2041. os=-aix
  2042. ;;
  2043. + *-knuth)
  2044. + os=-mmixware
  2045. + ;;
  2046. *-wec)
  2047. os=-proelf
  2048. ;;
  2049. @@ -1444,9 +1536,15 @@
  2050. -mvs* | -opened*)
  2051. vendor=ibm
  2052. ;;
  2053. + -os400*)
  2054. + vendor=ibm
  2055. + ;;
  2056. -ptx*)
  2057. vendor=sequent
  2058. ;;
  2059. + -tpf*)
  2060. + vendor=ibm
  2061. + ;;
  2062. -vxsim* | -vxworks* | -windiss*)
  2063. vendor=wrs
  2064. ;;
  2065. @@ -1471,7 +1569,7 @@
  2066. esac
  2067. echo $basic_machine$os
  2068. -exit 0
  2069. +exit
  2070. # Local variables:
  2071. # eval: (add-hook 'write-file-hooks 'time-stamp)
  2072. --- sudo-1.6.8p12.orig/sudoers
  2073. +++ sudo-1.6.8p12/sudoers
  2074. @@ -1,10 +1,17 @@
  2075. # sudoers file.
  2076. #
  2077. # This file MUST be edited with the 'visudo' command as root.
  2078. +# 'visudo' edits the suoders file in a safe fashion. visudo
  2079. +# locks the sudoers file against multiple simultaneous edits,
  2080. +# provides basic sanity checks, and checks for syntax errors. If
  2081. +# the sudoers file is currently being edited you will receive a
  2082. +# message to try again later.
  2083. #
  2084. # See the sudoers man page for the details on how to write a sudoers file.
  2085. #
  2086. +# Defaults syslog=auth, secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
  2087. +
  2088. # Host alias specification
  2089. # User alias specification
  2090. --- sudo-1.6.8p12.orig/debian/dirs
  2091. +++ sudo-1.6.8p12/debian/dirs
  2092. @@ -0,0 +1,7 @@
  2093. +etc/pam.d
  2094. +usr/bin
  2095. +usr/share/man/man8
  2096. +usr/share/man/man5
  2097. +usr/sbin
  2098. +usr/share/doc/sudo/examples
  2099. +usr/share/lintian/overrides
  2100. --- sudo-1.6.8p12.orig/debian/docs
  2101. +++ sudo-1.6.8p12/debian/docs
  2102. @@ -0,0 +1,9 @@
  2103. +debian/OPTIONS
  2104. +BUGS
  2105. +RUNSON
  2106. +UPGRADE
  2107. +PORTING
  2108. +TODO
  2109. +HISTORY
  2110. +README
  2111. +TROUBLESHOOTING
  2112. --- sudo-1.6.8p12.orig/debian/sudo-ldap.init.d
  2113. +++ sudo-1.6.8p12/debian/sudo-ldap.init.d
  2114. @@ -0,0 +1,31 @@
  2115. +#! /bin/sh
  2116. +
  2117. +### BEGIN INIT INFO
  2118. +# Provides: sudu
  2119. +# Required-Start: $local_fs $remote_fs
  2120. +# Required-Stop:
  2121. +# Default-Start: S 1 2 3 4 5
  2122. +# Default-Stop: 0 6
  2123. +### END INIT INFO
  2124. +
  2125. +N=/etc/init.d/sudo
  2126. +
  2127. +set -e
  2128. +
  2129. +case "$1" in
  2130. + start)
  2131. + # make sure privileges don't persist across reboots
  2132. + if [ -d /var/run/sudo ]
  2133. + then
  2134. + find /var/run/sudo -type f -exec touch -t 198501010000 '{}' \;
  2135. + fi
  2136. + ;;
  2137. + stop|reload|restart|force-reload)
  2138. + ;;
  2139. + *)
  2140. + echo "Usage: $N {start|stop|restart|force-reload}" >&2
  2141. + exit 1
  2142. + ;;
  2143. +esac
  2144. +
  2145. +exit 0
  2146. --- sudo-1.6.8p12.orig/debian/control
  2147. +++ sudo-1.6.8p12/debian/control
  2148. @@ -0,0 +1,32 @@
  2149. +Source: sudo
  2150. +Section: admin
  2151. +Priority: optional
  2152. +Maintainer: Bdale Garbee <bdale@gag.com>
  2153. +Build-Depends: debhelper (>= 5), libpam0g-dev, libldap2-dev
  2154. +Standards-Version: 3.6.2.1
  2155. +
  2156. +Package: sudo
  2157. +Architecture: any
  2158. +Depends: ${shlibs:Depends}, libpam-modules
  2159. +Conflicts: sudo-ldap
  2160. +Replaces: sudo-ldap
  2161. +Description: Provide limited super user privileges to specific users
  2162. + Sudo is a program designed to allow a sysadmin to give limited root
  2163. + privileges to users and log root activity. The basic philosophy is to give
  2164. + as few privileges as possible but still allow people to get their work done.
  2165. + .
  2166. + This version is built with minimal shared library dependencies, use the
  2167. + sudo-ldap package instead if you need LDAP support.
  2168. +
  2169. +Package: sudo-ldap
  2170. +Architecture: any
  2171. +Depends: ${shlibs:Depends}, libpam-modules
  2172. +Conflicts: sudo
  2173. +Replaces: sudo
  2174. +Provides: sudo
  2175. +Description: Provide limited super user privileges to specific users
  2176. + Sudo is a program designed to allow a sysadmin to give limited root
  2177. + privileges to users and log root activity. The basic philosophy is to give
  2178. + as few privileges as possible but still allow people to get their work done.
  2179. + .
  2180. + This version is built with LDAP support.
  2181. --- sudo-1.6.8p12.orig/debian/sudo-ldap.postrm
  2182. +++ sudo-1.6.8p12/debian/sudo-ldap.postrm
  2183. @@ -0,0 +1,21 @@
  2184. +#! /bin/sh
  2185. +
  2186. +set -e
  2187. +
  2188. +case "$1" in
  2189. + purge)
  2190. + rm -f /etc/sudoers
  2191. + ;;
  2192. +
  2193. + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
  2194. + ;;
  2195. +
  2196. + *)
  2197. + echo "postrm called with unknown argument \`$1'" >&2
  2198. + exit 1
  2199. +
  2200. +esac
  2201. +
  2202. +#DEBHELPER#
  2203. +
  2204. +exit 0
  2205. --- sudo-1.6.8p12.orig/debian/prerm
  2206. +++ sudo-1.6.8p12/debian/prerm
  2207. @@ -0,0 +1,37 @@
  2208. +#!/bin/sh
  2209. +
  2210. +set -e
  2211. +
  2212. +check_password() {
  2213. + if [ ! "$SUDO_FORCE_REMOVE" = "yes" ]; then
  2214. + # let's check whether the root account is locked.
  2215. + # if it is, we're not going another step. No Sirreee!
  2216. + passwd=$(getent shadow root|cut -f2 -d:)
  2217. + if [ "$passwd" = "*" -o "$passwd" = "!" ]; then
  2218. + # yup, password is locked
  2219. + echo "You have asked that the sudo package be removed,"
  2220. + echo "but no root password has been set."
  2221. + echo "Without sudo, you may not be able to gain administrative privileges."
  2222. + echo
  2223. + echo "If you would prefer to access the root account with su(1)"
  2224. + echo "or by logging in directly,"
  2225. + echo "you must set a root password with \"sudo passwd\"."
  2226. + echo
  2227. + echo "If you have arranged other means to access the root account,"
  2228. + echo "and you are sure this is what you want,"
  2229. + echo "you may bypass this check by setting an environment variable "
  2230. + echo "(export SUDO_FORCE_REMOVE=yes)."
  2231. + echo
  2232. + echo "Refusing to remove sudo."
  2233. + exit 1
  2234. + fi
  2235. + fi
  2236. +}
  2237. +
  2238. +case $1 in
  2239. + remove)
  2240. + check_password;
  2241. + ;;
  2242. + *)
  2243. + ;;
  2244. +esac
  2245. --- sudo-1.6.8p12.orig/debian/rules
  2246. +++ sudo-1.6.8p12/debian/rules
  2247. @@ -0,0 +1,140 @@
  2248. +#!/usr/bin/make -f
  2249. +
  2250. +export DH_VERBOSE=1
  2251. +
  2252. +CFLAGS = -O2 -Wall -Wno-comment
  2253. +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  2254. +CFLAGS += -g
  2255. +endif
  2256. +export CFLAGS
  2257. +
  2258. +build: config-stamp
  2259. +config-stamp:
  2260. + dh_testdir
  2261. +
  2262. + # simple version
  2263. + mkdir -p build-simple
  2264. + cd build-simple && ../configure --prefix=/usr -v \
  2265. + --with-all-insults \
  2266. + --with-exempt=sudo --with-pam --with-fqdn \
  2267. + --with-logging=syslog --with-logfac=authpriv \
  2268. + --with-env-editor --with-editor=/usr/bin/editor \
  2269. + --with-timeout=15 --with-password-timeout=0 \
  2270. + --disable-root-mailer --disable-setresuid \
  2271. + --with-sendmail=/usr/sbin/sendmail \
  2272. + --without-lecture \
  2273. + --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
  2274. +
  2275. + # LDAP version
  2276. + mkdir -p build-ldap
  2277. + cd build-ldap && ../configure --prefix=/usr -v \
  2278. + --with-all-insults \
  2279. + --with-exempt=sudo --with-pam --with-ldap --with-fqdn \
  2280. + --with-logging=syslog --with-logfac=authpriv \
  2281. + --with-env-editor --with-editor=/usr/bin/editor \
  2282. + --with-timeout=15 --with-password-timeout=0 \
  2283. + --disable-root-mailer --disable-setresuid \
  2284. + --with-sendmail=/usr/sbin/sendmail \
  2285. + --with-ldap-conf-file=/etc/ldap/ldap.conf \
  2286. + --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
  2287. +
  2288. + touch config-stamp
  2289. +
  2290. +build: build-stamp
  2291. +build-stamp: config-stamp
  2292. + dh_testdir
  2293. +
  2294. + -$(MAKE) -C build-simple
  2295. + -$(MAKE) -C build-ldap
  2296. +
  2297. + touch build-stamp
  2298. +
  2299. +clean:
  2300. + dh_testdir
  2301. + dh_testroot
  2302. + rm -f config-stamp build-stamp
  2303. + rm -rf build-simple build-ldap
  2304. + rm -f config.cache
  2305. +
  2306. + -test -r /usr/share/misc/config.sub && \
  2307. + cp -f /usr/share/misc/config.sub config.sub
  2308. + -test -r /usr/share/misc/config.guess && \
  2309. + cp -f /usr/share/misc/config.guess config.guess
  2310. +
  2311. + dh_clean
  2312. +
  2313. +install: build-stamp
  2314. + dh_testdir
  2315. + dh_testroot
  2316. + dh_clean -k
  2317. + dh_installdirs
  2318. +
  2319. + # simple version
  2320. + install -o root -g root -m 4755 -s build-simple/sudo debian/sudo/usr/bin/sudo
  2321. + ln -sf sudo debian/sudo/usr/bin/sudoedit
  2322. + install -o root -g root -m 0755 -s build-simple/visudo \
  2323. + debian/sudo/usr/sbin/visudo
  2324. + install -o root -g root -m 0644 build-simple/sudo.man \
  2325. + debian/sudo/usr/share/man/man8/sudo.8
  2326. + ln -sf sudo.8 debian/sudo/usr/share/man/man8/sudoedit.8
  2327. + install -o root -g root -m 0644 build-simple/visudo.man \
  2328. + debian/sudo/usr/share/man/man8/visudo.8
  2329. + install -o root -g root -m 0644 build-simple/sudoers.man \
  2330. + debian/sudo/usr/share/man/man5/sudoers.5
  2331. + install -o root -g root -m 0644 sample.sudoers \
  2332. + debian/sudo/usr/share/doc/sudo/examples/sudoers
  2333. + install -o root -g root -m 0644 debian/sudo.pam \
  2334. + debian/sudo/etc/pam.d/sudo
  2335. +
  2336. + install -o root -g root -m 0644 debian/sudo.lintian \
  2337. + debian/sudo/usr/share/lintian/overrides/sudo
  2338. +
  2339. + install -o root -g root -m 0644 debian/sudo_root.8 \
  2340. + debian/sudo/usr/share/man/man8/sudo_root.8
  2341. +
  2342. + # LDAP version
  2343. + install -o root -g root -m 4755 -s build-ldap/sudo debian/sudo-ldap/usr/bin/sudo
  2344. + ln -sf sudo debian/sudo-ldap/usr/bin/sudoedit
  2345. + install -o root -g root -m 0755 -s build-ldap/visudo debian/sudo-ldap/usr/sbin/visudo
  2346. + install -o root -g root -m 0644 build-ldap/sudo.man \
  2347. + debian/sudo-ldap/usr/share/man/man8/sudo.8
  2348. + ln -sf sudo.8 debian/sudo-ldap/usr/share/man/man8/sudoedit.8
  2349. + install -o root -g root -m 0644 build-ldap/visudo.man \
  2350. + debian/sudo-ldap/usr/share/man/man8/visudo.8
  2351. + install -o root -g root -m 0644 build-ldap/sudoers.man \
  2352. + debian/sudo-ldap/usr/share/man/man5/sudoers.5
  2353. + install -o root -g root -m 0644 sample.sudoers \
  2354. + debian/sudo-ldap/usr/share/doc/sudo-ldap/examples/sudoers
  2355. + install -o root -g root -m 0644 debian/sudo.pam \
  2356. + debian/sudo-ldap/etc/pam.d/sudo
  2357. +
  2358. + install -o root -g root -m 0644 debian/sudo-ldap.lintian \
  2359. + debian/sudo-ldap/usr/share/lintian/overrides/sudo-ldap
  2360. +
  2361. + install -o root -g root -m 0644 debian/sudo_root.8 \
  2362. + debian/sudo/usr/share/man/man8/sudo_root.8
  2363. +
  2364. +binary-indep: build install
  2365. +
  2366. +binary-arch: build install
  2367. + dh_testdir
  2368. + dh_testroot
  2369. + dh_installdocs
  2370. + dh_installexamples -A
  2371. +# dh_installinit -psudo -psudo-ldap
  2372. + dh_installmanpages fnmatch.3
  2373. + dh_installinfo -A
  2374. + dh_installchangelogs CHANGES
  2375. + dh_strip
  2376. + dh_compress
  2377. + dh_fixperms
  2378. + chown root.root debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo
  2379. + chmod 4755 debian/sudo/usr/bin/sudo debian/sudo-ldap/usr/bin/sudo
  2380. + dh_installdeb
  2381. + dh_shlibdeps
  2382. + dh_gencontrol
  2383. + dh_md5sums
  2384. + dh_builddeb
  2385. +
  2386. +binary: binary-indep binary-arch
  2387. +.PHONY: build clean binary-indep binary-arch binary install
  2388. --- sudo-1.6.8p12.orig/debian/changelog
  2389. +++ sudo-1.6.8p12/debian/changelog
  2390. @@ -0,0 +1,769 @@
  2391. +sudo (1.6.8p12-1ubuntu6) dapper; urgency=low
  2392. +
  2393. + * env.c: Preserve additional environment variables for non-almighty sudoers:
  2394. + HOME, LOGNAME, DISPLAY, XAUTHORITY, XAUTHORIZATION. Closes: LP#44500
  2395. +
  2396. + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 17 May 2006 09:29:15 +0200
  2397. +
  2398. +sudo (1.6.8p12-1ubuntu5) dapper; urgency=low
  2399. +
  2400. + * env.c: Unbreak the env_keep option. Closes: LP#31690
  2401. + * sudoers: Add some explanatory text why it is a REALLY good idea to use
  2402. + visudo. Closes: LP#11620
  2403. +
  2404. + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 28 Mar 2006 18:52:24 +0200
  2405. +
  2406. +sudo (1.6.8p12-1ubuntu4) dapper; urgency=low
  2407. +
  2408. + * Remove the init script, it only cleans up /var/run which is a tmpfs.
  2409. +
  2410. + -- Scott James Remnant <scott@ubuntu.com> Wed, 22 Feb 2006 16:28:42 +0000
  2411. +
  2412. +sudo (1.6.8p12-1ubuntu3) dapper; urgency=low
  2413. +
  2414. + * Add debian/sudo_root.8: Introduction about root handling in ubuntu with
  2415. + sudo.
  2416. + * debian/rules: Install that new manpage into sudo and sudo-ldap.
  2417. +
  2418. + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 8 Feb 2006 17:01:50 +0100
  2419. +
  2420. +sudo (1.6.8p12-1ubuntu2) dapper; urgency=low
  2421. +
  2422. + * sudo.c: If the user successfully authenticated and he is in the 'admin'
  2423. + group, then create a stamp ~/.sudo_as_admin_successful. A future
  2424. + /etc/profile will evaluate this flag to display a short help about how to
  2425. + execute things as root.
  2426. +
  2427. + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 18 Jan 2006 09:32:02 +0100
  2428. +
  2429. +sudo (1.6.8p12-1ubuntu1) dapper; urgency=low
  2430. +
  2431. + * Resynchronise with Debian, clean up cruft from Ubuntu diff.
  2432. + * debian/postinst: Do not set env_reset flag in newly created sudoers files;
  2433. + it's incompatible with upgrades.
  2434. + * Clean up environment variable handling to fix vulns like CVE-2005-4158 and
  2435. + CVE-2006-0151 once and for all: Only keep known-good variables if user has
  2436. + limited sudo privileges (blacklist -> whitelist) and keep them all for
  2437. + users with unlimited command privileges (to not drive admins and
  2438. + developers up the wall which actually need to pass env variables from time
  2439. + to time).
  2440. + - parse.h, parse.yacc:
  2441. + + Add a new flag 'cmdall' to the matchstack, and a new macro 'cmnd_all'
  2442. + to access it.
  2443. + + In the "cmnd" grammar rule: Set cmdall to TRUE if command specifier is
  2444. + 'ALL', otherwise to FALSE.
  2445. + - sudo.tab.cc: Re-yaccified to match changes to parse.yacc.
  2446. + - sudo.h: Add new sudoers_lookup() return flag FLAG_CMND_ALL.
  2447. + - parse.c, sudoers_lookup(): Set flag FLAG_CMND_ALL if cmnd_all matched.
  2448. + - ldap.c:
  2449. + + sudo_ldap_check_command(): Add return parameter all, set to true
  2450. + if command specifier is 'ALL'.
  2451. + + sudo_ldap_check(): Set flag FLAG_CMND_ALL if sudo_ldap_check_command()
  2452. + returned all=1.
  2453. + - env.c:
  2454. + + Apply Martin Schulze's patch to switch from blacklist to whitelist
  2455. + environment cleaning.
  2456. + + Add parameter 'noclean' to rebuild_env(); if it is != 0, environment
  2457. + variables are not cleaned.
  2458. + - sudo.c: Call rebuild_env() with noclean=1 if FLAG_CMND_ALL is set.
  2459. +
  2460. + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 17 Jan 2006 10:03:05 +0100
  2461. +
  2462. +sudo (1.6.8p12-1) unstable; urgency=low
  2463. +
  2464. + * new upstream version, closes: #342948 (CVE-2005-4158)
  2465. + * add env_reset to the sudoers file we create if none already exists,
  2466. + as a further precaution in response to discussion about CVS-2005-4158
  2467. + * split ldap support into a new sudo-ldap package. I was trying to avoid
  2468. + doing this, but the impact of going from 4 to 17 linked shlibs on the
  2469. + autobuilder chroots is sufficient motivation for me.
  2470. + closes: #344034
  2471. +
  2472. + -- Bdale Garbee <bdale@gag.com> Wed, 28 Dec 2005 13:49:10 -0700
  2473. +
  2474. +sudo (1.6.8p9-4) unstable; urgency=low
  2475. +
  2476. + * enable ldap support, deliver README.LDAP and sudoers2ldif, closes: #283231
  2477. + * merge patch from Martin Pitt / Ubuntu to be more robust about resetting
  2478. + timestamps in the init.d script, closes: #330868
  2479. + * add dependency header to init.d script, closes: #332849
  2480. +
  2481. + -- Bdale Garbee <bdale@gag.com> Sat, 10 Dec 2005 07:47:07 -0800
  2482. +
  2483. +sudo (1.6.8p9-3ubuntu4) dapper; urgency=low
  2484. +
  2485. + * Revert addition of sudo -t, i. e. revert to version 1.6.8p9-3ubuntu1. As
  2486. + per TB discussion, we will not use sudo for implementing
  2487. + https://wiki.ubuntu.com/HideAdminToolsToUsers.
  2488. +
  2489. + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 29 Nov 2005 23:27:42 +0100
  2490. +
  2491. +sudo (1.6.8p9-3ubuntu3) dapper; urgency=low
  2492. +
  2493. + * sudo.c: Log failures even in test mode, to avoid the possibility of
  2494. + silently poking around for interesting sudo privileges. This will generate
  2495. + a lot of auth log clutter in the desktop case, but will not change sudo
  2496. + semantics where it matters (on servers).
  2497. +
  2498. + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 17 Nov 2005 10:35:04 +0100
  2499. +
  2500. +sudo (1.6.8p9-3ubuntu2) dapper; urgency=low
  2501. +
  2502. + * Add option -t which only tests whether the given command can be executed
  2503. + and does not require a password. This is required for the
  2504. + https://wiki.ubuntu.com/HideAdminToolsToUsers spec.
  2505. + * sudo.h: Add MODE_TESTONLY mode.
  2506. + * sudo.c: Add -t parsing and do not actually run the command in test mode,
  2507. + just return success or failure. Also, add the new option to the "usage"
  2508. + output.
  2509. + * sudo.pod: Document new -t option.
  2510. + * Put patch into debian/ubuntu-patches/sudo.add-test-option.patch to have
  2511. + it separate for future merges (requires a manual "make sudo.man.in" to
  2512. + actually run pod2man).
  2513. +
  2514. + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 9 Nov 2005 17:40:43 -0500
  2515. +
  2516. +sudo (1.6.8p9-3ubuntu1) dapper; urgency=low
  2517. +
  2518. + * Resynchronise with Debian.
  2519. +
  2520. + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 9 Nov 2005 17:12:06 -0500
  2521. +
  2522. +sudo (1.6.8p9-3) unstable; urgency=high
  2523. +
  2524. + * update debhelper compatibility level from 2 to 4
  2525. + * add man page symlink for sudoedit
  2526. + * Clean SHELLOPTS and PS4 from the environment before executing programs
  2527. + with sudo permissions [env.c, CAN-2005-2959]
  2528. + * fix typo in manpage pointed out by Moray Allen, closes: #285995
  2529. + * fix paths in sample complex sudoers file, closes: #303542
  2530. + * fix type in sudoers man page, closes: #311244
  2531. +
  2532. + -- Bdale Garbee <bdale@gag.com> Wed, 28 Sep 2005 01:18:04 -0600
  2533. +
  2534. +sudo (1.6.8p9-2ubuntu2) breezy; urgency=low
  2535. +
  2536. + * debian/init.d: When resetting the timestamps of the tty tags, actually
  2537. + touch the files, not the per-user directories. Since bootclean.sh removes
  2538. + /var/run/* anyway, this is no big deal, but clean it up anyway for the
  2539. + sake of correctness. (Ubuntu #16594)
  2540. +
  2541. + -- Martin Pitt <martin.pitt@ubuntu.com> Fri, 30 Sep 2005 09:52:27 +0200
  2542. +
  2543. +sudo (1.6.8p9-2ubuntu1) breezy; urgency=low
  2544. +
  2545. + * Resynchronise with Debian, resolve merging conflicts and unscramble
  2546. + changelog.
  2547. +
  2548. + -- Martin Pitt <martin.pitt@ubuntu.com> Thu, 7 Jul 2005 09:01:48 +0000
  2549. +
  2550. +sudo (1.6.8p9-2) unstable; urgency=high
  2551. +
  2552. + * merge the NMU fix for sudoedit symlink problem that was in 1.6.8p7-1.1,
  2553. + closes: #305735
  2554. +
  2555. + -- Bdale Garbee <bdale@gag.com> Tue, 28 Jun 2005 16:18:47 -0400
  2556. +
  2557. +sudo (1.6.8p9-1) unstable; urgency=high
  2558. +
  2559. + * new upstream version, fixes a race condition in sudo's pathname
  2560. + validation, which is a security issue (CAN-2005-1993),
  2561. + closes: #315115, #315718
  2562. +
  2563. + -- Bdale Garbee <bdale@gag.com> Tue, 28 Jun 2005 15:33:11 -0400
  2564. +
  2565. +sudo (1.6.8p7-1) unstable; urgency=low
  2566. +
  2567. + * new upstream version, closes: #299585
  2568. + * update lintian overrides to squelch the postinst warning
  2569. + * change sudoedit from a hard to a soft link, closes: #296896
  2570. + * fix regex doc in sudoers man page, closes: #300361
  2571. +
  2572. + -- Bdale Garbee <bdale@gag.com> Sat, 26 Mar 2005 22:18:34 -0700
  2573. +
  2574. +sudo (1.6.8p5-1ubuntu3) breezy; urgency=low
  2575. +
  2576. + * SECURITY UPDATE: Fix privilege escalation.
  2577. + * sudo.c, parse.yacc: safe_cmd contains the actually executed program which
  2578. + is normally taken from /etc/sudoers. However, if sudoers contains "ALL"
  2579. + entries that follow the matching entry, safe_cmd was overwritten with the
  2580. + path the user specified on the command line, which opens up the
  2581. + possibility of executing arbitrary commands by generating symlinks to
  2582. + them.
  2583. + * References:
  2584. + CAN-2005-1993
  2585. + http://www.securityfocus.com/archive/1/402741
  2586. +
  2587. + -- Martin Pitt <martin.pitt@ubuntu.com> Tue, 21 Jun 2005 13:41:05 +0200
  2588. +
  2589. +sudo (1.6.8p5-1ubuntu2) hoary; urgency=low
  2590. +
  2591. + * Add !fqdn to the Defaults so we don't die horribly when localhost doesn't
  2592. + resolve (Ubuntu: 2772)
  2593. +
  2594. + -- Thom May <thom@ubuntu.com> Wed, 2 Mar 2005 20:34:20 +0000
  2595. +
  2596. +sudo (1.6.8p5-1ubuntu1) hoary; urgency=low
  2597. +
  2598. + * Resync with Debian
  2599. +
  2600. + -- LaMont Jones <lamont@canonical.com> Mon, 6 Dec 2004 09:31:28 -0700
  2601. +
  2602. +sudo (1.6.8p5-1) unstable; urgency=high
  2603. +
  2604. + * new upstream version
  2605. + * restores ability to use config tuples without a value, which was causing
  2606. + problems on upgrade closes: #283306
  2607. + * deliver sudoedit, closes: #283078
  2608. + * marking urgency high since 283306 is a serious upgrade incompatibility
  2609. +
  2610. + -- Bdale Garbee <bdale@gag.com> Fri, 3 Dec 2004 10:11:16 -0700
  2611. +
  2612. +sudo (1.6.8p3-2) unstable; urgency=high
  2613. +
  2614. + * update pam.d deliverable so ldap works again, closes: #282191
  2615. +
  2616. + -- Bdale Garbee <bdale@gag.com> Mon, 22 Nov 2004 11:44:46 -0700
  2617. +
  2618. +sudo (1.6.8p3-1) unstable; urgency=high
  2619. +
  2620. + * new upstream version, fixes a flaw in sudo's environment sanitizing that
  2621. + could allow a malicious user with permission to run a shell script that
  2622. + utilized the bash shell to run arbitrary commands, closes: #281665
  2623. + * patch the sample sudoers to have the proper path for kill on Debian
  2624. + systems, closes: #263486
  2625. + * patch the sudo manpage to reflect Debian's choice of exempt_group
  2626. + default setting, closes: #236465
  2627. + * patch the sudo manpage to reflect Debian's choice of no timeout on the
  2628. + password prompt, closes: #271194
  2629. +
  2630. + -- Bdale Garbee <bdale@gag.com> Tue, 16 Nov 2004 23:23:41 -0700
  2631. +
  2632. +sudo (1.6.7p5-2ubuntu2) hoary; urgency=low
  2633. +
  2634. + * SECURITY UPDATE: fix input validation flaw
  2635. + * env.c, rebuild_env(): skip variables with values beginnig with "()" to
  2636. + ignore exported bash functions in the sudo environment; this prevents
  2637. + introducing malicious functions with the name of commands that are
  2638. + executed without full path
  2639. + * References:
  2640. + http://www.sudo.ws/sudo/alerts/bash_functions.html
  2641. +
  2642. + -- Martin Pitt <martin.pitt@canonical.com> Wed, 17 Nov 2004 18:54:30 +0100
  2643. +
  2644. +sudo (1.6.7p5-2ubuntu1) hoary; urgency=low
  2645. +
  2646. + * Resynchronise with Debian.
  2647. +
  2648. + -- Scott James Remnant <scott@canonical.com> Wed, 27 Oct 2004 15:06:39 +0100
  2649. +
  2650. +sudo (1.6.7p5-2) unstable; urgency=low
  2651. +
  2652. + * Jeff Bailey reports that seteuid works on current sparc systems, so we
  2653. + no longer need the "grosshack" stuff in the sudo rules file
  2654. + * add a postrm that removes /etc/sudoers on purge. don't do this with the
  2655. + normal conffile mechanism since it would generate noise on every upgrade,
  2656. + closes: #245405
  2657. +
  2658. + -- Bdale Garbee <bdale@gag.com> Tue, 20 Jul 2004 12:29:48 -0400
  2659. +
  2660. +sudo (1.6.7p5-1ubuntu4) warty; urgency=low
  2661. +
  2662. + * Disable lecture by default. (Warty #987)
  2663. +
  2664. + -- Thom May <thom@canonical.com> Wed, 6 Oct 2004 14:31:31 +0100
  2665. +
  2666. +sudo (1.6.7p5-1ubuntu3) warty; urgency=low
  2667. +
  2668. + * Refuse to remove sudo if the root password is not set and the user is
  2669. + running us via sudo
  2670. +
  2671. + -- Thom May <thom@canonical.com> Mon, 27 Sep 2004 15:30:09 +0100
  2672. +
  2673. +sudo (1.6.7p5-1ubuntu2) warty; urgency=low
  2674. +
  2675. + * Add 'Defaults !lecture,tty_tickets' to initial sudoers file.
  2676. +
  2677. + -- Colin Watson <cjwatson@flatline.org.uk> Mon, 23 Aug 2004 21:03:15 +0100
  2678. +
  2679. +sudo (1.6.7p5-1ubuntu1) warty; urgency=low
  2680. +
  2681. + * Remove /etc/sudoers on purge. (Closes: #245405)
  2682. +
  2683. + -- Fabio M. Di Nitto <fabbione@fabbione.net> Mon, 19 Jul 2004 09:42:04 +0200
  2684. +
  2685. +sudo (1.6.7p5-1) unstable; urgency=low
  2686. +
  2687. + * new upstream version, closes: #190265, #193222, #197244
  2688. + * change from '.' to ':' in postinst chown call, closes: #208369
  2689. +
  2690. + -- Bdale Garbee <bdale@gag.com> Tue, 2 Sep 2003 21:27:06 -0600
  2691. +
  2692. +sudo (1.6.7p3-2) unstable; urgency=low
  2693. +
  2694. + * add --disable-setresuid to configure call since 2.2 kernels don't support
  2695. + setresgid, closes: #189044
  2696. + * cosmetic cleanups to debian/rules as long as I'm there
  2697. +
  2698. + -- Bdale Garbee <bdale@gag.com> Tue, 15 Apr 2003 16:04:48 -0600
  2699. +
  2700. +sudo (1.6.7p3-1) unstable; urgency=low
  2701. +
  2702. + * new upstream version
  2703. + * add overrides to quiet lintian about things it doesn't understand,
  2704. + except the source one that can't be overridden until 129510 is fixed
  2705. +
  2706. + -- Bdale Garbee <bdale@gag.com> Mon, 7 Apr 2003 17:34:05 -0600
  2707. +
  2708. +sudo (1.6.6-3) unstable; urgency=low
  2709. +
  2710. + * add code to rules file to update config.sub/guess, closes: #164501
  2711. +
  2712. + -- Bdale Garbee <bdale@gag.com> Sat, 12 Oct 2002 15:35:22 -0600
  2713. +
  2714. +sudo (1.6.6-2) unstable; urgency=low
  2715. +
  2716. + * adopt suggestion from Marcus Brinkmann to feed --with-sendmail option to
  2717. + configure, and lose the build dependency on mail-transport-agent
  2718. + * incorporate changes from LaMont's NMU, closes: #144665, #144737
  2719. + * update init.d to not try and set time on nonexistent timestamp files,
  2720. + closes: #132616
  2721. + * build with --with-all-insults, admin must edit sudoers to turn insults
  2722. + on at runtime if desired, closes: #135374
  2723. + * stop setting /usr/doc symlink in postinst
  2724. +
  2725. + -- Bdale Garbee <bdale@gag.com> Sat, 12 Oct 2002 01:54:24 -0600
  2726. +
  2727. +sudo (1.6.6-1.1) unstable; urgency=high
  2728. +
  2729. + * NMU - patch from Colin Watson <cjwatson@debian.org>, in bts.
  2730. + * Revert patch to auth/pam.c that left pass uninitialized, causing a
  2731. + segfault (Closes: #144665).
  2732. +
  2733. + -- LaMont Jones <lamont@debian.org> Fri, 26 Apr 2002 22:36:04 -0600
  2734. +
  2735. +sudo (1.6.6-1) unstable; urgency=high
  2736. +
  2737. + * new upstream version, fixes security problem with crafty prompts,
  2738. + closes: #144540
  2739. +
  2740. + -- Bdale Garbee <bdale@gag.com> Thu, 25 Apr 2002 12:45:49 -0600
  2741. +
  2742. +sudo (1.6.5p1-4) unstable; urgency=high
  2743. +
  2744. + * apply patch for auth/pam.c to fix yet another way to make sudo segfault
  2745. + if ctrl/C'ed at password prompt, closes: #131235
  2746. +
  2747. + -- Bdale Garbee <bdale@gag.com> Sun, 3 Mar 2002 23:18:56 -0700
  2748. +
  2749. +sudo (1.6.5p1-3) unstable; urgency=high
  2750. +
  2751. + * ugly hack to add --disable-saved-ids when building on sparc in response
  2752. + to 131592, which will be reassigned to glibc for a real fix
  2753. + * urgency high since the sudo currently in testing for sparc is worthless
  2754. +
  2755. + -- Bdale Garbee <bdale@gag.com> Sun, 17 Feb 2002 22:42:10 -0700
  2756. +
  2757. +sudo (1.6.5p1-2) unstable; urgency=high
  2758. +
  2759. + * patch from upstream to fix seg faults caused by versions of pam that
  2760. + follow a NULL pointer, closes: #129512
  2761. +
  2762. + -- Bdale Garbee <bdale@gag.com> Tue, 22 Jan 2002 01:50:13 -0700
  2763. +
  2764. +sudo (1.6.5p1-1) unstable; urgency=high
  2765. +
  2766. + * new upstream version
  2767. + * add --disable-root-mailer option supported by new version to configure
  2768. + call in rules file, closes: #129648
  2769. +
  2770. + -- Bdale Garbee <bdale@gag.com> Fri, 18 Jan 2002 11:29:37 -0700
  2771. +
  2772. +sudo (1.6.4p1-1) unstable; urgency=high
  2773. +
  2774. + * new upstream version, with fix for segfaulting problem in 1.6.4
  2775. +
  2776. + -- Bdale Garbee <bdale@gag.com> Mon, 14 Jan 2002 20:09:46 -0700
  2777. +
  2778. +sudo (1.6.4-1) unstable; urgency=high
  2779. +
  2780. + * new upstream version, includes an important security fix, closes: #127576
  2781. +
  2782. + -- Bdale Garbee <bdale@gag.com> Mon, 14 Jan 2002 09:35:48 -0700
  2783. +
  2784. +sudo (1.6.3p7-5) unstable; urgency=low
  2785. +
  2786. + * only touch /var/run/sudo/* if /var/run/sudo is there, closes: #126872
  2787. + * fix spelling error in init.d, closes: #126847
  2788. +
  2789. + -- Bdale Garbee <bdale@gag.com> Sat, 29 Dec 2001 11:21:43 -0700
  2790. +
  2791. +sudo (1.6.3p7-4) unstable; urgency=medium
  2792. +
  2793. + * use touch to set status files to an ancient date instead of removing them
  2794. + outright on reboot. this achieves the desired effect of keeping elevated
  2795. + privs from living across reboots, without forcing everyone to see the
  2796. + new-sudo-user lecture after every reboot. pick a time that's 'old enough'
  2797. + for systems with good clocks, and 'recent enough' that broken PC hardware
  2798. + setting the clock to commonly-seen bogus dates trips over the "don't trust
  2799. + future timestamps" rule. closes: #76529, #123559
  2800. + * apply patch from Steve Langasek to fix seg faults due to interaction with
  2801. + PAM code. upstream confirms the problem, and says they're fixing this
  2802. + differently for their next release... but this should be useful in the
  2803. + meantime, and would be good to get into woody. closes: #119147
  2804. + * only run the init.d at boot, not on each runlevel change... and don't run
  2805. + it during package configure. closes: #125935
  2806. + * add DEB_BUILD_OPTIONS support to rules file, closes: #94952
  2807. +
  2808. + -- Bdale Garbee <bdale@gag.com> Wed, 26 Dec 2001 12:40:44 -0700
  2809. +
  2810. +sudo (1.6.3p7-3) unstable; urgency=low
  2811. +
  2812. + * apply patch from Fumitoshi UKAI that fixes segfaults when hostname not
  2813. + resolvable, closes: #86062, #69430, #77852, #82744, #55716, #56718,
  2814. + * fix a typo in the manpage, closes: #97368
  2815. + * apply patch to configure.in and run autoconf to fix problem building on
  2816. + the hurd, closes: #96325
  2817. + * add an init.d to clean out /var/run/sudo at boot, so privs are guaranteed
  2818. + to not last across reboots, closes: #76529
  2819. + * clean up lintian-noticed cosmetic packaging issues
  2820. +
  2821. + -- Bdale Garbee <bdale@gag.com> Sat, 1 Dec 2001 02:59:52 -0700
  2822. +
  2823. +sudo (1.6.3p7-2) unstable; urgency=low
  2824. +
  2825. + * update config.sub/guess for hppa support
  2826. +
  2827. + -- Bdale Garbee <bdale@gag.com> Sun, 22 Apr 2001 23:23:42 -0600
  2828. +
  2829. +sudo (1.6.3p7-1) unstable; urgency=low
  2830. +
  2831. + * new upstream version
  2832. + * add build dependency on mail-transport-agent, closes: #90685
  2833. +
  2834. + -- Bdale Garbee <bdale@gag.com> Thu, 12 Apr 2001 17:02:42 -0600
  2835. +
  2836. +sudo (1.6.3p6-1) unstable; urgency=high
  2837. +
  2838. + * new upstream version, fixes buffer overflow problem,
  2839. + closes: #87259, #87278, #87263
  2840. + * revert to using --with-secure-path option at build time, since the option
  2841. + available in sudoers is parsed too late to be useful, and upstream says
  2842. + it won't get fixed quickly. This reopens 85123, which I will mark as
  2843. + forwarded. Closes: #86199, #86117, #85676
  2844. +
  2845. + -- Bdale Garbee <bdale@gag.com> Mon, 26 Feb 2001 11:02:51 -0700
  2846. +
  2847. +sudo (1.6.3p5-2) unstable; urgency=low
  2848. +
  2849. + * lose the dh_suidregister call since it's obsolete
  2850. + * stop using the --with-secure-path option at build time, and instead show
  2851. + how to set it in sudoers. Closes: #85123
  2852. + * freshen config.sub and config.guess for ia64 and hppa
  2853. + * update sudoers man page to indicate exempt_group is on by default,
  2854. + closes: #70847
  2855. +
  2856. + -- Bdale Garbee <bdale@gag.com> Sat, 10 Feb 2001 02:05:17 -0700
  2857. +
  2858. +sudo (1.6.3p5-1) unstable; urgency=low
  2859. +
  2860. + * new upstream version, closes: #63940, #59175, #61817, #64652, #65743
  2861. + * this version restores core dumps before the exec, while leaving them
  2862. + disabled during sudo's internal execution, closes: #58289
  2863. + * update debhelper calls in rules file
  2864. +
  2865. + -- Bdale Garbee <bdale@gag.com> Wed, 16 Aug 2000 00:13:15 -0600
  2866. +
  2867. +sudo (1.6.2p2-1) frozen unstable; urgency=medium
  2868. +
  2869. + * new upstream source resulting from direct collaboration with the upstream
  2870. + author to fix ugly pam-related problems on Debian in 1.6.1 and later.
  2871. + Closes: #56129, #55978, #55979, #56550, #56772
  2872. + * include more upstream documentation, closes: #55054
  2873. + * pam.d fragment update, closes: #56129
  2874. +
  2875. + -- Bdale Garbee <bdale@gag.com> Sun, 27 Feb 2000 11:48:48 -0700
  2876. +
  2877. +sudo (1.6.1-1) unstable; urgency=low
  2878. +
  2879. + * new upstream source, closes: #52750
  2880. +
  2881. + -- Bdale Garbee <bdale@gag.com> Fri, 7 Jan 2000 21:01:42 -0700
  2882. +
  2883. +sudo (1.6-2) unstable; urgency=low
  2884. +
  2885. + * drop suidregister support for this package. The sudo executable is
  2886. + essentially worthless unless it is setuid root, and making suidregister
  2887. + work involves shipping a non-setuid executable in the .deb and setting the
  2888. + perms in the postinst. On a long upgrade run, this can leave the sudo
  2889. + executable 'broken' for a long time, which is unacceptable. With this
  2890. + version, we ship the executable setuid root in the .deb. Closes: #51742
  2891. +
  2892. + -- Bdale Garbee <bdale@gag.com> Wed, 1 Dec 1999 19:59:44 -0700
  2893. +
  2894. +sudo (1.6-1) unstable; urgency=low
  2895. +
  2896. + * new upstream version, many options previously set at compile-time are now
  2897. + configurable at runtime.
  2898. + Closes: #39255, #20996, #29812, #50705, #49148, #48435, #47190, #45639
  2899. + * FHS support
  2900. +
  2901. + -- Bdale Garbee <bdale@gag.com> Tue, 23 Nov 1999 16:51:22 -0700
  2902. +
  2903. +sudo (1.5.9p4-1) unstable; urgency=low
  2904. +
  2905. + * new upstream version, closes: #43464
  2906. + * empty password handling was fixed in 1.5.8, closes: #31863
  2907. +
  2908. + -- Bdale Garbee <bdale@gag.com> Thu, 26 Aug 1999 00:00:57 -0600
  2909. +
  2910. +sudo (1.5.9p1-1) unstable; urgency=low
  2911. +
  2912. + * new upstream version
  2913. +
  2914. + -- Bdale Garbee <bdale@gag.com> Thu, 15 Apr 1999 22:43:29 -0600
  2915. +
  2916. +sudo (1.5.8p1-1) unstable; urgency=medium
  2917. +
  2918. + * new upstream version, closes 33690
  2919. + * add dependency on libpam-modules, closes 34215, 33432
  2920. +
  2921. + -- Bdale Garbee <bdale@gag.com> Mon, 8 Mar 1999 10:27:42 -0700
  2922. +
  2923. +sudo (1.5.7p4-2) unstable; urgency=medium
  2924. +
  2925. + * update the pam fragment provided so that sudo works with latest pam bits,
  2926. + closes 33432
  2927. +
  2928. + -- Bdale Garbee <bdale@gag.com> Sun, 21 Feb 1999 00:22:44 -0700
  2929. +
  2930. +sudo (1.5.7p4-1) unstable; urgency=low
  2931. +
  2932. + * new upstream release
  2933. +
  2934. + -- Bdale Garbee <bdale@gag.com> Sun, 27 Dec 1998 16:13:53 -0700
  2935. +
  2936. +sudo (1.5.6p5-1) unstable; urgency=low
  2937. +
  2938. + * new upstream patch release
  2939. + * add PAM support, closes 28594
  2940. +
  2941. + -- Bdale Garbee <bdale@gag.com> Mon, 2 Nov 1998 00:00:24 -0700
  2942. +
  2943. +sudo (1.5.6p2-2) unstable; urgency=low
  2944. +
  2945. + * update copyright file, closes 24136
  2946. + * review and close forwarded bugs believed fixed in this upstream version,
  2947. + closes 17606, 15786.
  2948. +
  2949. + -- Bdale Garbee <bdale@gag.com> Mon, 5 Oct 1998 22:30:43 -0600
  2950. +
  2951. +sudo (1.5.6p2-1) unstable; urgency=low
  2952. +
  2953. + * new upstream release
  2954. +
  2955. + -- Bdale Garbee <bdale@gag.com> Mon, 5 Oct 1998 22:30:43 -0600
  2956. +
  2957. +sudo (1.5.4-4) frozen unstable; urgency=low
  2958. +
  2959. + * update postinst to use groupadd, closes 21403
  2960. + * move the suidregister stuff earlier in postinst to ensure it always runs
  2961. +
  2962. + -- Bdale Garbee <bdale@gag.com> Sun, 19 Apr 1998 22:07:45 -0600
  2963. +
  2964. +sudo (1.5.4-3) frozen unstable; urgency=low
  2965. +
  2966. + * change /etc/sudoers from a conffile to being handled in postinst,
  2967. + closes 18219
  2968. + * add suidmanager support, closes 15711
  2969. + * add '-Wno-comment' to quiet warnings from gcc upstream maintainer is
  2970. + unlikely to ever fix, and which just don't matter. closes 17146
  2971. + * fix FSF address in copyright file, and submit exception for lintian
  2972. + warning about sudo being setuid root
  2973. +
  2974. + -- Bdale Garbee <bdale@gag.com> Thu, 9 Apr 1998 23:59:11 -0600
  2975. +
  2976. +sudo (1.5.4-2) unstable; urgency=high
  2977. +
  2978. + * patch from upstream author correcting/improving security fix
  2979. +
  2980. + -- Bdale Garbee <bdale@gag.com> Tue, 13 Jan 1998 10:39:35 -0700
  2981. +
  2982. +sudo (1.5.4-1) unstable; urgency=high
  2983. +
  2984. + * new upstream version, includes a security fix
  2985. + * change default editor from /bin/ae to /usr/bin/editor
  2986. +
  2987. + -- Bdale Garbee <bdale@gag.com> Mon, 12 Jan 1998 23:36:41 -0700
  2988. +
  2989. +sudo (1.5.3-1) unstable; urgency=medium
  2990. +
  2991. + * new upstream version, closes bug 15911.
  2992. + * rules file reworked to use debhelper
  2993. + * implement a really gross hack to force use of the sudo-provided
  2994. + lsearch(), since the one in libc6 is broken! This closes bugs
  2995. + 12552, 12557, 14881, 15259, 15916.
  2996. +
  2997. + -- Bdale Garbee <bdale@gag.com> Sat, 3 Jan 1998 20:39:23 -0700
  2998. +
  2999. +sudo (1.5.2-6) unstable; urgency=LOW
  3000. +
  3001. + * don't install INSTALL in the doc directory, closes bug 13195.
  3002. +
  3003. + -- Bdale Garbee <bdale@gag.com> Sun, 21 Sep 1997 17:10:40 -0600
  3004. +
  3005. +sudo (1.5.2-5) unstable; urgency=LOW
  3006. +
  3007. + * libc6
  3008. +
  3009. + -- Bdale Garbee <bdale@gag.com> Fri, 5 Sep 1997 00:06:22 -0600
  3010. +
  3011. +sudo (1.5.2-4) unstable; urgency=LOW
  3012. +
  3013. + * change TIMEOUT (how long before you have to type your password again)
  3014. + to 15 mins, disable PASSWORD_TIMEOUT. This makes building large Debian
  3015. + packages on slower machines much more tolerable. Closes bug 9076.
  3016. + * touch debian/suid before debstd. Closes bug 8709.
  3017. +
  3018. + -- Bdale Garbee <bdale@gag.com> Sat, 26 Apr 1997 00:48:01 -0600
  3019. +
  3020. +sudo (1.5.2-3) frozen unstable; urgency=LOW
  3021. +
  3022. + * patch from upstream maintainer to close Bug 6828
  3023. + * add a debian/suid file to get debstd to leave my perl postinst alone
  3024. +
  3025. + -- Bdale Garbee <bdale@gag.com> Fri, 11 Apr 1997 23:09:55 -0600
  3026. +
  3027. +sudo (1.5.2-2) frozen unstable; urgency=LOW
  3028. +
  3029. + * change rules to use -O2 -Wall as per standards
  3030. +
  3031. + -- Bdale Garbee <bdale@gag.com> Sun, 6 Apr 1997 12:48:53 -0600
  3032. +
  3033. +sudo (1.5.2-1) unstable; urgency=LOW
  3034. +
  3035. + * new upstream version
  3036. + * cosmetic changes to debian package control files
  3037. +
  3038. + -- Bdale Garbee <bdale@gag.com> Wed, 30 Oct 1996 09:50:00 -0700
  3039. +
  3040. +sudo (1.5-2) unstable; urgency=LOW
  3041. +
  3042. + * add /usr/X11R6/bin to the end of the secure path... this makes it
  3043. + much easier to run xmkmf, etc., during package builds. To the extent
  3044. + that /usr/local/sbin and /usr/local/bin were already included, I see
  3045. + no security reasons not to add this.
  3046. +
  3047. + -- Bdale Garbee <bdale@gag.com> Wed, 30 Oct 1996 09:44:58 -0700
  3048. +
  3049. +sudo (1.5-1) unstable; urgency=LOW
  3050. +
  3051. + * New upstream version
  3052. + * New maintainer
  3053. + * New packaging format
  3054. +
  3055. + -- Bdale Garbee <bdale@gag.com> Thu, 29 Aug 1996 11:44:22 +0200
  3056. +
  3057. +Tue Mar 5 09:36:41 MET 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
  3058. +
  3059. + sudo (1.4.1-1):
  3060. +
  3061. + * hard code SECURE_PATH to:
  3062. + "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  3063. +
  3064. + * enable ENV_EDITOR
  3065. +
  3066. + * enabled EXEMPTGROUP "sudo"
  3067. +
  3068. + * moved timestamp dir to /var/log/sudo
  3069. +
  3070. + * changed parser to check for long and short filenames (Bug#1162)
  3071. +
  3072. +Wed Apr 17 13:03:31 MET DST 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
  3073. +
  3074. + sudo (1.4.2-1):
  3075. +
  3076. + * New upstream source
  3077. +
  3078. + * Fixed postinst script
  3079. + (thanks to Peter Tobis <tobias@et-inf.fho-emden.de>)
  3080. +
  3081. + * Removed special shadow binary. This version works with and without
  3082. + shadow password file.
  3083. +
  3084. +Mon May 20 09:35:22 MET DST 1996 Michael Meskes <meskes@debian.org>
  3085. +
  3086. + sudo (1.4.2-2):
  3087. +
  3088. + * Corrected editor path to /bin/ae (Bug#3062)
  3089. +
  3090. + * Set file permission to 4755 for sudo and 755 for visudo (Bug#3063)
  3091. +
  3092. +Mon Jun 17 12:06:41 MET DST 1996 Michael Meskes <meskes@debian.org>
  3093. +
  3094. + sudo (1.4.3-1):
  3095. +
  3096. + * New upstream version
  3097. +
  3098. + * Changed sudoers permission to 440 (owner root, group root) to make
  3099. + sudo usable via NFS
  3100. +
  3101. +Wed Jun 19 10:56:54 MET DST 1996 Michael Meskes <meskes@debian.org>
  3102. +
  3103. + sudo (1.4.3-2):
  3104. +
  3105. + * Applied upstream patch 1
  3106. +
  3107. +Thu Jun 20 09:02:57 MET DST 1996 Michael Meskes <meskes@debian.org>
  3108. +
  3109. + sudo (1.4.3-3):
  3110. +
  3111. + * Applied upstream patch 2
  3112. +
  3113. +Fri Jun 28 12:49:40 MET DST 1996 Michael Meskes <meskes@debian.org>
  3114. +
  3115. + sudo (1.4.3-4):
  3116. +
  3117. + * Applied upstream patch 3 (fixes problems with an NFS-mounted
  3118. + sudoers file)
  3119. +
  3120. +
  3121. +Sun Jun 30 13:02:44 MET DST 1996 Michael Meskes <meskes@debian.org>
  3122. +
  3123. + sudo (1.4.3-5):
  3124. +
  3125. + * Corrected postinst to use /usr/bin/perl instead of /bin/perl
  3126. + [Reported by jdassen@wi.leidenuniv.nl (J.H.M.Dassen)]
  3127. +
  3128. +Wed Jul 10 12:44:33 MET DST 1996 Michael Meskes <meskes@debian.org>
  3129. +
  3130. + sudo (1.4.3-6):
  3131. +
  3132. + * Applied upstream patch 4 (fixes several bugs)
  3133. +
  3134. + * Changed priority to optional
  3135. +
  3136. +Thu Jul 11 19:23:52 MET DST 1996 Michael Meskes <meskes@debian.org>
  3137. +
  3138. + sudo (1.4.3-7):
  3139. +
  3140. + * Corrected postinst to create correct permission for /etc/sudoers
  3141. + (Bug#3749)
  3142. +
  3143. +Fri Aug 2 10:50:53 MET DST 1996 Michael Meskes <meskes@debian.org>
  3144. +
  3145. + sudo (1.4.4-1):
  3146. +
  3147. + * New upstream version
  3148. +
  3149. +
  3150. +sudo (1.4.4-2) admin; urgency=HIGH
  3151. +
  3152. + * Fixed major security bug reported by Peter Tobias
  3153. + <tobias@et-inf.fho-emden.de>
  3154. + * Added dchanges support to debian.rules
  3155. +
  3156. +sudo (1.4.5-1) admin; urgency=LOW
  3157. +
  3158. + * New upstream version
  3159. + * Minor changes to debian.rules
  3160. --- sudo-1.6.8p12.orig/debian/sudo_root.8
  3161. +++ sudo-1.6.8p12/debian/sudo_root.8
  3162. @@ -0,0 +1,135 @@
  3163. +.TH sudo_root 8 "February 8, 2006"
  3164. +
  3165. +.SH NAME
  3166. +sudo_root \- How to run administrative commands
  3167. +
  3168. +.SH SYNOPSIS
  3169. +
  3170. +.B sudo
  3171. +.I command
  3172. +
  3173. +.B sudo \-i
  3174. +
  3175. +.SH INTRODUCTION
  3176. +
  3177. +By default, the password for the user "root" (the system
  3178. +administrator) is locked. This means you cannot login as root or use
  3179. +su. Instead, the installer will set up sudo to allow the user that is
  3180. +created during install to run all administrative commands.
  3181. +
  3182. +This means that in the terminal you can use sudo for commands that
  3183. +require root privileges. All programs in the menu will use a graphical
  3184. +sudo to prompt for a password. When sudo asks for a password, it needs
  3185. +.B your password,
  3186. +this means that a root password is not needed.
  3187. +
  3188. +To run a command which requires root privileges in a terminal, simply
  3189. +prepend
  3190. +.B sudo
  3191. +in front of it. To get an interactive root shell, use
  3192. +.B sudo \-i\fR.
  3193. +
  3194. +.SH ALLOWING OTHER USERS TO RUN SUDO
  3195. +
  3196. +By default, only the user who installed the system is permitted to run
  3197. +sudo. To add more administrators, i. e. users who can run sudo, you
  3198. +have to add these users to the group 'admin' by doing one of the
  3199. +following steps:
  3200. +
  3201. +.IP * 2
  3202. +In a shell, do
  3203. +
  3204. +.RS 4
  3205. +.B sudo adduser
  3206. +.I username
  3207. +.B admin
  3208. +.RE
  3209. +
  3210. +.IP * 2
  3211. +Use the graphical "Users & Groups" program in the "System settings"
  3212. +menu to add the new user to the
  3213. +.B admin
  3214. +group.
  3215. +
  3216. +.SH BENEFITS OF USING SUDO
  3217. +
  3218. +The benefits of leaving root disabled by default include the following:
  3219. +
  3220. +.IP * 2
  3221. +Users do not have to remember an extra password, which they are likely to forget.
  3222. +.IP * 2
  3223. +The installer is able to ask fewer questions.
  3224. +.IP * 2
  3225. +It avoids the "I can do anything" interactive login by default \- you
  3226. +will be prompted for a password before major changes can happen, which
  3227. +should make you think about the consequences of what you are doing.
  3228. +.IP * 2
  3229. +Sudo adds a log entry of the command(s) run (in \fB/var/log/auth.log\fR).
  3230. +.IP * 2
  3231. +Every attacker trying to brute\-force their way into your box will
  3232. +know it has an account named root and will try that first. What they
  3233. +do not know is what the usernames of your other users are.
  3234. +.IP * 2
  3235. +Allows easy transfer for admin rights, in a short term or long term
  3236. +period, by adding and removing users from the admin group, while not
  3237. +compromising the root account.
  3238. +.IP * 2
  3239. +sudo can be set up with a much more fine\-grained security policy.
  3240. +
  3241. +.SH DOWNSIDES OF USING SUDO
  3242. +
  3243. +Although for desktops the benefits of using sudo are great, there are
  3244. +possible issues which need to be noted:
  3245. +
  3246. +.IP * 2
  3247. +Redirecting the output of commands run with sudo can be confusing at
  3248. +first. For instance consider
  3249. +
  3250. +.RS 4
  3251. +.B sudo ls > /root/somefile
  3252. +.RE
  3253. +
  3254. +.RS 2
  3255. +will not work since it is the shell that tries to write to that file. You can use
  3256. +.RE
  3257. +
  3258. +.RS 4
  3259. +.B ls | sudo tee /root/somefile
  3260. +.RE
  3261. +
  3262. +.RS 2
  3263. +to get the behaviour you want.
  3264. +.RE
  3265. +
  3266. +.IP * 2
  3267. +In a lot of office environments the ONLY local user on a system is
  3268. +root. All other users are imported using NSS techniques such as
  3269. +nss\-ldap. To setup a workstation, or fix it, in the case of a network
  3270. +failure where nss\-ldap is broken, root is required. This tends to
  3271. +leave the system unusable. An extra local user, or an enabled root
  3272. +password is needed here.
  3273. +
  3274. +.SH GOING BACK TO A TRADITIONAL ROOT ACCOUNT
  3275. +
  3276. +.B This is not recommended!
  3277. +
  3278. +To enable the root account (i.e. set a password) use:
  3279. +
  3280. +.RS 4
  3281. +.B sudo passwd root
  3282. +.RE
  3283. +
  3284. +Afterwards, edit
  3285. +.B /etc/sudoers
  3286. +and comment out the line
  3287. +
  3288. +.RS 4
  3289. +%admin ALL=(ALL) ALL
  3290. +.RE
  3291. +
  3292. +to disable sudo access to members of the admin group.
  3293. +
  3294. +.SH SEE ALSO
  3295. +.BR sudo (8),
  3296. +.B https://wiki.ubuntu.com/RootSudo
  3297. +
  3298. --- sudo-1.6.8p12.orig/debian/sudo-ldap.postinst
  3299. +++ sudo-1.6.8p12/debian/sudo-ldap.postinst
  3300. @@ -0,0 +1,62 @@
  3301. +#!/usr/bin/perl
  3302. +
  3303. +# remove old link
  3304. +
  3305. +unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo");
  3306. +
  3307. +# make sure we have a sudoers file
  3308. +if ( ! -f "/etc/sudoers") {
  3309. +
  3310. + print "No /etc/sudoers found... creating one for you.\n";
  3311. +
  3312. + open (SUDOERS, "> /etc/sudoers");
  3313. + print SUDOERS "# /etc/sudoers\n",
  3314. + "#\n",
  3315. + "# This file MUST be edited with the 'visudo' command as root.\n",
  3316. + "#\n",
  3317. + "# See the man page for details on how to write a sudoers file.\n",
  3318. + "#\n\nDefaults\tenv_reset\n\n",
  3319. + "# Host alias specification\n\n",
  3320. + "# User alias specification\n\n",
  3321. + "# Cmnd alias specification\n\n",
  3322. + "# User privilege specification\nroot\tALL=(ALL) ALL\n";
  3323. + close SUDOERS;
  3324. +
  3325. +}
  3326. +
  3327. +# make sure sudoers has the correct permissions and owner/group
  3328. +system ('chown root:root /etc/sudoers');
  3329. +system ('chmod 440 /etc/sudoers');
  3330. +
  3331. +# must do a remove first to un-do the "bad" links created by previous version
  3332. +system ('update-rc.d -f sudo remove >/dev/null 2>&1');
  3333. +
  3334. +#system ('update-rc.d sudo start 75 S . >/dev/null');
  3335. +
  3336. +# make sure we have a sudo group
  3337. +
  3338. +exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo
  3339. +
  3340. +$gid = 27; # start searcg with gid 27
  3341. +setgrent;
  3342. +while (getgrgid($gid)) {
  3343. + ++$gid;
  3344. +}
  3345. +endgrent;
  3346. +
  3347. +if ($gid != 27) {
  3348. + print "On Debian we normally use gid 27 for 'sudo'.\n";
  3349. + $gname = getgrgid(27);
  3350. + print "However, on your system gid 27 is group '$gname'.\n\n";
  3351. + print "Would you like me to stop configuring sudo so that you can change this? [n] ";
  3352. + $ans = <STDIN>;
  3353. + if ($ans =~ m/^[yY].*/) {
  3354. + print "'dpkg --pending --configure' will restart the configuration.\n\n\n";
  3355. + exit 1;
  3356. + }
  3357. +}
  3358. +
  3359. +print "Creating group 'sudo' with gid = $gid\n";
  3360. +system("groupadd -g $gid sudo");
  3361. +
  3362. +print "";
  3363. --- sudo-1.6.8p12.orig/debian/sudo.lintian
  3364. +++ sudo-1.6.8p12/debian/sudo.lintian
  3365. @@ -0,0 +1,3 @@
  3366. +sudo: setuid-binary usr/bin/sudo 4755 root/root
  3367. +sudo: postrm-contains-additional-updaterc.d-calls /etc/init.d/sudo
  3368. +sudo: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/sudo
  3369. --- sudo-1.6.8p12.orig/debian/postinst
  3370. +++ sudo-1.6.8p12/debian/postinst
  3371. @@ -0,0 +1,62 @@
  3372. +#!/usr/bin/perl
  3373. +
  3374. +# remove old link
  3375. +
  3376. +unlink ("/etc/alternatives/sudo") if ( -l "/etc/alternatives/sudo");
  3377. +
  3378. +# make sure we have a sudoers file
  3379. +if ( ! -f "/etc/sudoers") {
  3380. +
  3381. + print "No /etc/sudoers found... creating one for you.\n";
  3382. +
  3383. + open (SUDOERS, "> /etc/sudoers");
  3384. + print SUDOERS "# /etc/sudoers\n",
  3385. + "#\n",
  3386. + "# This file MUST be edited with the 'visudo' command as root.\n",
  3387. + "#\n",
  3388. + "# See the man page for details on how to write a sudoers file.\n",
  3389. + "# Host alias specification\n\n",
  3390. + "# User alias specification\n\n",
  3391. + "# Cmnd alias specification\n\n",
  3392. + "# Defaults\n\nDefaults\t!lecture,tty_tickets,!fqdn\n\n",
  3393. + "# User privilege specification\nroot\tALL=(ALL) ALL\n";
  3394. + close SUDOERS;
  3395. +
  3396. +}
  3397. +
  3398. +# make sure sudoers has the correct permissions and owner/group
  3399. +system ('chown root:root /etc/sudoers');
  3400. +system ('chmod 440 /etc/sudoers');
  3401. +
  3402. +# must do a remove first to un-do the "bad" links created by previous version
  3403. +system ('update-rc.d -f sudo remove >/dev/null 2>&1');
  3404. +
  3405. +#system ('update-rc.d sudo start 75 S . >/dev/null');
  3406. +
  3407. +# make sure we have a sudo group
  3408. +
  3409. +exit 0 if getgrnam("sudo"); # we're finished if there is a group sudo
  3410. +
  3411. +$gid = 27; # start searcg with gid 27
  3412. +setgrent;
  3413. +while (getgrgid($gid)) {
  3414. + ++$gid;
  3415. +}
  3416. +endgrent;
  3417. +
  3418. +if ($gid != 27) {
  3419. + print "On Debian we normally use gid 27 for 'sudo'.\n";
  3420. + $gname = getgrgid(27);
  3421. + print "However, on your system gid 27 is group '$gname'.\n\n";
  3422. + print "Would you like me to stop configuring sudo so that you can change this? [n] ";
  3423. + $ans = <STDIN>;
  3424. + if ($ans =~ m/^[yY].*/) {
  3425. + print "'dpkg --pending --configure' will restart the configuration.\n\n\n";
  3426. + exit 1;
  3427. + }
  3428. +}
  3429. +
  3430. +print "Creating group 'sudo' with gid = $gid\n";
  3431. +system("groupadd -g $gid sudo");
  3432. +
  3433. +print "";
  3434. --- sudo-1.6.8p12.orig/debian/compat
  3435. +++ sudo-1.6.8p12/debian/compat
  3436. @@ -0,0 +1 @@
  3437. +4
  3438. --- sudo-1.6.8p12.orig/debian/init.d
  3439. +++ sudo-1.6.8p12/debian/init.d
  3440. @@ -0,0 +1,31 @@
  3441. +#! /bin/sh
  3442. +
  3443. +### BEGIN INIT INFO
  3444. +# Provides: sudu
  3445. +# Required-Start: $local_fs $remote_fs
  3446. +# Required-Stop:
  3447. +# Default-Start: S 1 2 3 4 5
  3448. +# Default-Stop: 0 6
  3449. +### END INIT INFO
  3450. +
  3451. +N=/etc/init.d/sudo
  3452. +
  3453. +set -e
  3454. +
  3455. +case "$1" in
  3456. + start)
  3457. + # make sure privileges don't persist across reboots
  3458. + if [ -d /var/run/sudo ]
  3459. + then
  3460. + find /var/run/sudo -type f -exec touch -t 198501010000 '{}' \;
  3461. + fi
  3462. + ;;
  3463. + stop|reload|restart|force-reload)
  3464. + ;;
  3465. + *)
  3466. + echo "Usage: $N {start|stop|restart|force-reload}" >&2
  3467. + exit 1
  3468. + ;;
  3469. +esac
  3470. +
  3471. +exit 0
  3472. --- sudo-1.6.8p12.orig/debian/sudo-ldap.lintian
  3473. +++ sudo-1.6.8p12/debian/sudo-ldap.lintian
  3474. @@ -0,0 +1,3 @@
  3475. +sudo-ldap: setuid-binary usr/bin/sudo 4755 root/root
  3476. +sudo-ldap: postrm-contains-additional-updaterc.d-calls /etc/init.d/sudo-ldap
  3477. +sudo-ldap: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/sudo-ldap
  3478. --- sudo-1.6.8p12.orig/debian/sudo-ldap.dirs
  3479. +++ sudo-1.6.8p12/debian/sudo-ldap.dirs
  3480. @@ -0,0 +1,7 @@
  3481. +etc/pam.d
  3482. +usr/bin
  3483. +usr/share/man/man8
  3484. +usr/share/man/man5
  3485. +usr/sbin
  3486. +usr/share/doc/sudo-ldap/examples
  3487. +usr/share/lintian/overrides
  3488. --- sudo-1.6.8p12.orig/debian/sudo-ldap.docs
  3489. +++ sudo-1.6.8p12/debian/sudo-ldap.docs
  3490. @@ -0,0 +1,11 @@
  3491. +debian/OPTIONS
  3492. +BUGS
  3493. +RUNSON
  3494. +UPGRADE
  3495. +PORTING
  3496. +TODO
  3497. +HISTORY
  3498. +README
  3499. +README.LDAP
  3500. +TROUBLESHOOTING
  3501. +sudoers2ldif
  3502. --- sudo-1.6.8p12.orig/debian/postrm
  3503. +++ sudo-1.6.8p12/debian/postrm
  3504. @@ -0,0 +1,21 @@
  3505. +#! /bin/sh
  3506. +
  3507. +set -e
  3508. +
  3509. +case "$1" in
  3510. + purge)
  3511. + rm -f /etc/sudoers
  3512. + ;;
  3513. +
  3514. + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
  3515. + ;;
  3516. +
  3517. + *)
  3518. + echo "postrm called with unknown argument \`$1'" >&2
  3519. + exit 1
  3520. +
  3521. +esac
  3522. +
  3523. +#DEBHELPER#
  3524. +
  3525. +exit 0
  3526. --- sudo-1.6.8p12.orig/debian/OPTIONS
  3527. +++ sudo-1.6.8p12/debian/OPTIONS
  3528. @@ -0,0 +1,61 @@
  3529. +The following options were used to configure sudo for Debian GNU/Linux.
  3530. +
  3531. + --with-exempt=sudo
  3532. +
  3533. + Any user in group 'sudo' will not need to type their password. It
  3534. + is strongly recommended that no users be put in group sudo, and that
  3535. + instead the NOPASSWD option in the sudoers file be used if desired.
  3536. +
  3537. + --with-pam
  3538. +
  3539. + Support for pluggable authentication modules.
  3540. +
  3541. + --with-ldap
  3542. +
  3543. + Support for LDAP authentication.
  3544. +
  3545. + --with-fqdn
  3546. +
  3547. + Allow use of fully qualified domain names in the sudoers file.
  3548. +
  3549. + --disable-root-mailer
  3550. +
  3551. + Send mail as the invoking user, not as root.
  3552. +
  3553. + --with-logging=syslog
  3554. + --with-logfac=authpriv
  3555. +
  3556. + Where logging information goes.
  3557. +
  3558. + --with-env-editor
  3559. + --with-editor=/usr/bin/editor
  3560. +
  3561. + Honor the EDITOR and VISUAL environment variables. If they are not
  3562. + present, default to the Debian default system editor.
  3563. +
  3564. + --with-timeout=15
  3565. + --with-password-timeout=0
  3566. +
  3567. + Allow 15 minutes before a user has to re-type their passord, versus
  3568. + the sudo usual default of 5. Never time out while waiting for a
  3569. + password to be typed, this is a seriously big deal for Debian package
  3570. + developers using 'dpkg-buildpackage -rsudo'.
  3571. +
  3572. + --with-secure-path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:\
  3573. + /sbin:/bin:/usr/X11R6/bin"
  3574. +
  3575. + Give a reasonable default path for commands run as root via sudo.
  3576. +
  3577. + --with-all-insults
  3578. +
  3579. + Include all the insults in the binary, won't be enabled unless turned
  3580. + on in the sudoers file.
  3581. +
  3582. + --with-sendmail=/usr/sbin/sendmail
  3583. +
  3584. + Use Debian policy to know the location of sendmail instead of trying
  3585. + to detect it at build time.
  3586. +
  3587. + --disable-setresuid
  3588. +
  3589. + Linux 2.2 kernels don't support setresgid.
  3590. --- sudo-1.6.8p12.orig/debian/copyright
  3591. +++ sudo-1.6.8p12/debian/copyright
  3592. @@ -0,0 +1,72 @@
  3593. +This is the Debian GNU/Linux prepackaged version of sudo. sudo is
  3594. +used to provide limited super user privileges to specific users.
  3595. +
  3596. +This package was put together by Bdale Garbee <bdale@gag.com> using sources
  3597. +from
  3598. + ftp://ftp.cs.colorado.edu/pub/sudo/
  3599. +
  3600. +Sudo is distributed under the following BSD-style license:
  3601. +
  3602. + Copyright (c) 1994-1996,1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>
  3603. + All rights reserved.
  3604. +
  3605. + Redistribution and use in source and binary forms, with or without
  3606. + modification, are permitted provided that the following conditions
  3607. + are met:
  3608. +
  3609. + 1. Redistributions of source code must retain the above copyright
  3610. + notice, this list of conditions and the following disclaimer.
  3611. +
  3612. + 2. Redistributions in binary form must reproduce the above copyright
  3613. + notice, this list of conditions and the following disclaimer in the
  3614. + documentation and/or other materials provided with the distribution.
  3615. +
  3616. + 3. The name of the author may not be used to endorse or promote products
  3617. + derived from this software without specific prior written permission
  3618. + from the author.
  3619. +
  3620. + 4. Products derived from this software may not be called "Sudo" nor
  3621. + may "Sudo" appear in their names without specific prior written
  3622. + permission from the author.
  3623. +
  3624. + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
  3625. + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  3626. + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  3627. + THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  3628. + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  3629. + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  3630. + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  3631. + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  3632. + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  3633. + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3634. +
  3635. +
  3636. +Additionally, lsearch.c, fnmatch.c, getcwd.c, snprintf.c, strcasecmp.c
  3637. +and fnmatch.3 bear the following UCB license:
  3638. +
  3639. + Copyright (c) 1987, 1989, 1990, 1991, 1993, 1994
  3640. + The Regents of the University of California. All rights reserved.
  3641. +
  3642. + Redistribution and use in source and binary forms, with or without
  3643. + modification, are permitted provided that the following conditions
  3644. + are met:
  3645. + 1. Redistributions of source code must retain the above copyright
  3646. + notice, this list of conditions and the following disclaimer.
  3647. + 2. Redistributions in binary form must reproduce the above copyright
  3648. + notice, this list of conditions and the following disclaimer in the
  3649. + documentation and/or other materials provided with the distribution.
  3650. + 3. Neither the name of the University nor the names of its contributors
  3651. + may be used to endorse or promote products derived from this software
  3652. + without specific prior written permission.
  3653. +
  3654. + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  3655. + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3656. + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3657. + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3658. + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3659. + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3660. + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3661. + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3662. + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3663. + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3664. + SUCH DAMAGE.
  3665. --- sudo-1.6.8p12.orig/debian/sudo.pam
  3666. +++ sudo-1.6.8p12/debian/sudo.pam
  3667. @@ -0,0 +1,4 @@
  3668. +#%PAM-1.0
  3669. +
  3670. +@include common-auth
  3671. +@include common-account
  3672. --- sudo-1.6.8p12.orig/debian/source.lintian-overrides
  3673. +++ sudo-1.6.8p12/debian/source.lintian-overrides
  3674. @@ -0,0 +1 @@
  3675. +sudo source: maintainer-script-lacks-debhelper-token debian/postinst
  3676. --- sudo-1.6.8p12.orig/sample.sudoers
  3677. +++ sudo-1.6.8p12/sample.sudoers
  3678. @@ -35,16 +35,16 @@
  3679. # Cmnd alias specification
  3680. ##
  3681. Cmnd_Alias DUMPS = /usr/sbin/dump, /usr/sbin/rdump, /usr/sbin/restore, \
  3682. - /usr/sbin/rrestore, /usr/bin/mt
  3683. -Cmnd_Alias KILL = /usr/bin/kill
  3684. + /usr/sbin/rrestore, /bin/mt
  3685. +Cmnd_Alias KILL = /bin/kill
  3686. Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm
  3687. -Cmnd_Alias SHUTDOWN = /usr/sbin/shutdown
  3688. -Cmnd_Alias HALT = /usr/sbin/halt
  3689. -Cmnd_Alias REBOOT = /usr/sbin/reboot
  3690. -Cmnd_Alias SHELLS = /sbin/sh, /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh, \
  3691. - /usr/local/bin/tcsh, /usr/bin/rsh, \
  3692. - /usr/local/bin/zsh
  3693. -Cmnd_Alias SU = /usr/bin/su
  3694. +Cmnd_Alias SHUTDOWN = /sbin/shutdown
  3695. +Cmnd_Alias HALT = /sbin/halt
  3696. +Cmnd_Alias REBOOT = /sbin/reboot
  3697. +Cmnd_Alias SHELLS = /sbin/sh, /bin/sh, /bin/csh, /usr/bin/ksh, \
  3698. + /usr/bin/tcsh, /usr/bin/rsh, \
  3699. + /usr/bin/zsh
  3700. +Cmnd_Alias SU = /bin/su
  3701. Cmnd_Alias VIPW = /usr/sbin/vipw, /usr/bin/passwd, /usr/bin/chsh, \
  3702. /usr/bin/chfn
  3703. @@ -82,7 +82,7 @@
  3704. sudoedit /etc/printcap, /usr/oper/bin/
  3705. # joe may su only to operator
  3706. -joe ALL = /usr/bin/su operator
  3707. +joe ALL = /bin/su operator
  3708. # pete may change passwords for anyone but root on the hp snakes
  3709. pete HPPA = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root
  3710. @@ -96,13 +96,13 @@
  3711. # users in the secretaries netgroup need to help manage the printers
  3712. # as well as add and remove users
  3713. -+secretaries ALL = PRINTING, /usr/bin/adduser, /usr/bin/rmuser
  3714. ++secretaries ALL = PRINTING, /usr/sbin/adduser, /usr/bin/rmuser
  3715. # fred can run commands as oracle or sybase without a password
  3716. fred ALL = (DB) NOPASSWD: ALL
  3717. # on the alphas, john may su to anyone but root and flags are not allowed
  3718. -john ALPHA = /usr/bin/su [!-]*, !/usr/bin/su *root*
  3719. +john ALPHA = /bin/su [!-]*, !/bin/su *root*
  3720. # jen can run anything on all machines except the ones
  3721. # in the "SERVERS" Host_Alias
  3722. --- sudo-1.6.8p12.orig/sudo.tab.c
  3723. +++ sudo-1.6.8p12/sudo.tab.c
  3724. @@ -138,6 +138,7 @@
  3725. } \
  3726. match[top].user = UNSPEC; \
  3727. match[top].cmnd = UNSPEC; \
  3728. + match[top].cmndall= UNSPEC; \
  3729. match[top].host = UNSPEC; \
  3730. match[top].runas = UNSPEC; \
  3731. match[top].nopass = def_authenticate ? UNSPEC : TRUE; \
  3732. @@ -153,6 +154,7 @@
  3733. } \
  3734. match[top].user = match[top-1].user; \
  3735. match[top].cmnd = match[top-1].cmnd; \
  3736. + match[top].cmndall= match[top-1].cmndall; \
  3737. match[top].host = match[top-1].host; \
  3738. match[top].runas = match[top-1].runas; \
  3739. match[top].nopass = match[top-1].nopass; \
  3740. @@ -1739,6 +1741,7 @@
  3741. }
  3742. }
  3743. + SETMATCH(cmnd_all, TRUE);
  3744. yyval.BOOLEAN = TRUE;
  3745. }
  3746. break;
  3747. @@ -1769,6 +1772,7 @@
  3748. YYERROR;
  3749. }
  3750. }
  3751. + SETMATCH(cmnd_all, FALSE);
  3752. yyval.BOOLEAN = NOMATCH;
  3753. }
  3754. free(yyvsp[0].string);
  3755. @@ -1800,6 +1804,7 @@
  3756. free(yyvsp[0].command.cmnd);
  3757. if (yyvsp[0].command.args)
  3758. free(yyvsp[0].command.args);
  3759. + SETMATCH(cmnd_all, FALSE);
  3760. }
  3761. break;
  3762. case 65:
  3763. --- sudo-1.6.8p12.orig/ldap.c
  3764. +++ sudo-1.6.8p12/ldap.c
  3765. @@ -256,9 +256,10 @@
  3766. * Walks through search result and returns true if we have a
  3767. * command match
  3768. */
  3769. -int sudo_ldap_check_command(ld,entry)
  3770. +int sudo_ldap_check_command(ld,entry,all)
  3771. LDAP *ld;
  3772. LDAPMessage *entry;
  3773. + int* all;
  3774. {
  3775. char **v=NULL;
  3776. char **p=NULL;
  3777. @@ -267,6 +268,8 @@
  3778. int ret=0;
  3779. int foundbang;
  3780. + *all=0;
  3781. +
  3782. if (!entry) return ret;
  3783. v=ldap_get_values(ld,entry,"sudoCommand");
  3784. @@ -277,6 +280,7 @@
  3785. /* Match against ALL ? */
  3786. if (!strcasecmp(*p,"ALL")) {
  3787. + *all=1;
  3788. ret=1;
  3789. if (ldap_conf.debug>1) printf(" MATCH!\n");
  3790. continue;
  3791. @@ -711,6 +715,7 @@
  3792. /* flags */
  3793. int ldap_user_matches=0;
  3794. int ldap_host_matches=0;
  3795. + int command_all=0;
  3796. if (!sudo_ldap_read_config()) return VALIDATE_ERROR;
  3797. @@ -896,7 +901,7 @@
  3798. /* add matches for listing later */
  3799. sudo_ldap_add_match(ld,entry) &&
  3800. /* verify command match */
  3801. - sudo_ldap_check_command(ld,entry) &&
  3802. + sudo_ldap_check_command(ld,entry,&command_all) &&
  3803. /* verify runas match */
  3804. sudo_ldap_check_runas(ld,entry)
  3805. )
  3806. @@ -907,6 +912,7 @@
  3807. sudo_ldap_parse_options(ld,entry);
  3808. /* make sure we dont reenter loop */
  3809. ret=VALIDATE_OK;
  3810. + if(command_all) SET(ret,FLAG_CMND_ALL);
  3811. /* break from inside for loop */
  3812. break;
  3813. }
  3814. --- sudo-1.6.8p12.orig/sudo.c
  3815. +++ sudo-1.6.8p12/sudo.c
  3816. @@ -106,10 +106,11 @@
  3817. static void set_loginclass __P((struct passwd *));
  3818. static void usage __P((int));
  3819. static void usage_excl __P((int));
  3820. +static void create_admin_success_flag __P((void));
  3821. static struct passwd *get_authpw __P((void));
  3822. extern int sudo_edit __P((int, char **));
  3823. extern void list_matches __P((void));
  3824. -extern char **rebuild_env __P((char **, int, int));
  3825. +extern char **rebuild_env __P((char **, int, int, int));
  3826. extern char **zero_env __P((char **));
  3827. extern struct passwd *sudo_getpwnam __P((const char *));
  3828. extern struct passwd *sudo_getpwuid __P((uid_t));
  3829. @@ -368,11 +369,15 @@
  3830. /* Build a new environment that avoids any nasty bits if we have a cmnd. */
  3831. if (ISSET(sudo_mode, MODE_RUN))
  3832. - new_environ = rebuild_env(envp, sudo_mode, ISSET(validated, FLAG_NOEXEC));
  3833. + new_environ = rebuild_env(envp, sudo_mode, ISSET(validated, FLAG_NOEXEC), ISSET(validated, FLAG_CMND_ALL));
  3834. else
  3835. new_environ = envp;
  3836. if (ISSET(validated, VALIDATE_OK)) {
  3837. + /* If the user is in the admin group, create a dotfile to signal that
  3838. + * sudo was executed successfully. */
  3839. + create_admin_success_flag();
  3840. +
  3841. /* Finally tell the user if the command did not exist. */
  3842. if (cmnd_status == NOT_FOUND_DOT) {
  3843. warnx("ignoring `%s' found in '.'\nUse `sudo ./%s' if this is the `%s' you wish to run.", user_cmnd, user_cmnd, user_cmnd);
  3844. @@ -1156,3 +1161,46 @@
  3845. putchar('\n');
  3846. exit(exit_val);
  3847. }
  3848. +
  3849. +static void create_admin_success_flag(void)
  3850. +{
  3851. + struct group* admin;
  3852. + char** g;
  3853. + int is_admin;
  3854. + char flagfile[PATH_MAX];
  3855. + int f;
  3856. +
  3857. + if (!sudo_user.pw || !sudo_user.pw->pw_name || !sudo_user.pw->pw_dir)
  3858. + return;
  3859. +
  3860. + /* check whether the user is in the admin group */
  3861. + admin = getgrnam("admin");
  3862. + if (!admin || !admin->gr_mem)
  3863. + return;
  3864. + is_admin = 0;
  3865. + for (g = admin->gr_mem; *g; ++g) {
  3866. + if (!strcmp(*g, sudo_user.pw->pw_name)) {
  3867. + is_admin = 1;
  3868. + break;
  3869. + }
  3870. + }
  3871. + if (!is_admin)
  3872. + return;
  3873. +
  3874. + /* build path to flag file */
  3875. + snprintf(flagfile, sizeof(flagfile), "%s/.sudo_as_admin_successful",
  3876. + sudo_user.pw->pw_dir);
  3877. + if (strlen(flagfile) >= sizeof(flagfile)-1)
  3878. + return;
  3879. +
  3880. + /* do nothing if the file already exists */
  3881. + if (!access(flagfile, F_OK))
  3882. + return;
  3883. +
  3884. + /* create file */
  3885. + f = open(flagfile, O_CREAT|O_WRONLY|O_EXCL, 0644);
  3886. + if(f >= 0) {
  3887. + fchown(f, sudo_user.pw->pw_uid, sudo_user.pw->pw_gid);
  3888. + close(f);
  3889. + }
  3890. +}
  3891. --- sudo-1.6.8p12.orig/sudo.h
  3892. +++ sudo-1.6.8p12/sudo.h
  3893. @@ -65,6 +65,7 @@
  3894. #define FLAG_NO_HOST 0x080
  3895. #define FLAG_NO_CHECK 0x100
  3896. #define FLAG_NOEXEC 0x200
  3897. +#define FLAG_CMND_ALL 0x400
  3898. /*
  3899. * Pseudo-boolean values
  3900. --- sudo-1.6.8p12.orig/parse.c
  3901. +++ sudo-1.6.8p12/parse.c
  3902. @@ -200,7 +200,8 @@
  3903. set_perms(PERM_ROOT);
  3904. return(VALIDATE_OK |
  3905. (no_passwd == TRUE ? FLAG_NOPASS : 0) |
  3906. - (no_execve == TRUE ? FLAG_NOEXEC : 0));
  3907. + (no_execve == TRUE ? FLAG_NOEXEC : 0) |
  3908. + (cmnd_all == TRUE ? FLAG_CMND_ALL : 0));
  3909. } else if ((runas_matches == TRUE && cmnd_matches == FALSE) ||
  3910. (runas_matches == FALSE && cmnd_matches == TRUE)) {
  3911. /*
  3912. --- sudo-1.6.8p12.orig/parse.h
  3913. +++ sudo-1.6.8p12/parse.h
  3914. @@ -29,6 +29,7 @@
  3915. struct matchstack {
  3916. int user;
  3917. int cmnd;
  3918. + int cmndall;
  3919. int host;
  3920. int runas;
  3921. int nopass;
  3922. @@ -46,6 +47,7 @@
  3923. #define user_matches (match[top-1].user)
  3924. #define cmnd_matches (match[top-1].cmnd)
  3925. +#define cmnd_all (match[top-1].cmndall)
  3926. #define host_matches (match[top-1].host)
  3927. #define runas_matches (match[top-1].runas)
  3928. #define no_passwd (match[top-1].nopass)