1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
/*
* Copyright (c) 2004-2008 PADL Software Pty Ltd.
* All rights reserved.
* Use is subject to license.
*/
#ifndef _NSS_CACHE_H_
#define _NSS_CACHE_H_ 1
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_NSS_H
#include <nss.h>
#else
#error This system does not appear to support the GNU NSS interface.
#endif
#include <pwd.h>
#include <grp.h>
#define TMP_EXT ".tmp"
struct nss_cache;
typedef struct nss_cache nss_cache_t;
enum nss_status nss_cache_init(const char *filename,
nss_cache_t **store_p);
enum nss_status nss_cache_put(nss_cache_t *store,
const char *key,
const char *value);
enum nss_status nss_cache_putpwent(nss_cache_t *store,
struct passwd *pw);
enum nss_status nss_cache_putgrent(nss_cache_t *store,
struct group *gr);
enum nss_status nss_cache_commit(nss_cache_t *store);
enum nss_status nss_cache_abort(nss_cache_t *store);
enum nss_status nss_cache_close(nss_cache_t **store_p);
#endif /* _NSS_CACHE_H_ */
|