VirtualBox

Changeset 29060 in vbox


Ignore:
Timestamp:
May 5, 2010 9:14:49 AM (15 years ago)
Author:
vboxsync
Message:

pam: nits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/pam/pam_vbox.c

    r29057 r29060  
    2525
    2626#ifdef _DEBUG
    27  #define PAM_DEBUG
     27# define PAM_DEBUG
    2828#endif
    2929
     
    3434#include <security/pam_appl.h>
    3535#ifdef RT_OS_LINUX
    36 #include <security/_pam_macros.h>
     36# include <security/_pam_macros.h>
    3737#endif
    3838
     
    5353/** For debugging. */
    5454#ifdef _DEBUG
    55  static pam_handle_t *g_pam_handle;
    56  static int g_verbosity = 99;
     55static pam_handle_t *g_pam_handle;
     56static int g_verbosity = 99;
    5757#else
    58  static int g_verbosity = 0;
     58static int g_verbosity = 0;
    5959#endif
    6060
     
    6767{
    6868#ifdef RT_OS_LINUX
    69         openlog("pam_vbox", LOG_PID, LOG_AUTHPRIV);
    70         syslog(LOG_ERR, pszBuf);
    71         closelog();
     69    openlog("pam_vbox", LOG_PID, LOG_AUTHPRIV);
     70    syslog(LOG_ERR, pszBuf);
     71    closelog();
    7272#elif defined(RT_OS_SOLARIS)
    73         syslog(LOG_ERR, "pam_vbox: %s\n", pszBuf);
     73    syslog(LOG_ERR, "pam_vbox: %s\n", pszBuf);
    7474#endif
    7575}
     
    8787    char *buf;
    8888    va_start(va, pszFormat);
    89     /** @todo is this NULL terminated? */
    9089    if (RT_SUCCESS(RTStrAPrintfV(&buf, pszFormat, va)))
    9190    {
     
    106105static void pam_vbox_log(pam_handle_t *h, const char *pszFormat, ...)
    107106{
    108     va_list va;
    109     char *buf;
    110     va_start(va, pszFormat);
    111     /** @todo is this NULL terminated? */
    112     if (RT_SUCCESS(RTStrAPrintfV(&buf, pszFormat, va)))
    113     {
    114         if (g_verbosity)
     107    if (g_verbosity)
     108    {
     109        va_list va;
     110        char *buf;
     111        va_start(va, pszFormat);
     112        if (RT_SUCCESS(RTStrAPrintfV(&buf, pszFormat, va)))
    115113        {
    116114            /* Only do normal logging in debug mode; could contain
     
    119117            /* Log to syslog */
    120118            pam_vbox_writesyslog(buf);
     119            RTStrFree(buf);
    121120        }
    122         RTStrFree(buf);
    123     }
    124     va_end(va);
     121        va_end(va);
     122    }
    125123}
    126124
     
    265263    {
    266264        if (!RTStrICmp(argv[i], "debug"))
    267             g_verbosity=1;
     265            g_verbosity = 1;
    268266        else
    269267            pam_vbox_error(h, "pam_sm_authenticate: unknown command line argument \"%s\"\n", argv[i]);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette