* lib/pwio.h: Add protection against multiple inclusions.

* lib/pwio.c: The changed, isopen, locked, and readonly fields of the db are booleans.
This commit is contained in:
nekral-guest 2008-05-26 08:49:44 +00:00
parent caed1add3a
commit 964f68630a
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
* lib/pwio.h: Add protection against multiple inclusions.
* lib/pwio.c: The changed, isopen, locked, and readonly fields
of the db are booleans.
2008-05-26 Nicolas François <nicolas.francois@centraliens.net> 2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
* lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool. * lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool.

View File

@ -102,10 +102,10 @@ static struct commonio_db passwd_db = {
NULL, /* head */ NULL, /* head */
NULL, /* tail */ NULL, /* tail */
NULL, /* cursor */ NULL, /* cursor */
0, /* changed */ false, /* changed */
0, /* isopen */ false, /* isopen */
0, /* locked */ false, /* locked */
0 /* readonly */ false /* readonly */
}; };
int pw_name (const char *filename) int pw_name (const char *filename)

View File

@ -31,6 +31,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/* $Id$ */
#ifndef _PWIO_H
#define _PWIO_H
#include <pwd.h> #include <pwd.h>
extern int pw_close (void); extern int pw_close (void);
extern const struct passwd *pw_locate (const char *); extern const struct passwd *pw_locate (const char *);
@ -45,3 +49,4 @@ extern int pw_unlock (void);
extern int pw_update (const struct passwd *); extern int pw_update (const struct passwd *);
extern int pw_sort (void); extern int pw_sort (void);
#endif