summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-06 23:07:10 +0000
committerJeremy Allison <jra@samba.org>2001-06-06 23:07:10 +0000
commit11b2de50fc0e8bfcd810e8b07a7eb39a5d903621 (patch)
tree958c98c751380e3bacc0de3454c11f23ce3da76d
parente8e07a26eb1365d195c0345ad075ff828517fe53 (diff)
downloadsamba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.tar.gz
samba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.tar.bz2
samba-11b2de50fc0e8bfcd810e8b07a7eb39a5d903621.zip
Added getconf flags for RH7.1 lfs support. Changed while() to a for()
loop in Simo's code (removes much grp = gep->next code). Jeremy. (This used to be commit d0c276c2429fa19cd95ca887654e049593de68d5)
-rwxr-xr-xsource3/configure6
-rw-r--r--source3/configure.in4
-rw-r--r--source3/include/config.h.in6
-rw-r--r--source3/rpc_server/srv_samr_nt.c15
4 files changed, 12 insertions, 19 deletions
diff --git a/source3/configure b/source3/configure
index 5abdd6f16b..ab8868fd8f 100755
--- a/source3/configure
+++ b/source3/configure
@@ -947,7 +947,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -1809,7 +1809,7 @@ fi
echo $ac_n "checking for LFS support""... $ac_c" 1>&6
echo "configure:1811: checking for LFS support" >&5
old_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
if test "$cross_compiling" = yes; then
LINUX_LFS_SUPPORT=cross
else
@@ -1866,7 +1866,7 @@ fi
CPPFLAGS="$old_CPPFLAGS"
if test x$LINUX_LFS_SUPPORT = xyes ; then
- CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
fi
echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
;;
diff --git a/source3/configure.in b/source3/configure.in
index fcf7ec9ab3..109c019f30 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -175,7 +175,7 @@ exit(1);
*linux*)
AC_MSG_CHECKING([for LFS support])
old_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
AC_TRY_RUN([
#include <unistd.h>
#include <sys/utsname.h>
@@ -213,7 +213,7 @@ main() {
], [LINUX_LFS_SUPPORT=yes], [LINUX_LFS_SUPPORT=no], [LINUX_LFS_SUPPORT=cross])
CPPFLAGS="$old_CPPFLAGS"
if test x$LINUX_LFS_SUPPORT = xyes ; then
- CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
+ CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
fi
AC_MSG_RESULT([$LINUX_LFS_SUPPORT])
;;
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 25da15c199..433926eea5 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -796,6 +796,9 @@
/* Define if you have the <nss.h> header file. */
#undef HAVE_NSS_H
+/* Define if you have the <nss_common.h> header file. */
+#undef HAVE_NSS_COMMON_H
+
/* Define if you have the <poll.h> header file. */
#undef HAVE_POLL_H
@@ -999,6 +1002,3 @@
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
-
-/* Define if you have the <nss_common.h> header file. */
-#undef HAVE_NSS_COMMON_H
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 55e20ebd07..010da5c3e5 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -820,16 +820,14 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta
if (grp == NULL)
return NT_STATUS_NO_MEMORY;
- while ((num_entries < max_entries) && (grp != NULL)) {
+ for (; (num_entries < max_entries) && (grp != NULL); grp = grp->next) {
uint32 trid;
if(!get_group_from_gid(grp->gr_gid, &smap)) {
- grp = grp->next;
continue;
}
if (smap.sid_name_use!=SID_NAME_ALIAS) {
- grp = grp->next;
continue;
}
@@ -838,24 +836,21 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta
/* Don't return winbind groups as they are not local! */
if (strchr(smap.nt_name, *sep) != NULL) {
DEBUG(10,("get_group_alias_entries: not returing %s, not local.\n", smap.nt_name ));
- grp = grp->next;
continue;
}
/* Don't return user private groups... */
if (Get_Pwnam(smap.nt_name, False) != 0) {
DEBUG(10,("get_group_alias_entries: not returing %s, clashes with user.\n", smap.nt_name ));
- grp = grp->next;
continue;
}
for( i = 0; i < num_entries; i++)
- if ( (*d_grp)[i].rid == trid ) break;
+ if ( (*d_grp)[i].rid == trid )
+ break;
- if ( i < num_entries ) {
- grp = grp->next;
+ if ( i < num_entries )
continue; /* rid was there, dup! */
- }
/* JRA - added this for large group db enumeration... */
@@ -864,7 +859,6 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta
not very efficient, but hey...
*/
start_idx--;
- grp = grp->next;
continue;
}
@@ -877,7 +871,6 @@ static BOOL get_group_alias_entries(DOMAIN_GRP **d_grp, DOM_SID *sid, uint32 sta
fstrcpy((*d_grp)[num_entries].name, smap.nt_name);
(*d_grp)[num_entries].rid = trid;
num_entries++;
- grp = grp->next;
}
grent_free(glist);