Staging
v0.5.1
https://github.com/python/cpython
Revision eac0939ddd56f60664de9cb85aa32910d7b22c78 authored by R David Murray on 29 March 2012, 11:15:45 UTC, committed by R David Murray on 29 March 2012, 11:15:45 UTC
Unlike the other facilities, we don't use a fallback for AUTHPRIV if it
doesn't exist.  Because it is intended for logging sensitive log messages, it
is better that a program trying to log such messages fail than that it log
them insecurely.

Initial patch by Federico Reghenzani.
1 parent 8c69632
Raw File
Tip revision: eac0939ddd56f60664de9cb85aa32910d7b22c78 authored by R David Murray on 29 March 2012, 11:15:45 UTC
#14416: conditionally add LOG_AUTHPRIV facility and LOG_ODELAY to syslog.
Tip revision: eac0939
dynload_dl.c

/* Support for dynamic loading of extension modules */

#include "dl.h"

#include "Python.h"
#include "importdl.h"


extern char *Py_GetProgramName(void);

const struct filedescr _PyImport_DynLoadFiletab[] = {
    {".o", "rb", C_EXTENSION},
    {0, 0}
};


dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
                                    const char *pathname, FILE *fp)
{
    char funcname[258];

    PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
    return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
back to top