-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix login failing with "could not generate GID for group" (#742)
UDENG-5814
- Loading branch information
Showing
11 changed files
with
165 additions
and
67 deletions.
There are no files selected for viewing
7 changes: 5 additions & 2 deletions
7
internal/services/pam/testdata/TestIsAuthenticated/cache-with-conflicting-uid.db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
internal/services/pam/testdata/TestIsAuthenticated/cache-with-user.db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
GroupByID: | ||
"11111": '{"Name":"group1","GID":11111}' | ||
GroupByName: | ||
group1: '{"Name":"group1","GID":11111}' | ||
GroupByUGID: | ||
"12345678": '{"Name":"group1","GID":11111}' | ||
GroupToUsers: | ||
"11111": '{"GID":11111,"UIDs":[1111]}' | ||
UserByID: | ||
"1111": '{"Name":"user1","UID":1111,"GID":11111,"Gecos":"User1 gecos\nOn multiple lines","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"AAAAATIME"}' | ||
UserByName: | ||
user1: '{"Name":"user1","UID":1111,"GID":11111,"Gecos":"User1 gecos\nOn multiple lines","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"AAAAATIME"}' | ||
UserToGroups: | ||
"1111": '{"UID":1111,"GIDs":[11111]}' | ||
UserToBroker: | ||
"1111": '"broker-id"' |
23 changes: 23 additions & 0 deletions
23
...l/users/testdata/golden/TestUpdateUser/GID_does_not_change_if_group_with_same_UGID_exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
| | ||
GroupByID: | ||
"11110": '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
"11111": '{"Name":"renamed-group","GID":11111,"UGID":"12345678"}' | ||
GroupByName: | ||
renamed-group: '{"Name":"renamed-group","GID":11111,"UGID":"12345678"}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupByUGID: | ||
"12345678": '{"Name":"renamed-group","GID":11111,"UGID":"12345678"}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupToUsers: | ||
"11110": '{"GID":11110,"UIDs":[1111]}' | ||
"11111": '{"GID":11111,"UIDs":[1111]}' | ||
UserByID: | ||
"1111": '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserByName: | ||
user1: '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserToBroker: | ||
"1111": '"broker-id"' | ||
UserToGroups: | ||
"1111": '{"UID":1111,"GIDs":[11110,11111]}' | ||
UserToLocalGroups: | ||
"1111": "null" |
24 changes: 24 additions & 0 deletions
24
...a/golden/TestUpdateUser/GID_does_not_change_if_group_with_same_name_and_empty_UGID_exists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
| | ||
GroupByID: | ||
"11110": '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
"11111": '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
GroupByName: | ||
group1: '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupByUGID: | ||
"1": '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
"12345678": '{"Name":"group1","GID":11111}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupToUsers: | ||
"11110": '{"GID":11110,"UIDs":[1111]}' | ||
"11111": '{"GID":11111,"UIDs":[1111]}' | ||
UserByID: | ||
"1111": '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserByName: | ||
user1: '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserToBroker: | ||
"1111": '"broker-id"' | ||
UserToGroups: | ||
"1111": '{"UID":1111,"GIDs":[11110,11111]}' | ||
UserToLocalGroups: | ||
"1111": "null" |
14 changes: 7 additions & 7 deletions
14
internal/users/testdata/golden/TestUpdateUser/Successfully_update_user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
| | ||
GroupByID: | ||
"1111": '{"Name":"user1","GID":1111,"UGID":"user1"}' | ||
"11110": '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
"11111": '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
GroupByName: | ||
group1: '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
user1: '{"Name":"user1","GID":1111,"UGID":"user1"}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupByUGID: | ||
"1": '{"Name":"group1","GID":11111,"UGID":"1"}' | ||
user1: '{"Name":"user1","GID":1111,"UGID":"user1"}' | ||
user1: '{"Name":"user1","GID":11110,"UGID":"user1"}' | ||
GroupToUsers: | ||
"1111": '{"GID":1111,"UIDs":[1111]}' | ||
"11110": '{"GID":11110,"UIDs":[1111]}' | ||
"11111": '{"GID":11111,"UIDs":[1111]}' | ||
UserByID: | ||
"1111": '{"Name":"user1","UID":1111,"GID":1111,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
"1111": '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserByName: | ||
user1: '{"Name":"user1","UID":1111,"GID":1111,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
user1: '{"Name":"user1","UID":1111,"GID":11110,"Gecos":"gecos for user1","Dir":"/home/user1","Shell":"/bin/bash","LastPwdChange":-1,"MaxPwdAge":-1,"PwdWarnPeriod":-1,"PwdInactivity":-1,"MinPwdAge":-1,"ExpirationDate":-1,"LastLogin":"ABCDETIME"}' | ||
UserToBroker: {} | ||
UserToGroups: | ||
"1111": '{"UID":1111,"GIDs":[1111,11111]}' | ||
"1111": '{"UID":1111,"GIDs":[11110,11111]}' | ||
UserToLocalGroups: | ||
"1111": "null" |
Oops, something went wrong.