From 114743a1f417121777f5a96046154479af1e6b3d Mon Sep 17 00:00:00 2001 From: denisonbarbosa Date: Thu, 8 Sep 2022 09:33:47 -0400 Subject: [PATCH] Renaming test cases and updating golden files Co-authored-by: Didier Roche --- nss/aad-auth/integration_test.go | 73 +++++++++---------- .../error_on_listing_group_with_empty_cache | 15 ---- ...thout_cache_and_no_permission_to_create_it | 7 -- ..._listing_group_without_permission_on_cache | 8 -- .../error_on_listing_passwd_with_empty_cache | 15 ---- ...thout_cache_and_no_permission_to_create_it | 7 -- ...listing_passwd_without_permission_on_cache | 8 -- .../error_on_listing_shadow_with_empty_cache | 15 ---- ...on_listing_shadow_without_access_to_shadow | 14 ---- ...thout_cache_and_no_permission_to_create_it | 7 -- ...listing_shadow_without_permission_on_cache | 8 -- .../TestIntegration/list_entries_in_group | 26 ------- ..._entries_in_group_without_access_to_shadow | 25 ------- .../TestIntegration/list_entries_in_passwd | 26 ------- ...entries_in_passwd_without_access_to_shadow | 25 ------- .../TestIntegration/list_entries_in_shadow | 26 ------- .../list_entry_from_group_by_gid | 15 +--- ...from_group_by_gid_without_access_to_shadow | 14 +--- .../list_entry_from_group_by_name | 15 +--- ...rom_group_by_name_without_access_to_shadow | 14 +--- .../list_entry_from_passwd_by_name | 15 +--- ...om_passwd_by_name_without_access_to_shadow | 14 +--- .../list_entry_from_passwd_by_uid | 15 +--- ...rom_passwd_by_uid_without_access_to_shadow | 14 +--- .../list_entry_from_shadow_by_name | 15 +--- .../golden/TestIntegration/list_group | 4 + .../list_group_without_access_to_shadow | 4 + .../golden/TestIntegration/list_passwd | 4 + .../list_passwd_without_access_to_shadow | 4 + .../golden/TestIntegration/list_shadow | 4 + .../old_entries_in_group_are_cleaned | 18 +---- .../old_entries_in_passwd_are_cleaned | 18 +---- .../old_entries_in_shadow_are_cleaned | 18 +---- ...othing_when_listing_group_with_empty_cache | 1 + ...thout_cache_and_no_permission_to_create_it | 1 + ..._listing_group_without_permission_on_cache | 1 + ...thing_when_listing_passwd_with_empty_cache | 1 + ...thout_cache_and_no_permission_to_create_it | 1 + ...listing_passwd_without_permission_on_cache | 1 + ...thing_when_listing_shadow_with_empty_cache | 1 + ...nothing_when_listing_shadow_without_access | 1 + ...thout_cache_and_no_permission_to_create_it | 1 + ...listing_shadow_without_permission_on_cache | 1 + 43 files changed, 78 insertions(+), 442 deletions(-) delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_with_empty_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_cache_and_no_permission_to_create_it delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_permission_on_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_with_empty_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_cache_and_no_permission_to_create_it delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_permission_on_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_with_empty_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_access_to_shadow delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_cache_and_no_permission_to_create_it delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_permission_on_cache delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group_without_access_to_shadow delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd_without_access_to_shadow delete mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_shadow create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_group create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_group_without_access_to_shadow create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_passwd create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_passwd_without_access_to_shadow create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/list_shadow create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_with_empty_cache create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_cache_and_no_permission_to_create_it create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_permission_on_cache create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_with_empty_cache create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_cache_and_no_permission_to_create_it create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_permission_on_cache create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_with_empty_cache create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_access create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_cache_and_no_permission_to_create_it create mode 100644 nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_permission_on_cache diff --git a/nss/aad-auth/integration_test.go b/nss/aad-auth/integration_test.go index 6f6eb058..1145c9bf 100644 --- a/nss/aad-auth/integration_test.go +++ b/nss/aad-auth/integration_test.go @@ -35,50 +35,49 @@ func TestIntegration(t *testing.T) { wantErr bool }{ // List entry by name - "list entry from passwd by name": {db: "passwd", key: "myuser@domain.com"}, - "list entry from group by name": {db: "group", key: "myuser@domain.com"}, - "list entry from shadow by name": {db: "shadow", key: "myuser@domain.com"}, - "error on listing entry by name from shadow without access to shadow": {db: "shadow", key: "myuser@domain.com", shadowMode: &noShadow, wantErr: true}, + "list entry from passwd by name": {db: "passwd", key: "myuser@domain.com"}, + "list entry from group by name": {db: "group", key: "myuser@domain.com"}, + "list entry from shadow by name": {db: "shadow", key: "myuser@domain.com"}, // List entry by UID/GID - "list entry from passwd by uid": {db: "passwd", key: "165119649"}, - "list entry from group by gid": {db: "group", key: "165119649"}, - "error on listing entry from shadow by uid": {db: "shadow", key: "165119649", wantErr: true}, + "list entry from passwd by uid": {db: "passwd", key: "165119649"}, + "list entry from group by gid": {db: "group", key: "165119649"}, + "error when listing entry from shadow by uid": {db: "shadow", key: "165119649", wantErr: true}, // List entries - "list entries in passwd": {db: "passwd"}, - "list entries in group": {db: "group"}, - "list entries in shadow": {db: "shadow"}, + "list passwd": {db: "passwd"}, + "list group": {db: "group"}, + "list shadow": {db: "shadow"}, // List entries without access to shadow - "list entries in passwd without access to shadow": {db: "passwd", shadowMode: &noShadow}, - "list entries in group without access to shadow": {db: "group", shadowMode: &noShadow}, - "error on listing shadow without access to shadow": {db: "shadow", shadowMode: &noShadow, wantErr: true}, + "list passwd without access to shadow": {db: "passwd", shadowMode: &noShadow}, + "list group without access to shadow": {db: "group", shadowMode: &noShadow}, + "returns nothing when listing shadow without access": {db: "shadow", shadowMode: &noShadow}, // List entries by name without access to shadow - "list entry from passwd by name without access to shadow": {db: "passwd", key: "myuser@domain.com", shadowMode: &noShadow}, - "list entry from group by name without access to shadow": {db: "group", key: "myuser@domain.com", shadowMode: &noShadow}, - "error on listing entry from shadow by name without access to shadow": {db: "shadow", key: "myuser@domain.com", shadowMode: &noShadow, wantErr: true}, + "list entry from passwd by name without access to shadow": {db: "passwd", key: "myuser@domain.com", shadowMode: &noShadow}, + "list entry from group by name without access to shadow": {db: "group", key: "myuser@domain.com", shadowMode: &noShadow}, + "error when listing entry from shadow by name without access": {db: "shadow", key: "myuser@domain.com", shadowMode: &noShadow, wantErr: true}, // List entries by UID/GID without access to shadow - "list entry from passwd by uid without access to shadow": {db: "passwd", key: "165119649", shadowMode: &noShadow}, - "list entry from group by gid without access to shadow": {db: "group", key: "165119649", shadowMode: &noShadow}, - "error on listing entry from shadow by uid without access to shadow": {db: "shadow", key: "165119649", shadowMode: &noShadow, wantErr: true}, + "list entry from passwd by uid without access to shadow": {db: "passwd", key: "165119649", shadowMode: &noShadow}, + "list entry from group by gid without access to shadow": {db: "group", key: "165119649", shadowMode: &noShadow}, + "error when listing entry from shadow by uid without access": {db: "shadow", key: "165119649", shadowMode: &noShadow, wantErr: true}, - // Error on listing non-existent entry - "error on listing non-existent entry in passwd": {db: "passwd", key: "doesnotexist@domain.com", wantErr: true}, - "error on listing non-existent entry in group": {db: "group", key: "doesnotexist@domain.com", wantErr: true}, - "error on listing non-existent entry in shadow": {db: "shadow", key: "doesnotexist@domain.com", wantErr: true}, + // Error when listing non-existent entry + "error when listing non-existent entry in passwd": {db: "passwd", key: "doesnotexist@domain.com", wantErr: true}, + "error when listing non-existent entry in group": {db: "group", key: "doesnotexist@domain.com", wantErr: true}, + "error when listing non-existent entry in shadow": {db: "shadow", key: "doesnotexist@domain.com", wantErr: true}, - // error on listing without cache - "error on listing passwd without cache and no permission to create it": {db: "passwd", cacheDB: "nocache", rootUID: 4242., wantErr: true}, - "error on listing group without cache and no permission to create it": {db: "group", cacheDB: "nocache", rootUID: 4242, wantErr: true}, - "error on listing shadow without cache and no permission to create it": {db: "shadow", cacheDB: "nocache", rootUID: 4242, wantErr: true}, + // Returns nothing when listing without cache + "returns nothing when listing passwd without cache and no permission to create it": {db: "passwd", cacheDB: "nocache", rootUID: 4242}, + "returns nothing when listing group without cache and no permission to create it": {db: "group", cacheDB: "nocache", rootUID: 4242}, + "returns nothing when listing shadow without cache and no permission to create it": {db: "shadow", cacheDB: "nocache", rootUID: 4242}, - // error on listing with empty cache - "error on listing passwd with empty cache": {db: "passwd", cacheDB: "empty", wantErr: true}, - "error on listing group with empty cache": {db: "group", cacheDB: "empty", wantErr: true}, - "error on listing shadow with empty cache": {db: "shadow", cacheDB: "empty", wantErr: true}, + // Returns nothing when listing with empty cache + "returns nothing when listing passwd with empty cache": {db: "passwd", cacheDB: "empty"}, + "returns nothing when listing group with empty cache": {db: "group", cacheDB: "empty"}, + "returns nothing when listing shadow with empty cache": {db: "shadow", cacheDB: "empty"}, // List local entry without cache "list local passwd entry without cache": {db: "passwd", cacheDB: "nocache", key: "0"}, @@ -90,14 +89,14 @@ func TestIntegration(t *testing.T) { "old entries in group are cleaned": {db: "group", cacheDB: "db_with_old_users"}, "old entries in shadow are cleaned": {db: "shadow", cacheDB: "db_with_old_users"}, - // error on listing without permission on cache - "error on listing passwd without permission on cache": {db: "passwd", rootUID: 4242, wantErr: true}, - "error on listing group without permission on cache": {db: "group", rootUID: 4242, wantErr: true}, - "error on listing shadow without permission on cache": {db: "shadow", rootUID: 4242, wantErr: true}, + // Returns nothing when listing without permission on cache + "returns nothing when listing passwd without permission on cache": {db: "passwd", rootUID: 4242}, + "returns nothing when listing group without permission on cache": {db: "group", rootUID: 4242}, + "returns nothing when listing shadow without permission on cache": {db: "shadow", rootUID: 4242}, // Error when trying to list from unsupported database - "error trying to list entry by name from unsupported db": {db: "unsupported", key: "myuser@domain.com", wantErr: true}, - "error trying to list unsupported db": {db: "unsupported", wantErr: true}, + "error on trying to list entry by name from unsupported db": {db: "unsupported", key: "myuser@domain.com", wantErr: true}, + "error on trying to list unsupported db": {db: "unsupported", wantErr: true}, // Error when trying to list from db with an explicit empty key "error on get entry from passwd with explicit empty key": {db: "passwd", key: "-", wantErr: true}, diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_with_empty_cache deleted file mode 100644 index bff9c679..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_with_empty_cache +++ /dev/null @@ -1,15 +0,0 @@ -|- - 2022/09/07 13:51:57 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:51:57 DEBUG: Getting all entries from group - 2022/09/07 13:51:57 DEBUG: Cache initialization - 2022/09/07 13:51:57 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_group_with_empty_cache1610030673/001 - 2022/09/07 13:51:57 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_group_with_empty_cache1610030673/001/passwd.db - 2022/09/07 13:51:57 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_group_with_empty_cache1610030673/001/shadow.db - 2022/09/07 13:51:57 DEBUG: Shadow db mode: 2 - 2022/09/07 13:51:57 DEBUG: Clean up database - 2022/09/07 13:51:57 DEBUG: get next group entry - 2022/09/07 13:51:57 DEBUG: request next group entry in db - 2022/09/07 13:51:57 DEBUG: request to close group iteration in db - 2022/09/07 13:51:57 DEBUG: Close database request - 2022/09/07 13:51:57 DEBUG: Returning to NSS error: 0 with errno: 0 - 0:0 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_cache_and_no_permission_to_create_it deleted file mode 100644 index 11d78804..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_cache_and_no_permission_to_create_it +++ /dev/null @@ -1,7 +0,0 @@ -|- - 2022/09/07 13:51:54 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:51:54 DEBUG: Getting all entries from group - 2022/09/07 13:51:54 DEBUG: Cache initialization - 2022/09/07 13:51:54 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_group_without_cache_and_no_permission_to_create_it2618132374/001 - 2022/09/07 13:51:54 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_permission_on_cache deleted file mode 100644 index 2d1d0a50..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_group_without_permission_on_cache +++ /dev/null @@ -1,8 +0,0 @@ -|- - 2022/09/07 13:51:57 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:51:57 DEBUG: Getting all entries from group - 2022/09/07 13:51:57 DEBUG: Cache initialization - 2022/09/07 13:51:57 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_group_without_permission_on_cache3349045985/001 - 2022/09/07 13:51:57 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_group_without_permission_on_cache3349045985/001/passwd.db - 2022/09/07 13:51:57 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_with_empty_cache deleted file mode 100644 index 8319396a..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_with_empty_cache +++ /dev/null @@ -1,15 +0,0 @@ -|- - 2022/09/07 13:51:56 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:51:56 DEBUG: Getting all entries from passwd - 2022/09/07 13:51:56 DEBUG: Cache initialization - 2022/09/07 13:51:56 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_passwd_with_empty_cache2919110320/001 - 2022/09/07 13:51:56 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_passwd_with_empty_cache2919110320/001/passwd.db - 2022/09/07 13:51:56 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_passwd_with_empty_cache2919110320/001/shadow.db - 2022/09/07 13:51:56 DEBUG: Shadow db mode: 2 - 2022/09/07 13:51:56 DEBUG: Clean up database - 2022/09/07 13:51:56 DEBUG: get next passwd entry - 2022/09/07 13:51:56 DEBUG: request next passwd entry in db - 2022/09/07 13:51:56 DEBUG: request to close passwd iteration in db - 2022/09/07 13:51:56 DEBUG: Close database request - 2022/09/07 13:51:56 DEBUG: Returning to NSS error: 0 with errno: 0 - 0:0 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_cache_and_no_permission_to_create_it deleted file mode 100644 index 20df49c1..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_cache_and_no_permission_to_create_it +++ /dev/null @@ -1,7 +0,0 @@ -|- - 2022/09/07 13:51:55 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:51:55 DEBUG: Getting all entries from passwd - 2022/09/07 13:51:55 DEBUG: Cache initialization - 2022/09/07 13:51:55 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_passwd_without_cache_and_no_permission_to_create_it3770524358/001 - 2022/09/07 13:51:55 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_permission_on_cache deleted file mode 100644 index f0f98366..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_passwd_without_permission_on_cache +++ /dev/null @@ -1,8 +0,0 @@ -|- - 2022/09/07 13:51:57 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:51:57 DEBUG: Getting all entries from passwd - 2022/09/07 13:51:57 DEBUG: Cache initialization - 2022/09/07 13:51:57 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_passwd_without_permission_on_cache2317445046/001 - 2022/09/07 13:51:57 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_passwd_without_permission_on_cache2317445046/001/passwd.db - 2022/09/07 13:51:57 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_with_empty_cache deleted file mode 100644 index e808c963..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_with_empty_cache +++ /dev/null @@ -1,15 +0,0 @@ -|- - 2022/09/07 13:51:55 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:51:55 DEBUG: Getting all entries from shadow - 2022/09/07 13:51:55 DEBUG: Cache initialization - 2022/09/07 13:51:55 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_shadow_with_empty_cache4269342495/001 - 2022/09/07 13:51:55 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_shadow_with_empty_cache4269342495/001/passwd.db - 2022/09/07 13:51:55 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_shadow_with_empty_cache4269342495/001/shadow.db - 2022/09/07 13:51:55 DEBUG: Shadow db mode: 2 - 2022/09/07 13:51:55 DEBUG: Clean up database - 2022/09/07 13:51:55 DEBUG: get next shadow entry - 2022/09/07 13:51:55 DEBUG: request next shadow entry in db - 2022/09/07 13:51:55 DEBUG: request to close shadow iteration in db - 2022/09/07 13:51:55 DEBUG: Close database request - 2022/09/07 13:51:55 DEBUG: Returning to NSS error: 0 with errno: 0 - 0:0 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_access_to_shadow deleted file mode 100644 index 87316749..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_access_to_shadow +++ /dev/null @@ -1,14 +0,0 @@ -|- - 2022/09/07 13:51:56 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:51:56 DEBUG: Getting all entries from shadow - 2022/09/07 13:51:56 DEBUG: Cache initialization - 2022/09/07 13:51:56 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_shadow_without_access_to_shadow4122956534/001 - 2022/09/07 13:51:56 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_shadow_without_access_to_shadow4122956534/001/passwd.db - 2022/09/07 13:51:56 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_shadow_without_access_to_shadow4122956534/001/shadow.db - 2022/09/07 13:51:56 DEBUG: Shadow db mode: 0 - 2022/09/07 13:51:56 DEBUG: get next shadow entry - 2022/09/07 13:51:56 DEBUG: request next shadow entry in db - 2022/09/07 13:51:56 DEBUG: request to close shadow iteration in db - 2022/09/07 13:51:56 DEBUG: Close database request - 2022/09/07 13:51:56 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_cache_and_no_permission_to_create_it deleted file mode 100644 index 6e6dd084..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_cache_and_no_permission_to_create_it +++ /dev/null @@ -1,7 +0,0 @@ -|- - 2022/09/07 13:51:54 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:51:54 DEBUG: Getting all entries from shadow - 2022/09/07 13:51:54 DEBUG: Cache initialization - 2022/09/07 13:51:54 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_shadow_without_cache_and_no_permission_to_create_it4119249427/001 - 2022/09/07 13:51:54 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_permission_on_cache deleted file mode 100644 index 49b52b9b..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/error_on_listing_shadow_without_permission_on_cache +++ /dev/null @@ -1,8 +0,0 @@ -|- - 2022/09/07 13:51:57 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:51:57 DEBUG: Getting all entries from shadow - 2022/09/07 13:51:57 DEBUG: Cache initialization - 2022/09/07 13:51:57 DEBUG: Opening cache in /tmp/TestIntegrationerror_on_listing_shadow_without_permission_on_cache244408042/001 - 2022/09/07 13:51:57 DEBUG: check file permissions on /tmp/TestIntegrationerror_on_listing_shadow_without_permission_on_cache244408042/001/shadow.db - 2022/09/07 13:51:57 DEBUG: Returning to NSS error: -1 with errno: 2 - -1:2 diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group b/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group deleted file mode 100644 index 7cc1eaa6..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group +++ /dev/null @@ -1,26 +0,0 @@ -| - 2022/09/07 13:59:45 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:59:45 DEBUG: Getting all entries from group - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationlist_entries_in_group1154441822/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_group1154441822/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_group1154441822/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: request to close group iteration in db - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:myuser@domain.com - otheruser@domain.com:x:165119648:otheruser@domain.com - user@otherdomain.com:x:165119649:user@otherdomain.commyuser@domain.com:x:1929326240:myuser@domain.com - otheruser@domain.com:x:165119648:otheruser@domain.com - user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group_without_access_to_shadow deleted file mode 100644 index 51be4a12..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_group_without_access_to_shadow +++ /dev/null @@ -1,25 +0,0 @@ -| - 2022/09/07 13:59:43 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:59:43 DEBUG: Getting all entries from group - 2022/09/07 13:59:43 DEBUG: Cache initialization - 2022/09/07 13:59:43 DEBUG: Opening cache in /tmp/TestIntegrationlist_entries_in_group_without_access_to_shadow1668351925/001 - 2022/09/07 13:59:43 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_group_without_access_to_shadow1668351925/001/passwd.db - 2022/09/07 13:59:43 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_group_without_access_to_shadow1668351925/001/shadow.db - 2022/09/07 13:59:43 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:43 DEBUG: get next group entry - 2022/09/07 13:59:43 DEBUG: request next group entry in db - 2022/09/07 13:59:43 DEBUG: get next group entry - 2022/09/07 13:59:43 DEBUG: request next group entry in db - 2022/09/07 13:59:43 DEBUG: get next group entry - 2022/09/07 13:59:43 DEBUG: request next group entry in db - 2022/09/07 13:59:43 DEBUG: get next group entry - 2022/09/07 13:59:43 DEBUG: request next group entry in db - 2022/09/07 13:59:43 DEBUG: request to close group iteration in db - 2022/09/07 13:59:43 DEBUG: Close database request - 2022/09/07 13:59:43 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:myuser@domain.com - otheruser@domain.com:x:165119648:otheruser@domain.com - user@otherdomain.com:x:165119649:user@otherdomain.commyuser@domain.com:x:1929326240:myuser@domain.com - otheruser@domain.com:x:165119648:otheruser@domain.com - user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd b/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd deleted file mode 100644 index ad4518fa..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd +++ /dev/null @@ -1,26 +0,0 @@ -| - 2022/09/07 13:59:44 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:59:44 DEBUG: Getting all entries from passwd - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entries_in_passwd1039525804/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_passwd1039525804/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_passwd1039525804/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:44 DEBUG: Clean up database - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: request to close passwd iteration in db - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash - otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bashmyuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash - otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd_without_access_to_shadow deleted file mode 100644 index acf83817..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_passwd_without_access_to_shadow +++ /dev/null @@ -1,25 +0,0 @@ -| - 2022/09/07 13:59:44 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:59:44 DEBUG: Getting all entries from passwd - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entries_in_passwd_without_access_to_shadow4104957119/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_passwd_without_access_to_shadow4104957119/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_passwd_without_access_to_shadow4104957119/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: request to close passwd iteration in db - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash - otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bashmyuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash - otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_shadow deleted file mode 100644 index fb0ce6f4..00000000 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entries_in_shadow +++ /dev/null @@ -1,26 +0,0 @@ -| - 2022/09/07 13:59:44 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:59:44 DEBUG: Getting all entries from shadow - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entries_in_shadow249365685/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_shadow249365685/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entries_in_shadow249365685/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:44 DEBUG: Clean up database - 2022/09/07 13:59:44 DEBUG: get next shadow entry - 2022/09/07 13:59:44 DEBUG: request next shadow entry in db - 2022/09/07 13:59:44 DEBUG: get next shadow entry - 2022/09/07 13:59:44 DEBUG: request next shadow entry in db - 2022/09/07 13:59:44 DEBUG: get next shadow entry - 2022/09/07 13:59:44 DEBUG: request next shadow entry in db - 2022/09/07 13:59:44 DEBUG: get next shadow entry - 2022/09/07 13:59:44 DEBUG: request next shadow entry in db - 2022/09/07 13:59:44 DEBUG: request to close shadow iteration in db - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:$2a$10$R4ieqs.yZJuN1MSp2xhevemo5XnGK5oZ/RnMgWM67cpC3I10no97q:-1:-1:-1:-1:-1:-1:18446744073709551615 - otheruser@domain.com:$2a$10$XnMdMBMWoYRxZdODZXhB2O6ZUiAQedtX3VuIVJc3bVpdNHuEBa8YS:-1:-1:-1:-1:-1:-1:18446744073709551615 - user@otherdomain.com:$2a$10$uA1nwSVblaSj9GtYnP38/eAu9q6fQfJWgAeVMd6dyZfgsaYL5TgsS:-1:-1:-1:-1:-1:-1:18446744073709551615myuser@domain.com:$2a$10$R4ieqs.yZJuN1MSp2xhevemo5XnGK5oZ/RnMgWM67cpC3I10no97q::::::: - otheruser@domain.com:$2a$10$XnMdMBMWoYRxZdODZXhB2O6ZUiAQedtX3VuIVJc3bVpdNHuEBa8YS::::::: - user@otherdomain.com:$2a$10$uA1nwSVblaSj9GtYnP38/eAu9q6fQfJWgAeVMd6dyZfgsaYL5TgsS::::::: diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid index 6b59f88e..b4e9b27a 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid @@ -1,15 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0xc0001187a0 from group - 2022/09/07 13:59:45 DEBUG: Getting entry with id '�' from group - 2022/09/07 13:59:45 DEBUG: Requesting an group entry matching GID 165119649 - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_group_by_gid3334512991/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_gid3334512991/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_gid3334512991/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: getting group information from cache for gid 165119649 - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - user@otherdomain.com:x:165119649:user@otherdomain.comuser@otherdomain.com:x:165119649:user@otherdomain.com + user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid_without_access_to_shadow index 087681e0..b4e9b27a 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid_without_access_to_shadow +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_gid_without_access_to_shadow @@ -1,14 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0xc0000787d0 from group - 2022/09/07 13:59:45 DEBUG: Getting entry with id '�' from group - 2022/09/07 13:59:45 DEBUG: Requesting an group entry matching GID 165119649 - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_group_by_gid_without_access_to_shadow3816888042/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_gid_without_access_to_shadow3816888042/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_gid_without_access_to_shadow3816888042/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:45 DEBUG: getting group information from cache for gid 165119649 - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - user@otherdomain.com:x:165119649:user@otherdomain.comuser@otherdomain.com:x:165119649:user@otherdomain.com + user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name index 22dfd570..891cb878 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name @@ -1,15 +1,2 @@ | - 2022/09/07 13:59:44 DEBUG: Getting entry 0xc0001927a0 from group - 2022/09/07 13:59:44 DEBUG: Getting entry with name "myuser@domain.com" from group - 2022/09/07 13:59:44 DEBUG: Requesting a group entry matching name "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_group_by_name2164351177/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_name2164351177/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_name2164351177/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:44 DEBUG: Clean up database - 2022/09/07 13:59:44 DEBUG: getting group information from cache for "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:myuser@domain.commyuser@domain.com:x:1929326240:myuser@domain.com + myuser@domain.com:x:1929326240:myuser@domain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name_without_access_to_shadow index 39170d72..891cb878 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name_without_access_to_shadow +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_group_by_name_without_access_to_shadow @@ -1,14 +1,2 @@ | - 2022/09/07 13:59:44 DEBUG: Getting entry 0xc0000b07a0 from group - 2022/09/07 13:59:44 DEBUG: Getting entry with name "myuser@domain.com" from group - 2022/09/07 13:59:44 DEBUG: Requesting a group entry matching name "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_group_by_name_without_access_to_shadow431325101/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_name_without_access_to_shadow431325101/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_group_by_name_without_access_to_shadow431325101/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:44 DEBUG: getting group information from cache for "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:myuser@domain.commyuser@domain.com:x:1929326240:myuser@domain.com + myuser@domain.com:x:1929326240:myuser@domain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name index 5226a961..0fe2cf62 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name @@ -1,15 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0xc0000787d0 from passwd - 2022/09/07 13:59:45 DEBUG: Getting entry with name "myuser@domain.com" from passwd - 2022/09/07 13:59:45 DEBUG: Requesting a passwd entry matching name "myuser@domain.com" - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_passwd_by_name3192111504/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_name3192111504/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_name3192111504/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: getting user information from cache for "myuser@domain.com" - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bashmyuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash + myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name_without_access_to_shadow index 1242651b..0fe2cf62 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name_without_access_to_shadow +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_name_without_access_to_shadow @@ -1,14 +1,2 @@ | - 2022/09/07 13:59:44 DEBUG: Getting entry 0xc0000787d0 from passwd - 2022/09/07 13:59:44 DEBUG: Getting entry with name "myuser@domain.com" from passwd - 2022/09/07 13:59:44 DEBUG: Requesting a passwd entry matching name "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_passwd_by_name_without_access_to_shadow1817581510/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_name_without_access_to_shadow1817581510/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_name_without_access_to_shadow1817581510/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:44 DEBUG: getting user information from cache for "myuser@domain.com" - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bashmyuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash + myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid index 5593399b..084173c5 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid @@ -1,15 +1,2 @@ | - 2022/09/07 13:59:44 DEBUG: Getting entry 0xc0001107a0 from passwd - 2022/09/07 13:59:44 DEBUG: Getting entry with id '�' from passwd - 2022/09/07 13:59:44 DEBUG: Requesting a passwd entry matching UID 165119649 - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_passwd_by_uid241884985/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_uid241884985/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_uid241884985/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:44 DEBUG: Clean up database - 2022/09/07 13:59:44 DEBUG: getting user information from cache for uid 165119649 - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bashuser@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash + user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid_without_access_to_shadow index d40d80cf..084173c5 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid_without_access_to_shadow +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_passwd_by_uid_without_access_to_shadow @@ -1,14 +1,2 @@ | - 2022/09/07 13:59:43 DEBUG: Getting entry 0xc0000b07a0 from passwd - 2022/09/07 13:59:43 DEBUG: Getting entry with id '�' from passwd - 2022/09/07 13:59:43 DEBUG: Requesting a passwd entry matching UID 165119649 - 2022/09/07 13:59:43 DEBUG: Cache initialization - 2022/09/07 13:59:43 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_passwd_by_uid_without_access_to_shadow2373965321/001 - 2022/09/07 13:59:43 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_uid_without_access_to_shadow2373965321/001/passwd.db - 2022/09/07 13:59:43 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_passwd_by_uid_without_access_to_shadow2373965321/001/shadow.db - 2022/09/07 13:59:43 DEBUG: Shadow db mode: 0 - 2022/09/07 13:59:43 DEBUG: getting user information from cache for uid 165119649 - 2022/09/07 13:59:43 DEBUG: Close database request - 2022/09/07 13:59:43 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bashuser@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash + user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_shadow_by_name b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_shadow_by_name index 712805d2..dc8e54ed 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_shadow_by_name +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_entry_from_shadow_by_name @@ -1,15 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0xc0000787d0 from shadow - 2022/09/07 13:59:45 DEBUG: Getting entry with name "myuser@domain.com" from shadow - 2022/09/07 13:59:45 DEBUG: Requesting a shadow entry matching name "myuser@domain.com" - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationlist_entry_from_shadow_by_name3917688544/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_shadow_by_name3917688544/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationlist_entry_from_shadow_by_name3917688544/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: getting shadow information from cache for "myuser@domain.com" - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - myuser@domain.com:*:-1:-1:-1:-1:-1:-1:18446744073709551615myuser@domain.com:*::::::: + myuser@domain.com:*::::::: diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_group b/nss/aad-auth/testdata/golden/TestIntegration/list_group new file mode 100644 index 00000000..7d386da5 --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_group @@ -0,0 +1,4 @@ +| + myuser@domain.com:x:1929326240:myuser@domain.com + otheruser@domain.com:x:165119648:otheruser@domain.com + user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_group_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_group_without_access_to_shadow new file mode 100644 index 00000000..7d386da5 --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_group_without_access_to_shadow @@ -0,0 +1,4 @@ +| + myuser@domain.com:x:1929326240:myuser@domain.com + otheruser@domain.com:x:165119648:otheruser@domain.com + user@otherdomain.com:x:165119649:user@otherdomain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_passwd b/nss/aad-auth/testdata/golden/TestIntegration/list_passwd new file mode 100644 index 00000000..b253f852 --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_passwd @@ -0,0 +1,4 @@ +| + myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash + otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash + user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_passwd_without_access_to_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_passwd_without_access_to_shadow new file mode 100644 index 00000000..b253f852 --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_passwd_without_access_to_shadow @@ -0,0 +1,4 @@ +| + myuser@domain.com:x:1929326240:1929326240::/home/myuser@domain.com:/bin/bash + otheruser@domain.com:x:165119648:165119648::/home/otheruser@domain.com:/bin/bash + user@otherdomain.com:x:165119649:165119649::/home/user@otherdomain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/list_shadow b/nss/aad-auth/testdata/golden/TestIntegration/list_shadow new file mode 100644 index 00000000..ffd068c5 --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/list_shadow @@ -0,0 +1,4 @@ +| + myuser@domain.com:$2a$10$R4ieqs.yZJuN1MSp2xhevemo5XnGK5oZ/RnMgWM67cpC3I10no97q::::::: + otheruser@domain.com:$2a$10$XnMdMBMWoYRxZdODZXhB2O6ZUiAQedtX3VuIVJc3bVpdNHuEBa8YS::::::: + user@otherdomain.com:$2a$10$uA1nwSVblaSj9GtYnP38/eAu9q6fQfJWgAeVMd6dyZfgsaYL5TgsS::::::: diff --git a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_group_are_cleaned b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_group_are_cleaned index af1c89ca..bde5f119 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_group_are_cleaned +++ b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_group_are_cleaned @@ -1,18 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0x0 from group - 2022/09/07 13:59:45 DEBUG: Getting all entries from group - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationold_entries_in_group_are_cleaned16613317/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_group_are_cleaned16613317/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_group_are_cleaned16613317/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: get next group entry - 2022/09/07 13:59:45 DEBUG: request next group entry in db - 2022/09/07 13:59:45 DEBUG: request to close group iteration in db - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - futureuser@domain.com:x:80938656:futureuser@domain.comfutureuser@domain.com:x:80938656:futureuser@domain.com + futureuser@domain.com:x:80938656:futureuser@domain.com diff --git a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_passwd_are_cleaned b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_passwd_are_cleaned index 49df6c57..d68af7df 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_passwd_are_cleaned +++ b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_passwd_are_cleaned @@ -1,18 +1,2 @@ | - 2022/09/07 13:59:44 DEBUG: Getting entry 0x0 from passwd - 2022/09/07 13:59:44 DEBUG: Getting all entries from passwd - 2022/09/07 13:59:44 DEBUG: Cache initialization - 2022/09/07 13:59:44 DEBUG: Opening cache in /tmp/TestIntegrationold_entries_in_passwd_are_cleaned2532036994/001 - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_passwd_are_cleaned2532036994/001/passwd.db - 2022/09/07 13:59:44 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_passwd_are_cleaned2532036994/001/shadow.db - 2022/09/07 13:59:44 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:44 DEBUG: Clean up database - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: get next passwd entry - 2022/09/07 13:59:44 DEBUG: request next passwd entry in db - 2022/09/07 13:59:44 DEBUG: request to close passwd iteration in db - 2022/09/07 13:59:44 DEBUG: Close database request - 2022/09/07 13:59:44 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - futureuser@domain.com:x:80938656:80938656::/home/futureuser@domain.com:/bin/bashfutureuser@domain.com:x:80938656:80938656::/home/futureuser@domain.com:/bin/bash + futureuser@domain.com:x:80938656:80938656::/home/futureuser@domain.com:/bin/bash diff --git a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_shadow_are_cleaned b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_shadow_are_cleaned index 9f4f7a1c..97fbcd17 100644 --- a/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_shadow_are_cleaned +++ b/nss/aad-auth/testdata/golden/TestIntegration/old_entries_in_shadow_are_cleaned @@ -1,18 +1,2 @@ | - 2022/09/07 13:59:45 DEBUG: Getting entry 0x0 from shadow - 2022/09/07 13:59:45 DEBUG: Getting all entries from shadow - 2022/09/07 13:59:45 DEBUG: Cache initialization - 2022/09/07 13:59:45 DEBUG: Opening cache in /tmp/TestIntegrationold_entries_in_shadow_are_cleaned979511880/001 - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_shadow_are_cleaned979511880/001/passwd.db - 2022/09/07 13:59:45 DEBUG: check file permissions on /tmp/TestIntegrationold_entries_in_shadow_are_cleaned979511880/001/shadow.db - 2022/09/07 13:59:45 DEBUG: Shadow db mode: 2 - 2022/09/07 13:59:45 DEBUG: Clean up database - 2022/09/07 13:59:45 DEBUG: get next shadow entry - 2022/09/07 13:59:45 DEBUG: request next shadow entry in db - 2022/09/07 13:59:45 DEBUG: get next shadow entry - 2022/09/07 13:59:45 DEBUG: request next shadow entry in db - 2022/09/07 13:59:45 DEBUG: request to close shadow iteration in db - 2022/09/07 13:59:45 DEBUG: Close database request - 2022/09/07 13:59:45 DEBUG: Returning NSS STATUS SUCCESS with errno: 0 - 1:0 - futureuser@domain.com:$2a$10$cF4IsiVtLzwUTpboXHlv.eaK4BCnwn4r/Rjdry5iSJpq6zAjA0gGy:-1:-1:-1:-1:-1:-1:18446744073709551615futureuser@domain.com:$2a$10$cF4IsiVtLzwUTpboXHlv.eaK4BCnwn4r/Rjdry5iSJpq6zAjA0gGy::::::: + futureuser@domain.com:$2a$10$cF4IsiVtLzwUTpboXHlv.eaK4BCnwn4r/Rjdry5iSJpq6zAjA0gGy::::::: diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_with_empty_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_with_empty_cache @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_cache_and_no_permission_to_create_it new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_cache_and_no_permission_to_create_it @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_permission_on_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_group_without_permission_on_cache @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_with_empty_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_with_empty_cache @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_cache_and_no_permission_to_create_it new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_cache_and_no_permission_to_create_it @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_permission_on_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_passwd_without_permission_on_cache @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_with_empty_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_with_empty_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_with_empty_cache @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_access b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_access new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_access @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_cache_and_no_permission_to_create_it b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_cache_and_no_permission_to_create_it new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_cache_and_no_permission_to_create_it @@ -0,0 +1 @@ +"" diff --git a/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_permission_on_cache b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_permission_on_cache new file mode 100644 index 00000000..e16c76df --- /dev/null +++ b/nss/aad-auth/testdata/golden/TestIntegration/returns_nothing_when_listing_shadow_without_permission_on_cache @@ -0,0 +1 @@ +""