{
    "content": [
        {
            "type": "text",
            "text": "# PAM_END (info)\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\nfunction an application should call in the PAM context. Upon return the\nhandle pamh is no longer valid and all memory associated with it will\nbe 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": "info",
        "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": 23,
                "subsections": []
            },
            {
                "name": "RETURN VALUES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "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\nfunction an application should call in the PAM context. Upon return the\nhandle pamh is no longer valid and all memory associated with it will\nbe invalid.\n\nThe pamstatus argument should be set to the value returned to the\napplication by the last PAM library call.\n\nThe value taken by pamstatus is used as an argument to the module\nspecific callback function, cleanup() (See pamsetdata(3) and\npamgetdata(3)). In this way the module can be given notification of\nthe pass/fail nature of the tear-down process, and perform any last\nminute tasks that are appropriate to the module before it is unlinked.\nThis argument can be logically OR'd with PAMDATASILENT to indicate to\nindicate that the module should not treat the call too seriously. It is\ngenerally used to indicate that the current closing of the library is\nin a fork(2)ed process, and that the parent will take care of cleaning\nup things that exist outside of the current process space (files etc.).\n\nThis function free's all memory for items associated with the\npamsetitem(3) and pamgetitem(3) functions. Pointers associated with\nsuch objects are not valid anymore after pamend 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\nhandle or the function was called by a module.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pamgetdata(3), pamsetdata(3), pamstart(3), pamstrerror(3)\n\nLinux-PAM Manual                  06/08/2020                        PAMEND(3)",
                "subsections": []
            }
        }
    }
}