-CHANGES.txt - 2.2b1 - 2016-05-11
+CHANGES.txt - 2.2b1 - 2016-05-13
--------------------------------
CHANGES IN CUPS V2.2b1
+ - The scheduler now uses the getgrouplist function when available
+ (Issue #4611)
- The IPP backend no longer enables compression by default except for
certain raster formats that generally benefit from it
(<rdar://problem/25166952>)
dnl Check for posix_spawn
AC_CHECK_FUNCS(posix_spawn)
+dnl Check for getgrouplist
+AC_CHECK_FUNCS(getgrouplist)
+
dnl See if the tm structure has the tm_gmtoff member...
AC_MSG_CHECKING(for tm_gmtoff member in tm structure)
AC_TRY_COMPILE([#include <time.h>],[struct tm t;
#undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/
done
+for ac_func in getgrouplist
+do :
+ ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist"
+if test "x$ac_cv_func_getgrouplist" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETGROUPLIST 1
+_ACEOF
+
+fi
+done
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff member in tm structure" >&5
$as_echo_n "checking for tm_gmtoff member in tm structure... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/*
* Authorization routines for the CUPS scheduler.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
* Group exists, check it...
*/
+#ifdef HAVE_GETGROUPLIST
+ if (user)
+ {
+ int ngroups, /* Number of groups */
+ groups[2048]; /* Groups that user belongs to */
+
+ ngroups = (int)(sizeof(groups) / sizeof(groups[0]));
+ getgrouplist(username, (int)user->pw_gid, groups, &ngroups);
+
+ for (i = 0; i < ngroups; i ++)
+ if ((int)group->gr_gid == groups[i])
+ return (1);
+ }
+#endif /* HAVE_GETGROUPLIST */
+
for (i = 0; group->gr_mem[i]; i ++)
if (!_cups_strcasecmp(username, group->gr_mem[i]))
return (1);
/* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#undef HAVE_GETGROUPLIST
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/
#endif /* !TARGET_OS_IOS */
+/*
+ * Do we have the getgrouplist() function?
+ */
+
+#define HAVE_GETGROUPLIST 1
+
+
/*
* Do we have OS X 10.4's mbr_XXX functions?
*/