|
|
| version 1.1, 2012/02/21 23:32:47 | version 1.1.1.2, 2013/07/22 08:44:29 |
|---|---|
| Line 65 | Line 65 |
| { 1, 's', "syslog-ident", "ident", | { 1, 's', "syslog-ident", "ident", |
| "Identifier to use for syslog" }, | "Identifier to use for syslog" }, |
| #endif | #endif |
| #ifdef USE_PAM | |
| { 1, 'm', "pam-service", "service", | |
| "PAM service name" }, | |
| #endif | |
| { 0, 'v', "version", "", | { 0, 'v', "version", "", |
| "Show version information" }, | "Show version information" }, |
| { 0, 'h', "help", "", | { 0, 'h', "help", "", |
| Line 116 | Line 120 |
| struct acl *acl_filters[ACL_FILTERS]; /* mpd's global internal bpf filters */ | struct acl *acl_filters[ACL_FILTERS]; /* mpd's global internal bpf filters */ |
| #endif | #endif |
| #ifdef USE_PAM | |
| char gPamService[32]; | |
| #endif | |
| struct globalconf gGlobalConf; | struct globalconf gGlobalConf; |
| pthread_mutex_t gGiantMutex; | pthread_mutex_t gGiantMutex; |
| Line 202 main(int ac, char *av[]) | Line 210 main(int ac, char *av[]) |
| RadsrvInit(&gRadsrv); | RadsrvInit(&gRadsrv); |
| #endif | #endif |
| #ifdef USE_PAM | |
| if (!*gPamService) | |
| strcpy(gPamService, "mpd"); | |
| #endif | |
| /* Set up libnetgraph logging */ | /* Set up libnetgraph logging */ |
| NgSetErrLog(NgFuncErr, NgFuncErrx); | NgSetErrLog(NgFuncErr, NgFuncErrx); |
| Line 590 OptApply(Option opt, int ac, char *av[]) | Line 604 OptApply(Option opt, int ac, char *av[]) |
| #ifdef SYSLOG_FACILITY | #ifdef SYSLOG_FACILITY |
| memset(gSysLogIdent, 0, sizeof(gSysLogIdent)); | memset(gSysLogIdent, 0, sizeof(gSysLogIdent)); |
| #endif | #endif |
| #ifdef USE_PAM | |
| memset(gPamService, 0, sizeof(gPamService)); | |
| #endif | |
| if (opt == NULL) | if (opt == NULL) |
| Usage(EX_USAGE); | Usage(EX_USAGE); |
| Line 617 OptApply(Option opt, int ac, char *av[]) | Line 634 OptApply(Option opt, int ac, char *av[]) |
| #ifdef SYSLOG_FACILITY | #ifdef SYSLOG_FACILITY |
| case 's': | case 's': |
| strlcpy(gSysLogIdent, *av, sizeof(gSysLogIdent)); | strlcpy(gSysLogIdent, *av, sizeof(gSysLogIdent)); |
| return(1); | |
| #endif | |
| #ifdef USE_PAM | |
| case 'm': | |
| strlcpy(gPamService, *av, sizeof(gPamService)); | |
| return(1); | return(1); |
| #endif | #endif |
| case 'v': | case 'v': |