{"Entry":{"collection":"hook","key":"check_password_hook","name":"check_password_hook","aliases":[],"metadata":{"aliases":[],"category":"Authentication and connections","content_hash":"a52cdfa1c41379cdfed44c8b1e65fd486ec0e66d0fc026a22fc56b09016e6c16","imported_at":"2026-09-27T17:57:58.819474+08:00","name":"check_password_hook","name_zh":"check_password_hook","slug":"check_password_hook","summary":"Hook to check passwords in CreateRole() and AlterRole()"}},"Definition":{"Collection":"hook","Key":"check_password_hook","SourceDatabase":"center","Version":"18","SourceTable":"hook","SourceKey":"check_password_hook","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","Facts":{"description":["Hook to check passwords in CreateRole() and AlterRole()"],"facts":[{"label":"Interface type","value":"check_password_hook_type"},{"label":"Header","value":"src/include/commands/user.h"},{"label":"Subsystem","value":"Authentication and connections"},{"label":"Initial value","value":"NULL (no hook installed)"}],"related":[],"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sections":[{"paragraphs":["src/backend/commands/user.c:399","src/backend/commands/user.c:849"],"title":"Call sites"},{"code":"\t}\n\n\t/*\n\t * Call the password checking hook if there is one defined\n\t */\n\tif (check_password_hook \u0026\u0026 password)\n\t\t(*check_password_hook) (stmt-\u003erole,\n\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\tget_password_type(password),\n\t\t\t\t\t\t\t\tvalidUntil_datum,\n\t\t\t\t\t\t\t\tvalidUntil_null);\n\n\t/*\n\t * Build a tuple to insert\n\t */","paragraphs":[],"title":"Core call context: src/backend/commands/user.c:393–407"},{"code":"\t}\n\n\t/*\n\t * Call the password checking hook if there is one defined\n\t */\n\tif (check_password_hook \u0026\u0026 password)\n\t\t(*check_password_hook) (rolename,\n\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\tget_password_type(password),\n\t\t\t\t\t\t\t\tvalidUntil_datum,\n\t\t\t\t\t\t\t\tvalidUntil_null);\n\n\t/*\n\t * Build an updated tuple, perusing the information just obtained\n\t */","paragraphs":[],"title":"Core call context: src/backend/commands/user.c:843–857"}],"signature":"typedef void (*check_password_hook_type) (const char *username, const char *shadow_pass, PasswordType password_type, Datum validuntil_time, bool validuntil_null);\nextern PGDLLIMPORT check_password_hook_type check_password_hook;","sources":[{"label":"Interface declaration","path":"src/include/commands/user.h","sha256":"07915b0338269813ec0931d1403f3b4d9e837d789aeeef73125dee3f6d197eaa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/commands/user.h#L25"},{"label":"Core definition","path":"src/backend/commands/user.c","sha256":"53455e7697c69d5fcb687fcc223e11d827b9f8c3d71f8072a67a08189ae610fa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/user.c#L91"},{"label":"Call sites","path":"src/backend/commands/user.c","sha256":"53455e7697c69d5fcb687fcc223e11d827b9f8c3d71f8072a67a08189ae610fa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/user.c#L399"}]},"ManualEvidence":{"release":{"channel":"stable","label":"18","major":"18","ref":"REL_18_STABLE","revision":"753057e340da8f22e57c9a409ea7a235fd6a46bd"},"sources":[{"label":"Interface declaration","path":"src/include/commands/user.h","sha256":"07915b0338269813ec0931d1403f3b4d9e837d789aeeef73125dee3f6d197eaa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/include/commands/user.h#L25"},{"label":"Core definition","path":"src/backend/commands/user.c","sha256":"53455e7697c69d5fcb687fcc223e11d827b9f8c3d71f8072a67a08189ae610fa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/user.c#L91"},{"label":"Call sites","path":"src/backend/commands/user.c","sha256":"53455e7697c69d5fcb687fcc223e11d827b9f8c3d71f8072a67a08189ae610fa","url":"https://github.com/postgres/postgres/blob/753057e340da8f22e57c9a409ea7a235fd6a46bd/src/backend/commands/user.c#L399"}]},"MeasuredEvidence":{}},"Text":{"Collection":"hook","Key":"check_password_hook","SourceDatabase":"center","Version":"18","Locale":"en","Title":"check_password_hook","Summary":"Hook to check passwords in CreateRole() and AlterRole()","BodyHTML":"\u003cp\u003eHook to check passwords in CreateRole() and AlterRole()\u003c/p\u003e","SourceRevision":"753057e340da8f22e57c9a409ea7a235fd6a46bd","ContentHash":"87c1f7f3b340c49f5dc47cf15e569a31da7170b3ec461ceaeda3910978b12ec0","Payload":{"description":["Hook to check passwords in CreateRole() and AlterRole()"],"related":[],"sections":[{"paragraphs":["src/backend/commands/user.c:399","src/backend/commands/user.c:849"],"title":"Call sites"},{"code":"\t}\n\n\t/*\n\t * Call the password checking hook if there is one defined\n\t */\n\tif (check_password_hook \u0026\u0026 password)\n\t\t(*check_password_hook) (stmt-\u003erole,\n\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\tget_password_type(password),\n\t\t\t\t\t\t\t\tvalidUntil_datum,\n\t\t\t\t\t\t\t\tvalidUntil_null);\n\n\t/*\n\t * Build a tuple to insert\n\t */","paragraphs":[],"title":"Core call context: src/backend/commands/user.c:393–407"},{"code":"\t}\n\n\t/*\n\t * Call the password checking hook if there is one defined\n\t */\n\tif (check_password_hook \u0026\u0026 password)\n\t\t(*check_password_hook) (rolename,\n\t\t\t\t\t\t\t\tpassword,\n\t\t\t\t\t\t\t\tget_password_type(password),\n\t\t\t\t\t\t\t\tvalidUntil_datum,\n\t\t\t\t\t\t\t\tvalidUntil_null);\n\n\t/*\n\t * Build an updated tuple, perusing the information just obtained\n\t */","paragraphs":[],"title":"Core call context: src/backend/commands/user.c:843–857"}]}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
