Content-Length: 257917 | pFad | http://github.com/postgrespro/postgres_cluster/commit/6a61d1ff9dce7406c0affdc013da27ed4252ba29

5E Properly close token in sspi authentication · postgrespro/postgres_cluster@6a61d1f · GitHub
Skip to content

Commit 6a61d1f

Browse files
committed
Properly close token in sspi authentication
We can never leak more than one token, but we shouldn't do that. We don't bother closing it in the error paths since the process will exit shortly anyway. Christian Ullrich
1 parent e72d7d8 commit 6a61d1f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/libpq/auth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,8 @@ pg_SSPI_recvauth(Port *port)
12531253
(errmsg_internal("could not get user token: error code %lu",
12541254
GetLastError())));
12551255

1256+
CloseHandle(token);
1257+
12561258
if (!LookupAccountSid(NULL, tokenuser->User.Sid, accountname, &accountnamesize,
12571259
domainname, &domainnamesize, &accountnameuse))
12581260
ereport(ERROR,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/6a61d1ff9dce7406c0affdc013da27ed4252ba29

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy