diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2014-05-04 13:01:09 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2014-05-04 13:28:00 +0200 |
commit | 15fc13ce31cd6455d7c64089425da795da5d51d2 (patch) | |
tree | 1fbb0f99f89a9b05e012c66527e9892b47fbf93f /nslcd/usermod.c | |
parent | f9878913604c197a214b78f26782efd245237dda (diff) |
Warn when binddn buffer is too small
Diffstat (limited to 'nslcd/usermod.c')
-rw-r--r-- | nslcd/usermod.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) || |