+struct nwrap_ops {
+ struct passwd * (*nw_getpwnam)(struct nwrap_backend *b,
+ const char *name);
+ int (*nw_getpwnam_r)(struct nwrap_backend *b,
+ const char *name, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp);
+ struct passwd * (*nw_getpwuid)(struct nwrap_backend *b,
+ uid_t uid);
+ int (*nw_getpwuid_r)(struct nwrap_backend *b,
+ uid_t uid, struct passwd *pwdst,
+ char *buf, size_t buflen, struct passwd **pwdstp);
+ void (*nw_setpwent)(struct nwrap_backend *b);
+ struct passwd * (*nw_getpwent)(struct nwrap_backend *b);
+ int (*nw_getpwent_r)(struct nwrap_backend *b,
+ struct passwd *pwdst, char *buf,
+ size_t buflen, struct passwd **pwdstp);
+ void (*nw_endpwent)(struct nwrap_backend *b);
+ int (*nw_initgroups)(struct nwrap_backend *b,
+ const char *user, gid_t group);
+ struct group * (*nw_getgrnam)(struct nwrap_backend *b,
+ const char *name);
+ int (*nw_getgrnam_r)(struct nwrap_backend *b,
+ const char *name, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp);
+ struct group * (*nw_getgrgid)(struct nwrap_backend *b,
+ gid_t gid);
+ int (*nw_getgrgid_r)(struct nwrap_backend *b,
+ gid_t gid, struct group *grdst,
+ char *buf, size_t buflen, struct group **grdstp);
+ void (*nw_setgrent)(struct nwrap_backend *b);
+ struct group * (*nw_getgrent)(struct nwrap_backend *b);
+ int (*nw_getgrent_r)(struct nwrap_backend *b,
+ struct group *grdst, char *buf,
+ size_t buflen, struct group **grdstp);
+ void (*nw_endgrent)(struct nwrap_backend *b);
+};
+
+/* protoypes for files backend */
+
+
+static struct passwd *nwrap_files_getpwnam(struct nwrap_backend *b,
+ const char *name);
+static int nwrap_files_getpwnam_r(struct nwrap_backend *b,
+ const char *name, struct passwd *pwdst,