From 15fc13ce31cd6455d7c64089425da795da5d51d2 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 4 May 2014 13:01:09 +0200 Subject: Warn when binddn buffer is too small --- nslcd/usermod.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nslcd/usermod.c') diff --git a/nslcd/usermod.c b/nslcd/usermod.c index f7b22c5..e0de4d4 100644 --- a/nslcd/usermod.c +++ b/nslcd/usermod.c @@ -2,7 +2,7 @@ usermod.c - routines for changing user information such as full name, login shell, etc - Copyright (C) 2013 Arthur de Jong + Copyright (C) 2013-2014 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -117,7 +117,8 @@ static MYLDAP_SESSION *get_session(const char *binddn, const char *userdn, return NULL; } /* set up credentials for the session */ - myldap_set_credentials(session, binddn, password); + if (myldap_set_credentials(session, binddn, password)) + return NULL; /* perform search for own object (just to do any kind of search to set up the connection with fail-over) */ if ((lookup_dn2uid(session, userdn, rcp, buffer, sizeof(buffer)) == NULL) || -- cgit v1.2.3