diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2012-12-22 22:38:26 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2012-12-22 22:38:26 +0100 |
commit | c7bb19c55c7a902e25bdd33b0d49a2ddcf62e07a (patch) | |
tree | b3a75ef2719bc2f334041460fd21fbdf86a23a82 /nslcd/myldap.h | |
parent | d336cd6b429f8ce40c58ea287f79bbc7c23d0966 (diff) |
update C coding style to a more commonly used style
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/myldap.h')
-rw-r--r-- | nslcd/myldap.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/nslcd/myldap.h b/nslcd/myldap.h index f118f72..627b236 100644 --- a/nslcd/myldap.h +++ b/nslcd/myldap.h @@ -2,7 +2,7 @@ myldap.h - simple interface to do LDAP requests This file is part of the nss-pam-ldapd library. - Copyright (C) 2007, 2008, 2009, 2010, 2011 Arthur de Jong + Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 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 @@ -69,7 +69,7 @@ typedef struct myldap_entry MYLDAP_ENTRY; MUST_USE MYLDAP_SESSION *myldap_create_session(void); /* Set alternative credentials for the session. */ -void myldap_set_credentials(MYLDAP_SESSION *session,const char *dn, +void myldap_set_credentials(MYLDAP_SESSION *session, const char *dn, const char *password); /* Closes all pending searches and deallocates any memory that is allocated @@ -89,10 +89,10 @@ void myldap_session_close(MYLDAP_SESSION *session); error). This function uses paging, and does reconnects to the configured URLs transparently. The function returns an LDAP status code in the location pointed to by rcp if it is non-NULL. */ -MUST_USE MYLDAP_SEARCH *myldap_search( - MYLDAP_SESSION *session, - const char *base,int scope,const char *filter,const char **attrs, - int *rcp); +MUST_USE MYLDAP_SEARCH *myldap_search(MYLDAP_SESSION *session, + const char *base, int scope, + const char *filter, const char **attrs, + int *rcp); /* Close the specified search. This frees all the memory that was allocated for the search and its results. */ @@ -104,51 +104,51 @@ void myldap_search_close(MYLDAP_SEARCH *search); freed with this call. The search is autoamtically closed when no more results are available. The function returns an LDAP status code in the location pointed to by rcp if it is non-NULL. */ -MUST_USE MYLDAP_ENTRY *myldap_get_entry(MYLDAP_SEARCH *search,int *rcp); +MUST_USE MYLDAP_ENTRY *myldap_get_entry(MYLDAP_SEARCH *search, int *rcp); /* Get the DN from the entry. This function does not return NULL (on error "unknown" is returned). */ MUST_USE const char *myldap_get_dn(MYLDAP_ENTRY *entry); /* Just like myldap_get_dn() but copies the result into the buffer. */ -char *myldap_cpy_dn(MYLDAP_ENTRY *entry,char *buf,size_t buflen); +char *myldap_cpy_dn(MYLDAP_ENTRY *entry, char *buf, size_t buflen); /* Get the attribute values from a certain entry as a NULL terminated list. May return NULL or an empty array. */ -MUST_USE const char **myldap_get_values(MYLDAP_ENTRY *entry,const char *attr); +MUST_USE const char **myldap_get_values(MYLDAP_ENTRY *entry, const char *attr); /* Get the attribute values from a certain entry as a NULL terminated list. May return NULL or an empty array. */ -MUST_USE const char **myldap_get_values_len(MYLDAP_ENTRY *entry,const char *attr); +MUST_USE const char **myldap_get_values_len(MYLDAP_ENTRY *entry, const char *attr); /* Checks to see if the entry has the specified object class. */ -MUST_USE int myldap_has_objectclass(MYLDAP_ENTRY *entry,const char *objectclass); +MUST_USE int myldap_has_objectclass(MYLDAP_ENTRY *entry, const char *objectclass); /* Get the RDN's value: eg. if the DN was cn=lukeh, ou=People, dc=example, - dc=com getrdnvalue(entry,cn) would return lukeh. If the attribute was not + dc=com getrdnvalue(entry, cn) would return lukeh. If the attribute was not found in the DN or if some error occurs NULL is returned. This method may be used to get the "most authorative" value for an attribute. */ -MUST_USE const char *myldap_get_rdn_value(MYLDAP_ENTRY *entry,const char *attr); +MUST_USE const char *myldap_get_rdn_value(MYLDAP_ENTRY *entry, const char *attr); /* Just like myldap_get_rdn_value() but use the supplied character sequence and copies the result into the buffer. Returns a pointer to the start of the string on success and NULL on failure. */ -MUST_USE const char *myldap_cpy_rdn_value(const char *dn,const char *attr, - char *buf,size_t buflen); +MUST_USE const char *myldap_cpy_rdn_value(const char *dn, const char *attr, + char *buf, size_t buflen); /* Escapes characters in a string for use in a search filter. */ -MUST_USE int myldap_escape(const char *src,char *buffer,size_t buflen); +MUST_USE int myldap_escape(const char *src, char *buffer, size_t buflen); /* Set the debug level globally. Returns an LDAP status code. */ int myldap_set_debuglevel(int level); /* Perform an EXOP password modification call. Returns an LDAP status code. */ -int myldap_passwd( - MYLDAP_SESSION *session, - const char *userdn,const char *oldpassword,const char *newpasswd); +int myldap_passwd(MYLDAP_SESSION *session, + const char *userdn, const char *oldpassword, + const char *newpasswd); /* Perform an LDAP modification request. Returns an LDAP status code. */ -int myldap_modify(MYLDAP_SESSION *session,const char *dn,LDAPMod *mods[]); +int myldap_modify(MYLDAP_SESSION *session, const char *dn, LDAPMod * mods[]); #endif /* not NSLCD__MYLDAP_H */ |