changeset 11329:3ee6b83c1689 HEAD

str_to_gid(): Allow negative GIDs on OS X.
author Timo Sirainen <tss@iki.fi>
date Wed, 19 May 2010 14:59:11 +0200
parents 0877d6920960
children f15b3aac5443
files src/lib/strnum.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/strnum.c	Wed May 19 13:20:06 2010 +0200
+++ b/src/lib/strnum.c	Wed May 19 14:59:11 2010 +0200
@@ -198,8 +198,11 @@
 	if (str_to_uintmax(str, &l) < 0)
 		return -1;
 
+	/* OS X uses negative GIDs */
+#ifndef __APPLE__
 	if (verify_xid(l, sizeof(*num_r)) < 0)
 		return -1;
+#endif
 	*num_r = (gid_t)l;
 	return 0;
 }