diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2006-10-31 12:46:40 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2006-10-31 12:46:40 +0000 |
commit | 74d1870512ff50d5beda37e64762b6e836aa078e (patch) | |
tree | e90011b6f2ec4c6c8f634155e06ee3958234f7ca | |
parent | 73a617eba07e37e29e3c98f2ea76c329424f6c29 (diff) |
make code consistent by adding headers, removing trailing whitespace and proper ifdefs for header files
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@37 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nss/aliases.c | 29 | ||||
-rw-r--r-- | nss/common.c | 26 | ||||
-rw-r--r-- | nss/common.h | 26 | ||||
-rw-r--r-- | nss/exports.h | 27 | ||||
-rw-r--r-- | nss/passwd.c | 4 |
5 files changed, 105 insertions, 7 deletions
diff --git a/nss/aliases.c b/nss/aliases.c index 307b374..6fe0a72 100644 --- a/nss/aliases.c +++ b/nss/aliases.c @@ -1,5 +1,34 @@ +/* + aliases.c - NSS lookup functions for aliases database + + Copyright (C) 2006 West Consulting + Copyright (C) 2006 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA +*/ + +#include "config.h" + +#include <string.h> +#include <nss.h> +#include <errno.h> #include "exports.h" +#include "nslcd-client.h" +#include "common.h" enum nss_status _nss_ldap_getaliasbyname_r(const char *name,struct aliasent *result,char *buffer,size_t buflen,int *errnop) {} diff --git a/nss/common.c b/nss/common.c index 9bf1eb6..c5d0433 100644 --- a/nss/common.c +++ b/nss/common.c @@ -1,7 +1,30 @@ +/* + common.c - common functions for NSS lookups + + Copyright (C) 2006 West Consulting + Copyright (C) 2006 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA +*/ + +#include "config.h" #include <nss.h> -#include "nslcd-client.h" +#include "nslcd.h" #include "common.h" /* translates a nsklcd return code (as defined in nslcd.h) to @@ -16,4 +39,3 @@ enum nss_status nslcd2nss(int code) default: return NSS_STATUS_UNAVAIL; } } - diff --git a/nss/common.h b/nss/common.h index 3129eee..d7be6a7 100644 --- a/nss/common.h +++ b/nss/common.h @@ -1,3 +1,27 @@ +/* + common.h - common functions for NSS lookups + + Copyright (C) 2006 West Consulting + Copyright (C) 2006 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA +*/ + +#ifndef _NSS_COMMON_H +#define _NSS_COMMON_H 1 #include <nss.h> @@ -29,3 +53,5 @@ enum nss_status nslcd2nss(int code); fclose(fp); \ *errnop=ENOENT; \ return nslcd2nss(retv); + +#endif /* not _NSS_COMMON_H */ diff --git a/nss/exports.h b/nss/exports.h index b6f6c48..1bd1484 100644 --- a/nss/exports.h +++ b/nss/exports.h @@ -1,4 +1,24 @@ -/* nss.h -all functions exported by the library */ +/* + exports.h - all functions exported by the NSS library + + Copyright (C) 2006 West Consulting + Copyright (C) 2006 Arthur de Jong + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA +*/ #ifndef _NSS_EXPORTS_H #define _NSS_EXPORTS_H 1 @@ -13,12 +33,11 @@ #include <shadow.h> /* - These are prototypes for functions exported from the ldap nss module. + These are prototypes for functions exported from the ldap NSS module. For more complete definitions of these functions check the GLIBC documentation. - + Other services than those mentioned here are currently not implemented. - Contributions are welcome. */ /* aliases - mail aliases */ diff --git a/nss/passwd.c b/nss/passwd.c index cf118bd..d89fb9b 100644 --- a/nss/passwd.c +++ b/nss/passwd.c @@ -1,5 +1,5 @@ /* - passwd.c - NSS lookup functions for passwd database + passwd.c - NSS lookup functions for passwd database Copyright (C) 2006 West Consulting Copyright (C) 2006 Arthur de Jong @@ -20,6 +20,8 @@ MA 02110-1301 USA */ +#include "config.h" + #include <string.h> #include <nss.h> #include <errno.h> |