summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbind_nss_linux.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-22 23:27:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:46 -0500
commitcf32220e416f06c077099efc0e2adf41a9568dda (patch)
tree00e82c1b3b366eaafb387cf2ab45303c46b9e799 /source3/nsswitch/winbind_nss_linux.c
parent2da3d6d5aac46cdada7b770a96bd73ae78fc983a (diff)
downloadsamba-cf32220e416f06c077099efc0e2adf41a9568dda.tar.gz
samba-cf32220e416f06c077099efc0e2adf41a9568dda.tar.bz2
samba-cf32220e416f06c077099efc0e2adf41a9568dda.zip
r2540: Fix it the way Henrik Nordstrom (the patch author) wants :-).
Jeremy. (This used to be commit 45707b5700f8a7c422fca2d7c95f9fab50740f35)
Diffstat (limited to 'source3/nsswitch/winbind_nss_linux.c')
-rw-r--r--source3/nsswitch/winbind_nss_linux.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/nsswitch/winbind_nss_linux.c b/source3/nsswitch/winbind_nss_linux.c
index 267631cf2c..0ea5db74da 100644
--- a/source3/nsswitch/winbind_nss_linux.c
+++ b/source3/nsswitch/winbind_nss_linux.c
@@ -23,10 +23,6 @@
#include "winbind_client.h"
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
-
/* Maximum number of users to pass back over the unix domain socket
per call. This is not a static limit on the total number of users
or groups returned in total. */
@@ -852,7 +848,9 @@ _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
if (*size == limit) {
goto done;
}
- newsize = MIN(newsize, limit);
+ if (newsize > limit) {
+ newsize = limit;
+ }
}
newgroups = realloc((*groups), newsize * sizeof(**groups));