Projects

Ticket #16: patch-APICommonCode_QTAccessFile_cpp

File patch-APICommonCode_QTAccessFile_cpp, 0.8 KB (added by jason@…, 4 years ago)
Line 
1$OpenBSD$
2--- APICommonCode/QTAccessFile.cpp.orig Sat Jun  7 21:43:02 2008
3+++ APICommonCode/QTAccessFile.cpp      Sat Jun  7 21:45:18 2008
4@@ -46,7 +46,9 @@
5 
6 
7 #include <grp.h>
8+#ifdef __MacOSX__
9 #include <membership.h>
10+#endif
11 #include <pwd.h>
12 #include <signal.h>
13 #include <unistd.h>
14@@ -612,7 +614,8 @@ if (DEBUG_QTACCESS)
15 
16 
17 bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName)
18-{   
19+{
20+#ifdef __MacOSX__
21        // In Tiger, group membership is painfully simple: we ask memberd for it!
22        struct passwd   *user           = NULL;
23        struct group    *group          = NULL;
24@@ -641,6 +644,9 @@ bool DSAccessFile::CheckGroupMembership(const char* in
25        if ( mbr_check_membership(userID, groupID, &isMember) )
26                return false;
27        return (bool)isMember;
28+#else
29+       return true;
30+#endif
31 }
32 
33 Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr)