Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #386 - honor log_level option on clients too
Signed-off-by: Howard Chu <hyc@symas.com>
- Loading branch information
Showing
3 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -403,7 +403,7 @@ int sasl_client_new(const char *service, | |
sasl_utils_t *utils; | ||
sasl_getopt_t *getopt; | ||
void *context; | ||
const char *mlist = NULL; | ||
const char *mlist = NULL, *log_level; | ||
int plus = 0; | ||
|
||
if (_sasl_client_active == 0) return SASL_NOTINIT; | ||
|
@@ -445,9 +445,12 @@ int sasl_client_new(const char *service, | |
utils->conn= *pconn; | ||
conn->cparams->utils = utils; | ||
|
||
log_level = NULL; | ||
if(_sasl_getcallback(*pconn, SASL_CB_GETOPT, (sasl_callback_ft *)&getopt, &context) == SASL_OK) { | ||
getopt(context, NULL, "log_level", &log_level, NULL); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
hyc
Author
Contributor
|
||
getopt(context, NULL, "client_mech_list", &mlist, NULL); | ||
} | ||
conn->cparams->log_level = log_level ? atoi(log_level) : SASL_LOG_ERR; | ||
|
||
/* if we have a client_mech_list, create ordered list of | ||
available mechanisms for this conn */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is there an example on how to set this
log_level
option for a client? I tried the usual suspects (ldapwhoami
,smtptest
from cyrus,
sasl-sample-client) but none seemed to have a way to pass sasl config options to the tool. They don't even seem to open the generic
.confsasl configuration file in
/etc/sasl2and other places, where I could set
log_level: 7` for example.