diff --git a/pkg/blueprint/customizations.go b/pkg/blueprint/customizations.go index 7750bb5c56..880f8ee39e 100644 --- a/pkg/blueprint/customizations.go +++ b/pkg/blueprint/customizations.go @@ -72,6 +72,7 @@ type UserCustomization struct { Groups []string `json:"groups,omitempty" toml:"groups,omitempty"` UID *int `json:"uid,omitempty" toml:"uid,omitempty"` GID *int `json:"gid,omitempty" toml:"gid,omitempty"` + ExpireDate *int `json:"expiredate,omitempty" toml:"expiredate,omitempty"` } type GroupCustomization struct { diff --git a/pkg/blueprint/customizations_test.go b/pkg/blueprint/customizations_test.go index 9f7189cae9..e341f776d6 100644 --- a/pkg/blueprint/customizations_test.go +++ b/pkg/blueprint/customizations_test.go @@ -103,6 +103,7 @@ func TestGetUsers(t *testing.T) { } UID := 123 GID := 321 + ExpireDate := 12345 expectedUsers := []UserCustomization{ { @@ -115,6 +116,7 @@ func TestGetUsers(t *testing.T) { Groups: Groups, UID: &UID, GID: &GID, + ExpireDate: &ExpireDate, }, } diff --git a/pkg/customizations/users/users.go b/pkg/customizations/users/users.go index 02f39d089c..a88b2c3ae6 100644 --- a/pkg/customizations/users/users.go +++ b/pkg/customizations/users/users.go @@ -12,6 +12,7 @@ type User struct { Groups []string UID *int GID *int + ExpireDate *int } type Group struct { diff --git a/pkg/osbuild/users_stage.go b/pkg/osbuild/users_stage.go index d86538374c..bd71664ed8 100644 --- a/pkg/osbuild/users_stage.go +++ b/pkg/osbuild/users_stage.go @@ -20,6 +20,7 @@ type UsersStageOptionsUser struct { Shell *string `json:"shell,omitempty"` Password *string `json:"password,omitempty"` Key *string `json:"key,omitempty"` + ExpireDate *int `json:"expiredate,omitempty"` } func NewUsersStage(options *UsersStageOptions) *Stage { @@ -60,6 +61,7 @@ func NewUsersStageOptions(userCustomizations []users.User, omitKey bool) (*Users Shell: uc.Shell, Password: uc.Password, Key: nil, + ExpireDate: uc.ExpireDate, } if !omitKey { user.Key = uc.Key