containerize_me 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +8 -0
- data/lib/containerize_me.rb +37 -1
- metadata +3 -3
data/History.txt
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
|
2
|
+
=== 0.1.3 / 2011-09-11
|
3
|
+
templates now can include a :chmod: key which is defined by an array
|
4
|
+
where each array element is a hash having keys :item & :mode. Ex:
|
5
|
+
:chmod:
|
6
|
+
- :item: /tmp
|
7
|
+
:mode: 0777
|
8
|
+
- :item: /home
|
9
|
+
:mode: 0700
|
2
10
|
=== 0.1.1 / 2011-07-11
|
3
11
|
* Added ability to add users to a chroot jail which do not exists on the
|
4
12
|
system. This is good if one wants a user to be able to ssh into the jail
|
data/lib/containerize_me.rb
CHANGED
@@ -11,7 +11,7 @@ require base + '/cp_dep_libs'
|
|
11
11
|
ENV['PATH'] += "/opt/cyberconnect/bin:/opt/cyberconnect/usr/bin:/opt/cyberconnect/sbin:/opt/cyberconnect/usr/sbin"
|
12
12
|
|
13
13
|
class ContainerizeMe
|
14
|
-
VERSION = '0.1.
|
14
|
+
VERSION = '0.1.3'
|
15
15
|
end
|
16
16
|
class JailKitNotFoundError < StandardError ; end
|
17
17
|
class JailNotWritable < StandardError ; end
|
@@ -250,6 +250,42 @@ module Jail
|
|
250
250
|
}
|
251
251
|
end
|
252
252
|
end
|
253
|
+
|
254
|
+
if cfg.has_key?(:chmod)
|
255
|
+
if cfg[:chmod].kind_of?(Array)
|
256
|
+
cfg[:chmod].each { |i|
|
257
|
+
begin
|
258
|
+
FileUtils.chmod(i[:mode], "#{@config.jail}#{i[:item]}") if File.exists?("#{@config.jail}#{i[:item]}")
|
259
|
+
rescue => e
|
260
|
+
p "issue chown: #{e.inspect}"
|
261
|
+
end
|
262
|
+
}
|
263
|
+
end
|
264
|
+
end
|
265
|
+
=begin
|
266
|
+
if cfg.has_key?(:sudo)
|
267
|
+
if cfg[:sudo].kind_of?(Array)
|
268
|
+
FileUtils.chmod(0600, '/etc/sudoers')
|
269
|
+
fd = File.open("#{@config.jail}/etc/sudoers', 'w+')
|
270
|
+
cfg[:sudo].each { |i|
|
271
|
+
begin
|
272
|
+
if Jail.user_in_jail?(i[:user])
|
273
|
+
if i[:commands].kind_of?(Array)
|
274
|
+
fd.puts "#{i[:user]} ALL=NOPASSWD: #{i[:commands].join(',')}"
|
275
|
+
end
|
276
|
+
end
|
277
|
+
rescue => e
|
278
|
+
p "issue chown: #{e.inspect}"
|
279
|
+
ensure
|
280
|
+
fd.close
|
281
|
+
FileUtils.chmod(0400, '/etc/sudoers')
|
282
|
+
end
|
283
|
+
}
|
284
|
+
end
|
285
|
+
end
|
286
|
+
=end
|
287
|
+
|
288
|
+
|
253
289
|
end
|
254
290
|
|
255
291
|
def perform
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: containerize_me
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Cliff Cyphers
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-10-31 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: platform_helpers
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements: []
|
90
90
|
|
91
91
|
rubyforge_project: containerize_me
|
92
|
-
rubygems_version: 1.8.
|
92
|
+
rubygems_version: 1.8.11
|
93
93
|
signing_key:
|
94
94
|
specification_version: 3
|
95
95
|
summary: Containerize Me is intended to provide a cross distro linux means for easily defining charactieristics of a chroot jail in yaml format
|