specinfra 2.50.3 → 2.50.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command/freebsd/base/user.rb +6 -7
- data/lib/specinfra/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a4576e3f89ab971501259a5b2f0d4ff81375da
|
4
|
+
data.tar.gz: a44bb834b6ba489e631de9f6e64c4918ed14a58a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd67c47f4d521832d1edbcf6bfa8db9bb8f2829cb0118a1f01a8bd83ff04c76b0e5548a035c2c4250e8dcaf47c3acdf5dd8093509132b88d0fb909a44db8bdcc
|
7
|
+
data.tar.gz: 98b9e396f696b18688f1833d0da3bb1a334ce4f6049ab202c13b4799af405c9fb05d4ef0e65c9bff5e6ccaecceda45f4a7d309820f7030fb4f1da31e28460c6a
|
@@ -9,7 +9,7 @@ class Specinfra::Command::Freebsd::Base::User < Specinfra::Command::Base::User
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def get_minimum_days_between_password_change(user)
|
12
|
-
|
12
|
+
'echo 0'
|
13
13
|
end
|
14
14
|
|
15
15
|
def get_maximum_days_between_password_change(user)
|
@@ -33,22 +33,21 @@ class Specinfra::Command::Freebsd::Base::User < Specinfra::Command::Base::User
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def add(user, options)
|
36
|
-
|
37
|
-
command = ['echo',"\'#{escape(options[:password])}\'",'|','pw','user','add',escape(user),'-H','0']
|
38
|
-
else
|
39
|
-
command = ['pw','user','add',escape(user)]
|
40
|
-
end
|
36
|
+
command = ['pw', 'user', 'add', escape(user)]
|
41
37
|
command << '-g' << escape(options[:gid]) if options[:gid]
|
42
38
|
command << '-d' << escape(options[:home_directory]) if options[:home_directory]
|
43
39
|
command << '-s' << escape(options[:shell]) if options[:shell]
|
44
40
|
command << '-m' if options[:create_home]
|
45
41
|
command << '-r' if options[:system_user]
|
46
42
|
command << '-u' << escape(options[:uid]) if options[:uid]
|
43
|
+
if options[:password]
|
44
|
+
command.concat(['&&', 'chpass', '-p', "\'#{options[:password]}\'", escape(user)])
|
45
|
+
end
|
47
46
|
command.join(' ')
|
48
47
|
end
|
49
48
|
|
50
49
|
def update_encrypted_password(user, encrypted_password)
|
51
|
-
|
50
|
+
"chpass -p \'#{encrypted_password}\' #{escape(user)}"
|
52
51
|
end
|
53
52
|
|
54
53
|
def get_encrypted_password(user)
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.50.
|
4
|
+
version: 2.50.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01
|
11
|
+
date: 2016-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|