From 2f6b9c1ec48a558ca6079044ddb5f1718efc6092 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 4 Jul 2007 19:52:51 +0000 Subject: r23707: - Move the asprintf() call to create the key even in get_conf_item_string() to the later if statement. - Also move the key definition to the later if statement in get_conf_item_string() and get_conf_item_int(). (This used to be commit 3a82ec943a3828b843dd47aaa0e360844d4dfb91) --- source3/nsswitch/pam_winbind.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 836822a8a9..8109eca4b9 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -1491,24 +1491,12 @@ const char *get_conf_item_string(const pam_handle_t *pamh, { int i = 0; const char *parm_opt = NULL; - char *key = NULL; if (!(ctrl & config_flag)) { goto out; } /* let the pam opt take precedence over the pam_winbind.conf option */ - - if (d != NULL) { - - if (!asprintf(&key, "global:%s", item)) { - goto out; - } - - parm_opt = iniparser_getstr(d, key); - SAFE_FREE(key); - } - for ( i=0; i