Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301 USA
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/** \example ldbreader.c
*/
-#include "ldb_includes.h"
#include "ldb.h"
-#include "ldb_errors.h"
/*
ldb_ldif_write takes a function pointer to a custom output
Note that you can use the context structure as a parent
for talloc allocations as well
*/
- ldb = ldb_init(NULL);
+ ldb = ldb_init(NULL, NULL);
/*
We now open the database. In this example we just hard code the connection path.
quite fine grained results with the LDAP search syntax, however it is a bit
confusing to start with. See RFC2254.
*/
- if (LDB_SUCCESS != ldb_search(ldb, NULL, LDB_SCOPE_DEFAULT,
- expression, NULL, &resultMsg) ) {
+ if (LDB_SUCCESS != ldb_search(ldb, ldb, &resultMsg,
+ NULL, LDB_SCOPE_DEFAULT, NULL,
+ "%s", expression)) {
printf("Problem in search\n");
exit(-1);
}