cracklib_reloaded 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/README.md +2 -1
- data/lib/cracklib_reloaded/password.rb +10 -4
- data/lib/cracklib_reloaded/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2b6096ce9c9708f4edc757c90ce9adbf0a96777
|
4
|
+
data.tar.gz: 4d2ccfcecc12280e87be8f38c6ded990833482a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a0e7b54d64dd65c501479dd67989bb419b870ff230bd02101fe312457a60334887886a6d1d5a719c6d51035f3441132cc051b3c60cf0047985eea0d3a113023
|
7
|
+
data.tar.gz: 242b7187733312fee9cadbd29200222db57a4d3060f25ff3150a47a09a3ea732e7f7fc274b3ca658037f20a7b6cb2bef401b6fe3b019c7d7834cd5c05c27ede7
|
data/.travis.yml
CHANGED
@@ -8,6 +8,7 @@ addons:
|
|
8
8
|
- language-pack-en
|
9
9
|
- language-pack-en-base
|
10
10
|
- libcrack2
|
11
|
+
- libcrack2-dev
|
11
12
|
- cracklib-runtime
|
12
13
|
env:
|
13
14
|
global:
|
@@ -16,6 +17,8 @@ env:
|
|
16
17
|
- LANGUAGE=en_US.UTF-8
|
17
18
|
# `cache` is only available for private projects
|
18
19
|
cache: bundler
|
20
|
+
before_script:
|
21
|
+
- unset LIBCRACK_SO_PATH
|
19
22
|
before_install:
|
20
23
|
- gem update --system --no-doc
|
21
24
|
- gem install bundler -v 1.14.6 --no-doc
|
data/README.md
CHANGED
@@ -4,8 +4,9 @@ CrackLib is a library for checking that a password is not based on a simple char
|
|
4
4
|
|
5
5
|
## Dependencies
|
6
6
|
|
7
|
+
* CENTOS 5.x: sudo yum install cracklib cracklib-dicts
|
7
8
|
* CENTOS 6.x: sudo yum install cracklib cracklib-devel
|
8
|
-
* UBUNTU: sudo apt-get install libcrack2 cracklib-
|
9
|
+
* UBUNTU: sudo apt-get install libcrack2 libcrack2-dev cracklib-runtime
|
9
10
|
* MAC: sudo port install cracklib cracklib-words
|
10
11
|
|
11
12
|
## Installation
|
@@ -6,13 +6,19 @@ module CracklibReloaded
|
|
6
6
|
module CracklibReloadedFfiMixin
|
7
7
|
extend FFI::Library
|
8
8
|
libcrack_so_paths = []
|
9
|
-
libcrack_so_paths << ENV['LIBCRACK_SO_PATH'].to_s
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
libcrack_so_paths << ENV['LIBCRACK_SO_PATH'].to_s if ENV['LIBCRACK_SO_PATH']
|
10
|
+
interpreter_bytes = 0.to_i.size
|
11
|
+
interpreter_bits = interpreter_bytes * 8
|
12
|
+
if interpreter_bits == 64
|
13
|
+
libcrack_so_paths << '/usr/lib64/libcrack.so.2'
|
14
|
+
libcrack_so_paths << '/usr/lib/x86_64-linux-gnu/libcrack.so.2'
|
15
|
+
end
|
16
|
+
libcrack_so_paths << '/usr/lib/libcrack.so.2' # generic
|
17
|
+
libcrack_so_paths << '/usr/lib/i386-linux-gnu/libcrack.so.2'
|
13
18
|
LIBCRACK_SO_PATH = libcrack_so_paths.select { |file| File.readable?(file) }.first.freeze
|
14
19
|
|
15
20
|
ffi_lib LIBCRACK_SO_PATH
|
21
|
+
|
16
22
|
attach_function :cracklib_default_dict, :GetDefaultCracklibDict, [], :string
|
17
23
|
attach_function :cracklib_check, :FascistCheck, %i[string string], :string
|
18
24
|
end
|