From: Hasso Tepper Date: Fri, 2 Jan 2009 22:48:31 +0000 (+0200) Subject: Temporary hack out reentrant user database functions. X-Git-Tag: v2.3.0~139 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/75ce8d9fc3ccabbd5bd15bcf79ab1e7da8a5b4cb Temporary hack out reentrant user database functions. Bringing in reentrant user database functions caused major issues with pkgsrc and there is no time to fix these (2008Q4 is released really soon now). Also there seem to be some missing pieces to conform SUSv3. The hack will be reverted after 2.2 release. The patch by pavalos@, requested by me. --- diff --git a/include/grp.h b/include/grp.h index e6feac5e7a..be76f6fb21 100644 --- a/include/grp.h +++ b/include/grp.h @@ -74,13 +74,16 @@ const char *group_from_gid(gid_t, int); #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); +#if 0 int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); #endif +#endif + #if __BSD_VISIBLE -int getgrent_r(struct group *, char *, size_t, struct group **); +/* int getgrent_r(struct group *, char *, size_t, struct group **); */ int setgroupent(int); #endif __END_DECLS diff --git a/include/pwd.h b/include/pwd.h index 148b8b8e6f..bee63ad79c 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -148,14 +148,16 @@ struct passwd *getpwuid(uid_t); void endpwent(void); struct passwd *getpwent(void); void setpwent(void); +#if 0 int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **); int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); #endif +#endif #if __BSD_VISIBLE -int getpwent_r(struct passwd *, char *, size_t, struct passwd **); +/* int getpwent_r(struct passwd *, char *, size_t, struct passwd **); */ int setpassent(int); const char *user_from_uid(uid_t, int); #endif diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index b410bc1e57..de4986056d 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -37,6 +37,11 @@ SRCS+= _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \ ualarm.c ucontext.c ulimit.c uname.c unvis.c usleep.c utime.c \ valloc.c vis.c wait.c wait3.c waitpid.c wordexp.c +# Temporary hack to hide these symbols until we get a full implementation. +CFLAGS+= -Dgetgrent_r=GETGRENT_R -Dgetgrnam_r=GETGRNAM_R \ + -Dgetgrgid_r=GETGRGID_R -Dgetpwent_r=GETPWENT_R \ + -Dgetpwnam_r=GETPWNAM_R -Dgetpwuid_r=GETPWUID_R + .if ${LIB} != {c_rtld} SRCS+= tls.c .endif