system: some user inmprovements
* not use cgo * add lock/unlock user Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
@@ -164,7 +164,7 @@ func TestConfigCompile(t *testing.T) {
|
||||
|
||||
func TestCloudConfigUnknownKeys(t *testing.T) {
|
||||
contents := `
|
||||
coreos:
|
||||
coreos:
|
||||
etcd:
|
||||
discovery: "https://discovery.etcd.io/827c73219eeb2fa5530027c37bf18877"
|
||||
coreos_unknown:
|
||||
@@ -227,7 +227,7 @@ func TestCloudConfigEmpty(t *testing.T) {
|
||||
// Assert that the parsing of a cloud config file "generally works"
|
||||
func TestCloudConfig(t *testing.T) {
|
||||
contents := `
|
||||
coreos:
|
||||
coreos:
|
||||
etcd:
|
||||
discovery: "https://discovery.etcd.io/827c73219eeb2fa5530027c37bf18877"
|
||||
update:
|
||||
@@ -236,14 +236,14 @@ coreos:
|
||||
- name: 50-eth0.network
|
||||
runtime: yes
|
||||
content: '[Match]
|
||||
|
||||
|
||||
Name=eth47
|
||||
|
||||
|
||||
|
||||
|
||||
[Network]
|
||||
|
||||
|
||||
Address=10.209.171.177/19
|
||||
|
||||
|
||||
'
|
||||
oem:
|
||||
id: rackspace
|
||||
@@ -367,6 +367,7 @@ users:
|
||||
gecos: arbitrary comment
|
||||
homedir: /home/place
|
||||
no_create_home: yes
|
||||
lock_passwd: false
|
||||
primary_group: things
|
||||
groups:
|
||||
- ping
|
||||
|
@@ -24,6 +24,7 @@ type User struct {
|
||||
GECOS string `yaml:"gecos"`
|
||||
Homedir string `yaml:"homedir"`
|
||||
NoCreateHome bool `yaml:"no_create_home"`
|
||||
LockPasswd bool `yaml:"lock_passwd"`
|
||||
PrimaryGroup string `yaml:"primary_group"`
|
||||
Groups []string `yaml:"groups"`
|
||||
NoUserGroup bool `yaml:"no_user_group"`
|
||||
|
Reference in New Issue
Block a user