From f32b9a15950fd37aed5dae2ccf0a1e60a0fc78ee Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 7 Sep 2007 08:41:44 +0000 Subject: move some of the filter code to the database specific modules to be able to reduce complexity of ldap-nss.c later on git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@375 ef36b2f9-881f-0410-afb5-c4e39611909c --- nslcd/common.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nslcd/common.h') diff --git a/nslcd/common.h b/nslcd/common.h index ccb77be..318c4ef 100644 --- a/nslcd/common.h +++ b/nslcd/common.h @@ -54,6 +54,10 @@ int nss2nslcd(enum nss_status code) log_log(LOG_WARNING,"client supplied argument too large"); \ return -1; +/* a simple wrapper around snprintf, + returns 0 if ok, -1 on error */ +int mysnprintf(char *buffer,size_t buflen,const char *format, ...) + LIKE_PRINTF(3,4); /* these are the different functions that handle the database specific actions, see nslcd.h for the action descriptions */ @@ -88,4 +92,7 @@ int nslcd_service_all(TFILE *fp); int nslcd_shadow_byname(TFILE *fp); int nslcd_shadow_all(TFILE *fp); +int mkfilter_passwd_byname(const char *name, + char *buffer,size_t buflen); + #endif /* not _SERVER_COMMON_H */ -- cgit v1.2.3