1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

nss_wrapper: prefix function pointer names in struct nwrap_ops.

Guenther
This commit is contained in:
Günther Deschner 2009-06-02 14:52:53 +02:00
parent 68bb2d2e80
commit 011a505800

View File

@ -141,30 +141,30 @@
struct nwrap_ops { struct nwrap_ops {
const char *name; const char *name;
struct passwd * (*getpwnam)(const char *name); struct passwd * (*nw_getpwnam)(const char *name);
int (*getpwnam_r)(const char *name, struct passwd *pwdst, int (*nw_getpwnam_r)(const char *name, struct passwd *pwdst,
char *buf, size_t buflen, struct passwd **pwdstp); char *buf, size_t buflen, struct passwd **pwdstp);
struct passwd * (*getpwuid)(uid_t uid); struct passwd * (*nw_getpwuid)(uid_t uid);
int (*getpwuid_r)(uid_t uid, struct passwd *pwdst, int (*nw_getpwuid_r)(uid_t uid, struct passwd *pwdst,
char *buf, size_t buflen, struct passwd **pwdstp); char *buf, size_t buflen, struct passwd **pwdstp);
void (*setpwent)(void); void (*nw_setpwent)(void);
struct passwd * (*getpwent)(void); struct passwd * (*nw_getpwent)(void);
int (*getpwent_r)(struct passwd *pwdst, char *buf, int (*nw_getpwent_r)(struct passwd *pwdst, char *buf,
size_t buflen, struct passwd **pwdstp); size_t buflen, struct passwd **pwdstp);
void (*endpwent)(void); void (*nw_endpwent)(void);
int (*initgroups)(const char *user, gid_t group); int (*nw_initgroups)(const char *user, gid_t group);
struct group * (*getgrnam)(const char *name); struct group * (*nw_getgrnam)(const char *name);
int (*getgrnam_r)(const char *name, struct group *grdst, int (*nw_getgrnam_r)(const char *name, struct group *grdst,
char *buf, size_t buflen, struct group **grdstp); char *buf, size_t buflen, struct group **grdstp);
struct group * (*getgrgid)(gid_t gid); struct group * (*nw_getgrgid)(gid_t gid);
int (*getgrgid_r)(gid_t gid, struct group *grdst, int (*nw_getgrgid_r)(gid_t gid, struct group *grdst,
char *buf, size_t buflen, struct group **grdstp); char *buf, size_t buflen, struct group **grdstp);
void (*setgrent)(void); void (*nw_setgrent)(void);
struct group * (*getgrent)(void); struct group * (*nw_getgrent)(void);
int (*getgrent_r)(struct group *grdst, char *buf, int (*nw_getgrent_r)(struct group *grdst, char *buf,
size_t buflen, struct group **grdstp); size_t buflen, struct group **grdstp);
void (*endgrent)(void); void (*nw_endgrent)(void);
int (*getgrouplist)(const char *user, gid_t group, gid_t *groups, int *ngroups); int (*nw_getgrouplist)(const char *user, gid_t group, gid_t *groups, int *ngroups);
}; };
static struct passwd *nwrap_files_getpwnam(const char *name); static struct passwd *nwrap_files_getpwnam(const char *name);
@ -194,24 +194,24 @@ static int nwrap_files_getgrouplist(const char *user, gid_t group, gid_t *groups
struct nwrap_ops nwrap_files_ops = { struct nwrap_ops nwrap_files_ops = {
.name = "files", .name = "files",
.getpwnam = nwrap_files_getpwnam, .nw_getpwnam = nwrap_files_getpwnam,
.getpwnam_r = nwrap_files_getpwnam_r, .nw_getpwnam_r = nwrap_files_getpwnam_r,
.getpwuid = nwrap_files_getpwuid, .nw_getpwuid = nwrap_files_getpwuid,
.getpwuid_r = nwrap_files_getpwuid_r, .nw_getpwuid_r = nwrap_files_getpwuid_r,
.setpwent = nwrap_files_setpwent, .nw_setpwent = nwrap_files_setpwent,
.getpwent = nwrap_files_getpwent, .nw_getpwent = nwrap_files_getpwent,
.getpwent_r = nwrap_files_getpwent_r, .nw_getpwent_r = nwrap_files_getpwent_r,
.endpwent = nwrap_files_endpwent, .nw_endpwent = nwrap_files_endpwent,
.initgroups = nwrap_files_initgroups, .nw_initgroups = nwrap_files_initgroups,
.getgrnam = nwrap_files_getgrnam, .nw_getgrnam = nwrap_files_getgrnam,
.getgrnam_r = nwrap_files_getgrnam_r, .nw_getgrnam_r = nwrap_files_getgrnam_r,
.getgrgid = nwrap_files_getgrgid, .nw_getgrgid = nwrap_files_getgrgid,
.getgrgid_r = nwrap_files_getgrgid_r, .nw_getgrgid_r = nwrap_files_getgrgid_r,
.setgrent = nwrap_files_setgrent, .nw_setgrent = nwrap_files_setgrent,
.getgrent = nwrap_files_getgrent, .nw_getgrent = nwrap_files_getgrent,
.getgrent_r = nwrap_files_getgrent_r, .nw_getgrent_r = nwrap_files_getgrent_r,
.endgrent = nwrap_files_endgrent, .nw_endgrent = nwrap_files_endgrent,
.getgrouplist = nwrap_files_getgrouplist .nw_getgrouplist= nwrap_files_getgrouplist
}; };
struct nwrap_main { struct nwrap_main {
@ -1204,7 +1204,7 @@ _PUBLIC_ struct passwd *nwrap_getpwnam(const char *name)
return real_getpwnam(name); return real_getpwnam(name);
} }
return nwrap_main_global->ops->getpwnam(name); return nwrap_main_global->ops->nw_getpwnam(name);
} }
_PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst, _PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
@ -1214,7 +1214,7 @@ _PUBLIC_ int nwrap_getpwnam_r(const char *name, struct passwd *pwdst,
return real_getpwnam_r(name, pwdst, buf, buflen, pwdstp); return real_getpwnam_r(name, pwdst, buf, buflen, pwdstp);
} }
return nwrap_main_global->ops->getpwnam_r(name, pwdst, buf, buflen, pwdstp); return nwrap_main_global->ops->nw_getpwnam_r(name, pwdst, buf, buflen, pwdstp);
} }
_PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid) _PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid)
@ -1223,7 +1223,7 @@ _PUBLIC_ struct passwd *nwrap_getpwuid(uid_t uid)
return real_getpwuid(uid); return real_getpwuid(uid);
} }
return nwrap_main_global->ops->getpwuid(uid); return nwrap_main_global->ops->nw_getpwuid(uid);
} }
_PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst, _PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
@ -1233,7 +1233,7 @@ _PUBLIC_ int nwrap_getpwuid_r(uid_t uid, struct passwd *pwdst,
return real_getpwuid_r(uid, pwdst, buf, buflen, pwdstp); return real_getpwuid_r(uid, pwdst, buf, buflen, pwdstp);
} }
return nwrap_main_global->ops->getpwuid_r(uid, pwdst, buf, buflen, pwdstp); return nwrap_main_global->ops->nw_getpwuid_r(uid, pwdst, buf, buflen, pwdstp);
} }
_PUBLIC_ void nwrap_setpwent(void) _PUBLIC_ void nwrap_setpwent(void)
@ -1243,7 +1243,7 @@ _PUBLIC_ void nwrap_setpwent(void)
return; return;
} }
nwrap_main_global->ops->setpwent(); nwrap_main_global->ops->nw_setpwent();
} }
_PUBLIC_ struct passwd *nwrap_getpwent(void) _PUBLIC_ struct passwd *nwrap_getpwent(void)
@ -1252,7 +1252,7 @@ _PUBLIC_ struct passwd *nwrap_getpwent(void)
return real_getpwent(); return real_getpwent();
} }
return nwrap_main_global->ops->getpwent(); return nwrap_main_global->ops->nw_getpwent();
} }
_PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf, _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
@ -1277,7 +1277,7 @@ _PUBLIC_ int nwrap_getpwent_r(struct passwd *pwdst, char *buf,
#endif #endif
} }
return nwrap_main_global->ops->getpwent_r(pwdst, buf, buflen, pwdstp); return nwrap_main_global->ops->nw_getpwent_r(pwdst, buf, buflen, pwdstp);
} }
_PUBLIC_ void nwrap_endpwent(void) _PUBLIC_ void nwrap_endpwent(void)
@ -1287,7 +1287,7 @@ _PUBLIC_ void nwrap_endpwent(void)
return; return;
} }
nwrap_main_global->ops->endpwent(); nwrap_main_global->ops->nw_endpwent();
} }
_PUBLIC_ int nwrap_initgroups(const char *user, gid_t group) _PUBLIC_ int nwrap_initgroups(const char *user, gid_t group)
@ -1296,7 +1296,7 @@ _PUBLIC_ int nwrap_initgroups(const char *user, gid_t group)
return real_initgroups(user, group); return real_initgroups(user, group);
} }
return nwrap_main_global->ops->initgroups(user, group); return nwrap_main_global->ops->nw_initgroups(user, group);
} }
_PUBLIC_ struct group *nwrap_getgrnam(const char *name) _PUBLIC_ struct group *nwrap_getgrnam(const char *name)
@ -1305,7 +1305,7 @@ _PUBLIC_ struct group *nwrap_getgrnam(const char *name)
return real_getgrnam(name); return real_getgrnam(name);
} }
return nwrap_main_global->ops->getgrnam(name); return nwrap_main_global->ops->nw_getgrnam(name);
} }
_PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst, _PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst,
@ -1315,7 +1315,7 @@ _PUBLIC_ int nwrap_getgrnam_r(const char *name, struct group *grdst,
return real_getgrnam_r(name, grdst, buf, buflen, grdstp); return real_getgrnam_r(name, grdst, buf, buflen, grdstp);
} }
return nwrap_main_global->ops->getgrnam_r(name, grdst, buf, buflen, grdstp); return nwrap_main_global->ops->nw_getgrnam_r(name, grdst, buf, buflen, grdstp);
} }
_PUBLIC_ struct group *nwrap_getgrgid(gid_t gid) _PUBLIC_ struct group *nwrap_getgrgid(gid_t gid)
@ -1324,7 +1324,7 @@ _PUBLIC_ struct group *nwrap_getgrgid(gid_t gid)
return real_getgrgid(gid); return real_getgrgid(gid);
} }
return nwrap_main_global->ops->getgrgid(gid); return nwrap_main_global->ops->nw_getgrgid(gid);
} }
_PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst, _PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
@ -1334,7 +1334,7 @@ _PUBLIC_ int nwrap_getgrgid_r(gid_t gid, struct group *grdst,
return real_getgrgid_r(gid, grdst, buf, buflen, grdstp); return real_getgrgid_r(gid, grdst, buf, buflen, grdstp);
} }
return nwrap_main_global->ops->getgrgid_r(gid, grdst, buf, buflen, grdstp); return nwrap_main_global->ops->nw_getgrgid_r(gid, grdst, buf, buflen, grdstp);
} }
_PUBLIC_ void nwrap_setgrent(void) _PUBLIC_ void nwrap_setgrent(void)
@ -1344,7 +1344,7 @@ _PUBLIC_ void nwrap_setgrent(void)
return; return;
} }
nwrap_main_global->ops->setgrent(); nwrap_main_global->ops->nw_setgrent();
} }
_PUBLIC_ struct group *nwrap_getgrent(void) _PUBLIC_ struct group *nwrap_getgrent(void)
@ -1353,7 +1353,7 @@ _PUBLIC_ struct group *nwrap_getgrent(void)
return real_getgrent(); return real_getgrent();
} }
return nwrap_main_global->ops->getgrent(); return nwrap_main_global->ops->nw_getgrent();
} }
_PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf, _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
@ -1378,7 +1378,7 @@ _PUBLIC_ int nwrap_getgrent_r(struct group *grdst, char *buf,
#endif #endif
} }
return nwrap_main_global->ops->getgrent_r(grdst, buf, buflen, grdstp); return nwrap_main_global->ops->nw_getgrent_r(grdst, buf, buflen, grdstp);
} }
_PUBLIC_ void nwrap_endgrent(void) _PUBLIC_ void nwrap_endgrent(void)
@ -1388,7 +1388,7 @@ _PUBLIC_ void nwrap_endgrent(void)
return; return;
} }
nwrap_main_global->ops->endgrent(); nwrap_main_global->ops->nw_endgrent();
} }
_PUBLIC_ int nwrap_getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups) _PUBLIC_ int nwrap_getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups)
@ -1397,5 +1397,5 @@ _PUBLIC_ int nwrap_getgrouplist(const char *user, gid_t group, gid_t *groups, in
return real_getgrouplist(user, group, groups, ngroups); return real_getgrouplist(user, group, groups, ngroups);
} }
return nwrap_main_global->ops->getgrouplist(user, group, groups, ngroups); return nwrap_main_global->ops->nw_getgrouplist(user, group, groups, ngroups);
} }