omnibus 3.2.2 → 4.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +140 -10
  3. data/CHANGELOG.md +181 -8
  4. data/README.md +63 -35
  5. data/Rakefile +1 -1
  6. data/docs/omnibus-build-cache.md b/data/docs/Build → Cache.md +0 -0
  7. data/docs/Building on Debian.md +59 -0
  8. data/docs/Building on OSX.md +61 -35
  9. data/docs/Building on RHEL.md +74 -0
  10. data/docs/Building on Windows.md +40 -81
  11. data/features/commands/build.feature +1 -2
  12. data/features/commands/clean.feature +1 -1
  13. data/lib/omnibus.rb +111 -204
  14. data/lib/omnibus/build_version.rb +3 -20
  15. data/lib/omnibus/build_version_dsl.rb +2 -3
  16. data/lib/omnibus/builder.rb +103 -211
  17. data/lib/omnibus/cleaner.rb +5 -7
  18. data/lib/omnibus/cli.rb +1 -4
  19. data/lib/omnibus/cli/base.rb +9 -16
  20. data/lib/omnibus/compressor.rb +60 -0
  21. data/{spec/data/complicated/config/software/version-manifest.rb → lib/omnibus/compressors/base.rb} +17 -12
  22. data/lib/omnibus/compressors/dmg.rb +312 -0
  23. data/lib/omnibus/{null_builder.rb → compressors/null.rb} +10 -4
  24. data/lib/omnibus/compressors/tgz.rb +141 -0
  25. data/lib/omnibus/config.rb +89 -83
  26. data/lib/omnibus/core_extensions.rb +1 -0
  27. data/lib/omnibus/core_extensions/open_uri.rb +58 -0
  28. data/lib/omnibus/digestable.rb +9 -3
  29. data/lib/omnibus/exceptions.rb +116 -175
  30. data/lib/omnibus/fetcher.rb +97 -138
  31. data/lib/omnibus/fetchers/git_fetcher.rb +130 -165
  32. data/lib/omnibus/fetchers/net_fetcher.rb +205 -164
  33. data/lib/omnibus/fetchers/{s3_cache_fetcher.rb → null_fetcher.rb} +27 -17
  34. data/lib/omnibus/fetchers/path_fetcher.rb +74 -32
  35. data/lib/omnibus/file_syncer.rb +149 -0
  36. data/lib/omnibus/generator.rb +103 -32
  37. data/lib/omnibus/generator_files/.kitchen.yml.erb +5 -1
  38. data/lib/omnibus/generator_files/Gemfile.erb +13 -7
  39. data/lib/omnibus/generator_files/config/projects/project.rb.erb +28 -0
  40. data/lib/omnibus/generator_files/config/software/zlib.rb.erb +55 -0
  41. data/lib/omnibus/generator_files/omnibus.rb.erb +5 -7
  42. data/lib/omnibus/git_cache.rb +11 -13
  43. data/lib/omnibus/logger.rb +76 -22
  44. data/lib/omnibus/logging.rb +1 -1
  45. data/lib/omnibus/metadata.rb +264 -0
  46. data/lib/omnibus/ohai.rb +0 -51
  47. data/lib/omnibus/package.rb +4 -228
  48. data/lib/omnibus/packager.rb +71 -0
  49. data/lib/omnibus/packagers/base.rb +118 -176
  50. data/lib/omnibus/packagers/bff.rb +136 -0
  51. data/lib/omnibus/packagers/deb.rb +389 -0
  52. data/lib/omnibus/packagers/makeself.rb +114 -0
  53. data/lib/omnibus/packagers/msi.rb +346 -0
  54. data/lib/omnibus/packagers/pkg.rb +278 -0
  55. data/lib/omnibus/packagers/rpm.rb +438 -0
  56. data/lib/omnibus/packagers/solaris.rb +110 -0
  57. data/lib/omnibus/project.rb +263 -666
  58. data/lib/omnibus/publisher.rb +3 -3
  59. data/lib/omnibus/s3_cache.rb +21 -30
  60. data/lib/omnibus/software.rb +132 -271
  61. data/lib/omnibus/templating.rb +66 -0
  62. data/lib/omnibus/thread_pool.rb +109 -0
  63. data/lib/omnibus/util.rb +137 -15
  64. data/lib/omnibus/version.rb +1 -1
  65. data/omnibus.gemspec +2 -2
  66. data/resources/bff/gen.template.erb +22 -0
  67. data/resources/bff/postinstall.sh +0 -0
  68. data/resources/bff/unpostinstall.sh +0 -0
  69. data/resources/deb/conffiles.erb +3 -0
  70. data/resources/deb/control.erb +25 -0
  71. data/resources/deb/md5sums.erb +3 -0
  72. data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/background.png +0 -0
  73. data/resources/dmg/create_dmg.osascript.erb +17 -0
  74. data/{lib/omnibus/generator_files/mac_dmg → resources/dmg}/icon.png +0 -0
  75. data/{bin → resources/makeself}/makeself-header.sh +0 -0
  76. data/{bin → resources/makeself}/makeself.sh +0 -0
  77. data/{lib/omnibus/generator_files/package_scripts/makeselfinst.erb → resources/makeself/post_extract.sh.erb} +4 -4
  78. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/LICENSE.rtf +0 -0
  79. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/banner_background.bmp +0 -0
  80. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/dialog_background.bmp +0 -0
  81. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project.ico +0 -0
  82. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_16x16.ico +0 -0
  83. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/assets/project_32x32.ico +0 -0
  84. data/{spec/fixtures/sample/files/windows_msi/Resources/localization-en-us.wxl → resources/msi/localization-en-us.wxl.erb} +3 -4
  85. data/resources/msi/parameters.wxi.erb +9 -0
  86. data/{lib/omnibus/generator_files/windows_msi → resources/msi}/source.wxs.erb +14 -15
  87. data/{lib/omnibus/generator_files/mac_pkg → resources/pkg}/background.png +0 -0
  88. data/resources/pkg/distribution.xml.erb +21 -0
  89. data/resources/pkg/license.html.erb +3 -0
  90. data/resources/pkg/welcome.html.erb +7 -0
  91. data/resources/rpm/rpmmacros.erb +3 -0
  92. data/resources/rpm/signing.erb +40 -0
  93. data/resources/rpm/spec.erb +70 -0
  94. data/spec/functional/builder_spec.rb +90 -111
  95. data/spec/functional/fetchers/git_fetcher_spec.rb +130 -0
  96. data/spec/functional/fetchers/net_fetcher_spec.rb +110 -0
  97. data/spec/functional/fetchers/path_fetcher_spec.rb +97 -0
  98. data/spec/functional/file_syncer_spec.rb +206 -0
  99. data/spec/functional/templating_spec.rb +73 -0
  100. data/spec/spec_helper.rb +31 -94
  101. data/spec/support/env_helpers.rb +20 -0
  102. data/spec/support/examples.rb +56 -0
  103. data/spec/support/file_helpers.rb +46 -0
  104. data/spec/support/git_helpers.rb +107 -0
  105. data/spec/support/logging_helpers.rb +33 -0
  106. data/spec/support/matchers.rb +36 -0
  107. data/spec/support/ohai_helpers.rb +22 -0
  108. data/spec/support/path_helpers.rb +19 -0
  109. data/spec/support/shell_helpers.rb +14 -0
  110. data/spec/unit/build_version_dsl_spec.rb +0 -17
  111. data/spec/unit/build_version_spec.rb +1 -19
  112. data/spec/unit/builder_spec.rb +158 -46
  113. data/spec/unit/compressor_spec.rb +45 -0
  114. data/spec/unit/compressors/base_spec.rb +26 -0
  115. data/spec/unit/compressors/dmg_spec.rb +291 -0
  116. data/spec/unit/compressors/null_spec.rb +23 -0
  117. data/spec/unit/compressors/tgz_spec.rb +67 -0
  118. data/spec/unit/config_spec.rb +27 -34
  119. data/spec/unit/digestable_spec.rb +4 -4
  120. data/spec/unit/fetchers/git_fetcher_spec.rb +110 -39
  121. data/spec/unit/fetchers/net_fetcher_spec.rb +182 -72
  122. data/spec/unit/fetchers/path_fetcher_spec.rb +111 -0
  123. data/spec/unit/generator_spec.rb +137 -0
  124. data/spec/unit/git_cache_spec.rb +24 -34
  125. data/spec/unit/library_spec.rb +21 -82
  126. data/spec/unit/metadata_spec.rb +207 -0
  127. data/spec/unit/ohai_spec.rb +0 -7
  128. data/spec/unit/omnibus_spec.rb +41 -36
  129. data/spec/unit/package_spec.rb +1 -216
  130. data/spec/unit/packagers/base_spec.rb +76 -190
  131. data/spec/unit/packagers/bff_spec.rb +160 -0
  132. data/spec/unit/packagers/deb_spec.rb +324 -0
  133. data/spec/unit/packagers/makeself_spec.rb +80 -0
  134. data/spec/unit/packagers/msi_spec.rb +267 -0
  135. data/spec/unit/packagers/pkg_spec.rb +219 -0
  136. data/spec/unit/packagers/rpm_spec.rb +328 -0
  137. data/spec/unit/project_spec.rb +217 -80
  138. data/spec/unit/publisher_spec.rb +6 -2
  139. data/spec/unit/publishers/artifactory_publisher_spec.rb +1 -1
  140. data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
  141. data/spec/unit/s3_cacher_spec.rb +22 -5
  142. data/spec/unit/software_spec.rb +89 -232
  143. data/spec/unit/util_spec.rb +188 -0
  144. metadata +159 -402
  145. data/features/commands/_deprecated.feature +0 -84
  146. data/lib/omnibus/cleanroom.rb +0 -141
  147. data/lib/omnibus/cli/deprecated.rb +0 -132
  148. data/lib/omnibus/generator_files/mac_pkg/license.html.erb +0 -1
  149. data/lib/omnibus/generator_files/mac_pkg/welcome.html.erb +0 -9
  150. data/lib/omnibus/generator_files/project.rb.erb +0 -20
  151. data/lib/omnibus/generator_files/software/c-example.rb.erb +0 -42
  152. data/lib/omnibus/generator_files/software/erlang-example.rb.erb +0 -38
  153. data/lib/omnibus/generator_files/software/ruby-example.rb.erb +0 -24
  154. data/lib/omnibus/generator_files/windows_msi/localization-en-us.wxl.erb +0 -20
  155. data/lib/omnibus/generator_files/windows_msi/parameters.wxi.erb +0 -9
  156. data/lib/omnibus/packagers/mac_dmg.rb +0 -235
  157. data/lib/omnibus/packagers/mac_pkg.rb +0 -176
  158. data/lib/omnibus/packagers/windows_msi.rb +0 -109
  159. data/spec/data/complicated/config/patches/bzip2/makefile_take_env_vars.patch +0 -15
  160. data/spec/data/complicated/config/patches/couchdb/patch_for_couchjs_stack.patch +0 -19
  161. data/spec/data/complicated/config/patches/gd/gd-2.0.33-configure-libpng.patch +0 -100
  162. data/spec/data/complicated/config/patches/keepalived/keepalived-1.2.9_opscode_centos_5.patch +0 -15
  163. data/spec/data/complicated/config/patches/libedit/freebsd-vi-fix.patch +0 -24
  164. data/spec/data/complicated/config/patches/libiconv/libiconv-1.14_srclib_stdio.in.h-remove-gets-declarations.patch +0 -29
  165. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-makefile-dest-fix.patch +0 -35
  166. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-malloc-fix.patch +0 -13
  167. data/spec/data/complicated/config/patches/libwrap/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch +0 -1035
  168. data/spec/data/complicated/config/patches/logrotate/logrotate_basedir_override.patch +0 -12
  169. data/spec/data/complicated/config/patches/ncurses/ncurses-5.9-solaris-xopen_source_extended-detection.patch +0 -11
  170. data/spec/data/complicated/config/patches/ncurses/ncurses-clang.patch +0 -42
  171. data/spec/data/complicated/config/patches/ncurses/patch-aa +0 -23
  172. data/spec/data/complicated/config/patches/ncurses/patch-ab +0 -44
  173. data/spec/data/complicated/config/patches/ncurses/patch-ac +0 -40
  174. data/spec/data/complicated/config/patches/ncurses/patch-ad +0 -12
  175. data/spec/data/complicated/config/patches/ncurses/patch-aix-configure +0 -23
  176. data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesf.h +0 -22
  177. data/spec/data/complicated/config/patches/ncurses/patch-cxx_cursesm.h +0 -22
  178. data/spec/data/complicated/config/patches/nrpe/fix_for_runit.patch +0 -64
  179. data/spec/data/complicated/config/patches/openssl/openssl-1.0.1f-do-not-build-docs.patch +0 -101
  180. data/spec/data/complicated/config/patches/postgresql/postgresql-9.1.2-configure-ncurses-fix.patch +0 -12
  181. data/spec/data/complicated/config/patches/ruby/patch-configure +0 -103
  182. data/spec/data/complicated/config/patches/ruby/ruby-aix-configure.patch +0 -10
  183. data/spec/data/complicated/config/patches/ruby/ruby-openssl-1.0.1c.patch +0 -42
  184. data/spec/data/complicated/config/patches/ruby/ruby_aix_1_9_3_448_ssl_EAGAIN.patch +0 -57
  185. data/spec/data/complicated/config/patches/ruby/rvm-cflags.patch +0 -27
  186. data/spec/data/complicated/config/projects/angrychef.rb +0 -32
  187. data/spec/data/complicated/config/projects/chef-windows.rb +0 -32
  188. data/spec/data/complicated/config/projects/chef.rb +0 -32
  189. data/spec/data/complicated/config/projects/chefdk-windows.rb +0 -41
  190. data/spec/data/complicated/config/projects/chefdk.rb +0 -44
  191. data/spec/data/complicated/config/software/appbundler.rb +0 -25
  192. data/spec/data/complicated/config/software/autoconf.rb +0 -35
  193. data/spec/data/complicated/config/software/automake.rb +0 -39
  194. data/spec/data/complicated/config/software/berkshelf.rb +0 -44
  195. data/spec/data/complicated/config/software/bundler.rb +0 -25
  196. data/spec/data/complicated/config/software/bzip2.rb +0 -46
  197. data/spec/data/complicated/config/software/cacerts.rb +0 -44
  198. data/spec/data/complicated/config/software/chef-client-msi.rb +0 -87
  199. data/spec/data/complicated/config/software/chef-gem.rb +0 -26
  200. data/spec/data/complicated/config/software/chef-vault.rb +0 -43
  201. data/spec/data/complicated/config/software/chef-windows.rb +0 -158
  202. data/spec/data/complicated/config/software/chef.rb +0 -170
  203. data/spec/data/complicated/config/software/chefdk.rb +0 -103
  204. data/spec/data/complicated/config/software/couchdb.rb +0 -53
  205. data/spec/data/complicated/config/software/curl.rb +0 -48
  206. data/spec/data/complicated/config/software/erlang.rb +0 -65
  207. data/spec/data/complicated/config/software/expat.rb +0 -21
  208. data/spec/data/complicated/config/software/fcgi.rb +0 -56
  209. data/spec/data/complicated/config/software/fcgiwrap.rb +0 -41
  210. data/spec/data/complicated/config/software/gd.rb +0 -56
  211. data/spec/data/complicated/config/software/gdbm.rb +0 -40
  212. data/spec/data/complicated/config/software/gecode.rb +0 -48
  213. data/spec/data/complicated/config/software/git.rb +0 -40
  214. data/spec/data/complicated/config/software/help2man.rb +0 -30
  215. data/spec/data/complicated/config/software/icu.rb +0 -40
  216. data/spec/data/complicated/config/software/jre.rb +0 -48
  217. data/spec/data/complicated/config/software/keepalived.rb +0 -43
  218. data/spec/data/complicated/config/software/libarchive.rb +0 -50
  219. data/spec/data/complicated/config/software/libedit.rb +0 -69
  220. data/spec/data/complicated/config/software/libffi.rb +0 -71
  221. data/spec/data/complicated/config/software/libgcc.rb +0 -39
  222. data/spec/data/complicated/config/software/libiconv.rb +0 -55
  223. data/spec/data/complicated/config/software/libjpeg.rb +0 -39
  224. data/spec/data/complicated/config/software/libpng.rb +0 -38
  225. data/spec/data/complicated/config/software/libtool.rb +0 -52
  226. data/spec/data/complicated/config/software/libwrap.rb +0 -50
  227. data/spec/data/complicated/config/software/libxml2.rb +0 -51
  228. data/spec/data/complicated/config/software/libxslt.rb +0 -52
  229. data/spec/data/complicated/config/software/libyaml-windows.rb +0 -43
  230. data/spec/data/complicated/config/software/libyaml.rb +0 -62
  231. data/spec/data/complicated/config/software/logrotate.rb +0 -41
  232. data/spec/data/complicated/config/software/makedepend.rb +0 -73
  233. data/spec/data/complicated/config/software/mysql2.rb +0 -42
  234. data/spec/data/complicated/config/software/nagios-plugins.rb +0 -53
  235. data/spec/data/complicated/config/software/nagios.rb +0 -66
  236. data/spec/data/complicated/config/software/ncurses.rb +0 -149
  237. data/spec/data/complicated/config/software/nginx.rb +0 -40
  238. data/spec/data/complicated/config/software/nodejs.rb +0 -44
  239. data/spec/data/complicated/config/software/nokogiri.rb +0 -55
  240. data/spec/data/complicated/config/software/nrpe.rb +0 -61
  241. data/spec/data/complicated/config/software/ohai.rb +0 -64
  242. data/spec/data/complicated/config/software/omnibus-ctl.rb +0 -34
  243. data/spec/data/complicated/config/software/openresty.rb +0 -67
  244. data/spec/data/complicated/config/software/openssl.rb +0 -158
  245. data/spec/data/complicated/config/software/pcre.rb +0 -42
  246. data/spec/data/complicated/config/software/perl-extutils-embed.rb +0 -15
  247. data/spec/data/complicated/config/software/perl-extutils-makemaker.rb +0 -15
  248. data/spec/data/complicated/config/software/perl.rb +0 -48
  249. data/spec/data/complicated/config/software/perl_pg_driver.rb +0 -12
  250. data/spec/data/complicated/config/software/php.rb +0 -41
  251. data/spec/data/complicated/config/software/pip.rb +0 -30
  252. data/spec/data/complicated/config/software/pkg-config.rb +0 -66
  253. data/spec/data/complicated/config/software/popt.rb +0 -47
  254. data/spec/data/complicated/config/software/postgresql.rb +0 -51
  255. data/spec/data/complicated/config/software/preparation.rb +0 -30
  256. data/spec/data/complicated/config/software/pygments.rb +0 -25
  257. data/spec/data/complicated/config/software/python.rb +0 -49
  258. data/spec/data/complicated/config/software/rabbitmq.rb +0 -36
  259. data/spec/data/complicated/config/software/rebar.rb +0 -36
  260. data/spec/data/complicated/config/software/redis.rb +0 -33
  261. data/spec/data/complicated/config/software/rsync.rb +0 -48
  262. data/spec/data/complicated/config/software/ruby-windows-devkit.rb +0 -30
  263. data/spec/data/complicated/config/software/ruby-windows.rb +0 -30
  264. data/spec/data/complicated/config/software/ruby.rb +0 -162
  265. data/spec/data/complicated/config/software/rubygems-customization.rb +0 -57
  266. data/spec/data/complicated/config/software/rubygems.rb +0 -37
  267. data/spec/data/complicated/config/software/runit.rb +0 -118
  268. data/spec/data/complicated/config/software/server-jre.rb +0 -46
  269. data/spec/data/complicated/config/software/setuptools.rb +0 -30
  270. data/spec/data/complicated/config/software/spawn-fcgi.rb +0 -40
  271. data/spec/data/complicated/config/software/sphinx.rb +0 -26
  272. data/spec/data/complicated/config/software/spidermonkey.rb +0 -60
  273. data/spec/data/complicated/config/software/sqitch.rb +0 -24
  274. data/spec/data/complicated/config/software/test-kitchen.rb +0 -39
  275. data/spec/data/complicated/config/software/unicorn.rb +0 -27
  276. data/spec/data/complicated/config/software/util-macros.rb +0 -46
  277. data/spec/data/complicated/config/software/xproto.rb +0 -46
  278. data/spec/data/complicated/config/software/yajl.rb +0 -30
  279. data/spec/data/complicated/config/software/zlib.rb +0 -67
  280. data/spec/data/overrides/bad_line.overrides +0 -3
  281. data/spec/data/overrides/good.overrides +0 -5
  282. data/spec/data/overrides/with_dupes.overrides +0 -4
  283. data/spec/data/projects/chefdk.rb +0 -41
  284. data/spec/data/projects/sample.rb +0 -13
  285. data/spec/data/software/erchef.rb +0 -42
  286. data/spec/data/software/zlib.rb +0 -67
  287. data/spec/fixtures/sample/files/mac_dmg/Resources/background.png +0 -0
  288. data/spec/fixtures/sample/files/mac_dmg/Resources/icon.png +0 -0
  289. data/spec/fixtures/sample/files/mac_pkg/Resources/background.png +0 -0
  290. data/spec/fixtures/sample/files/mac_pkg/Resources/license.html +0 -1
  291. data/spec/fixtures/sample/files/mac_pkg/Resources/welcome.html +0 -9
  292. data/spec/fixtures/sample/files/windows_msi/Resources/assets/LICENSE.rtf +0 -8
  293. data/spec/fixtures/sample/files/windows_msi/Resources/assets/banner_background.bmp +0 -0
  294. data/spec/fixtures/sample/files/windows_msi/Resources/assets/dialog_background.bmp +0 -0
  295. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project.ico +0 -0
  296. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_16x16.ico +0 -0
  297. data/spec/fixtures/sample/files/windows_msi/Resources/assets/project_32x32.ico +0 -0
  298. data/spec/fixtures/sample/files/windows_msi/Resources/parameters.wxi.erb +0 -9
  299. data/spec/fixtures/sample/files/windows_msi/Resources/source.wxs +0 -74
  300. data/spec/integration/packagers/mac_spec.rb +0 -58
  301. data/spec/integration/packagers/windows_spec.rb +0 -70
  302. data/spec/unit/packagers/mac_pkg_spec.rb +0 -151
@@ -1,109 +0,0 @@
1
- #
2
- # Copyright:: Copyright (c) 2014 Chef Software, Inc.
3
- # License:: Apache License, Version 2.0
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
-
18
- module Omnibus
19
- #
20
- # Builds a Windows MSI package (.msi extension)
21
- #
22
- class Packager::WindowsMsi < Packager::Base
23
- # !@method msi_parameters
24
- # @return (see Project#msi_parameters)
25
- def_delegator :@project, :msi_parameters, :msi_parameters
26
-
27
- validate do
28
- assert_presence!(resource('localization-en-us.wxl'))
29
- assert_presence!(resource('parameters.wxi'))
30
- assert_presence!(resource('source.wxs'))
31
- end
32
-
33
- setup do
34
- purge_directory(staging_dir)
35
- purge_directory(Config.package_dir)
36
- purge_directory(staging_resources_path)
37
- copy_directory(resources_path, staging_resources_path)
38
-
39
- # Set the MSI version before rendering MSI source files
40
- set_msi_version_from_project
41
-
42
- ['localization-en-us.wxl.erb', 'parameters.wxi.erb', 'source.wxs.erb'].each do |res|
43
- res_path = resource(res)
44
- render_template(res_path) if File.exist?(res_path)
45
- end
46
- end
47
-
48
- build do
49
- # harvest the files with heat.exe
50
- # recursively generate fragment for project directory
51
- execute [
52
- "heat.exe dir \"#{project.install_dir}\"",
53
- '-nologo -srd -gg -cg ProjectDir',
54
- '-dr PROJECTLOCATION -var var.ProjectSourceDir',
55
- '-out project-files.wxs',
56
- ].join(' ')
57
-
58
- # compile with candle.exe
59
- execute [
60
- 'candle.exe -nologo',
61
- "-dProjectSourceDir=\"#{project.install_dir}\" project-files.wxs",
62
- "\"#{resource('source.wxs')}\"",
63
- ].join(' ')
64
-
65
- # create the msi
66
- # Don't care about the 204 return code from light.exe since it's
67
- # about some expected warnings...
68
- execute [
69
- 'light.exe -nologo -ext WixUIExtension -cultures:en-us',
70
- "-loc #{resource('localization-en-us.wxl')}",
71
- 'project-files.wixobj source.wixobj',
72
- "-out \"#{final_pkg}\"",
73
- ].join(' '), returns: [0, 204]
74
- end
75
-
76
- clean do
77
- end
78
-
79
- # @see Base#package_name
80
- def package_name
81
- "#{project.name}-#{project.build_version}-#{project.iteration}.msi"
82
- end
83
-
84
- # The full path where the product package was/will be written.
85
- #
86
- # @return [String] Path to the packge file.
87
- def final_pkg
88
- File.expand_path("#{Config.package_dir}/#{package_name}")
89
- end
90
-
91
- # Helper method to set the msi version for a given project
92
- def set_msi_version_from_project
93
- # build_version looks something like this:
94
- # dev builds => 11.14.0-alpha.1+20140501194641.git.94.561b564
95
- # => 0.0.0+20140506165802.1
96
- # rel builds => 11.14.0.alpha.1 || 11.14.0
97
- #
98
- # MSI version spec expects a version that looks like X.Y.Z.W where
99
- # X, Y, Z & W are 32 bit integers.
100
- #
101
- # MSI source files expect two versions to be set in the msi_parameters:
102
- # msi_version & msi_display_version
103
-
104
- versions = project.build_version.split(/[.+-]/)
105
- @msi_version = "#{versions[0]}.#{versions[1]}.#{versions[2]}.#{project.build_iteration}"
106
- @msi_display_version = "#{versions[0]}.#{versions[1]}.#{versions[2]}"
107
- end
108
- end
109
- end
@@ -1,15 +0,0 @@
1
- --- bzip2-1.0.6/Makefile-orig 2010-09-10 17:46:02.000000000 -0500
2
- +++ bzip2-1.0.6/Makefile 2013-11-21 13:55:11.000000000 -0600
3
- @@ -18,10 +18,10 @@
4
- CC=gcc
5
- AR=ar
6
- RANLIB=ranlib
7
- -LDFLAGS=
8
- +LDFLAGS+=
9
-
10
- BIGFILES=-D_FILE_OFFSET_BITS=64
11
- -CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
12
- +CFLAGS+=-Wall -Winline -O2 -g $(BIGFILES)
13
-
14
- # Where you want it installed when you do 'make install'
15
- PREFIX=/usr/local
@@ -1,19 +0,0 @@
1
- diff -r -u apache-couchdb-1.0.3/src/couchdb/priv/couch_js/main.c apache-couchdb-1.0.3-couchjs-stack-patch/src/couchdb/priv/couch_js/main.c
2
- --- apache-couchdb-1.0.3/src/couchdb/priv/couch_js/main.c 2012-07-17 16:09:32.000000000 -0700
3
- +++ apache-couchdb-1.0.3-couchjs-stack-patch/src/couchdb/priv/couch_js/main.c 2012-07-17 16:11:35.000000000 -0700
4
- @@ -57,6 +57,8 @@
5
- return JS_FALSE;
6
- }
7
-
8
- + JS_SetScriptStackQuota(subcx, 0x20000000);
9
- +
10
- SETUP_REQUEST(subcx);
11
-
12
- src = JS_GetStringChars(str);
13
- @@ -286,6 +288,7 @@
14
- cx = JS_NewContext(rt, 8L * 1024L);
15
- if (!cx) return 1;
16
-
17
- + JS_SetScriptStackQuota(cx, 0x20000000);
18
- JS_SetErrorReporter(cx, printerror);
19
- JS_ToggleOptions(cx, JSOPTION_XML);
@@ -1,100 +0,0 @@
1
- diff -ur libgd-gd-libgd-5551f61978e3/src/configure libgd-gd-libgd-5551f61978e3.fixed/src/configure
2
- --- libgd-gd-libgd-5551f61978e3/src/configure 2006-04-05 08:56:57.000000000 -0700
3
- +++ libgd-gd-libgd-5551f61978e3.fixed/src/configure 2012-04-06 16:38:27.000000000 -0700
4
- @@ -10953,95 +10953,8 @@
5
- # authors decide to do this AGAIN. Which I really hope they won't. TBB
6
-
7
- if test "$withval" != no; then
8
- - # Extract the first word of "libpng12-config", so it can be a program name with args.
9
- -set dummy libpng12-config; ac_word=$2
10
- -echo "$as_me:$LINENO: checking for $ac_word" >&5
11
- -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12
- -if test "${ac_cv_path_LIBPNG12_CONFIG+set}" = set; then
13
- - echo $ECHO_N "(cached) $ECHO_C" >&6
14
- -else
15
- - case $LIBPNG12_CONFIG in
16
- - [\\/]* | ?:[\\/]*)
17
- - ac_cv_path_LIBPNG12_CONFIG="$LIBPNG12_CONFIG" # Let the user override the test with a path.
18
- - ;;
19
- - *)
20
- - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21
- -for as_dir in $PATH
22
- -do
23
- - IFS=$as_save_IFS
24
- - test -z "$as_dir" && as_dir=.
25
- - for ac_exec_ext in '' $ac_executable_extensions; do
26
- - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27
- - ac_cv_path_LIBPNG12_CONFIG="$as_dir/$ac_word$ac_exec_ext"
28
- - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29
- - break 2
30
- - fi
31
- -done
32
- -done
33
- -
34
- - ;;
35
- -esac
36
- -fi
37
- -LIBPNG12_CONFIG=$ac_cv_path_LIBPNG12_CONFIG
38
- -
39
- -if test -n "$LIBPNG12_CONFIG"; then
40
- - echo "$as_me:$LINENO: result: $LIBPNG12_CONFIG" >&5
41
- -echo "${ECHO_T}$LIBPNG12_CONFIG" >&6
42
- -else
43
- - echo "$as_me:$LINENO: result: no" >&5
44
- -echo "${ECHO_T}no" >&6
45
- -fi
46
- -
47
- - # Extract the first word of "libpng-config", so it can be a program name with args.
48
- -set dummy libpng-config; ac_word=$2
49
- -echo "$as_me:$LINENO: checking for $ac_word" >&5
50
- -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
51
- -if test "${ac_cv_path_LIBPNG_CONFIG+set}" = set; then
52
- - echo $ECHO_N "(cached) $ECHO_C" >&6
53
- -else
54
- - case $LIBPNG_CONFIG in
55
- - [\\/]* | ?:[\\/]*)
56
- - ac_cv_path_LIBPNG_CONFIG="$LIBPNG_CONFIG" # Let the user override the test with a path.
57
- - ;;
58
- - *)
59
- - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60
- -for as_dir in $PATH
61
- -do
62
- - IFS=$as_save_IFS
63
- - test -z "$as_dir" && as_dir=.
64
- - for ac_exec_ext in '' $ac_executable_extensions; do
65
- - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66
- - ac_cv_path_LIBPNG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
67
- - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
68
- - break 2
69
- - fi
70
- -done
71
- -done
72
- -
73
- - ;;
74
- -esac
75
- -fi
76
- -LIBPNG_CONFIG=$ac_cv_path_LIBPNG_CONFIG
77
-
78
- -if test -n "$LIBPNG_CONFIG"; then
79
- - echo "$as_me:$LINENO: result: $LIBPNG_CONFIG" >&5
80
- -echo "${ECHO_T}$LIBPNG_CONFIG" >&6
81
- -else
82
- - echo "$as_me:$LINENO: result: no" >&5
83
- -echo "${ECHO_T}no" >&6
84
- -fi
85
- -
86
- - if test -n "$LIBPNG12_CONFIG"; then
87
- - libpng_CPPFLAGS=`libpng12-config --cflags`
88
- - # should be --ldopts, but it's currently broken
89
- - libpng_LDFLAGS=`libpng12-config --ldflags`
90
- - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[^ ][^ ]*//g'`
91
- - elif test -n "$LIBPNG_CONFIG"; then
92
- - libpng_CPPFLAGS=`libpng-config --cflags`
93
- - # should be --ldopts, but it's currently broken
94
- - libpng_LDFLAGS=`libpng-config --ldflags`
95
- - libpng_LDFLAGS=`echo " $libpng_LDFLAGS" | sed 's/ -l[^ ][^ ]*//g'`
96
- - elif test -d "$withval"; then
97
- + if test -d "$withval"; then
98
- libpng_CPPFLAGS="-I$withval/include"
99
- libpng_LDFLAGS="-L$withval/lib"
100
- fi
@@ -1,15 +0,0 @@
1
- diff --git keepalived-1.2.9/vrrp/vrrp_ipaddress.c keepalived-1.2.9_centos5/vrrp/vrrp_ipaddress.c
2
- index 130014f..1900327 100644
3
- --- a/keepalived/vrrp/vrrp_ipaddress.c
4
- +++ b/keepalived/vrrp/vrrp_ipaddress.c
5
- @@ -76,7 +76,9 @@ netlink_ipaddress(ip_address_t *ipaddress, int cmd)
6
- * without service. HA/VRRP setups have their own "DAD"-like
7
- * functionality, so it's not really needed from the IPv6 stack.
8
- */
9
- - req.ifa.ifa_flags |= IFA_F_NODAD;
10
- + #ifdef IFA_F_NODAD
11
- + req.ifa.ifa_flags |= IFA_F_NODAD;
12
- + #endif
13
-
14
- addattr_l(&req.n, sizeof(req), IFA_LOCAL,
15
- &ipaddress->u.sin6_addr, sizeof(ipaddress->u.sin6_addr));
@@ -1,24 +0,0 @@
1
- diff -ruN libedit-20120601-3.0/src/vi.c libedit-20120601-3.0.fixed/src/vi.c
2
- --- libedit-20120601-3.0/src/vi.c 2012-03-11 09:54:58.000000000 +0000
3
- +++ libedit-20120601-3.0.fixed/src/vi.c 2013-02-08 05:22:16.338954507 +0000
4
- @@ -918,17 +918,15 @@
5
- * NB: posix implies that we should enter insert mode, however
6
- * this is against historical precedent...
7
- */
8
- -#ifdef __weak_reference
9
- -__weakref_visible char *my_get_alias_text(const char *)
10
- - __weak_reference(get_alias_text);
11
- -#endif
12
- protected el_action_t
13
- /*ARGSUSED*/
14
- vi_alias(EditLine *el, Int c __attribute__((__unused__)))
15
- {
16
- -#ifdef __weak_reference
17
- +#ifdef __weak_extern
18
- char alias_name[3];
19
- char *alias_text;
20
- + extern __weakref_visible char *my_get_alias_text(const char *);
21
- + __weak_extern(get_alias_text);
22
-
23
- if (my_get_alias_text == 0) {
24
- return CC_ERROR;
@@ -1,29 +0,0 @@
1
- diff -r -u libiconv-1.14/srclib/stdio.in.h.orig libiconv-1.14/srclib/stdio.in.h
2
- --- libiconv-1.14/srclib/stdio.in.h.orig 2013-02-22 13:52:46.336327969 -0600
3
- +++ libiconv-1.14/srclib/stdio.in.h 2013-02-22 13:54:27.948207059 -0600
4
- @@ -679,22 +679,11 @@
5
- # endif
6
- #endif
7
-
8
- -#if @GNULIB_GETS@
9
- -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
10
- -# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
11
- -# undef gets
12
- -# define gets rpl_gets
13
- -# endif
14
- -_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
15
- -_GL_CXXALIAS_RPL (gets, char *, (char *s));
16
- -# else
17
- -_GL_CXXALIAS_SYS (gets, char *, (char *s));
18
- -# undef gets
19
- -# endif
20
- -_GL_CXXALIASWARN (gets);
21
- /* It is very rare that the developer ever has full control of stdin,
22
- - so any use of gets warrants an unconditional warning. Assume it is
23
- - always declared, since it is required by C89. */
24
- + so any use of gets warrants an unconditional warning; besides, C11
25
- + removed it. */
26
- +#undef gets
27
- +#if HAVE_RAW_DECL_GETS
28
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
29
- #endif
@@ -1,35 +0,0 @@
1
- diff -ur tcp_wrappers_7.6/Makefile tcp_wrappers_7.6.fixed/Makefile
2
- --- tcp_wrappers_7.6/Makefile 2012-04-10 11:45:38.000000000 -0700
3
- +++ tcp_wrappers_7.6.fixed/Makefile 2012-04-10 14:11:58.000000000 -0700
4
- @@ -768,9 +768,9 @@
5
- install: install-lib install-bin install-dev
6
-
7
- install-lib:
8
- - install -o root -g root -m 0755 $(SHLIB) ${DESTDIR}/usr/lib/
9
- - ln -sf $(notdir $(SHLIB)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSOMAJ))
10
- - ln -sf $(notdir $(SHLIBSOMAJ)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSO))
11
- + install -m 0755 $(SHLIB) ${DESTDIR}/lib/
12
- + ln -sf $(notdir $(SHLIB)) ${DESTDIR}/lib/$(notdir $(SHLIBSOMAJ))
13
- + ln -sf $(notdir $(SHLIBSOMAJ)) ${DESTDIR}/lib/$(notdir $(SHLIBSO))
14
-
15
- install-bin:
16
- install -o root -g root -m 0755 tcpd ${DESTDIR}/usr/sbin/
17
- @@ -787,12 +787,12 @@
18
- install -o root -g root -m 0644 hosts_options.5 ${DESTDIR}/usr/share/man/man5/
19
-
20
- install-dev:
21
- - install -o root -g root -m 0644 hosts_access.3 ${DESTDIR}/usr/share/man/man3/
22
- - install -o root -g root -m 0644 tcpd.h ${DESTDIR}/usr/include/
23
- - install -o root -g root -m 0644 $(LIB) ${DESTDIR}/usr/lib/
24
- - ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/hosts_ctl.3
25
- - ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_init.3
26
- - ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_set.3
27
- + install -m 0644 hosts_access.3 ${DESTDIR}/share/man/man3/
28
- + install -m 0644 tcpd.h ${DESTDIR}/include/
29
- + install -m 0644 $(LIB) ${DESTDIR}/lib/
30
- + ln -sf hosts_access.3 ${DESTDIR}/share/man/man3/hosts_ctl.3
31
- + ln -sf hosts_access.3 ${DESTDIR}/share/man/man3/request_init.3
32
- + ln -sf hosts_access.3 ${DESTDIR}/share/man/man3/request_set.3
33
-
34
- shar: $(KIT)
35
- @shar $(KIT)
@@ -1,13 +0,0 @@
1
- diff -ur tcp_wrappers_7.6/scaffold.c tcp_wrappers_7.6.fixed/scaffold.c
2
- --- tcp_wrappers_7.6/scaffold.c 2012-04-10 11:45:38.000000000 -0700
3
- +++ tcp_wrappers_7.6.fixed/scaffold.c 2012-04-10 12:48:14.000000000 -0700
4
- @@ -25,7 +25,7 @@
5
- #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
6
- #endif
7
-
8
- -extern char *malloc();
9
- +/* extern char *malloc(); */
10
-
11
- /* Application-specific. */
12
-
13
- Only in tcp_wrappers_7.6.fixed: scaffold.c-e
@@ -1,1035 +0,0 @@
1
- Submitted By: Tushar Teredesai <tushar@linuxfromscratch.org>
2
- Date: 2003-10-04
3
- Initial Package Version: 7.6
4
- Origin: http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2003-January/001960.html
5
- Description: The patch was created from the tcp_wrappers modified package by Mark Heerdink.
6
- This patch provides the following improvements:
7
- * Install libwrap.so along with libwrap.a.
8
- * Create an install target for tcp_wrappers.
9
- * Compilation and security fixes.
10
- * Documentation fixes.
11
- diff -Naur tcp_wrappers_7.6/Makefile tcp_wrappers_7.6.gimli/Makefile
12
- --- tcp_wrappers_7.6/Makefile 1997-03-21 12:27:21.000000000 -0600
13
- +++ tcp_wrappers_7.6.gimli/Makefile 2002-07-15 16:07:21.000000000 -0500
14
- @@ -1,5 +1,10 @@
15
- +GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h)
16
- +
17
- # @(#) Makefile 1.23 97/03/21 19:27:20
18
-
19
- +# unset the HOSTNAME environment variable
20
- +HOSTNAME =
21
- +
22
- what:
23
- @echo
24
- @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:"
25
- @@ -19,7 +24,7 @@
26
- @echo " generic (most bsd-ish systems with sys5 compatibility)"
27
- @echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543"
28
- @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix"
29
- - @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
30
- + @echo " linux gnu machten mips(untested) ncrsvr4 netbsd next osf power_unix_211"
31
- @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4"
32
- @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2"
33
- @echo " uts215 uxp"
34
- @@ -43,8 +48,8 @@
35
- # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
36
- #REAL_DAEMON_DIR=/usr/etc
37
- #
38
- -# SysV.4 Solaris 2.x OSF AIX
39
- -#REAL_DAEMON_DIR=/usr/sbin
40
- +# SysV.4 Solaris 2.x OSF AIX Linux
41
- +REAL_DAEMON_DIR=/usr/sbin
42
- #
43
- # BSD 4.4
44
- #REAL_DAEMON_DIR=/usr/libexec
45
- @@ -141,10 +146,21 @@
46
- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \
47
- EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all
48
-
49
- +ifneq ($(GLIBC),0)
50
- +MYLIB=-lnsl
51
- +endif
52
- +
53
- linux:
54
- @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
55
- - LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \
56
- - NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
57
- + LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
58
- + NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \
59
- + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_WEAKSYMS -D_REENTRANT"
60
- +
61
- +gnu:
62
- + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
63
- + LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
64
- + NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \
65
- + EXTRA_CFLAGS="-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT"
66
-
67
- # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
68
- hpux hpux8 hpux9 hpux10:
69
- @@ -391,7 +407,7 @@
70
- # the ones provided with this source distribution. The environ.c module
71
- # implements setenv(), getenv(), and putenv().
72
-
73
- -AUX_OBJ= setenv.o
74
- +#AUX_OBJ= setenv.o
75
- #AUX_OBJ= environ.o
76
- #AUX_OBJ= environ.o strcasecmp.o
77
-
78
- @@ -454,7 +470,8 @@
79
- # host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work
80
- # around this. The workaround does no harm on other Solaris versions.
81
-
82
- -BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
83
- +BUGS =
84
- +#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK
85
- #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
86
- #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG
87
-
88
- @@ -464,7 +481,7 @@
89
- # If your system supports NIS or YP-style netgroups, enable the following
90
- # macro definition. Netgroups are used only for host access control.
91
- #
92
- -#NETGROUP= -DNETGROUP
93
- +NETGROUP= -DNETGROUP
94
-
95
- ###############################################################
96
- # System dependencies: whether or not your system has vsyslog()
97
- @@ -491,7 +508,7 @@
98
- # Uncomment the next definition to turn on the language extensions
99
- # (examples: allow, deny, banners, twist and spawn).
100
- #
101
- -#STYLE = -DPROCESS_OPTIONS # Enable language extensions.
102
- +STYLE = -DPROCESS_OPTIONS # Enable language extensions.
103
-
104
- ################################################################
105
- # Optional: Changing the default disposition of logfile records
106
- @@ -514,7 +531,7 @@
107
- #
108
- # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
109
-
110
- -FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use
111
- +FACILITY= LOG_DAEMON # LOG_MAIL is what most sendmail daemons use
112
-
113
- # The syslog priority at which successful connections are logged.
114
-
115
- @@ -610,7 +627,7 @@
116
- # Paranoid mode implies hostname lookup. In order to disable hostname
117
- # lookups altogether, see the next section.
118
-
119
- -PARANOID= -DPARANOID
120
- +#PARANOID= -DPARANOID
121
-
122
- ########################################
123
- # Optional: turning off hostname lookups
124
- @@ -623,7 +640,7 @@
125
- # In order to perform selective hostname lookups, disable paranoid
126
- # mode (see previous section) and comment out the following definition.
127
-
128
- -HOSTNAME= -DALWAYS_HOSTNAME
129
- +#HOSTNAME= -DALWAYS_HOSTNAME
130
-
131
- #############################################
132
- # Optional: Turning on host ADDRESS checking
133
- @@ -649,28 +666,46 @@
134
- # source-routed traffic in the kernel. Examples: 4.4BSD derivatives,
135
- # Solaris 2.x, and Linux. See your system documentation for details.
136
- #
137
- -# KILL_OPT= -DKILL_IP_OPTIONS
138
- +KILL_OPT= -DKILL_IP_OPTIONS
139
-
140
- ## End configuration options
141
- ############################
142
-
143
- # Protection against weird shells or weird make programs.
144
-
145
- +CC = gcc
146
- SHELL = /bin/sh
147
- -.c.o:; $(CC) $(CFLAGS) -c $*.c
148
- +.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c
149
- +
150
- +SOMAJOR = 0
151
- +SOMINOR = 7.6
152
- +
153
- +LIB = libwrap.a
154
- +SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR)
155
- +SHLIBSOMAJ= shared/libwrap.so.$(SOMAJOR)
156
- +SHLIBSO = shared/libwrap.so
157
- +SHLIBFLAGS = -Lshared -lwrap
158
-
159
- -CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
160
- +shared/%.o: %.c
161
- + $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
162
- +
163
- +CFLAGS = -O2 -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
164
- $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
165
- -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
166
- -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
167
- $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \
168
- $(VSYSLOG) $(HOSTNAME)
169
-
170
- +SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS)
171
- +SHCFLAGS = -fPIC -shared -D_REENTRANT
172
- +
173
- LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \
174
- hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \
175
- $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \
176
- update.o misc.o diag.o percent_m.o myvsyslog.o
177
-
178
- +SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ));
179
- +
180
- FROM_OBJ= fromhost.o
181
-
182
- KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
183
- @@ -684,46 +719,80 @@
184
- refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \
185
- scaffold.h tcpdmatch.8 README.NIS
186
-
187
- -LIB = libwrap.a
188
- -
189
- -all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
190
- +all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB)
191
-
192
- # Invalidate all object files when the compiler options (CFLAGS) have changed.
193
-
194
- config-check:
195
- @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
196
- - @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \
197
- - if cmp cflags /tmp/cflags.$$$$ ; \
198
- - then rm /tmp/cflags.$$$$ ; \
199
- - else mv /tmp/cflags.$$$$ cflags ; \
200
- + @set +e; echo $(CFLAGS) >cflags.new ; \
201
- + if cmp cflags cflags.new ; \
202
- + then rm cflags.new ; \
203
- + else mv cflags.new cflags ; \
204
- fi >/dev/null 2>/dev/null
205
- + @if [ ! -d shared ]; then mkdir shared; fi
206
-
207
- $(LIB): $(LIB_OBJ)
208
- rm -f $(LIB)
209
- $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ)
210
- -$(RANLIB) $(LIB)
211
-
212
- -tcpd: tcpd.o $(LIB)
213
- - $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS)
214
- +$(SHLIB): $(SHLIB_OBJ)
215
- + rm -f $(SHLIB)
216
- + $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ)
217
- + ln -s $(notdir $(SHLIB)) $(SHLIBSOMAJ)
218
- + ln -s $(notdir $(SHLIBSOMAJ)) $(SHLIBSO)
219
- +
220
- +tcpd: tcpd.o $(SHLIB)
221
- + $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS)
222
-
223
- -miscd: miscd.o $(LIB)
224
- - $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS)
225
- +miscd: miscd.o $(SHLIB)
226
- + $(CC) $(CFLAGS) -o $@ miscd.o $(SHLIBFLAGS)
227
-
228
- -safe_finger: safe_finger.o $(LIB)
229
- - $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS)
230
- +safe_finger: safe_finger.o $(SHLIB)
231
- + $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS)
232
-
233
- TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o
234
-
235
- -tcpdmatch: $(TCPDMATCH_OBJ) $(LIB)
236
- - $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS)
237
- +tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB)
238
- + $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS)
239
-
240
- -try-from: try-from.o fakelog.o $(LIB)
241
- - $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS)
242
- +try-from: try-from.o fakelog.o $(SHLIB)
243
- + $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS)
244
-
245
- TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o
246
-
247
- -tcpdchk: $(TCPDCHK_OBJ) $(LIB)
248
- - $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS)
249
- +tcpdchk: $(TCPDCHK_OBJ) $(SHLIB)
250
- + $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS)
251
- +
252
- +install: install-lib install-bin install-dev
253
- +
254
- +install-lib:
255
- + install -o root -g root -m 0755 $(SHLIB) ${DESTDIR}/usr/lib/
256
- + ln -sf $(notdir $(SHLIB)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSOMAJ))
257
- + ln -sf $(notdir $(SHLIBSOMAJ)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSO))
258
- +
259
- +install-bin:
260
- + install -o root -g root -m 0755 tcpd ${DESTDIR}/usr/sbin/
261
- + install -o root -g root -m 0755 tcpdchk ${DESTDIR}/usr/sbin/
262
- + install -o root -g root -m 0755 tcpdmatch ${DESTDIR}/usr/sbin/
263
- + install -o root -g root -m 0755 try-from ${DESTDIR}/usr/sbin/
264
- + install -o root -g root -m 0755 safe_finger ${DESTDIR}/usr/sbin/
265
- + install -o root -g root -m 0644 tcpd.8 ${DESTDIR}/usr/share/man/man8/
266
- + install -o root -g root -m 0644 tcpdchk.8 ${DESTDIR}/usr/share/man/man8/
267
- + install -o root -g root -m 0644 try-from.8 ${DESTDIR}/usr/share/man/man8/
268
- + install -o root -g root -m 0644 tcpdmatch.8 ${DESTDIR}/usr/share/man/man8/
269
- + install -o root -g root -m 0644 safe_finger.8 ${DESTDIR}/usr/share/man/man8/
270
- + install -o root -g root -m 0644 hosts_access.5 ${DESTDIR}/usr/share/man/man5/
271
- + install -o root -g root -m 0644 hosts_options.5 ${DESTDIR}/usr/share/man/man5/
272
- +
273
- +install-dev:
274
- + install -o root -g root -m 0644 hosts_access.3 ${DESTDIR}/usr/share/man/man3/
275
- + install -o root -g root -m 0644 tcpd.h ${DESTDIR}/usr/include/
276
- + install -o root -g root -m 0644 $(LIB) ${DESTDIR}/usr/lib/
277
- + ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/hosts_ctl.3
278
- + ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_init.3
279
- + ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_set.3
280
-
281
- shar: $(KIT)
282
- @shar $(KIT)
283
- @@ -739,7 +808,8 @@
284
-
285
- clean:
286
- rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \
287
- - cflags
288
- + cflags libwrap*.so*
289
- + rm -rf shared
290
-
291
- tidy: clean
292
- chmod -R a+r .
293
- @@ -885,5 +955,6 @@
294
- update.o: mystdarg.h
295
- update.o: tcpd.h
296
- vfprintf.o: cflags
297
- +weak_symbols.o: tcpd.h
298
- workarounds.o: cflags
299
- workarounds.o: tcpd.h
300
- diff -Naur tcp_wrappers_7.6/fix_options.c tcp_wrappers_7.6.gimli/fix_options.c
301
- --- tcp_wrappers_7.6/fix_options.c 1997-04-07 19:29:19.000000000 -0500
302
- +++ tcp_wrappers_7.6.gimli/fix_options.c 2002-01-07 08:50:19.000000000 -0600
303
- @@ -35,7 +35,12 @@
304
- #ifdef IP_OPTIONS
305
- unsigned char optbuf[BUFFER_SIZE / 3], *cp;
306
- char lbuf[BUFFER_SIZE], *lp;
307
- +#if !defined(__GLIBC__)
308
- int optsize = sizeof(optbuf), ipproto;
309
- +#else /* __GLIBC__ */
310
- + size_t optsize = sizeof(optbuf);
311
- + int ipproto;
312
- +#endif /* __GLIBC__ */
313
- struct protoent *ip;
314
- int fd = request->fd;
315
- unsigned int opt;
316
- diff -Naur tcp_wrappers_7.6/hosts_access.3 tcp_wrappers_7.6.gimli/hosts_access.3
317
- --- tcp_wrappers_7.6/hosts_access.3 1996-02-11 10:01:27.000000000 -0600
318
- +++ tcp_wrappers_7.6.gimli/hosts_access.3 2002-01-07 08:50:19.000000000 -0600
319
- @@ -3,7 +3,7 @@
320
- hosts_access, hosts_ctl, request_init, request_set \- access control library
321
- .SH SYNOPSIS
322
- .nf
323
- -#include "tcpd.h"
324
- +#include <tcpd.h>
325
-
326
- extern int allow_severity;
327
- extern int deny_severity;
328
- diff -Naur tcp_wrappers_7.6/hosts_access.5 tcp_wrappers_7.6.gimli/hosts_access.5
329
- --- tcp_wrappers_7.6/hosts_access.5 1995-01-30 12:51:47.000000000 -0600
330
- +++ tcp_wrappers_7.6.gimli/hosts_access.5 2002-01-07 08:50:19.000000000 -0600
331
- @@ -8,9 +8,9 @@
332
- impatient reader is encouraged to skip to the EXAMPLES section for a
333
- quick introduction.
334
- .PP
335
- -An extended version of the access control language is described in the
336
- -\fIhosts_options\fR(5) document. The extensions are turned on at
337
- -program build time by building with -DPROCESS_OPTIONS.
338
- +The extended version of the access control language is described in the
339
- +\fIhosts_options\fR(5) document. \fBNote that this language supersedes
340
- +the meaning of \fIshell_command\fB as documented below.\fR
341
- .PP
342
- In the following text, \fIdaemon\fR is the the process name of a
343
- network daemon process, and \fIclient\fR is the name and/or address of
344
- @@ -40,7 +40,7 @@
345
- character. This permits you to break up long lines so that they are
346
- easier to edit.
347
- .IP \(bu
348
- -Blank lines or lines that begin with a `#\' character are ignored.
349
- +Blank lines or lines that begin with a `#' character are ignored.
350
- This permits you to insert comments and whitespace so that the tables
351
- are easier to read.
352
- .IP \(bu
353
- @@ -69,26 +69,33 @@
354
- .SH PATTERNS
355
- The access control language implements the following patterns:
356
- .IP \(bu
357
- -A string that begins with a `.\' character. A host name is matched if
358
- +A string that begins with a `.' character. A host name is matched if
359
- the last components of its name match the specified pattern. For
360
- -example, the pattern `.tue.nl\' matches the host name
361
- -`wzv.win.tue.nl\'.
362
- +example, the pattern `.tue.nl' matches the host name
363
- +`wzv.win.tue.nl'.
364
- .IP \(bu
365
- -A string that ends with a `.\' character. A host address is matched if
366
- +A string that ends with a `.' character. A host address is matched if
367
- its first numeric fields match the given string. For example, the
368
- -pattern `131.155.\' matches the address of (almost) every host on the
369
- +pattern `131.155.' matches the address of (almost) every host on the
370
- Eind\%hoven University network (131.155.x.x).
371
- .IP \(bu
372
- -A string that begins with an `@\' character is treated as an NIS
373
- +A string that begins with an `@' character is treated as an NIS
374
- (formerly YP) netgroup name. A host name is matched if it is a host
375
- member of the specified netgroup. Netgroup matches are not supported
376
- for daemon process names or for client user names.
377
- .IP \(bu
378
- -An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a
379
- -`net/mask\' pair. A host address is matched if `net\' is equal to the
380
- -bitwise AND of the address and the `mask\'. For example, the net/mask
381
- -pattern `131.155.72.0/255.255.254.0\' matches every address in the
382
- -range `131.155.72.0\' through `131.155.73.255\'.
383
- +An expression of the form `n.n.n.n/m.m.m.m' is interpreted as a
384
- +`net/mask' pair. A host address is matched if `net' is equal to the
385
- +bitwise AND of the address and the `mask'. For example, the net/mask
386
- +pattern `131.155.72.0/255.255.254.0' matches every address in the
387
- +range `131.155.72.0' through `131.155.73.255'.
388
- +.IP \(bu
389
- +A string that begins with a `/' character is treated as a file
390
- +name. A host name or address is matched if it matches any host name
391
- +or address pattern listed in the named file. The file format is
392
- +zero or more lines with zero or more host name or address patterns
393
- +separated by whitespace. A file name pattern can be used anywhere
394
- +a host name or address pattern can be used.
395
- .SH WILDCARDS
396
- The access control language supports explicit wildcards:
397
- .IP ALL
398
- @@ -115,19 +122,19 @@
399
- .ne 6
400
- .SH OPERATORS
401
- .IP EXCEPT
402
- -Intended use is of the form: `list_1 EXCEPT list_2\'; this construct
403
- +Intended use is of the form: `list_1 EXCEPT list_2'; this construct
404
- matches anything that matches \fIlist_1\fR unless it matches
405
- \fIlist_2\fR. The EXCEPT operator can be used in daemon_lists and in
406
- client_lists. The EXCEPT operator can be nested: if the control
407
- -language would permit the use of parentheses, `a EXCEPT b EXCEPT c\'
408
- -would parse as `(a EXCEPT (b EXCEPT c))\'.
409
- +language would permit the use of parentheses, `a EXCEPT b EXCEPT c'
410
- +would parse as `(a EXCEPT (b EXCEPT c))'.
411
- .br
412
- .ne 6
413
- .SH SHELL COMMANDS
414
- If the first-matched access control rule contains a shell command, that
415
- command is subjected to %<letter> substitutions (see next section).
416
- The result is executed by a \fI/bin/sh\fR child process with standard
417
- -input, output and error connected to \fI/dev/null\fR. Specify an `&\'
418
- +input, output and error connected to \fI/dev/null\fR. Specify an `&'
419
- at the end of the command if you do not want to wait until it has
420
- completed.
421
- .PP
422
- @@ -159,7 +166,7 @@
423
- .IP %u
424
- The client user name (or "unknown").
425
- .IP %%
426
- -Expands to a single `%\' character.
427
- +Expands to a single `%' character.
428
- .PP
429
- Characters in % expansions that may confuse the shell are replaced by
430
- underscores.
431
- @@ -243,9 +250,9 @@
432
- less trustworthy. It is possible for an intruder to spoof both the
433
- client connection and the IDENT lookup, although doing so is much
434
- harder than spoofing just a client connection. It may also be that
435
- -the client\'s IDENT server is lying.
436
- +the client's IDENT server is lying.
437
- .PP
438
- -Note: IDENT lookups don\'t work with UDP services.
439
- +Note: IDENT lookups don't work with UDP services.
440
- .SH EXAMPLES
441
- The language is flexible enough that different types of access control
442
- policy can be expressed with a minimum of fuss. Although the language
443
- @@ -285,7 +292,7 @@
444
- .br
445
- ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
446
- .PP
447
- -The first rule permits access from hosts in the local domain (no `.\'
448
- +The first rule permits access from hosts in the local domain (no `.'
449
- in the host name) and from members of the \fIsome_netgroup\fP
450
- netgroup. The second rule permits access from all hosts in the
451
- \fIfoobar.edu\fP domain (notice the leading dot), with the exception of
452
- @@ -322,8 +329,8 @@
453
- /etc/hosts.deny:
454
- .in +3
455
- .nf
456
- -in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\
457
- - /usr/ucb/mail -s %d-%h root) &
458
- +in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\
459
- + /usr/bin/mail -s %d-%h root) &
460
- .fi
461
- .PP
462
- The safe_finger command comes with the tcpd wrapper and should be
463
- @@ -349,7 +356,7 @@
464
- capacity of an internal buffer; when an access control rule is not
465
- terminated by a newline character; when the result of %<letter>
466
- expansion would overflow an internal buffer; when a system call fails
467
- -that shouldn\'t. All problems are reported via the syslog daemon.
468
- +that shouldn't. All problems are reported via the syslog daemon.
469
- .SH FILES
470
- .na
471
- .nf
472
- diff -Naur tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.gimli/hosts_access.c
473
- --- tcp_wrappers_7.6/hosts_access.c 1997-02-11 19:13:23.000000000 -0600
474
- +++ tcp_wrappers_7.6.gimli/hosts_access.c 2002-01-07 08:50:19.000000000 -0600
475
- @@ -240,6 +240,26 @@
476
- }
477
- }
478
-
479
- +/* hostfile_match - look up host patterns from file */
480
- +
481
- +static int hostfile_match(path, host)
482
- +char *path;
483
- +struct hosts_info *host;
484
- +{
485
- + char tok[BUFSIZ];
486
- + int match = NO;
487
- + FILE *fp;
488
- +
489
- + if ((fp = fopen(path, "r")) != 0) {
490
- + while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host)))
491
- + /* void */ ;
492
- + fclose(fp);
493
- + } else if (errno != ENOENT) {
494
- + tcpd_warn("open %s: %m", path);
495
- + }
496
- + return (match);
497
- +}
498
- +
499
- /* host_match - match host name and/or address against pattern */
500
-
501
- static int host_match(tok, host)
502
- @@ -267,6 +287,8 @@
503
- tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */
504
- return (NO);
505
- #endif
506
- + } else if (tok[0] == '/') { /* /file hack */
507
- + return (hostfile_match(tok, host));
508
- } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */
509
- char *name = eval_hostname(host);
510
- return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
511
- diff -Naur tcp_wrappers_7.6/hosts_options.5 tcp_wrappers_7.6.gimli/hosts_options.5
512
- --- tcp_wrappers_7.6/hosts_options.5 1994-12-28 10:42:29.000000000 -0600
513
- +++ tcp_wrappers_7.6.gimli/hosts_options.5 2002-01-07 08:50:19.000000000 -0600
514
- @@ -58,12 +58,12 @@
515
- Execute, in a child process, the specified shell command, after
516
- performing the %<letter> expansions described in the hosts_access(5)
517
- manual page. The command is executed with stdin, stdout and stderr
518
- -connected to the null device, so that it won\'t mess up the
519
- +connected to the null device, so that it won't mess up the
520
- conversation with the client host. Example:
521
- .sp
522
- .nf
523
- .ti +3
524
- -spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
525
- +spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) &
526
- .fi
527
- .sp
528
- executes, in a background child process, the shell command "safe_finger
529
- diff -Naur tcp_wrappers_7.6/options.c tcp_wrappers_7.6.gimli/options.c
530
- --- tcp_wrappers_7.6/options.c 1996-02-11 10:01:32.000000000 -0600
531
- +++ tcp_wrappers_7.6.gimli/options.c 2002-01-07 08:50:19.000000000 -0600
532
- @@ -473,6 +473,9 @@
533
- #ifdef LOG_CRON
534
- "cron", LOG_CRON,
535
- #endif
536
- +#ifdef LOG_FTP
537
- + "ftp", LOG_FTP,
538
- +#endif
539
- #ifdef LOG_LOCAL0
540
- "local0", LOG_LOCAL0,
541
- #endif
542
- diff -Naur tcp_wrappers_7.6/percent_m.c tcp_wrappers_7.6.gimli/percent_m.c
543
- --- tcp_wrappers_7.6/percent_m.c 1994-12-28 10:42:37.000000000 -0600
544
- +++ tcp_wrappers_7.6.gimli/percent_m.c 2002-01-07 08:50:19.000000000 -0600
545
- @@ -13,7 +13,7 @@
546
- #include <string.h>
547
-
548
- extern int errno;
549
- -#ifndef SYS_ERRLIST_DEFINED
550
- +#if !defined(SYS_ERRLIST_DEFINED) && !defined(HAVE_STRERROR)
551
- extern char *sys_errlist[];
552
- extern int sys_nerr;
553
- #endif
554
- @@ -29,11 +29,15 @@
555
-
556
- while (*bp = *cp)
557
- if (*cp == '%' && cp[1] == 'm') {
558
- +#ifdef HAVE_STRERROR
559
- + strcpy(bp, strerror(errno));
560
- +#else
561
- if (errno < sys_nerr && errno > 0) {
562
- strcpy(bp, sys_errlist[errno]);
563
- } else {
564
- sprintf(bp, "Unknown error %d", errno);
565
- }
566
- +#endif
567
- bp += strlen(bp);
568
- cp += 2;
569
- } else {
570
- diff -Naur tcp_wrappers_7.6/rfc931.c tcp_wrappers_7.6.gimli/rfc931.c
571
- --- tcp_wrappers_7.6/rfc931.c 1995-01-02 09:11:34.000000000 -0600
572
- +++ tcp_wrappers_7.6.gimli/rfc931.c 2002-01-07 08:50:19.000000000 -0600
573
- @@ -33,7 +33,7 @@
574
-
575
- int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */
576
-
577
- -static jmp_buf timebuf;
578
- +static sigjmp_buf timebuf;
579
-
580
- /* fsocket - open stdio stream on top of socket */
581
-
582
- @@ -62,7 +62,7 @@
583
- static void timeout(sig)
584
- int sig;
585
- {
586
- - longjmp(timebuf, sig);
587
- + siglongjmp(timebuf, sig);
588
- }
589
-
590
- /* rfc931 - return remote user name, given socket structures */
591
- @@ -99,7 +99,7 @@
592
- * Set up a timer so we won't get stuck while waiting for the server.
593
- */
594
-
595
- - if (setjmp(timebuf) == 0) {
596
- + if (sigsetjmp(timebuf,1) == 0) {
597
- signal(SIGALRM, timeout);
598
- alarm(rfc931_timeout);
599
-
600
- diff -Naur tcp_wrappers_7.6/safe_finger.8 tcp_wrappers_7.6.gimli/safe_finger.8
601
- --- tcp_wrappers_7.6/safe_finger.8 1969-12-31 18:00:00.000000000 -0600
602
- +++ tcp_wrappers_7.6.gimli/safe_finger.8 2002-01-07 08:50:19.000000000 -0600
603
- @@ -0,0 +1,34 @@
604
- +.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual"
605
- +.SH NAME
606
- +safe_finger \- finger client wrapper that protects against nasty stuff
607
- +from finger servers
608
- +.SH SYNOPSIS
609
- +.B safe_finger [finger_options]
610
- +.SH DESCRIPTION
611
- +The
612
- +.B safe_finger
613
- +command protects against nasty stuff from finger servers. Use this
614
- +program for automatic reverse finger probes from the
615
- +.B tcp_wrapper
616
- +.B (tcpd)
617
- +, not the raw finger command. The
618
- +.B safe_finger
619
- +command makes sure that the finger client is not run with root
620
- +privileges. It also runs the finger client with a defined PATH
621
- +environment.
622
- +.B safe_finger
623
- +will also protect you from problems caused by the output of some
624
- +finger servers. The problem: some programs may react to stuff in
625
- +the first column. Other programs may get upset by thrash anywhere
626
- +on a line. File systems may fill up as the finger server keeps
627
- +sending data. Text editors may bomb out on extremely long lines.
628
- +The finger server may take forever because it is somehow wedged.
629
- +.B safe_finger
630
- +takes care of all this badness.
631
- +.SH SEE ALSO
632
- +.BR hosts_access (5),
633
- +.BR hosts_options (5),
634
- +.BR tcpd (8)
635
- +.SH AUTHOR
636
- +Wietse Venema, Eindhoven University of Technology, The Netherlands.
637
- +
638
- diff -Naur tcp_wrappers_7.6/safe_finger.c tcp_wrappers_7.6.gimli/safe_finger.c
639
- --- tcp_wrappers_7.6/safe_finger.c 1994-12-28 10:42:42.000000000 -0600
640
- +++ tcp_wrappers_7.6.gimli/safe_finger.c 2002-01-07 08:50:19.000000000 -0600
641
- @@ -26,21 +26,24 @@
642
- #include <stdio.h>
643
- #include <ctype.h>
644
- #include <pwd.h>
645
- +#include <syslog.h>
646
-
647
- extern void exit();
648
-
649
- /* Local stuff */
650
-
651
- -char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin";
652
- +char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin";
653
-
654
- #define TIME_LIMIT 60 /* Do not keep listinging forever */
655
- #define INPUT_LENGTH 100000 /* Do not keep listinging forever */
656
- #define LINE_LENGTH 128 /* Editors can choke on long lines */
657
- #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */
658
- #define UNPRIV_NAME "nobody" /* Preferred privilege level */
659
- -#define UNPRIV_UGID 32767 /* Default uid and gid */
660
- +#define UNPRIV_UGID 65534 /* Default uid and gid */
661
-
662
- int finger_pid;
663
- +int allow_severity = SEVERITY;
664
- +int deny_severity = LOG_WARNING;
665
-
666
- void cleanup(sig)
667
- int sig;
668
- diff -Naur tcp_wrappers_7.6/scaffold.c tcp_wrappers_7.6.gimli/scaffold.c
669
- --- tcp_wrappers_7.6/scaffold.c 1997-03-21 12:27:24.000000000 -0600
670
- +++ tcp_wrappers_7.6.gimli/scaffold.c 2002-01-07 08:50:19.000000000 -0600
671
- @@ -180,10 +180,12 @@
672
-
673
- /* ARGSUSED */
674
-
675
- -void rfc931(request)
676
- -struct request_info *request;
677
- +void rfc931(rmt_sin, our_sin, dest)
678
- +struct sockaddr_in *rmt_sin;
679
- +struct sockaddr_in *our_sin;
680
- +char *dest;
681
- {
682
- - strcpy(request->user, unknown);
683
- + strcpy(dest, unknown);
684
- }
685
-
686
- /* check_path - examine accessibility */
687
- diff -Naur tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.gimli/socket.c
688
- --- tcp_wrappers_7.6/socket.c 1997-03-21 12:27:25.000000000 -0600
689
- +++ tcp_wrappers_7.6.gimli/socket.c 2002-01-07 08:50:19.000000000 -0600
690
- @@ -76,7 +76,11 @@
691
- {
692
- static struct sockaddr_in client;
693
- static struct sockaddr_in server;
694
- +#if !defined (__GLIBC__)
695
- int len;
696
- +#else /* __GLIBC__ */
697
- + size_t len;
698
- +#endif /* __GLIBC__ */
699
- char buf[BUFSIZ];
700
- int fd = request->fd;
701
-
702
- @@ -224,7 +228,11 @@
703
- {
704
- char buf[BUFSIZ];
705
- struct sockaddr_in sin;
706
- +#if !defined(__GLIBC__)
707
- int size = sizeof(sin);
708
- +#else /* __GLIBC__ */
709
- + size_t size = sizeof(sin);
710
- +#endif /* __GLIBC__ */
711
-
712
- /*
713
- * Eat up the not-yet received datagram. Some systems insist on a
714
- diff -Naur tcp_wrappers_7.6/tcpd.8 tcp_wrappers_7.6.gimli/tcpd.8
715
- --- tcp_wrappers_7.6/tcpd.8 1996-02-21 09:39:16.000000000 -0600
716
- +++ tcp_wrappers_7.6.gimli/tcpd.8 2002-01-07 08:50:19.000000000 -0600
717
- @@ -94,7 +94,7 @@
718
- .PP
719
- The example assumes that the network daemons live in /usr/etc. On some
720
- systems, network daemons live in /usr/sbin or in /usr/libexec, or have
721
- -no `in.\' prefix to their name.
722
- +no `in.' prefix to their name.
723
- .SH EXAMPLE 2
724
- This example applies when \fItcpd\fR expects that the network daemons
725
- are left in their original place.
726
- @@ -110,26 +110,26 @@
727
- becomes:
728
- .sp
729
- .ti +5
730
- -finger stream tcp nowait nobody /some/where/tcpd in.fingerd
731
- +finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd
732
- .sp
733
- .fi
734
- .PP
735
- The example assumes that the network daemons live in /usr/etc. On some
736
- systems, network daemons live in /usr/sbin or in /usr/libexec, the
737
- -daemons have no `in.\' prefix to their name, or there is no userid
738
- +daemons have no `in.' prefix to their name, or there is no userid
739
- field in the inetd configuration file.
740
- .PP
741
- Similar changes will be needed for the other services that are to be
742
- -covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)
743
- +covered by \fItcpd\fR. Send a `kill -HUP' to the \fIinetd\fR(8)
744
- process to make the changes effective. AIX users may also have to
745
- -execute the `inetimp\' command.
746
- +execute the `inetimp' command.
747
- .SH EXAMPLE 3
748
- In the case of daemons that do not live in a common directory ("secret"
749
- or otherwise), edit the \fIinetd\fR configuration file so that it
750
- specifies an absolute path name for the process name field. For example:
751
- .nf
752
- .sp
753
- - ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
754
- + ntalk dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.ntalkd
755
- .sp
756
- .fi
757
- .PP
758
- diff -Naur tcp_wrappers_7.6/tcpd.h tcp_wrappers_7.6.gimli/tcpd.h
759
- --- tcp_wrappers_7.6/tcpd.h 1996-03-19 09:22:25.000000000 -0600
760
- +++ tcp_wrappers_7.6.gimli/tcpd.h 2002-01-07 08:50:19.000000000 -0600
761
- @@ -4,6 +4,25 @@
762
- * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
763
- */
764
-
765
- +#ifndef _TCPWRAPPERS_TCPD_H
766
- +#define _TCPWRAPPERS_TCPD_H
767
- +
768
- +/* someone else may have defined this */
769
- +#undef __P
770
- +
771
- +/* use prototypes if we have an ANSI C compiler or are using C++ */
772
- +#if defined(__STDC__) || defined(__cplusplus)
773
- +#define __P(args) args
774
- +#else
775
- +#define __P(args) ()
776
- +#endif
777
- +
778
- +/* Need definitions of struct sockaddr_in and FILE. */
779
- +#include <netinet/in.h>
780
- +#include <stdio.h>
781
- +
782
- +__BEGIN_DECLS
783
- +
784
- /* Structure to describe one communications endpoint. */
785
-
786
- #define STRING_LENGTH 128 /* hosts, users, processes */
787
- @@ -25,10 +44,10 @@
788
- char pid[10]; /* access via eval_pid(request) */
789
- struct host_info client[1]; /* client endpoint info */
790
- struct host_info server[1]; /* server endpoint info */
791
- - void (*sink) (); /* datagram sink function or 0 */
792
- - void (*hostname) (); /* address to printable hostname */
793
- - void (*hostaddr) (); /* address to printable address */
794
- - void (*cleanup) (); /* cleanup function or 0 */
795
- + void (*sink) __P((int)); /* datagram sink function or 0 */
796
- + void (*hostname) __P((struct host_info *)); /* address to printable hostname */
797
- + void (*hostaddr) __P((struct host_info *)); /* address to printable address */
798
- + void (*cleanup) __P((struct request_info *)); /* cleanup function or 0 */
799
- struct netconfig *config; /* netdir handle */
800
- };
801
-
802
- @@ -61,25 +80,30 @@
803
- /* Global functions. */
804
-
805
- #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
806
- -extern void fromhost(); /* get/validate client host info */
807
- +extern void fromhost __P((struct request_info *)); /* get/validate client host info */
808
- #else
809
- #define fromhost sock_host /* no TLI support needed */
810
- #endif
811
-
812
- -extern int hosts_access(); /* access control */
813
- -extern void shell_cmd(); /* execute shell command */
814
- -extern char *percent_x(); /* do %<char> expansion */
815
- -extern void rfc931(); /* client name from RFC 931 daemon */
816
- -extern void clean_exit(); /* clean up and exit */
817
- -extern void refuse(); /* clean up and exit */
818
- -extern char *xgets(); /* fgets() on steroids */
819
- -extern char *split_at(); /* strchr() and split */
820
- -extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
821
- +extern void shell_cmd __P((char *)); /* execute shell command */
822
- +extern char *percent_x __P((char *, int, char *, struct request_info *)); /* do %<char> expansion */
823
- +extern void rfc931 __P((struct sockaddr_in *, struct sockaddr_in *, char *)); /* client name from RFC 931 daemon */
824
- +extern void clean_exit __P((struct request_info *)); /* clean up and exit */
825
- +extern void refuse __P((struct request_info *)); /* clean up and exit */
826
- +extern char *xgets __P((char *, int, FILE *)); /* fgets() on steroids */
827
- +extern char *split_at __P((char *, int)); /* strchr() and split */
828
- +extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */
829
-
830
- /* Global variables. */
831
-
832
- +#ifdef HAVE_WEAKSYMS
833
- +extern int allow_severity __attribute__ ((weak)); /* for connection logging */
834
- +extern int deny_severity __attribute__ ((weak)); /* for connection logging */
835
- +#else
836
- extern int allow_severity; /* for connection logging */
837
- extern int deny_severity; /* for connection logging */
838
- +#endif
839
- +
840
- extern char *hosts_allow_table; /* for verification mode redirection */
841
- extern char *hosts_deny_table; /* for verification mode redirection */
842
- extern int hosts_access_verbose; /* for verbose matching mode */
843
- @@ -92,9 +116,14 @@
844
- */
845
-
846
- #ifdef __STDC__
847
- +extern int hosts_access(struct request_info *request);
848
- +extern int hosts_ctl(char *daemon, char *client_name, char *client_addr,
849
- + char *client_user);
850
- extern struct request_info *request_init(struct request_info *,...);
851
- extern struct request_info *request_set(struct request_info *,...);
852
- #else
853
- +extern int hosts_access();
854
- +extern int hosts_ctl();
855
- extern struct request_info *request_init(); /* initialize request */
856
- extern struct request_info *request_set(); /* update request structure */
857
- #endif
858
- @@ -117,27 +146,31 @@
859
- * host_info structures serve as caches for the lookup results.
860
- */
861
-
862
- -extern char *eval_user(); /* client user */
863
- -extern char *eval_hostname(); /* printable hostname */
864
- -extern char *eval_hostaddr(); /* printable host address */
865
- -extern char *eval_hostinfo(); /* host name or address */
866
- -extern char *eval_client(); /* whatever is available */
867
- -extern char *eval_server(); /* whatever is available */
868
- +extern char *eval_user __P((struct request_info *)); /* client user */
869
- +extern char *eval_hostname __P((struct host_info *)); /* printable hostname */
870
- +extern char *eval_hostaddr __P((struct host_info *)); /* printable host address */
871
- +extern char *eval_hostinfo __P((struct host_info *)); /* host name or address */
872
- +extern char *eval_client __P((struct request_info *)); /* whatever is available */
873
- +extern char *eval_server __P((struct request_info *)); /* whatever is available */
874
- #define eval_daemon(r) ((r)->daemon) /* daemon process name */
875
- #define eval_pid(r) ((r)->pid) /* process id */
876
-
877
- /* Socket-specific methods, including DNS hostname lookups. */
878
-
879
- -extern void sock_host(); /* look up endpoint addresses */
880
- -extern void sock_hostname(); /* translate address to hostname */
881
- -extern void sock_hostaddr(); /* address to printable address */
882
- +/* look up endpoint addresses */
883
- +extern void sock_host __P((struct request_info *));
884
- +/* translate address to hostname */
885
- +extern void sock_hostname __P((struct host_info *));
886
- +/* address to printable address */
887
- +extern void sock_hostaddr __P((struct host_info *));
888
- +
889
- #define sock_methods(r) \
890
- { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
891
-
892
- /* The System V Transport-Level Interface (TLI) interface. */
893
-
894
- #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
895
- -extern void tli_host(); /* look up endpoint addresses etc. */
896
- +extern void tli_host __P((struct request_info *)); /* look up endpoint addresses etc. */
897
- #endif
898
-
899
- /*
900
- @@ -178,7 +211,7 @@
901
- * behavior.
902
- */
903
-
904
- -extern void process_options(); /* execute options */
905
- +extern void process_options __P((char *, struct request_info *)); /* execute options */
906
- extern int dry_run; /* verification flag */
907
-
908
- /* Bug workarounds. */
909
- @@ -217,3 +250,7 @@
910
- #define strtok my_strtok
911
- extern char *my_strtok();
912
- #endif
913
- +
914
- +__END_DECLS
915
- +
916
- +#endif /* tcpd.h */
917
- diff -Naur tcp_wrappers_7.6/tcpdchk.c tcp_wrappers_7.6.gimli/tcpdchk.c
918
- --- tcp_wrappers_7.6/tcpdchk.c 1997-02-11 19:13:25.000000000 -0600
919
- +++ tcp_wrappers_7.6.gimli/tcpdchk.c 2002-01-07 08:50:19.000000000 -0600
920
- @@ -350,6 +350,8 @@
921
- {
922
- if (pat[0] == '@') {
923
- tcpd_warn("%s: daemon name begins with \"@\"", pat);
924
- + } else if (pat[0] == '/') {
925
- + tcpd_warn("%s: daemon name begins with \"/\"", pat);
926
- } else if (pat[0] == '.') {
927
- tcpd_warn("%s: daemon name begins with dot", pat);
928
- } else if (pat[strlen(pat) - 1] == '.') {
929
- @@ -382,6 +384,8 @@
930
- {
931
- if (pat[0] == '@') { /* @netgroup */
932
- tcpd_warn("%s: user name begins with \"@\"", pat);
933
- + } else if (pat[0] == '/') {
934
- + tcpd_warn("%s: user name begins with \"/\"", pat);
935
- } else if (pat[0] == '.') {
936
- tcpd_warn("%s: user name begins with dot", pat);
937
- } else if (pat[strlen(pat) - 1] == '.') {
938
- @@ -402,8 +406,13 @@
939
- static int check_host(pat)
940
- char *pat;
941
- {
942
- + char buf[BUFSIZ];
943
- char *mask;
944
- int addr_count = 1;
945
- + FILE *fp;
946
- + struct tcpd_context saved_context;
947
- + char *cp;
948
- + char *wsp = " \t\r\n";
949
-
950
- if (pat[0] == '@') { /* @netgroup */
951
- #ifdef NO_NETGRENT
952
- @@ -422,6 +431,21 @@
953
- tcpd_warn("netgroup support disabled");
954
- #endif
955
- #endif
956
- + } else if (pat[0] == '/') { /* /path/name */
957
- + if ((fp = fopen(pat, "r")) != 0) {
958
- + saved_context = tcpd_context;
959
- + tcpd_context.file = pat;
960
- + tcpd_context.line = 0;
961
- + while (fgets(buf, sizeof(buf), fp)) {
962
- + tcpd_context.line++;
963
- + for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp))
964
- + check_host(cp);
965
- + }
966
- + tcpd_context = saved_context;
967
- + fclose(fp);
968
- + } else if (errno != ENOENT) {
969
- + tcpd_warn("open %s: %m", pat);
970
- + }
971
- } else if (mask = split_at(pat, '/')) { /* network/netmask */
972
- if (dot_quad_addr(pat) == INADDR_NONE
973
- || dot_quad_addr(mask) == INADDR_NONE)
974
- diff -Naur tcp_wrappers_7.6/try-from.8 tcp_wrappers_7.6.gimli/try-from.8
975
- --- tcp_wrappers_7.6/try-from.8 1969-12-31 18:00:00.000000000 -0600
976
- +++ tcp_wrappers_7.6.gimli/try-from.8 2002-01-07 08:50:19.000000000 -0600
977
- @@ -0,0 +1,28 @@
978
- +.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual"
979
- +.SH NAME
980
- +try-from \- test program for the tcp_wrapper
981
- +.SH SYNOPSIS
982
- +.B try-from
983
- +.SH DESCRIPTION
984
- +The
985
- +.B try-from
986
- +command can be called via a remote shell command to find out
987
- +if the hostname and address are properly recognized
988
- +by the
989
- +.B tcp_wrapper
990
- +library, if username lookup works, and (SysV only) if the TLI
991
- +on top of IP heuristics work. Diagnostics are reported through
992
- +.BR syslog (3)
993
- +and redirected to stderr.
994
- +
995
- +Example:
996
- +
997
- +rsh host /some/where/try-from
998
- +
999
- +.SH SEE ALSO
1000
- +.BR hosts_access (5),
1001
- +.BR hosts_options (5),
1002
- +.BR tcpd (8)
1003
- +.SH AUTHOR
1004
- +Wietse Venema, Eindhoven University of Technology, The Netherlands.
1005
- +
1006
- diff -Naur tcp_wrappers_7.6/weak_symbols.c tcp_wrappers_7.6.gimli/weak_symbols.c
1007
- --- tcp_wrappers_7.6/weak_symbols.c 1969-12-31 18:00:00.000000000 -0600
1008
- +++ tcp_wrappers_7.6.gimli/weak_symbols.c 2002-01-07 08:50:19.000000000 -0600
1009
- @@ -0,0 +1,11 @@
1010
- + /*
1011
- + * @(#) weak_symbols.h 1.5 99/12/29 23:50
1012
- + *
1013
- + * Author: Anthony Towns <ajt@debian.org>
1014
- + */
1015
- +
1016
- +#ifdef HAVE_WEAKSYMS
1017
- +#include <syslog.h>
1018
- +int deny_severity = LOG_WARNING;
1019
- +int allow_severity = SEVERITY;
1020
- +#endif
1021
- diff -Naur tcp_wrappers_7.6/workarounds.c tcp_wrappers_7.6.gimli/workarounds.c
1022
- --- tcp_wrappers_7.6/workarounds.c 1996-03-19 09:22:26.000000000 -0600
1023
- +++ tcp_wrappers_7.6.gimli/workarounds.c 2002-01-07 08:50:19.000000000 -0600
1024
- @@ -163,7 +163,11 @@
1025
- int fix_getpeername(sock, sa, len)
1026
- int sock;
1027
- struct sockaddr *sa;
1028
- +#if !defined(__GLIBC__)
1029
- int *len;
1030
- +#else /* __GLIBC__ */
1031
- +size_t *len;
1032
- +#endif /* __GLIBC__ */
1033
- {
1034
- int ret;
1035
- struct sockaddr_in *sin = (struct sockaddr_in *) sa;