{
    "content": [
        {
            "type": "text",
            "text": "# PAM_END (man)\n\n## NAME\n\npamend - termination of PAM transaction\n\n## SYNOPSIS\n\n#include <security/pamappl.h>\nint pamend(pamhandlet *pamh, int pamstatus);\n\n## DESCRIPTION\n\nThe pamend function terminates the PAM transaction and is the last function an application\nshould call in the PAM context. Upon return the handle pamh is no longer valid and all memory\nassociated with it will be invalid.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **RETURN VALUES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "PAM_END",
        "section": "",
        "mode": "man",
        "summary": "pamend - termination of PAM transaction",
        "synopsis": "#include <security/pamappl.h>\nint pamend(pamhandlet *pamh, int pamstatus);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "pamgetdata",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pamgetdata/3/json"
            },
            {
                "name": "pamsetdata",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pamsetdata/3/json"
            },
            {
                "name": "pamstart",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pamstart/3/json"
            },
            {
                "name": "pamstrerror",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pamstrerror/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pamend - termination of PAM transaction\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "#include <security/pamappl.h>\n\nint pamend(pamhandlet *pamh, int pamstatus);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The pamend function terminates the PAM transaction and is the last function an application\nshould call in the PAM context. Upon return the handle pamh is no longer valid and all memory\nassociated with it will be invalid.\n\nThe pamstatus argument should be set to the value returned to the application by the last\nPAM library call.\n\nThe value taken by pamstatus is used as an argument to the module specific callback\nfunction, cleanup() (See pamsetdata(3) and pamgetdata(3)). In this way the module can be\ngiven notification of the pass/fail nature of the tear-down process, and perform any last\nminute tasks that are appropriate to the module before it is unlinked. This argument can be\nlogically OR'd with PAMDATASILENT to indicate to indicate that the module should not treat\nthe call too seriously. It is generally used to indicate that the current closing of the\nlibrary is in a fork(2)ed process, and that the parent will take care of cleaning up things\nthat exist outside of the current process space (files etc.).\n\nThis function free's all memory for items associated with the pamsetitem(3) and\npamgetitem(3) functions. Pointers associated with such objects are not valid anymore after\npamend was called.\n",
                "subsections": []
            },
            "RETURN VALUES": {
                "content": "PAMSUCCESS\nTransaction was successful terminated.\n\nPAMSYSTEMERR\nSystem error, for example a NULL pointer was submitted as PAM handle or the function was\ncalled by a module.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pamgetdata(3), pamsetdata(3), pamstart(3), pamstrerror(3)\n\n\n\nLinux-PAM Manual                             06/08/2020                                   PAMEND(3)",
                "subsections": []
            }
        }
    }
}