diff options
Diffstat (limited to 'nslcd/common.c')
-rw-r--r-- | nslcd/common.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/nslcd/common.c b/nslcd/common.c index 979be82..421e8a5 100644 --- a/nslcd/common.c +++ b/nslcd/common.c @@ -40,7 +40,6 @@ #include "nslcd.h" #include "common.h" #include "log.h" -#include "attmap.h" #include "cfg.h" /* simple wrapper around snptintf() to return non-zero in case @@ -180,27 +179,6 @@ const char *getfqdn(void) return fqdn; } -const char *get_userpassword(MYLDAP_ENTRY *entry, const char *attr, - char *buffer, size_t buflen) -{ - const char *tmpvalue; - /* get the value */ - tmpvalue = attmap_get_value(entry, attr, buffer, buflen); - if (tmpvalue == NULL) - return NULL; - /* go over the entries and return the remainder of the value if it - starts with {crypt} or crypt$ */ - if (strncasecmp(tmpvalue, "{crypt}", 7) == 0) - return tmpvalue + 7; - if (strncasecmp(tmpvalue, "crypt$", 6) == 0) - return tmpvalue + 6; - /* just return the first value completely */ - return tmpvalue; - /* TODO: support more password formats e.g. SMD5 - (which is $1$ but in a different format) - (any code for this is more than welcome) */ -} - /* Checks if the specified name seems to be a valid user or group name. */ int isvalidname(const char *name) { |