summaryrefslogtreecommitdiff
path: root/source4/auth/credentials/credentials.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 23:33:09 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:50 +0100
commit5b357ca8774d97e85153151552bc052cfaf26c1b (patch)
treef5ee90b480ce2a3511e1760e3eb5b003deb9ef2a /source4/auth/credentials/credentials.c
parent0184e5ef2d4ebd19e1617ca8daaf2102b8e5a9f0 (diff)
downloadsamba-5b357ca8774d97e85153151552bc052cfaf26c1b.tar.gz
samba-5b357ca8774d97e85153151552bc052cfaf26c1b.tar.bz2
samba-5b357ca8774d97e85153151552bc052cfaf26c1b.zip
r26270: Require specifying the loadparm_context or NULL to cli_credentials_guess().
(This used to be commit e52710d6794a25ba697f8c26b43784226964f9cb)
Diffstat (limited to 'source4/auth/credentials/credentials.c')
-rw-r--r--source4/auth/credentials/credentials.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c
index 0c5f5b0f3b..1889731781 100644
--- a/source4/auth/credentials/credentials.c
+++ b/source4/auth/credentials/credentials.c
@@ -635,11 +635,14 @@ void cli_credentials_set_conf(struct cli_credentials *cred,
*
* @param cred Credentials structure to fill in
*/
-void cli_credentials_guess(struct cli_credentials *cred)
+void cli_credentials_guess(struct cli_credentials *cred,
+ struct loadparm_context *lp_ctx)
{
char *p;
- cli_credentials_set_conf(cred, global_loadparm);
+ if (lp_ctx != NULL) {
+ cli_credentials_set_conf(cred, global_loadparm);
+ }
if (getenv("LOGNAME")) {
cli_credentials_set_username(cred, getenv("LOGNAME"), CRED_GUESS_ENV);