diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index b87c8ad4..34aa9d1b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -30,6 +30,11 @@ "Comment": "v1.8.0", "Rev": "4ba9bba6adb6697bcec3841e1ecdfecf5227c3b9" }, + { + "ImportPath": "github.com/Sirupsen/logrus", + "Comment": "v0.7.3-2-g26709e2", + "Rev": "26709e2714106fb8ad40b773b711ebce25b78914" + }, { "ImportPath": "github.com/abbot/go-http-auth", "Rev": "c0ef4539dfab4d21c8ef20ba2924f9fc6f186d35" @@ -185,23 +190,23 @@ }, { "ImportPath": "github.com/docker/docker/pkg/longpath", - "Comment": "v1.11.2", - "Rev": "b9f10c951893f9a00865890a5232e85d770c1087" + "Comment": "v1.13.1-rc2", + "Rev": "54f71fd84a0dabab9d45f5fe7543a028b1200ca1" }, { "ImportPath": "github.com/docker/docker/pkg/mount", - "Comment": "v1.11.2", - "Rev": "b9f10c951893f9a00865890a5232e85d770c1087" + "Comment": "v1.13.1-rc2", + "Rev": "54f71fd84a0dabab9d45f5fe7543a028b1200ca1" }, { "ImportPath": "github.com/docker/docker/pkg/symlink", - "Comment": "v1.11.2", - "Rev": "b9f10c951893f9a00865890a5232e85d770c1087" + "Comment": "v1.13.1-rc2", + "Rev": "54f71fd84a0dabab9d45f5fe7543a028b1200ca1" }, { "ImportPath": "github.com/docker/docker/pkg/system", - "Comment": "v1.11.2", - "Rev": "b9f10c951893f9a00865890a5232e85d770c1087" + "Comment": "v1.13.1-rc2", + "Rev": "54f71fd84a0dabab9d45f5fe7543a028b1200ca1" }, { "ImportPath": "github.com/docker/engine-api/client", diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS index bfb128ca..246e2a33 100644 --- a/vendor/github.com/docker/docker/AUTHORS +++ b/vendor/github.com/docker/docker/AUTHORS @@ -12,11 +12,17 @@ Abhijeet Kasurde Abhinav Ajgaonkar Abhishek Chanda Abin Shahab +Adam Avilla +Adam Kunk Adam Miller +Adam Mills Adam Singer +Adam Walz Aditi Rajagopal Aditya +Adolfo Ochagavía Adria Casas +Adrian Moisey Adrian Mouat Adrian Oprea Adrien Folie @@ -31,6 +37,7 @@ ajneu Akihiro Suda Al Tobey alambike +Alan Scherger Alan Thompson Albert Callarisa Albert Zhang @@ -40,8 +47,11 @@ Alena Prokharchyk Alessandro Boch Alessio Biancalana Alex Chan +Alex Coventry Alex Crawford +Alex Ellis Alex Gaynor +Alex Olshansky Alex Samorukov Alex Warhawk Alexander Artemenko @@ -49,21 +59,24 @@ Alexander Boyd Alexander Larsson Alexander Morozov Alexander Shopov -Alexandre Beslic +Alexandre Beslic Alexandre González Alexandru Sfirlogea Alexey Guskov Alexey Kotlyarov Alexey Shamrin Alexis THOMAS +Ali Dehghani Allen Madsen Allen Sun almoehi +Alvaro Saurin Alvin Richards amangoel Amen Belayneh Amit Bakshi Amit Krishnan +Amit Shukla Amy Lindburg Anand Patil AnandkumarPatel @@ -77,6 +90,7 @@ Andrea Turli Andreas Köhler Andreas Savvides Andreas Tiefenthaler +Andrei Gherzan Andrew C. Bodine Andrew Clay Shafer Andrew Duckworth @@ -88,6 +102,7 @@ Andrew Macgregor Andrew Macpherson Andrew Martin Andrew Munsell +Andrew Po Andrew Weiss Andrew Williams Andrews Medina @@ -104,6 +119,7 @@ Andy Smith Andy Wilson Anes Hasicic Anil Belur +Anil Madhavapeddy Ankush Agarwal Anonmily Anthon van der Neut @@ -115,11 +131,13 @@ Anton Nikitin Anton Polonskiy Anton Tiurin Antonio Murdaca +Antonis Kalipetis Antony Messerli Anuj Bahuguna Anusha Ragunathan apocas ArikaChen +Arnaud Lefebvre Arnaud Porterie Arthur Barr Arthur Gautier @@ -129,6 +147,7 @@ Asbjørn Enge averagehuman Avi Das Avi Miller +Avi Vaid ayoshitake Azat Khuyiyakhmetov Bardia Keyoumarsi @@ -150,6 +169,7 @@ Bernerd Schaefer Bert Goethals Bharath Thiruveedula Bhiraj Butala +Bilal Amarni Bill W bin liu Blake Geno @@ -158,6 +178,7 @@ bobby abbott boucher Bouke Haarsma Boyd Hemphill +boynux Bradley Cicenas Bradley Wright Brandon Liu @@ -165,6 +186,7 @@ Brandon Philips Brandon Rhodes Brendan Dixon Brent Salisbury +Brett Higgins Brett Kochendorfer Brian (bex) Exelbierd Brian Bland @@ -176,6 +198,7 @@ Brian McCallister Brian Olsen Brian Shumate Brian Torres-Gil +Brian Trump Brice Jaglin Briehan Lombaard Bruno Bigras @@ -195,8 +218,11 @@ Cameron Boehmer Cameron Spear Campbell Allen Candid Dauth +Cao Weiwei Carl Henrik Lunde +Carl Loa Odin Carl X. Su +Carlos Alexandro Becker Carlos Sanchez Carol Fager-Higgins Cary @@ -208,9 +234,11 @@ Chance Zibolski Chander G Charles Chan Charles Hooper +Charles Law Charles Lindsay Charles Merriam Charles Sarrazin +Charles Smith Charlie Lewis Chase Bolt ChaYoung You @@ -237,6 +265,7 @@ Chris Weyl chrismckinnel Christian Berendt Christian Böhme +Christian Persson Christian Rotzoll Christian Simon Christian Stefanescu @@ -261,6 +290,7 @@ Colm Hally companycy Cory Forsyth cressie176 +CrimsonGlory Cristian Staretu cristiano balducci Cruceru Calin-Cristian @@ -269,11 +299,14 @@ Daan van Berkel Daehyeok Mun Dafydd Crosby dalanlan +Damian Smyth +Damien Nadé Damien Nozay Damjan Georgievski Dan Anolik Dan Buch Dan Cotora +Dan Feldman Dan Griffin Dan Hirsch Dan Keder @@ -296,6 +329,7 @@ Daniel Nordberg Daniel Robinson Daniel S Daniel Von Fange +Daniel X Moore Daniel YC Lin Daniel Zhang Daniel, Dao Quang Minh @@ -304,8 +338,10 @@ Danny Yates Darren Coxall Darren Shepherd Darren Stahl +Davanum Srinivas Dave Barboza -Dave Henderson +Dave Henderson +Dave MacDonald Dave Tucker David Anderson David Calavera @@ -313,9 +349,12 @@ David Corking David Cramer David Currie David Davis +David Dooling David Gageot David Gebler David Lawrence +David Lechner +David M. Karr David Mackey David Mat David Mcanulty @@ -324,12 +363,15 @@ David R. Jenni David Röthlisberger David Sheets David Sissitka +David Trott David Xia David Young Davide Ceretti Dawn Chen +dbdd dcylabs decadent +deed02392 Deng Guangxing Deni Bertovic Denis Gladkikh @@ -345,15 +387,21 @@ devmeyster Devvyn Murphy Dharmit Shah Dieter Reuter +Dillon Dixon Dima Stopel Dimitri John Ledkov +Dimitris Rozakis +Dimitry Andric Dinesh Subhraveti Diogo Monica DiuDiugirl Djibril Koné dkumor +Dmitri Logvinenko +Dmitri Shuralyov Dmitry Demeshchuk Dmitry Gusev +Dmitry Smirnov Dmitry V. Krivenok Dmitry Vorobev Dolph Mathews @@ -365,17 +413,20 @@ Don Spaulding Donald Huang Dong Chen Donovan Jones +Doron Podoleanu Doug Davis Doug MacEachern Doug Tangren Dr Nic Williams dragon788 Dražen Lučanin +Drew Erny Dustin Sallings Ed Costello Edmund Wagner Eiichi Tsukata Eike Herzbach +Eivin Giske Skaaren Eivind Uggedal Elan Ruusamäe Elias Probst @@ -388,6 +439,7 @@ Emily Rose Emir Ozer Enguerran Eohyung Lee +Eric Barch Eric Hanchrow Eric Lee Eric Myhre @@ -396,6 +448,7 @@ Eric Rafaloff Eric Rosenberg Eric Sage Eric Windisch +Eric Yang Eric-Olivier Lamey Erik Bray Erik Dubbelboer @@ -415,14 +468,17 @@ Evan Hazlett Evan Krall Evan Phoenix Evan Wies +Everett Toews Evgeny Vereshchagin Ewa Czechowska Eystein Måløy Stenberg ezbercih Fabiano Rosas Fabio Falci +Fabio Rapposelli Fabio Rehm Fabrizio Regini +Fabrizio Soppelsa Faiz Khan falmp Fangyuan Gao <21551127@zju.edu.cn> @@ -432,20 +488,26 @@ Federico Gimenez Felix Geisendörfer Felix Hupfeld Felix Rabe +Felix Ruess Felix Schindler Ferenc Szabo Fernando Fero Volar +Ferran Rodenas Filipe Brandenburger Filipe Oliveira fl0yd Flavio Castelli FLGMwt +Florian Florian Klein Florian Maier Florian Weingarten Florin Asavoaie +fonglh +fortinux Francesc Campoy +Francis Chuang Francisco Carriedo Francisco Souza Frank Groeneveld @@ -457,6 +519,8 @@ Frederick F. Kautz IV Frederik Loeffert Frederik Nordahl Jul Sabroe Freek Kalter +frosforever +fy2462 Félix Baylac-Jacqué Félix Cantournet Gabe Rosenhouse @@ -506,11 +570,12 @@ gwx296173 Günter Zöchbauer Hans Kristian Flaatten Hans Rødtang +Hao Shu Wei Hao Zhang <21521210@zju.edu.cn> Harald Albers Harley Laue Harold Cooper -Harry Zhang +Harry Zhang He Simei heartlock <21521209@zju.edu.cn> Hector Castro @@ -530,6 +595,7 @@ huqun Huu Nguyen hyeongkyu.lee hyp3rdino +Hyzhou <1187766782@qq.com> Ian Babrou Ian Bishop Ian Bull @@ -552,6 +618,7 @@ Isabel Jimenez Isao Jonas Ivan Babrou Ivan Fraixedes +Ivan Grcic J Bruni J. Nunn Jack Danger Canty @@ -580,8 +647,10 @@ Jan Toebes Jan-Gerd Tenberge Jan-Jaap Driessen Jana Radhakrishnan +Jannick Fahlbusch Januar Wayong Jared Biel +Jared Hocutt Jaroslaw Zabiello jaseg Jasmine Hegman @@ -611,6 +680,7 @@ Jeff Lindsay Jeff Mickey Jeff Minard Jeff Nickoloff +Jeff Silberman Jeff Welch Jeffrey Bolle Jeffrey Morgan @@ -623,9 +693,11 @@ Jeremy Unruh Jeroen Jacobs Jesse Dearing Jesse Dubay -Jessica Frazelle +Jessica Frazelle Jezeniel Zapanta jgeiger +Jhon Honce +Ji.Zhilong Jian Zhang jianbosun Jilles Oldenbeuving @@ -639,6 +711,7 @@ Jiri Popelka Jiří Župka jjy jmzwcn +Joao Fernandes Joe Beda Joe Doliner Joe Ferguson @@ -654,6 +727,7 @@ Joey Gibson Joffrey F Johan Euphrosine Johan Rydberg +Johanan Lieberman Johannes 'fish' Ziemke John Costa John Feminella @@ -665,6 +739,7 @@ John Starks John Tims John Warwick John Willis +johnharris85 Jon Wedaman Jonas Pfenniger Jonathan A. Sternberg @@ -672,10 +747,12 @@ Jonathan Boulle Jonathan Camp Jonathan Dowland Jonathan Lebon +Jonathan Lomas Jonathan McCrohan Jonathan Mueller Jonathan Pares Jonathan Rudenberg +Jonathan Stoppani Joost Cassee Jordan Jordan Arentsen @@ -685,7 +762,10 @@ Joseph Anthony Pasquale Holsten Joseph Hager Joseph Kern Josh +Josh Bodah +Josh Chorlton Josh Hawn +Josh Horwitz Josh Poimboeuf Josiah Kiehl José Tomás Albornoz @@ -697,6 +777,7 @@ Julien Bisconti Julien Bordellier Julien Dubois Julien Pervillé +Julio Montes Jun-Ru Chang Jussi Nummelin Justas Brazauskas @@ -704,13 +785,17 @@ Justin Cormack Justin Force Justin Plock Justin Simonelis +Justin Terry +Justyn Temme Jyrki Puttonen Jérôme Petazzoni Jörg Thalheim Kai Blin -Kai Qiang Wu(Kennan) +Kai Qiang Wu(Kennan) Kamil Domański +kamjar gerami Kanstantsin Shautsou +Kara Alexandra Karan Lyons Kareem Khazem kargakis @@ -721,20 +806,27 @@ Kato Kazuyoshi Katrina Owen Kawsar Saiyeed kayrus +Ke Xu +Keith Hudgins Keli Hu Ken Cochrane +Ken Herner Ken ICHIKAWA -Kenfe-Mickael Laventure +Kenfe-Mickaël Laventure Kenjiro Nakayama Kent Johnson Kevin "qwazerty" Houdebert +Kevin Burke Kevin Clark Kevin J. Lynagh +Kevin Jing Qiu Kevin Menard Kevin P. Kucharczyk +Kevin Richardson Kevin Shi Kevin Wallace Kevin Yap +kevinmeredith Keyvan Fatehi kies Kim BKC Carlbacker @@ -742,19 +834,23 @@ Kim Eik Kimbro Staken Kir Kolyshkin Kiran Gangadharan +Kirill Kolyshkin Kirill SIbirev knappe Kohei Tsuruta Koichi Shiraishi Konrad Kleine +Konstantin L Konstantin Pelykh Krasimir Georgiev +Kris-Mikael Krister Kristian Haugene Kristina Zabunova krrg Kun Zhang Kunal Kushwaha Kyle Conroy +Kyle Linden kyu Lachlan Coote Lai Jiangshan @@ -764,12 +860,14 @@ Lalatendu Mohanty lalyos Lance Chen Lance Kinley +Lars Butler Lars Kellogg-Stedman Lars R. Damerow Laszlo Meszaros Laurent Erignoux Laurie Voss Leandro Siqueira +Lee Chao <932819864@qq.com> Lee, Meng-Han leeplay Lei Jitang @@ -780,16 +878,20 @@ Levi Blackstone Levi Gross Lewis Marshall Lewis Peckover +Liam Macgillavry Liana Lo Liang Mingqiang Liang-Chi Hsieh liaoqingwei limsy +Lin Lu +LingFaKe Linus Heckemann Liran Tal Liron Levin Liu Bo Liu Hua +lixiaobing10051267 LIZAO LI Lloyd Dewolf Lokesh Mandvekar @@ -801,9 +903,12 @@ Luca Marturana Luca Orlandi Luca-Bogdan Grigorescu Lucas Chan +Lucas Chi +Luciano Mores Luis Martínez de Bartolomé Izquierdo Lukas Waslowski lukaspustina +Lukasz Zajaczkowski lukemarsden Lynda O'Leary Lénaïc Huard @@ -818,6 +923,8 @@ Malte Janduda manchoz Manfred Touron Manfred Zabarauskas +Mansi Nahar +mansinahar Manuel Meurer Manuel Woelker mapk0y @@ -848,7 +955,7 @@ Martijn van Oosterhout Martin Honermeyer Martin Kelly Martin Mosegaard Amdisen -Martin Redmond +Martin Redmond Mary Anthony Masahito Zembutsu Mason Malone @@ -857,10 +964,12 @@ Mathias Monnerville Mathieu Le Marec - Pasquet Matt Apperson Matt Bachmann -Matt Bentley +Matt Bentley Matt Haggard +Matt Hoyle Matt McCormick Matt Moore +Matt Richardson Matt Robenolt Matthew Heon Matthew Mayer @@ -872,9 +981,10 @@ Matthias Rampke Matthieu Hauglustaine mattymo mattyw -Mauricio Garavaglia +Mauricio Garavaglia mauriyouth Max Shytikov +Maxim Fedchyshyn Maxim Ivanov Maxim Kulkin Maxim Treskin @@ -883,8 +993,10 @@ Meaglith Ma meejah Megan Kostick Mehul Kar +Mei ChunTao Mengdi Gao Mert Yazıcıoğlu +mgniu Micah Zoltu Michael A. Smith Michael Bridgen @@ -892,8 +1004,10 @@ Michael Brown Michael Chiang Michael Crosby Michael Currie +Michael Friis Michael Gorsuch Michael Grauer +Michael Holzheu Michael Hudson-Doyle Michael Huettermann Michael Käufl @@ -908,12 +1022,14 @@ Michal Fojtik Michal Gebauer Michal Jemala Michal Minar +Michal Wieczorek Michaël Pailloncy Michał Czeraszkiewicz Michiel@unhosted +Mickaël FORTUNATO Miguel Angel Fernández Miguel Morales -Mihai Borobocea +Mihai Borobocea Mihuleacc Sergiu Mike Brown Mike Chelen @@ -921,15 +1037,17 @@ Mike Danese Mike Dillon Mike Dougherty Mike Gaffney -Mike Goelzer +Mike Goelzer Mike Leone Mike MacCana Mike Naberezny Mike Snitzer +mikelinjie <294893458@qq.com> Mikhail Sobolev Miloslav Trmač mingqing Mingzhen Feng +Misty Stanley-Jones Mitch Capper mlarcher Mohammad Banikazemi @@ -945,14 +1063,18 @@ mqliang Mrunal Patel msabansal mschurenko +muge Mustafa Akın Muthukumar R +Máximo Cuadros Médi-Rémi Hashim +Nahum Shalman Nakul Pathak Nalin Dahyabhai Nan Monnand Deng Naoki Orii Natalie Parker +Natanael Copa Nate Brennand Nate Eagleson Nate Jones @@ -962,15 +1084,20 @@ Nathan LeClaire Nathan McCauley Nathan Williams Neal McBurnett +Neil Peterson Nelson Chen +Neyazul Haque Nghia Tran Niall O'Higgins Nicholas E. Rabenau +nick +Nick DeCoursin Nick Irvine Nick Parker Nick Payne Nick Stenning Nick Stinemates +Nicola Kabar Nicolas Borboën Nicolas De loof Nicolas Dudebout @@ -980,6 +1107,7 @@ Nicolás Hock Isaza Nigel Poulton NikolaMandic nikolas +Nirmal Mehta Nishant Totla NIWA Hideyuki noducks @@ -988,16 +1116,20 @@ nponeccop Nuutti Kotivuori nzwsch O.S. Tezer +objectified OddBloke odk- Oguz Bilgic Oh Jinkyun Ohad Schneider +ohmystack Ole Reifschneider Oliver Neal Olivier Gambier Olle Jonsson Oriol Francès +orkaa +Oskar Niburski Otto Kekäläinen oyld ozlerhakan @@ -1007,6 +1139,7 @@ panticz Paolo G. Giarrusso Pascal Borreli Pascal Hartig +Patrick Böänziger Patrick Devine Patrick Hemmer Patrick Stapleton @@ -1016,6 +1149,7 @@ paul Paul Annesley Paul Bellamy Paul Bowsher +Paul Furtado Paul Hammond Paul Jimenez Paul Lietar @@ -1023,16 +1157,19 @@ Paul Liljenberg Paul Morie Paul Nasrat Paul Weaver +Paulo Ribeiro Pavel Lobashov Pavel Pospisil Pavel Sutyrin Pavel Tikhomirov Pavlos Ratis +Pavol Vargovcik Peeyush Gupta Peggy Li Pei Su Penghan Wang perhapszzy@sina.com +pestophagous Peter Bourgon Peter Braden Peter Choi @@ -1044,6 +1181,7 @@ Peter Malmgren Peter Salvatore Peter Volpe Peter Waller +Petr Švihlík Phil Phil Estes Phil Spitler @@ -1055,6 +1193,7 @@ pidster Piergiuliano Bossi Pierre Pierre Carrier +Pierre Dal-Pra Pierre Wacrenier Pierre-Alain RIVIERE Piotr Bogdan @@ -1080,9 +1219,11 @@ Raghavendra K T Raghuram Devarakonda Rajat Pandit Rajdeep Dua +Ralf Sippl Ralle Ralph Bean Ramkumar Ramachandra +Ramon Brooker Ramon van Alteren Ray Tsang ReadmeCritic @@ -1093,10 +1234,12 @@ Renato Riccieri Santos Zannon resouer rgstephens Rhys Hiltner +Rich Moyse Rich Seymour Richard Richard Burnison Richard Harvey +Richard Mathie Richard Metzler Richard Scothern Richo Healey @@ -1106,29 +1249,36 @@ Rick Wieman Rik Nijessen Riku Voipio Riley Guerin +Ritesh H Shukla Riyaz Faizullabhoy Rob Vesse Robert Bachmann Robert Bittle Robert Obryk Robert Stern +Robert Terhaar Robert Wallis Roberto G. Hashioka Robin Naundorf Robin Schneider Robin Speekenbrink robpc +Rodolfo Carvalho Rodrigo Vaz Roel Van Nyen Roger Peppe Rohit Jnagal Rohit Kadam Roland Huß +Roland Kammerer Roland Moriz Roma Sokolov Roman Strashkin Ron Smits +Ron Williams root +root +root root root Rory Hunter @@ -1139,6 +1289,7 @@ Rozhnov Alexandr rsmoorthy Rudolph Gottesheim Rui Lopes +Runshen Zhu Ryan Anderson Ryan Aslett Ryan Belgrave @@ -1157,6 +1308,8 @@ s00318865 Sabin Basyal Sachin Joshi Sagar Hani +Sainath Grandhi +sakeven Sally O'Malley Sam Abed Sam Alba @@ -1178,6 +1331,7 @@ sapphiredev Satnam Singh satoru Satoshi Amemiya +Satoshi Tagomori scaleoutsean Scott Bessler Scott Collier @@ -1185,28 +1339,38 @@ Scott Johnston Scott Stamp Scott Walls sdreyesg +Sean Christopherson Sean Cronin Sean OMeara Sean P. Kane Sebastiaan van Steenis Sebastiaan van Stijn Senthil Kumar Selvaraj +Senthil Kumaran SeongJae Park Seongyeol Lim +Serge Hallyn Sergey Alekseev Sergey Evstifeev +Serhat Gülçiçek Sevki Hasirci Shane Canon Shane da Silva shaunol Shawn Landden Shawn Siefkas +shawnhe Shekhar Gulati Sheng Yang +Shengbo Song +Shev Yan Shih-Yuan Lee Shijiang Wei Shishir Mahajan +Shoubhik Bose +Shourya Sarcar shuai-z +Shukui Yang Shuwei Hao Sian Lerk Lau sidharthamani @@ -1217,6 +1381,7 @@ Simon Leinen Simon Taranto Sindhu S Sjoerd Langkemper +skaasten Solganik Alexander Solomon Hykes Song Gao @@ -1226,8 +1391,8 @@ Spencer Brown Spencer Smith Sridatta Thatipamala Sridhar Ratnakumar -Srini Brahmaroutu Srini Brahmaroutu +srinsriv Steeve Morin Stefan Berger Stefan J. Wernli @@ -1237,24 +1402,28 @@ Stefan Staudenmeyer Stefan Weil Stephen Crosby Stephen Day +Stephen Drake Stephen Rust Steve Durrheimer Steve Francia Steve Koch Steven Burgess +Steven Erenst Steven Iveson Steven Merrill Steven Richards Steven Taylor +Subhajit Ghosh Sujith Haridasan Suryakumar Sudar Sven Dowideit Swapnil Daingade Sylvain Baubeau -Sylvain Bellemare +Sylvain Bellemare Sébastien Sébastien Luttringer Sébastien Stormacq +Tadej Janež TAGOMORI Satoshi tang0th Tangi COLIN @@ -1275,18 +1444,25 @@ Thijs Terlouw Thomas Bikeev Thomas Frössman Thomas Gazagnaire +Thomas Grainger Thomas Hansen +Thomas Leonard Thomas LEVEIL Thomas Orozco +Thomas Riccardi Thomas Schroeter Thomas Sjögren Thomas Swift +Thomas Tanaka Thomas Texier Tianon Gravi +Tianyi Wang Tibor Vass +Tiffany Jernigan Tiffany Low Tim Bosse Tim Dettrick +Tim Düsterhus Tim Hockin Tim Ruffles Tim Smith @@ -1294,6 +1470,7 @@ Tim Terhorst Tim Wang Tim Waugh Tim Wraight +timfeirg Timothy Hobbs tjwebb123 tobe @@ -1301,6 +1478,7 @@ Tobias Bieniek Tobias Bradtke Tobias Gesellchen Tobias Klauser +Tobias Munk Tobias Schmidt Tobias Schwab Todd Crane @@ -1345,6 +1523,7 @@ vagrant Vaidas Jablonskis Veres Lajos vgeta +Victor Algaze Victor Coisne Victor Costan Victor I. Wood @@ -1373,6 +1552,7 @@ Vivek Dasgupta Vivek Goyal Vladimir Bulyga Vladimir Kirillov +Vladimir Pouzanov Vladimir Rutsky Vladimir Varankin VladimirAus @@ -1381,6 +1561,7 @@ waitingkuo Walter Leibbrandt Walter Stanish WANG Chao +Wang Xing Ward Vandewege WarheadsSE Wayne Chang @@ -1388,6 +1569,8 @@ Wei-Ting Kuo weiyan Weiyang Zhu Wen Cheng Ma +Wendel Fleming +Wenkai Yin Wenxuan Zhao Wenyu You <21551128@zju.edu.cn> Wes Morgan @@ -1404,7 +1587,9 @@ WiseTrem wlan0 Wolfgang Powisch wonderflow +Wonjun Kim xamyzhao +Xianlu Bird XiaoBing Jiang Xiaoxu Chen xiekeyang @@ -1417,6 +1602,7 @@ YAMADA Tsuyoshi Yan Feng Yang Bai yangshukui +Yanqiang Miao Yasunori Mahata Yestin Sun Yi EungJun @@ -1426,10 +1612,13 @@ Ying Li Yohei Ueda Yong Tang Yongzhi Pan +yorkie Youcef YEKHLEF Yuan Sun yuchangchun yuchengxia +yuexiao-wang +YuPengZTE Yurii Rashkovskii yuzou Zac Dover @@ -1444,6 +1633,7 @@ Zhang Kun Zhang Wei Zhang Wentao Zhenan Ye <21551168@zju.edu.cn> +zhouhao Zhu Guihua Zhuoyun Wei Zilin Du @@ -1454,7 +1644,9 @@ zmarouf Zoltan Tombol zqh Zuhayr Elahi +Zunayed Ali Álex González Álvaro Lázaro Átila Camurça Alves 尹吉峰 +搏通 diff --git a/vendor/github.com/docker/docker/pkg/mount/flags.go b/vendor/github.com/docker/docker/pkg/mount/flags.go index d2fb1fb4..607dbed4 100644 --- a/vendor/github.com/docker/docker/pkg/mount/flags.go +++ b/vendor/github.com/docker/docker/pkg/mount/flags.go @@ -5,6 +5,112 @@ import ( "strings" ) +var flags = map[string]struct { + clear bool + flag int +}{ + "defaults": {false, 0}, + "ro": {false, RDONLY}, + "rw": {true, RDONLY}, + "suid": {true, NOSUID}, + "nosuid": {false, NOSUID}, + "dev": {true, NODEV}, + "nodev": {false, NODEV}, + "exec": {true, NOEXEC}, + "noexec": {false, NOEXEC}, + "sync": {false, SYNCHRONOUS}, + "async": {true, SYNCHRONOUS}, + "dirsync": {false, DIRSYNC}, + "remount": {false, REMOUNT}, + "mand": {false, MANDLOCK}, + "nomand": {true, MANDLOCK}, + "atime": {true, NOATIME}, + "noatime": {false, NOATIME}, + "diratime": {true, NODIRATIME}, + "nodiratime": {false, NODIRATIME}, + "bind": {false, BIND}, + "rbind": {false, RBIND}, + "unbindable": {false, UNBINDABLE}, + "runbindable": {false, RUNBINDABLE}, + "private": {false, PRIVATE}, + "rprivate": {false, RPRIVATE}, + "shared": {false, SHARED}, + "rshared": {false, RSHARED}, + "slave": {false, SLAVE}, + "rslave": {false, RSLAVE}, + "relatime": {false, RELATIME}, + "norelatime": {true, RELATIME}, + "strictatime": {false, STRICTATIME}, + "nostrictatime": {true, STRICTATIME}, +} + +var validFlags = map[string]bool{ + "": true, + "size": true, + "mode": true, + "uid": true, + "gid": true, + "nr_inodes": true, + "nr_blocks": true, + "mpol": true, +} + +var propagationFlags = map[string]bool{ + "bind": true, + "rbind": true, + "unbindable": true, + "runbindable": true, + "private": true, + "rprivate": true, + "shared": true, + "rshared": true, + "slave": true, + "rslave": true, +} + +// MergeTmpfsOptions merge mount options to make sure there is no duplicate. +func MergeTmpfsOptions(options []string) ([]string, error) { + // We use collisions maps to remove duplicates. + // For flag, the key is the flag value (the key for propagation flag is -1) + // For data=value, the key is the data + flagCollisions := map[int]bool{} + dataCollisions := map[string]bool{} + + var newOptions []string + // We process in reverse order + for i := len(options) - 1; i >= 0; i-- { + option := options[i] + if option == "defaults" { + continue + } + if f, ok := flags[option]; ok && f.flag != 0 { + // There is only one propagation mode + key := f.flag + if propagationFlags[option] { + key = -1 + } + // Check to see if there is collision for flag + if !flagCollisions[key] { + // We prepend the option and add to collision map + newOptions = append([]string{option}, newOptions...) + flagCollisions[key] = true + } + continue + } + opt := strings.SplitN(option, "=", 2) + if len(opt) != 2 || !validFlags[opt[0]] { + return nil, fmt.Errorf("Invalid tmpfs option %q", opt) + } + if !dataCollisions[opt[0]] { + // We prepend the option and add to collision map + newOptions = append([]string{option}, newOptions...) + dataCollisions[opt[0]] = true + } + } + + return newOptions, nil +} + // Parse fstab type mount options into mount() flags // and device specific data func parseOptions(options string) (int, string) { @@ -13,45 +119,6 @@ func parseOptions(options string) (int, string) { data []string ) - flags := map[string]struct { - clear bool - flag int - }{ - "defaults": {false, 0}, - "ro": {false, RDONLY}, - "rw": {true, RDONLY}, - "suid": {true, NOSUID}, - "nosuid": {false, NOSUID}, - "dev": {true, NODEV}, - "nodev": {false, NODEV}, - "exec": {true, NOEXEC}, - "noexec": {false, NOEXEC}, - "sync": {false, SYNCHRONOUS}, - "async": {true, SYNCHRONOUS}, - "dirsync": {false, DIRSYNC}, - "remount": {false, REMOUNT}, - "mand": {false, MANDLOCK}, - "nomand": {true, MANDLOCK}, - "atime": {true, NOATIME}, - "noatime": {false, NOATIME}, - "diratime": {true, NODIRATIME}, - "nodiratime": {false, NODIRATIME}, - "bind": {false, BIND}, - "rbind": {false, RBIND}, - "unbindable": {false, UNBINDABLE}, - "runbindable": {false, RUNBINDABLE}, - "private": {false, PRIVATE}, - "rprivate": {false, RPRIVATE}, - "shared": {false, SHARED}, - "rshared": {false, RSHARED}, - "slave": {false, SLAVE}, - "rslave": {false, RSLAVE}, - "relatime": {false, RELATIME}, - "norelatime": {true, RELATIME}, - "strictatime": {false, STRICTATIME}, - "nostrictatime": {true, STRICTATIME}, - } - for _, o := range strings.Split(options, ",") { // If the option does not exist in the flags table or the flag // is not supported on the platform, @@ -72,16 +139,6 @@ func parseOptions(options string) (int, string) { // ParseTmpfsOptions parse fstab type mount options into flags and data func ParseTmpfsOptions(options string) (int, string, error) { flags, data := parseOptions(options) - validFlags := map[string]bool{ - "": true, - "size": true, - "mode": true, - "uid": true, - "gid": true, - "nr_inodes": true, - "nr_blocks": true, - "mpol": true, - } for _, o := range strings.Split(data, ",") { opt := strings.SplitN(o, "=", 2) if !validFlags[opt[0]] { diff --git a/vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go b/vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go index a90d3d11..5564f7b3 100644 --- a/vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd freebsd,!cgo +// +build !linux,!freebsd freebsd,!cgo solaris,!cgo package mount diff --git a/vendor/github.com/docker/docker/pkg/mount/mount.go b/vendor/github.com/docker/docker/pkg/mount/mount.go index ed7216e5..66ac4bf4 100644 --- a/vendor/github.com/docker/docker/pkg/mount/mount.go +++ b/vendor/github.com/docker/docker/pkg/mount/mount.go @@ -9,8 +9,8 @@ func GetMounts() ([]*Info, error) { return parseMountTable() } -// Mounted looks at /proc/self/mountinfo to determine of the specified -// mountpoint has been mounted +// Mounted determines if a specified mountpoint has been mounted. +// On Linux it looks at /proc/self/mountinfo and on Solaris at mnttab. func Mounted(mountpoint string) (bool, error) { entries, err := parseMountTable() if err != nil { diff --git a/vendor/github.com/docker/docker/pkg/mount/mounter_solaris.go b/vendor/github.com/docker/docker/pkg/mount/mounter_solaris.go new file mode 100644 index 00000000..c684aa81 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/mount/mounter_solaris.go @@ -0,0 +1,33 @@ +// +build solaris,cgo + +package mount + +import ( + "golang.org/x/sys/unix" + "unsafe" +) + +// #include +// #include +// #include +// int Mount(const char *spec, const char *dir, int mflag, +// char *fstype, char *dataptr, int datalen, char *optptr, int optlen) { +// return mount(spec, dir, mflag, fstype, dataptr, datalen, optptr, optlen); +// } +import "C" + +func mount(device, target, mType string, flag uintptr, data string) error { + spec := C.CString(device) + dir := C.CString(target) + fstype := C.CString(mType) + _, err := C.Mount(spec, dir, C.int(flag), fstype, nil, 0, nil, 0) + C.free(unsafe.Pointer(spec)) + C.free(unsafe.Pointer(dir)) + C.free(unsafe.Pointer(fstype)) + return err +} + +func unmount(target string, flag int) error { + err := unix.Unmount(target, flag) + return err +} diff --git a/vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go b/vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go index eb93365e..a2a3bb45 100644 --- a/vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/mount/mounter_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!freebsd freebsd,!cgo +// +build !linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo package mount diff --git a/vendor/github.com/docker/docker/pkg/mount/mountinfo_solaris.go b/vendor/github.com/docker/docker/pkg/mount/mountinfo_solaris.go new file mode 100644 index 00000000..ad9ab57f --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/mount/mountinfo_solaris.go @@ -0,0 +1,37 @@ +// +build solaris,cgo + +package mount + +/* +#include +#include +*/ +import "C" + +import ( + "fmt" +) + +func parseMountTable() ([]*Info, error) { + mnttab := C.fopen(C.CString(C.MNTTAB), C.CString("r")) + if mnttab == nil { + return nil, fmt.Errorf("Failed to open %s", C.MNTTAB) + } + + var out []*Info + var mp C.struct_mnttab + + ret := C.getmntent(mnttab, &mp) + for ret == 0 { + var mountinfo Info + mountinfo.Mountpoint = C.GoString(mp.mnt_mountp) + mountinfo.Source = C.GoString(mp.mnt_special) + mountinfo.Fstype = C.GoString(mp.mnt_fstype) + mountinfo.Opts = C.GoString(mp.mnt_mntopts) + out = append(out, &mountinfo) + ret = C.getmntent(mnttab, &mp) + } + + C.fclose(mnttab) + return out, nil +} diff --git a/vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go b/vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go index b8d9aa5c..7fbcf192 100644 --- a/vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go @@ -1,4 +1,4 @@ -// +build !windows,!linux,!freebsd freebsd,!cgo +// +build !windows,!linux,!freebsd,!solaris freebsd,!cgo solaris,!cgo package mount diff --git a/vendor/github.com/docker/docker/pkg/mount/sharedsubtree_solaris.go b/vendor/github.com/docker/docker/pkg/mount/sharedsubtree_solaris.go new file mode 100644 index 00000000..09f6b03c --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/mount/sharedsubtree_solaris.go @@ -0,0 +1,58 @@ +// +build solaris + +package mount + +// MakeShared ensures a mounted filesystem has the SHARED mount option enabled. +// See the supported options in flags.go for further reference. +func MakeShared(mountPoint string) error { + return ensureMountedAs(mountPoint, "shared") +} + +// MakeRShared ensures a mounted filesystem has the RSHARED mount option enabled. +// See the supported options in flags.go for further reference. +func MakeRShared(mountPoint string) error { + return ensureMountedAs(mountPoint, "rshared") +} + +// MakePrivate ensures a mounted filesystem has the PRIVATE mount option enabled. +// See the supported options in flags.go for further reference. +func MakePrivate(mountPoint string) error { + return ensureMountedAs(mountPoint, "private") +} + +// MakeRPrivate ensures a mounted filesystem has the RPRIVATE mount option +// enabled. See the supported options in flags.go for further reference. +func MakeRPrivate(mountPoint string) error { + return ensureMountedAs(mountPoint, "rprivate") +} + +// MakeSlave ensures a mounted filesystem has the SLAVE mount option enabled. +// See the supported options in flags.go for further reference. +func MakeSlave(mountPoint string) error { + return ensureMountedAs(mountPoint, "slave") +} + +// MakeRSlave ensures a mounted filesystem has the RSLAVE mount option enabled. +// See the supported options in flags.go for further reference. +func MakeRSlave(mountPoint string) error { + return ensureMountedAs(mountPoint, "rslave") +} + +// MakeUnbindable ensures a mounted filesystem has the UNBINDABLE mount option +// enabled. See the supported options in flags.go for further reference. +func MakeUnbindable(mountPoint string) error { + return ensureMountedAs(mountPoint, "unbindable") +} + +// MakeRUnbindable ensures a mounted filesystem has the RUNBINDABLE mount +// option enabled. See the supported options in flags.go for further reference. +func MakeRUnbindable(mountPoint string) error { + return ensureMountedAs(mountPoint, "runbindable") +} + +func ensureMountedAs(mountPoint, options string) error { + // TODO: Solaris does not support bind mounts. + // Evaluate lofs and also look at the relevant + // mount flags to be supported. + return nil +} diff --git a/vendor/github.com/docker/docker/pkg/symlink/fs.go b/vendor/github.com/docker/docker/pkg/symlink/fs.go index dcf707f4..f6bc2231 100644 --- a/vendor/github.com/docker/docker/pkg/symlink/fs.go +++ b/vendor/github.com/docker/docker/pkg/symlink/fs.go @@ -95,8 +95,8 @@ func evalSymlinksInScope(path, root string) (string, error) { // root gets prepended and we Clean again (to remove any trailing slash // if the first Clean gave us just "/") cleanP := filepath.Clean(string(filepath.Separator) + b.String() + p) - if cleanP == string(filepath.Separator) { - // never Lstat "/" itself + if isDriveOrRoot(cleanP) { + // never Lstat "/" itself, or drive letters on Windows b.Reset() continue } @@ -113,7 +113,8 @@ func evalSymlinksInScope(path, root string) (string, error) { return "", err } if fi.Mode()&os.ModeSymlink == 0 { - b.WriteString(p + string(filepath.Separator)) + b.WriteString(p) + b.WriteRune(filepath.Separator) continue } diff --git a/vendor/github.com/docker/docker/pkg/symlink/fs_unix.go b/vendor/github.com/docker/docker/pkg/symlink/fs_unix.go index 818004f2..22708273 100644 --- a/vendor/github.com/docker/docker/pkg/symlink/fs_unix.go +++ b/vendor/github.com/docker/docker/pkg/symlink/fs_unix.go @@ -9,3 +9,7 @@ import ( func evalSymlinks(path string) (string, error) { return filepath.EvalSymlinks(path) } + +func isDriveOrRoot(p string) bool { + return p == string(filepath.Separator) +} diff --git a/vendor/github.com/docker/docker/pkg/symlink/fs_windows.go b/vendor/github.com/docker/docker/pkg/symlink/fs_windows.go index 449fe564..241e531f 100644 --- a/vendor/github.com/docker/docker/pkg/symlink/fs_windows.go +++ b/vendor/github.com/docker/docker/pkg/symlink/fs_windows.go @@ -153,3 +153,17 @@ func walkSymlinks(path string) (string, error) { } return filepath.Clean(b.String()), nil } + +func isDriveOrRoot(p string) bool { + if p == string(filepath.Separator) { + return true + } + + length := len(p) + if length >= 2 { + if p[length-1] == ':' && (('a' <= p[length-2] && p[length-2] <= 'z') || ('A' <= p[length-2] && p[length-2] <= 'Z')) { + return true + } + } + return false +} diff --git a/vendor/github.com/docker/docker/pkg/system/events_windows.go b/vendor/github.com/docker/docker/pkg/system/events_windows.go index 04e2de78..3ec6d221 100644 --- a/vendor/github.com/docker/docker/pkg/system/events_windows.go +++ b/vendor/github.com/docker/docker/pkg/system/events_windows.go @@ -6,6 +6,8 @@ package system import ( "syscall" "unsafe" + + "golang.org/x/sys/windows" ) var ( @@ -67,7 +69,7 @@ func PulseEvent(handle syscall.Handle) (err error) { return setResetPulse(handle, procPulseEvent) } -func setResetPulse(handle syscall.Handle, proc *syscall.LazyProc) (err error) { +func setResetPulse(handle syscall.Handle, proc *windows.LazyProc) (err error) { r0, _, _ := proc.Call(uintptr(handle)) if r0 != 0 { err = syscall.Errno(r0) diff --git a/vendor/github.com/docker/docker/pkg/system/exitcode.go b/vendor/github.com/docker/docker/pkg/system/exitcode.go new file mode 100644 index 00000000..60f0514b --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/system/exitcode.go @@ -0,0 +1,33 @@ +package system + +import ( + "fmt" + "os/exec" + "syscall" +) + +// GetExitCode returns the ExitStatus of the specified error if its type is +// exec.ExitError, returns 0 and an error otherwise. +func GetExitCode(err error) (int, error) { + exitCode := 0 + if exiterr, ok := err.(*exec.ExitError); ok { + if procExit, ok := exiterr.Sys().(syscall.WaitStatus); ok { + return procExit.ExitStatus(), nil + } + } + return exitCode, fmt.Errorf("failed to get exit code") +} + +// ProcessExitCode process the specified error and returns the exit status code +// if the error was of type exec.ExitError, returns nothing otherwise. +func ProcessExitCode(err error) (exitCode int) { + if err != nil { + var exiterr error + if exitCode, exiterr = GetExitCode(err); exiterr != nil { + // TODO: Fix this so we check the error's text. + // we've failed to retrieve exit code, so we set it to 127 + exitCode = 127 + } + } + return +} diff --git a/vendor/github.com/docker/docker/pkg/system/filesys.go b/vendor/github.com/docker/docker/pkg/system/filesys.go index c14feb84..810c7947 100644 --- a/vendor/github.com/docker/docker/pkg/system/filesys.go +++ b/vendor/github.com/docker/docker/pkg/system/filesys.go @@ -7,6 +7,12 @@ import ( "path/filepath" ) +// MkdirAllWithACL is a wrapper for MkdirAll that creates a directory +// ACL'd for Builtin Administrators and Local System. +func MkdirAllWithACL(path string, perm os.FileMode) error { + return MkdirAll(path, perm) +} + // MkdirAll creates a directory named path along with any necessary parents, // with permission specified by attribute perm for all dir created. func MkdirAll(path string, perm os.FileMode) error { @@ -17,3 +23,32 @@ func MkdirAll(path string, perm os.FileMode) error { func IsAbs(path string) bool { return filepath.IsAbs(path) } + +// The functions below here are wrappers for the equivalents in the os package. +// They are passthrough on Unix platforms, and only relevant on Windows. + +// CreateSequential creates the named file with mode 0666 (before umask), truncating +// it if it already exists. If successful, methods on the returned +// File can be used for I/O; the associated file descriptor has mode +// O_RDWR. +// If there is an error, it will be of type *PathError. +func CreateSequential(name string) (*os.File, error) { + return os.Create(name) +} + +// OpenSequential opens the named file for reading. If successful, methods on +// the returned file can be used for reading; the associated file +// descriptor has mode O_RDONLY. +// If there is an error, it will be of type *PathError. +func OpenSequential(name string) (*os.File, error) { + return os.Open(name) +} + +// OpenFileSequential is the generalized open call; most users will use Open +// or Create instead. It opens the named file with specified flag +// (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, +// methods on the returned File can be used for I/O. +// If there is an error, it will be of type *PathError. +func OpenFileSequential(name string, flag int, perm os.FileMode) (*os.File, error) { + return os.OpenFile(name, flag, perm) +} diff --git a/vendor/github.com/docker/docker/pkg/system/filesys_windows.go b/vendor/github.com/docker/docker/pkg/system/filesys_windows.go index 16823d55..6094f01f 100644 --- a/vendor/github.com/docker/docker/pkg/system/filesys_windows.go +++ b/vendor/github.com/docker/docker/pkg/system/filesys_windows.go @@ -8,15 +8,31 @@ import ( "regexp" "strings" "syscall" + "unsafe" + + winio "github.com/Microsoft/go-winio" ) +// MkdirAllWithACL is a wrapper for MkdirAll that creates a directory +// ACL'd for Builtin Administrators and Local System. +func MkdirAllWithACL(path string, perm os.FileMode) error { + return mkdirall(path, true) +} + // MkdirAll implementation that is volume path aware for Windows. -func MkdirAll(path string, perm os.FileMode) error { +func MkdirAll(path string, _ os.FileMode) error { + return mkdirall(path, false) +} + +// mkdirall is a custom version of os.MkdirAll modified for use on Windows +// so that it is both volume path aware, and can create a directory with +// a DACL. +func mkdirall(path string, adminAndLocalSystem bool) error { if re := regexp.MustCompile(`^\\\\\?\\Volume{[a-z0-9-]+}$`); re.MatchString(path) { return nil } - // The rest of this method is copied from os.MkdirAll and should be kept + // The rest of this method is largely copied from os.MkdirAll and should be kept // as-is to ensure compatibility. // Fast path: if we can tell whether path is a directory or file, stop with success or error. @@ -45,14 +61,19 @@ func MkdirAll(path string, perm os.FileMode) error { if j > 1 { // Create parent - err = MkdirAll(path[0:j-1], perm) + err = mkdirall(path[0:j-1], false) if err != nil { return err } } - // Parent now exists; invoke Mkdir and use its result. - err = os.Mkdir(path, perm) + // Parent now exists; invoke os.Mkdir or mkdirWithACL and use its result. + if adminAndLocalSystem { + err = mkdirWithACL(path) + } else { + err = os.Mkdir(path, 0) + } + if err != nil { // Handle arguments like "foo/." by // double-checking that directory doesn't exist. @@ -65,6 +86,36 @@ func MkdirAll(path string, perm os.FileMode) error { return nil } +// mkdirWithACL creates a new directory. If there is an error, it will be of +// type *PathError. . +// +// This is a modified and combined version of os.Mkdir and syscall.Mkdir +// in golang to cater for creating a directory am ACL permitting full +// access, with inheritance, to any subfolder/file for Built-in Administrators +// and Local System. +func mkdirWithACL(name string) error { + sa := syscall.SecurityAttributes{Length: 0} + sddl := "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)" + sd, err := winio.SddlToSecurityDescriptor(sddl) + if err != nil { + return &os.PathError{Op: "mkdir", Path: name, Err: err} + } + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + sa.SecurityDescriptor = uintptr(unsafe.Pointer(&sd[0])) + + namep, err := syscall.UTF16PtrFromString(name) + if err != nil { + return &os.PathError{Op: "mkdir", Path: name, Err: err} + } + + e := syscall.CreateDirectory(namep, &sa) + if e != nil { + return &os.PathError{Op: "mkdir", Path: name, Err: e} + } + return nil +} + // IsAbs is a platform-specific wrapper for filepath.IsAbs. On Windows, // golang filepath.IsAbs does not consider a path \windows\system32 as absolute // as it doesn't start with a drive-letter/colon combination. However, in @@ -80,3 +131,106 @@ func IsAbs(path string) bool { } return true } + +// The origin of the functions below here are the golang OS and syscall packages, +// slightly modified to only cope with files, not directories due to the +// specific use case. +// +// The alteration is to allow a file on Windows to be opened with +// FILE_FLAG_SEQUENTIAL_SCAN (particular for docker load), to avoid eating +// the standby list, particularly when accessing large files such as layer.tar. + +// CreateSequential creates the named file with mode 0666 (before umask), truncating +// it if it already exists. If successful, methods on the returned +// File can be used for I/O; the associated file descriptor has mode +// O_RDWR. +// If there is an error, it will be of type *PathError. +func CreateSequential(name string) (*os.File, error) { + return OpenFileSequential(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0) +} + +// OpenSequential opens the named file for reading. If successful, methods on +// the returned file can be used for reading; the associated file +// descriptor has mode O_RDONLY. +// If there is an error, it will be of type *PathError. +func OpenSequential(name string) (*os.File, error) { + return OpenFileSequential(name, os.O_RDONLY, 0) +} + +// OpenFileSequential is the generalized open call; most users will use Open +// or Create instead. +// If there is an error, it will be of type *PathError. +func OpenFileSequential(name string, flag int, _ os.FileMode) (*os.File, error) { + if name == "" { + return nil, &os.PathError{Op: "open", Path: name, Err: syscall.ENOENT} + } + r, errf := syscallOpenFileSequential(name, flag, 0) + if errf == nil { + return r, nil + } + return nil, &os.PathError{Op: "open", Path: name, Err: errf} +} + +func syscallOpenFileSequential(name string, flag int, _ os.FileMode) (file *os.File, err error) { + r, e := syscallOpenSequential(name, flag|syscall.O_CLOEXEC, 0) + if e != nil { + return nil, e + } + return os.NewFile(uintptr(r), name), nil +} + +func makeInheritSa() *syscall.SecurityAttributes { + var sa syscall.SecurityAttributes + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + return &sa +} + +func syscallOpenSequential(path string, mode int, _ uint32) (fd syscall.Handle, err error) { + if len(path) == 0 { + return syscall.InvalidHandle, syscall.ERROR_FILE_NOT_FOUND + } + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return syscall.InvalidHandle, err + } + var access uint32 + switch mode & (syscall.O_RDONLY | syscall.O_WRONLY | syscall.O_RDWR) { + case syscall.O_RDONLY: + access = syscall.GENERIC_READ + case syscall.O_WRONLY: + access = syscall.GENERIC_WRITE + case syscall.O_RDWR: + access = syscall.GENERIC_READ | syscall.GENERIC_WRITE + } + if mode&syscall.O_CREAT != 0 { + access |= syscall.GENERIC_WRITE + } + if mode&syscall.O_APPEND != 0 { + access &^= syscall.GENERIC_WRITE + access |= syscall.FILE_APPEND_DATA + } + sharemode := uint32(syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE) + var sa *syscall.SecurityAttributes + if mode&syscall.O_CLOEXEC == 0 { + sa = makeInheritSa() + } + var createmode uint32 + switch { + case mode&(syscall.O_CREAT|syscall.O_EXCL) == (syscall.O_CREAT | syscall.O_EXCL): + createmode = syscall.CREATE_NEW + case mode&(syscall.O_CREAT|syscall.O_TRUNC) == (syscall.O_CREAT | syscall.O_TRUNC): + createmode = syscall.CREATE_ALWAYS + case mode&syscall.O_CREAT == syscall.O_CREAT: + createmode = syscall.OPEN_ALWAYS + case mode&syscall.O_TRUNC == syscall.O_TRUNC: + createmode = syscall.TRUNCATE_EXISTING + default: + createmode = syscall.OPEN_EXISTING + } + // Use FILE_FLAG_SEQUENTIAL_SCAN rather than FILE_ATTRIBUTE_NORMAL as implemented in golang. + //https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx + const fileFlagSequentialScan = 0x08000000 // FILE_FLAG_SEQUENTIAL_SCAN + h, e := syscall.CreateFile(pathp, access, sharemode, sa, createmode, fileFlagSequentialScan, 0) + return h, e +} diff --git a/vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go b/vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go new file mode 100644 index 00000000..7f4f84f7 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/system/meminfo_solaris.go @@ -0,0 +1,128 @@ +// +build solaris,cgo + +package system + +import ( + "fmt" + "unsafe" +) + +// #cgo LDFLAGS: -lkstat +// #include +// #include +// #include +// #include +// #include +// #include +// struct swaptable *allocSwaptable(int num) { +// struct swaptable *st; +// struct swapent *swapent; +// st = (struct swaptable *)malloc(num * sizeof(swapent_t) + sizeof (int)); +// swapent = st->swt_ent; +// for (int i = 0; i < num; i++,swapent++) { +// swapent->ste_path = (char *)malloc(MAXPATHLEN * sizeof (char)); +// } +// st->swt_n = num; +// return st; +//} +// void freeSwaptable (struct swaptable *st) { +// struct swapent *swapent = st->swt_ent; +// for (int i = 0; i < st->swt_n; i++,swapent++) { +// free(swapent->ste_path); +// } +// free(st); +// } +// swapent_t getSwapEnt(swapent_t *ent, int i) { +// return ent[i]; +// } +// int64_t getPpKernel() { +// int64_t pp_kernel = 0; +// kstat_ctl_t *ksc; +// kstat_t *ks; +// kstat_named_t *knp; +// kid_t kid; +// +// if ((ksc = kstat_open()) == NULL) { +// return -1; +// } +// if ((ks = kstat_lookup(ksc, "unix", 0, "system_pages")) == NULL) { +// return -1; +// } +// if (((kid = kstat_read(ksc, ks, NULL)) == -1) || +// ((knp = kstat_data_lookup(ks, "pp_kernel")) == NULL)) { +// return -1; +// } +// switch (knp->data_type) { +// case KSTAT_DATA_UINT64: +// pp_kernel = knp->value.ui64; +// break; +// case KSTAT_DATA_UINT32: +// pp_kernel = knp->value.ui32; +// break; +// } +// pp_kernel *= sysconf(_SC_PAGESIZE); +// return (pp_kernel > 0 ? pp_kernel : -1); +// } +import "C" + +// Get the system memory info using sysconf same as prtconf +func getTotalMem() int64 { + pagesize := C.sysconf(C._SC_PAGESIZE) + npages := C.sysconf(C._SC_PHYS_PAGES) + return int64(pagesize * npages) +} + +func getFreeMem() int64 { + pagesize := C.sysconf(C._SC_PAGESIZE) + npages := C.sysconf(C._SC_AVPHYS_PAGES) + return int64(pagesize * npages) +} + +// ReadMemInfo retrieves memory statistics of the host system and returns a +// MemInfo type. +func ReadMemInfo() (*MemInfo, error) { + + ppKernel := C.getPpKernel() + MemTotal := getTotalMem() + MemFree := getFreeMem() + SwapTotal, SwapFree, err := getSysSwap() + + if ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 || + SwapFree < 0 { + return nil, fmt.Errorf("error getting system memory info %v\n", err) + } + + meminfo := &MemInfo{} + // Total memory is total physical memory less than memory locked by kernel + meminfo.MemTotal = MemTotal - int64(ppKernel) + meminfo.MemFree = MemFree + meminfo.SwapTotal = SwapTotal + meminfo.SwapFree = SwapFree + + return meminfo, nil +} + +func getSysSwap() (int64, int64, error) { + var tSwap int64 + var fSwap int64 + var diskblksPerPage int64 + num, err := C.swapctl(C.SC_GETNSWP, nil) + if err != nil { + return -1, -1, err + } + st := C.allocSwaptable(num) + _, err = C.swapctl(C.SC_LIST, unsafe.Pointer(st)) + if err != nil { + C.freeSwaptable(st) + return -1, -1, err + } + + diskblksPerPage = int64(C.sysconf(C._SC_PAGESIZE) >> C.DEV_BSHIFT) + for i := 0; i < int(num); i++ { + swapent := C.getSwapEnt(&st.swt_ent[0], C.int(i)) + tSwap += int64(swapent.ste_pages) * diskblksPerPage + fSwap += int64(swapent.ste_free) * diskblksPerPage + } + C.freeSwaptable(st) + return tSwap, fSwap, nil +} diff --git a/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go b/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go index 82ddd30c..3ce019df 100644 --- a/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows +// +build !linux,!windows,!solaris package system diff --git a/vendor/github.com/docker/docker/pkg/system/meminfo_windows.go b/vendor/github.com/docker/docker/pkg/system/meminfo_windows.go index d4664259..883944a4 100644 --- a/vendor/github.com/docker/docker/pkg/system/meminfo_windows.go +++ b/vendor/github.com/docker/docker/pkg/system/meminfo_windows.go @@ -1,12 +1,13 @@ package system import ( - "syscall" "unsafe" + + "golang.org/x/sys/windows" ) var ( - modkernel32 = syscall.NewLazyDLL("kernel32.dll") + modkernel32 = windows.NewLazySystemDLL("kernel32.dll") procGlobalMemoryStatusEx = modkernel32.NewProc("GlobalMemoryStatusEx") ) diff --git a/vendor/github.com/docker/docker/pkg/system/path_unix.go b/vendor/github.com/docker/docker/pkg/system/path_unix.go index 1b6cc9cb..c607c4db 100644 --- a/vendor/github.com/docker/docker/pkg/system/path_unix.go +++ b/vendor/github.com/docker/docker/pkg/system/path_unix.go @@ -6,3 +6,9 @@ package system // executables. Each directory is separated from the next by a colon // ':' character . const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +// CheckSystemDriveAndRemoveDriveLetter verifies that a path, if it includes a drive letter, +// is the system drive. This is a no-op on Linux. +func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) { + return path, nil +} diff --git a/vendor/github.com/docker/docker/pkg/system/path_windows.go b/vendor/github.com/docker/docker/pkg/system/path_windows.go index 09e7f89f..cbfe2c15 100644 --- a/vendor/github.com/docker/docker/pkg/system/path_windows.go +++ b/vendor/github.com/docker/docker/pkg/system/path_windows.go @@ -2,6 +2,36 @@ package system +import ( + "fmt" + "path/filepath" + "strings" +) + // DefaultPathEnv is deliberately empty on Windows as the default path will be set by // the container. Docker has no context of what the default path should be. const DefaultPathEnv = "" + +// CheckSystemDriveAndRemoveDriveLetter verifies and manipulates a Windows path. +// This is used, for example, when validating a user provided path in docker cp. +// If a drive letter is supplied, it must be the system drive. The drive letter +// is always removed. Also, it translates it to OS semantics (IOW / to \). We +// need the path in this syntax so that it can ultimately be contatenated with +// a Windows long-path which doesn't support drive-letters. Examples: +// C: --> Fail +// C:\ --> \ +// a --> a +// /a --> \a +// d:\ --> Fail +func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) { + if len(path) == 2 && string(path[1]) == ":" { + return "", fmt.Errorf("No relative path specified in %q", path) + } + if !filepath.IsAbs(path) || len(path) < 2 { + return filepath.FromSlash(path), nil + } + if string(path[1]) == ":" && !strings.EqualFold(string(path[0]), "c") { + return "", fmt.Errorf("The specified path is not on the system drive (C:)") + } + return filepath.FromSlash(path[2:]), nil +} diff --git a/vendor/github.com/docker/docker/pkg/system/stat_darwin.go b/vendor/github.com/docker/docker/pkg/system/stat_darwin.go new file mode 100644 index 00000000..f0742f59 --- /dev/null +++ b/vendor/github.com/docker/docker/pkg/system/stat_darwin.go @@ -0,0 +1,32 @@ +package system + +import ( + "syscall" +) + +// fromStatT creates a system.StatT type from a syscall.Stat_t type +func fromStatT(s *syscall.Stat_t) (*StatT, error) { + return &StatT{size: s.Size, + mode: uint32(s.Mode), + uid: s.Uid, + gid: s.Gid, + rdev: uint64(s.Rdev), + mtim: s.Mtimespec}, nil +} + +// FromStatT loads a system.StatT from a syscall.Stat_t. +func FromStatT(s *syscall.Stat_t) (*StatT, error) { + return fromStatT(s) +} + +// Stat takes a path to a file and returns +// a system.StatT type pertaining to that file. +// +// Throws an error if the file does not exist +func Stat(path string) (*StatT, error) { + s := &syscall.Stat_t{} + if err := syscall.Stat(path, s); err != nil { + return nil, err + } + return fromStatT(s) +} diff --git a/vendor/github.com/docker/docker/pkg/system/stat_solaris.go b/vendor/github.com/docker/docker/pkg/system/stat_solaris.go index b01d08ac..0216985a 100644 --- a/vendor/github.com/docker/docker/pkg/system/stat_solaris.go +++ b/vendor/github.com/docker/docker/pkg/system/stat_solaris.go @@ -15,3 +15,20 @@ func fromStatT(s *syscall.Stat_t) (*StatT, error) { rdev: uint64(s.Rdev), mtim: s.Mtim}, nil } + +// FromStatT loads a system.StatT from a syscal.Stat_t. +func FromStatT(s *syscall.Stat_t) (*StatT, error) { + return fromStatT(s) +} + +// Stat takes a path to a file and returns +// a system.StatT type pertaining to that file. +// +// Throws an error if the file does not exist +func Stat(path string) (*StatT, error) { + s := &syscall.Stat_t{} + if err := syscall.Stat(path, s); err != nil { + return nil, err + } + return fromStatT(s) +} diff --git a/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go b/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go index f53e9de4..5d85f523 100644 --- a/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux,!windows,!freebsd,!solaris,!openbsd +// +build !linux,!windows,!freebsd,!solaris,!openbsd,!darwin package system diff --git a/vendor/github.com/docker/docker/pkg/system/syscall_windows.go b/vendor/github.com/docker/docker/pkg/system/syscall_windows.go index 061e220f..1f311874 100644 --- a/vendor/github.com/docker/docker/pkg/system/syscall_windows.go +++ b/vendor/github.com/docker/docker/pkg/system/syscall_windows.go @@ -1,9 +1,15 @@ package system import ( - "fmt" "syscall" "unsafe" + + "github.com/Sirupsen/logrus" +) + +var ( + ntuserApiset = syscall.NewLazyDLL("ext-ms-win-ntuser-window-l1-1-0") + procGetVersionExW = modkernel32.NewProc("GetVersionExW") ) // OSVersion is a wrapper for Windows version information @@ -15,19 +21,49 @@ type OSVersion struct { Build uint16 } +// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx +type osVersionInfoEx struct { + OSVersionInfoSize uint32 + MajorVersion uint32 + MinorVersion uint32 + BuildNumber uint32 + PlatformID uint32 + CSDVersion [128]uint16 + ServicePackMajor uint16 + ServicePackMinor uint16 + SuiteMask uint16 + ProductType byte + Reserve byte +} + // GetOSVersion gets the operating system version on Windows. Note that // docker.exe must be manifested to get the correct version information. -func GetOSVersion() (OSVersion, error) { +func GetOSVersion() OSVersion { var err error osv := OSVersion{} osv.Version, err = syscall.GetVersion() if err != nil { - return osv, fmt.Errorf("Failed to call GetVersion()") + // GetVersion never fails. + panic(err) } osv.MajorVersion = uint8(osv.Version & 0xFF) osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF) osv.Build = uint16(osv.Version >> 16) - return osv, nil + return osv +} + +// IsWindowsClient returns true if the SKU is client +// @engine maintainers - this function should not be removed or modified as it +// is used to enforce licensing restrictions on Windows. +func IsWindowsClient() bool { + osviex := &osVersionInfoEx{OSVersionInfoSize: 284} + r1, _, err := procGetVersionExW.Call(uintptr(unsafe.Pointer(osviex))) + if r1 == 0 { + logrus.Warnf("GetVersionExW failed - assuming server SKU: %v", err) + return false + } + const verNTWorkstation = 0x00000001 + return osviex.ProductType == verNTWorkstation } // Unmount is a platform-specific helper function to call @@ -58,3 +94,12 @@ func CommandLineToArgv(commandLine string) ([]string, error) { return newArgs, nil } + +// HasWin32KSupport determines whether containers that depend on win32k can +// run on this machine. Win32k is the driver used to implement windowing. +func HasWin32KSupport() bool { + // For now, check for ntuser API support on the host. In the future, a host + // may support win32k in containers even if the host does not support ntuser + // APIs. + return ntuserApiset.Load() == nil +} diff --git a/vendor/github.com/docker/docker/pkg/system/umask.go b/vendor/github.com/docker/docker/pkg/system/umask.go index c670fcd7..3d0146b0 100644 --- a/vendor/github.com/docker/docker/pkg/system/umask.go +++ b/vendor/github.com/docker/docker/pkg/system/umask.go @@ -7,7 +7,7 @@ import ( ) // Umask sets current process's file mode creation mask to newmask -// and return oldmask. +// and returns oldmask. func Umask(newmask int) (oldmask int, err error) { return syscall.Umask(newmask), nil } diff --git a/vendor/github.com/docker/docker/pkg/system/utimes_darwin.go b/vendor/github.com/docker/docker/pkg/system/utimes_darwin.go deleted file mode 100644 index 0a161975..00000000 --- a/vendor/github.com/docker/docker/pkg/system/utimes_darwin.go +++ /dev/null @@ -1,8 +0,0 @@ -package system - -import "syscall" - -// LUtimesNano is not supported by darwin platform. -func LUtimesNano(path string, ts []syscall.Timespec) error { - return ErrNotSupportedPlatform -} diff --git a/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go b/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go index 50c3a043..13971454 100644 --- a/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go +++ b/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go @@ -1,10 +1,10 @@ -// +build !linux,!freebsd,!darwin +// +build !linux,!freebsd package system import "syscall" -// LUtimesNano is not supported on platforms other than linux, freebsd and darwin. +// LUtimesNano is only supported on linux and freebsd. func LUtimesNano(path string, ts []syscall.Timespec) error { return ErrNotSupportedPlatform }